/* Avaiki Tech Academy — site design system.
   Tokens carried over from the ATAC proposal document so print and web match. */

:root {
  --ground: #F3F6F5;
  --surface: #FFFFFF;
  --sunken: #EEF5F4;
  --ink: #132A2F;
  --muted: #566B70;
  --rule: #D3DFDE;
  --rule-strong: #A9BDBD;
  --lagoon: #0E6B70;
  --lagoon-soft: #DDEDEC;
  --indigo: #3B4A94;
  --indigo-soft: #E4E7F4;

  /* the night band — the screensaver's own world, identical in both themes */
  --night: #05090B;
  --night-2: #0A1318;
  --night-ink: #E8F2F1;
  --night-muted: #8FA6A9;
  --night-rule: rgba(232, 242, 241, .16);

  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: 28px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0B1A1E;
    --surface: #10242A;
    --sunken: #0E2126;
    --ink: #E2EDEB;
    --muted: #93A9AB;
    --rule: #22393F;
    --rule-strong: #3A565C;
    --lagoon: #55C2BE;
    --lagoon-soft: #12343A;
    --indigo: #A3AEF0;
    --indigo-soft: #1B2447;
  }
}

:root[data-theme="dark"] {
  --ground: #0B1A1E;
  --surface: #10242A;
  --sunken: #0E2126;
  --ink: #E2EDEB;
  --muted: #93A9AB;
  --rule: #22393F;
  --rule-strong: #3A565C;
  --lagoon: #55C2BE;
  --lagoon-soft: #12343A;
  --indigo: #A3AEF0;
  --indigo-soft: #1B2447;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--lagoon); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--lagoon); outline-offset: 3px; border-radius: 2px;
}
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
h1 { font-family: var(--display); font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.04; letter-spacing: -.01em; }
h2 { font-family: var(--display); font-size: clamp(1.55rem, 3.1vw, 2.2rem); line-height: 1.16; }
h3 { font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.25; }
h4 { font-family: var(--body); font-size: 1.04rem; font-weight: 700; line-height: 1.35; }
p { margin: 0; }
ul { margin: 0; padding-left: 1.15rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.measure { max-width: 64ch; }
.label {
  font-family: var(--body);
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lagoon);
}
.mono { font-family: var(--mono); font-size: .86em; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; }
.gap-s { gap: .55rem; } .gap-m { gap: 1rem; } .gap-l { gap: 1.7rem; }

/* ---------------------------------------------------------- header */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1.2rem;
  padding-block: .75rem; min-height: 60px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 32px; height: 32px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: invert(1); } }
:root[data-theme="dark"] .brand img { filter: invert(1); }
.brand b {
  font-family: var(--mono); font-size: .76rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; line-height: 1.15;
}
.brand b span { display: block; color: var(--muted); font-weight: 400; letter-spacing: .13em; }
.site-nav { display: flex; gap: 1.4rem; align-items: center; }
.site-nav a {
  font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--lagoon); }
@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* ---------------------------------------------------------- night band */
.night {
  background: var(--night);
  color: var(--night-ink);
  position: relative;
  overflow: hidden;
}
.night::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 8%, rgba(85,194,190,.10), transparent 60%),
              radial-gradient(90% 70% at 50% 100%, rgba(59,74,148,.22), transparent 65%);
}
.night .label { color: #6FD3CE; }
.night a { color: #9FD9D5; }

.hero { padding-block: clamp(1.6rem, 4vw, 2.6rem) clamp(2.4rem, 6vw, 3.8rem); }
.hero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1.15rem; text-align: center; }

#tiare { width: min(340px, 64vw); aspect-ratio: 1 / 1; display: block; margin-bottom: -.4rem; }
.tiare-word {
  font-family: var(--mono); font-size: clamp(.62rem, 2.1vw, .88rem);
  letter-spacing: .34em; text-indent: .34em;
  color: var(--night-ink); opacity: 0;
  transition: opacity 1.2s ease;
  white-space: nowrap;
}
.tiare-word.on { opacity: .92; }
@media (prefers-reduced-motion: reduce) { .tiare-word { opacity: .92; transition: none; } }

.hero-lede {
  font-family: var(--display); font-size: clamp(1.3rem, 3.4vw, 2rem);
  line-height: 1.24; max-width: 22ch; color: var(--night-ink);
}
.hero-sub { color: var(--night-muted); max-width: 52ch; font-size: 1.02rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.25rem; border-radius: 999px;
  font-size: .94rem; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #55C2BE; color: #05191B; }
.btn-primary:hover { background: #6FD3CE; }
.btn-ghost { border-color: var(--night-rule); color: var(--night-ink); }
.btn-ghost:hover { background: rgba(232,242,241,.07); }
.btn-solid { background: var(--lagoon); color: var(--surface); }
:root[data-theme="dark"] .btn-solid, :root:not([data-theme="light"]) .btn-solid { color: #05191B; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn-solid { color: #fff; } }

/* ---------------------------------------------------------- sections */
section { padding-block: clamp(2.6rem, 6vw, 4.4rem); }
.sec-head { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.8rem; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* launch strip */
.launch {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--sunken);
}
.launch .wrap {
  display: grid; grid-template-columns: 1fr auto; gap: 1.2rem 2.4rem;
  align-items: center; padding-block: 1.5rem;
}
@media (max-width: 760px) { .launch .wrap { grid-template-columns: 1fr; } }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.stats div { background: var(--ground); padding: 1.2rem 1rem; }
.stats b { display: block; font-family: var(--display); font-size: clamp(1.5rem,3vw,2rem); line-height: 1.1; color: var(--lagoon); }
.stats span { font-size: .84rem; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* pathway */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .stages { grid-template-columns: 1fr; } }
.stage {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 3px; overflow: hidden; display: flex; flex-direction: column;
}
.stage-top { padding: 1.3rem 1.3rem 0; display: flex; align-items: baseline; gap: .7rem; }
.stage-n {
  font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .1em;
  color: var(--surface); background: var(--lagoon); border-radius: 999px;
  padding: .12rem .6rem;
}
:root[data-theme="dark"] .stage-n, :root:not([data-theme="light"]) .stage-n { color: #05191B; }
.stage-gate { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: auto; }
.stage-body { padding: .8rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.stage-body p { color: var(--muted); font-size: .97rem; }
.facts { display: flex; flex-direction: column; gap: .3rem; margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--rule); }
.facts div { display: flex; justify-content: space-between; gap: 1rem; font-size: .87rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

/* map grid */
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1.3rem; }
.map-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 3px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color .18s ease, transform .18s ease;
}
a.map-card:hover { border-color: var(--lagoon); transform: translateY(-2px); }
.map-card figure { margin: 0; aspect-ratio: 16 / 9; background: var(--night); overflow: hidden; }
.map-card figure img { width: 100%; height: 100%; object-fit: cover; }
.map-card .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.map-card .n { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: var(--lagoon); }
.map-card h4 { font-family: var(--display); font-weight: 400; font-size: 1.16rem; }
.map-card .makes { font-size: .9rem; color: var(--muted); margin-top: auto; padding-top: .55rem; }
.map-card .makes b {
  display: block; font-size: .66rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); opacity: .8; margin-bottom: .1rem;
}

/* long map entries (foundations page) */
.map-long { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; background: var(--surface); }
.map-long:nth-child(even) .map-long-fig { order: 2; }
.map-long-fig { margin: 0; background: var(--night); aspect-ratio: 16/10; }
.map-long-fig img { width: 100%; height: 100%; object-fit: cover; }
.map-long-body { padding: clamp(1.3rem, 3vw, 2.1rem); display: flex; flex-direction: column; gap: .8rem; justify-content: center; }
.map-long-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.map-long-head .n { font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .12em; color: var(--lagoon); }
.map-long-head .hrs { margin-left: auto; font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.map-long-body p.covers { color: var(--muted); font-size: .98rem; }
.makes-box { background: var(--lagoon-soft); border-radius: 2px; padding: .7rem .9rem; font-size: .94rem; }
.makes-box b { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lagoon); margin-bottom: .1rem; }
@media (max-width: 820px) {
  .map-long { grid-template-columns: 1fr; }
  .map-long:nth-child(even) .map-long-fig { order: 0; }
}

/* split feature */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.split img { border-radius: 3px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; padding: 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .45rem; }
.card p { font-size: .95rem; color: var(--muted); }

/* options (how a school uses it) */
.opts { display: flex; flex-direction: column; }
.opt { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 1.4rem; padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.opt:last-child { border-bottom: 1px solid var(--rule); }
.opt .tag { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--lagoon); padding-top: .3rem; }
.opt p { color: var(--muted); font-size: .97rem; }
@media (max-width: 620px) { .opt { grid-template-columns: 1fr; gap: .5rem; } .opt .tag { padding-top: 0; } }

/* pull quote */
.pull { border-left: 3px solid var(--lagoon); padding: .1rem 0 .1rem 1.15rem; font-family: var(--display); font-size: clamp(1.1rem, 2.3vw, 1.4rem); line-height: 1.35; }

/* footer */
.site-foot { background: var(--night); color: var(--night-ink); padding-block: 2.8rem 2.2rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-foot h4 { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6FD3CE; margin-bottom: .6rem; }
.site-foot p, .site-foot li { color: var(--night-muted); font-size: .92rem; }
.site-foot ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.site-foot a { color: var(--night-ink); text-decoration: none; }
.site-foot a:hover { color: #9FD9D5; text-decoration: underline; }
.foot-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.foot-brand img { width: 40px; height: 40px; }
.foot-brand b { font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.foot-base { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--night-rule); display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-size: .82rem; color: var(--night-muted); }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } }
