/* LAKAN Technologies Inc. — lakan.app
   Layout: a charter page. A navy masthead carries the crest under an eight-ray Philippine sun;
   below it, white sheets ruled in hairlines, gold used only where the crest uses it. */

@font-face { font-family: "Marcellus"; src: url("fonts/marcellus.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* color: crest navy and crest gold; neutrals lean toward the navy */
  --band: #0e2247;        /* masthead and closing band, both themes */
  --band-deep: #091731;
  --band-ink: #f4efe3;
  --band-muted: #b9c2d6;
  --gold: #d2a54a;        /* gold on navy */
  --paper: #ffffff;
  --sheet: #f5f4f0;
  --ink: #0f1a2e;
  --muted: #4b566b;
  --line: #e2ddd1;
  --gold-ink: #7a5714;    /* gold as text on paper */
  --link: #1b4fa3;
  --plate: #ffffff;       /* app logos always sit on a white plate */
  --live: #1d7a46;
  --dev: #1f4fa8;
  --plan: #8a6418;

  /* type */
  --display: "Marcellus", "Trajan Pro", "Optima", "Palatino Linotype", Georgia, serif;
  --body: "Hanken Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* scale */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --step-4: clamp(2.4rem, 1.5rem + 3.8vw, 4rem);

  --wrap: 72rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --band: #0b1c3d;
    --band-deep: #060f22;
    --paper: #0a1224;
    --sheet: #0e1830;
    --ink: #e8ecf4;
    --muted: #a5afc4;
    --line: #26324f;
    --gold-ink: #e3be6c;
    --link: #93b8ff;
    --live: #63d394;
    --dev: #93b8ff;
    --plan: #e3be6c;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --band: #0b1c3d;
  --band-deep: #060f22;
  --paper: #0a1224;
  --sheet: #0e1830;
  --ink: #e8ecf4;
  --muted: #a5afc4;
  --line: #26324f;
  --gold-ink: #e3be6c;
  --link: #93b8ff;
  --live: #63d394;
  --dev: #93b8ff;
  --plan: #e3be6c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
h1, h2, h3, p, dd, li { overflow-wrap: break-word; }
/* at 200% text, long words and host names must still wrap inside narrow screens */
h1, h2, h3, .label, .section-head p, .app .more { overflow-wrap: anywhere; }
.section-head, .section-head > * { min-width: 0; max-width: 100%; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.8rem;
  background: var(--gold);
  color: var(--band-deep);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Every full-width band holds one .wrap, which carries the side gutter. */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.label {
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

/* ---------- masthead ---------- */

.masthead {
  position: relative;
  overflow: hidden;
  background: var(--band);
  color: var(--band-ink);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
  position: relative;
  z-index: 3;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--band-ink);
  text-decoration: none;
}
.wordmark b { font-weight: 400; color: var(--gold); letter-spacing: 0.12em; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.nav a {
  color: var(--band-muted);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-block: 0.3rem;
}
.nav a:hover { color: var(--band-ink); }
.nav { min-width: 0; }
.nav a { overflow-wrap: anywhere; }

/* language switch: Filipino by default, English on request */
.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(244, 239, 227, 0.28);
  border-radius: 999px;
}
.lang button {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 44px;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--band-muted);
  cursor: pointer;
}
.lang button:hover { color: var(--band-ink); }
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--band-deep); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 2.5rem;
  padding-block: 2.5rem 4rem;
  position: relative;
  z-index: 2;
}

.hero .label { color: var(--gold); }

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin-block: 0.9rem 1.4rem;
}
.hero h1 span { color: var(--gold); }

.hero .lede {
  max-width: 36rem;
  font-size: 1.15rem;
  color: var(--band-muted);
}
.hero .lede strong { color: var(--band-ink); font-weight: 600; }
.hero .vision-support {
  max-width: 36rem;
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
  color: var(--band-ink);
  font-size: 1.05rem;
}

.pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.pillars li + li::before { content: "·"; margin-right: 1.4rem; color: var(--band-muted); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--gold);
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--band-ink);
}
.button.solid { background: var(--gold); color: var(--band-deep); }
.button:hover { background: var(--band-ink); border-color: var(--band-ink); color: var(--band-deep); text-decoration: none; }

.crest {
  position: relative;
  justify-self: center;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

/* The eight-ray sun of the Philippine flag, behind the crest. */
.sun {
  position: absolute;
  inset: -45%;
  pointer-events: none;
  background: repeating-conic-gradient(from -4deg, rgba(210, 165, 74, 0.26) 0deg 8deg, transparent 8deg 45deg);
  -webkit-mask-image: radial-gradient(circle, #000 0 24%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0 24%, transparent 62%);
  animation: rise 1.4s ease-out both;
}

@keyframes rise {
  from { opacity: 0.45; transform: scale(0.94) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}

.crest img {
  position: relative;
  width: 82%;
  max-width: 100%;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
}

/* ---------- sections ---------- */

.band { background: var(--paper); padding-block: 4.5rem; }
.band.alt { background: var(--sheet); }

.section-head {
  display: grid;
  gap: 0.7rem;
  max-width: 44rem;
  margin-bottom: 2.5rem;
}
.section-head h2, .title {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.15;
}
.section-head p { color: var(--muted); max-width: 40rem; }

/* purpose: mission and goal */
.purpose { display: grid; border-top: 1px solid var(--line); }
.purpose .row {
  display: grid;
  grid-template-columns: minmax(10rem, 0.32fr) minmax(0, 1fr);
  gap: 0.6rem 3rem;
  align-items: baseline;
  padding-block: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.purpose .statement {
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1.3;
  max-width: 46rem;
  text-wrap: pretty;
}
.purpose .statement.goal { font-size: var(--step-1); line-height: 1.45; }

/* story */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem 4rem;
  align-items: center;
}
.story .text { display: grid; gap: 1.1rem; max-width: 38rem; }
.story .title { margin-bottom: 0.3rem; }

.creed {
  margin: 0;
  padding: 2.2rem 2.4rem;
  background: var(--band);
  color: var(--band-ink);
  border: 1px solid rgba(210, 165, 74, 0.45);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
}
.creed { min-width: 0; }
.creed blockquote { margin: 0; display: grid; gap: 0.35rem; }
.creed p { font-family: var(--display); font-size: var(--step-2); line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.creed p:last-child { color: var(--gold); margin-top: 0.4rem; }

/* apps */
.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.app {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.app.related { background: transparent; border-style: dashed; }

.app-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.plate {
  width: 4rem;
  height: 4rem;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0.4rem;
  background: var(--plate);
  border: 1px solid #e6e3da;
  border-radius: 10px;
}
.plate img { width: 100%; height: 100%; object-fit: contain; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.status.live { color: var(--live); }
.status.dev { color: var(--dev); }
.status.plan { color: var(--plan); }
.status.plan::before { background: transparent; border: 1.5px solid currentColor; }

.app h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.25; }
.app h3 small { display: block; margin-top: 0.15rem; font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.app p { color: var(--muted); font-size: 0.98rem; }
.app .more { margin-top: auto; font-size: 0.95rem; font-weight: 600; }
.app .more span { color: var(--muted); font-weight: 500; }

.note {
  margin-top: 1.75rem;
  max-width: 44rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* company */
.company {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2.5rem 4rem;
  align-items: start;
}
.facts {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
}
.facts dt, .facts dd { padding-block: 0.85rem; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); font-size: 0.95rem; padding-right: 1.5rem; }
.facts dd { font-weight: 600; overflow-wrap: anywhere; }
.facts .num { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.company .aside { display: grid; gap: 1rem; color: var(--muted); font-size: 0.97rem; }
.company .aside strong { color: var(--ink); }

/* contact */
.closing { background: var(--band); color: var(--band-ink); padding-block: 4.5rem; }
.closing .label { color: var(--gold); }
.closing h2 { font-family: var(--display); font-weight: 400; font-size: var(--step-3); margin-block: 0.7rem 1rem; }
.closing p { max-width: 40rem; color: var(--band-muted); }
.closing .email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}
.closing .email code {
  font-family: var(--mono);
  font-size: clamp(1.05rem, 0.9rem + 1vw, 1.5rem);
  color: var(--band-ink);
  overflow-wrap: anywhere;
}

.foot { background: var(--band-deep); color: var(--band-muted); padding-block: 2rem; font-size: 0.9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.foot .brand { display: flex; align-items: center; gap: 0.9rem; }
.foot .brand img { width: 3rem; height: 3rem; }
.foot .brand p { line-height: 1.4; }
.foot .brand strong { color: var(--band-ink); font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.foot .brand, .foot .brand p { min-width: 0; }
.foot .brand p { overflow-wrap: anywhere; }
.foot a { color: var(--band-muted); }
.foot a:hover { color: var(--band-ink); }

/* privacy notice: kept in the footer, opened by tapping "Privacy" */
.foot .privacy { flex-basis: 100%; scroll-margin-top: 1rem; border-top: 1px solid rgba(244, 239, 227, 0.14); padding-top: 0.6rem; }
.foot .privacy summary {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  color: var(--band-ink); font-weight: 600; cursor: pointer; list-style: none;
}
.foot .privacy summary::-webkit-details-marker { display: none; }
.foot .privacy summary::after { content: "+"; color: var(--gold); font-weight: 700; }
.foot .privacy[open] summary::after { content: "\2013"; }
.foot .privacy-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; max-width: 46rem; padding-block: 0.4rem 0.6rem; line-height: 1.6; }
.foot .privacy-body > *, .foot .privacy-body li { min-width: 0; overflow-wrap: anywhere; }
.foot .privacy-body h2 { font-size: 1.15rem; font-weight: 700; color: var(--band-ink); }
.foot .privacy-body h3 { font-size: 0.95rem; font-weight: 700; color: var(--band-ink); margin-top: 0.4rem; }
.foot .privacy-body ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }

/* ---------- plain pages (privacy) ---------- */

.page { padding-block: 3.5rem 4.5rem; }
.page article { max-width: 42rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.page article > *, .page li { min-width: 0; overflow-wrap: anywhere; }
.page h1 { font-family: var(--display); font-weight: 400; font-size: var(--step-3); }
.page h2 { font-size: var(--step-1); font-weight: 700; margin-top: 1rem; }
.page ul { margin: 0; padding-left: 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
.page .updated { color: var(--muted); font-size: 0.95rem; }

/* ---------- narrow screens ---------- */

@media (max-width: 960px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hero, .story, .company, .purpose .row { grid-template-columns: minmax(0, 1fr); }
  .purpose .row { padding-block: 1.8rem; }
  .hero { padding-block: 1.5rem 3rem; gap: 1.5rem; }
  .crest { width: min(100%, 240px); order: -1; }
  .band, .closing { padding-block: 3.25rem; }
}

@media (max-width: 560px) {
  .apps { grid-template-columns: minmax(0, 1fr); }
  .creed { padding: 1.8rem 1.6rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
  .facts dd { padding-top: 0.2rem; }
  .pillars li + li::before { content: none; }
  .pillars { gap: 0.4rem 1.1rem; }
}

/* not-found page (404.html) */
.notfound {
  min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 0.9rem;
  padding: 3rem var(--gutter-r) 3rem var(--gutter-l); text-align: center; background: var(--band-deep); color: var(--band-muted);
}
.notfound h1 { font-family: var(--display); font-weight: 400; font-size: var(--step-3, 2rem); color: var(--band-ink); overflow-wrap: anywhere; }
.notfound p { margin: 0; overflow-wrap: anywhere; }
.notfound a:not(.button) { color: var(--band-muted); }
