/* ==========================================================
   nawa home — base: tokens, type, buttons, nav, footer
   Dark, restrained system: navy-purple everywhere, hairlines,
   near-white headlines, lavender-gray body, lime used sparingly.
   ========================================================== */

:root {
  color-scheme: dark;

  /* Surfaces */
  --navy: #070030;
  --bg: var(--navy);
  --panel: #0e0940;
  --panel-2: #151049;
  --panel-3: #1d1757;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --hover: rgba(255, 255, 255, 0.04);

  /* Text contrast on navy (and over the faint glows): ≥15:1 · ≥6:1 · ≥4.7:1 */
  --text: #f4f3fa;
  --text-2: #9c98b8;
  --text-3: #908cab;

  /* Accent: lime, filled shapes and thin accents on navy only */
  --lime: #d1ee2b;
  --lime-hover: #dcf35a;
  --on-lime: #070030;

  /* Status dots */
  --dot-review: #a8a2ff;
  --dot-draft: #8a86a6;

  /* Type */
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-hero: clamp(2.5rem, 1.35rem + 4.6vw, 4.5rem);
  --text-statement: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  --text-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --track-tight: -0.03em;

  /* Space & shape */
  --gutter: 16px;
  --container: 1240px;

  /* Spacing: one 8px scale. Every layout margin, gap and padding on both pages
     uses these steps (directly, or through the roles below). */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 56px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-14: 112px;

  /* Roles: phone values here, stepped up at 768px and 1024px below */
  --section-space: var(--space-8);  /* every section's top and bottom: 64 / 80 / 112 */
  --head-gap: var(--space-4);       /* a section's heading block → its content: 32 / 40 / 48 */
  --head-stack: var(--space-2);     /* title → subtext inside a heading block: 16 / 24 / 24 */
  --grid-gap: var(--space-2);       /* between cards in a grid or row: 16 / 24 / 24 */
  --card-pad: var(--space-3);       /* inside a card: 24 / 32 / 32 */
  --panel-pad: var(--space-3);      /* around a product mock in its frame: 24 / 32 / 48 */
  --split-gap: var(--space-5);      /* between the two columns of a split layout: 40 / 40 / 64 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-float: 0 24px 60px -12px rgba(2, 0, 20, 0.7), 0 0 0 1px var(--line-2);

  /* Motion: settles, never bounces */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 160ms;
  --dur: 380ms;
  --dur-slow: 800ms;

  --header-h: 56px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section-space: var(--space-10);
    --head-gap: var(--space-5);
    --head-stack: var(--space-3);
    --grid-gap: var(--space-3);
    --card-pad: var(--space-4);
    --panel-pad: var(--space-4);
  }
}
@media (min-width: 1024px) {
  :root {
    --section-space: var(--space-14);
    --head-gap: var(--space-6);
    --panel-pad: var(--space-6);
    --split-gap: var(--space-8);
  }
}
@media (min-width: 1280px) { :root { --gutter: 40px; } }

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-2));
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
h1, h2, h3 { color: var(--text); }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(168, 162, 255, 0.35); color: var(--text); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 600;
  border-radius: 999px;
}
.skip-link:focus { top: 12px; }

/* ---------- Mono labels & section status tags ---------- */
.mono,
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow--muted { color: var(--text-3); }

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.status-tag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-draft);
  transition: background-color var(--dur) var(--ease);
}
.status-tag--review .status-tag__dot { background: var(--dot-review); }
.status-tag--approved {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
}
.status-tag--approved .status-tag__dot { background: var(--on-lime); }

/* ---------- Headings ---------- */
.section-title {
  font-size: var(--text-statement);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
.section-sub {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 36rem;
  text-wrap: pretty;
}

/* Two-tone statement: first sentence near-white, the rest gray */
.statement {
  max-width: 20em;
  font-size: var(--text-statement);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: var(--track-tight);
  text-wrap: pretty;
}
.statement__lead { color: var(--text); }
.statement__rest { color: var(--text-2); }
#features-title .statement__lead,
#features-title .statement__rest { display: block; }

/* ---------- Buttons: small, quiet pills ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.btn:active,
.btn.is-pressed { transform: scale(0.97); }
.btn--sm { --btn-h: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn--xs { --btn-h: 32px; padding: 0 12px; font-size: 0.875rem; gap: 6px; }

.btn--primary { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.btn--primary:hover { background: var(--lime-hover); border-color: var(--lime-hover); }

.btn--secondary { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn--secondary:hover { background: var(--hover); border-color: rgba(255, 255, 255, 0.28); }
.btn--secondary[aria-pressed="true"] { background: rgba(255, 255, 255, 0.08); }

.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--hover); color: var(--text); }

.btn:disabled { cursor: default; opacity: 0.4; }
.btn:disabled:hover { background: transparent; }

.btn__check { width: 14px; height: 14px; display: none; }
.btn.is-done .btn__check { display: block; }
.btn.is-done[aria-disabled="true"] { cursor: default; }
.btn.is-done[aria-disabled="true"]:hover { background: var(--lime); }

/* Thin lime underline accent (hero) */
.ul {
  position: relative;
  white-space: nowrap;
}
.ul::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.12em;
  bottom: 0.02em;
  height: max(3px, 0.06em);
  border-radius: 2px;
  background: var(--lime);
  transform-origin: 0 50%;
  animation: underline-in 900ms var(--ease) 500ms both;
}
@keyframes underline-in { from { transform: scaleX(0); } }

/* ==========================================================
   Top navigation
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 0, 48, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}
.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
/* The nawa bulb beside the header wordmark (images/nawa-mark.webp: all white; images/nawa-mark-ink.webp: all navy) */
.wordmark:has(.wordmark__mark) { display: inline-flex; align-items: center; gap: 8px; }
.wordmark__mark { display: block; width: auto; height: 28px; flex: none; }
/* Light headers (the Students and Businesses light heroes) use the navy mark */
.wordmark__mark--ink { display: none; }
html.js.biz-page:not(.biz-dark) .site-header .wordmark__mark { display: none; }
html.js.biz-page:not(.biz-dark) .site-header .wordmark__mark--ink { display: block; }
.wordmark--lg { font-size: clamp(3rem, 2rem + 4vw, 5.5rem); font-weight: 600; letter-spacing: -0.05em; }

.nav__panel {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 16px;
}
.nav__links { flex: 1; }
.nav__links > ul { display: flex; align-items: center; gap: 2px; }
.nav__links a,
.nav__menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.nav__links a:hover,
.nav__menu-btn:hover,
.nav__menu-btn[aria-expanded="true"] { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__caret { width: 12px; height: 12px; transition: transform var(--dur-fast) var(--ease); }
.nav__menu-btn[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

.nav__menu { position: relative; }
.nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
}
.nav__menu.is-open .nav__dropdown { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav__dropdown a { display: flex; width: 100%; color: var(--text-2); }
.nav__dropdown a:hover { background: var(--hover); color: var(--text); }

.nav__actions { display: flex; align-items: center; gap: 6px; }
.nav__signin {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--dur-fast) var(--ease);
}
.nav__signin:hover { color: var(--text); }
.nav__actions .btn,
.nav__mobile-bar .btn { --btn-h: 32px; padding: 0 14px; font-size: 0.875rem; }

.nav__mobile-bar { display: none; margin-left: auto; align-items: center; gap: 8px; }
.nav__toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav__toggle svg { width: 18px; height: 18px; }
.nav__toggle-close { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-open { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-close { display: block; }

/* Reading progress: thin lime line under the nav */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
}
.read-progress__fill {
  display: block;
  height: 100%;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

@media (max-width: 1023px) {
  .nav__mobile-bar { display: flex; }
  .nav__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .js .nav__panel:not(.is-open) { display: none; }
  .nav__links > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__links a,
  .nav__menu-btn {
    width: 100%;
    min-height: 48px;
    padding: 0 2px;
    font-size: 1rem;
    justify-content: space-between;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav__dropdown {
    position: static;
    min-width: 0;
    padding: 0 0 0 16px;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .nav__menu.is-open .nav__dropdown { display: block; }
  .nav__actions { padding-top: 16px; }
  .nav__signin { padding: 0 2px; min-height: 44px; font-size: 1rem; }
  .nav__cta-desktop { display: none; }
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  padding: var(--section-space) 0 var(--space-4);
  border-top: 1px solid var(--line);
  color: var(--text-2);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6) var(--space-4);
  padding-bottom: var(--space-8); /* columns → bottom rule: 64 */
}
.footer__brand {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;     /* the bulb centred over the wordmark */
  gap: var(--space-2);
  justify-self: start;
  width: fit-content;
  align-self: start;
}
/* The nawa bulb formed from moving dots (js/dot-bulb.js), above the wordmark.
   The canvas covers the footer so the dots can fly in from both sides; .footer__bulb
   only reserves the bulb's place (hidden without JS). */
.footer__bulb {
  --bulb-h: clamp(140px, 12vw, 200px);
  display: none;
  flex: none;
  width: calc(var(--bulb-h) * 218 / 318);
  height: var(--bulb-h);
}
.js .footer__bulb { display: block; }
.footer__wordmark {
  font-size: 2rem;  /* small, under the bulb; 24px on phones */
  font-weight: 600;
  letter-spacing: -0.05em;
}
@media (max-width: 599px) { .footer__wordmark { font-size: 1.5rem; } }
.dot-bulb-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.site-footer > .container { position: relative; z-index: 1; }
.footer__h {
  margin: 0 0 var(--space-3);
  font-size: 1.125rem;      /* one step above the links */
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}
/* every column has a heading, so the headings and the lists share one top line each */
.footer__col ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.footer__col a,
.footer__bottom a { font-size: 0.875rem; transition: color var(--dur-fast) var(--ease); }
.footer__col a:hover,
.footer__bottom a:hover { color: var(--text); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding-top: var(--space-4); /* rule → bottom bar: 32, the same as the bar → page end */
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--text-3);
}
.footer__bottom ul { display: flex; gap: var(--space-3); }

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; align-items: start; }
  .footer__brand { grid-column: auto; }
}

/* ==========================================================
   Reveal on scroll (only when JS is running)
   ========================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Helpers ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.type-wrap { display: grid; }
.type-wrap > .type-wrap__ghost,
.type-wrap > .type-wrap__live { grid-area: 1 / 1; }
.type-wrap__ghost { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
