:root {
  --ink: #04161c;
  --ink-2: #16333c;
  --mute: #6a7f86;
  --line: rgba(10, 40, 48, 0.12);
  --line-strong: rgba(10, 40, 48, 0.18);
  --panel: #f7faf9;
  --white: #ffffff;
  --teal: #0b9a84;
  --teal-2: #077a69;
  --teal-soft: #daf4ee;
  --mint: #8ef0d4;
  --warn: #c2410c;
  --radius: 18px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px rgba(4, 22, 28, 0.22);
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --top: 56px;
  --dock: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --dur: 300ms;
  --stage-pad-b: calc(12px + var(--dock) + var(--safe-b));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: #0a1c22;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid rgba(11, 154, 132, 0.45);
  outline-offset: 2px;
}

.skip-link {
  position: fixed; z-index: 200; top: 10px; left: 10px;
  padding: 10px 12px; border-radius: 10px; background: #fff; color: var(--ink);
  font-weight: 700; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.app {
  position: relative;
  width: 100%;
  height: var(--vvh, 100dvh);
  max-height: var(--vvh, 100dvh);
  display: grid;
  grid-template-rows: calc(var(--top) + var(--safe-t)) minmax(0, 1fr);
  background:
    radial-gradient(900px 420px at 90% -5%, rgba(11, 154, 132, 0.16), transparent 60%),
    linear-gradient(160deg, #d5e2e6 0%, #e7eef0 42%, #dde8e4 100%);
  overflow: hidden;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}

/* —— Top bar —— */
.topbar {
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: calc(var(--top) + var(--safe-t));
  padding: var(--safe-t) 14px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; letter-spacing: 0.14em; font-size: 12px; flex: 0 0 auto;
}
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.brand-text { display: none; }
.topnav { display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.link-quiet { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 13px; font-weight: 750;
}
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-glass {
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(8px);
}
.btn-ghost { background: #fff; border: 1px solid var(--line-strong); }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.75);
}

/* —— Stage: mobile-first scrollable stack —— */
.stage {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px var(--stage-pad-b);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-padding-bottom: var(--stage-pad-b);
}

.hero-pane {
  position: relative;
  flex: 0 0 auto;
  min-height: 220px;
  border-radius: var(--radius);
  color: #f4fbf8;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(4, 22, 28, 0.18);
}
.hero-media, .hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(160deg, rgba(4,22,28,.88) 0%, rgba(4,22,28,.7) 55%, rgba(4,22,28,.45) 100%);
}
.hero-copy {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 8px;
  min-height: 220px;
  padding: 16px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--mint);
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 4px rgba(142,240,212,.18);
}
.brand-mark {
  display: block; margin-bottom: 2px;
  font-size: clamp(28px, 8vw, 40px); font-weight: 800; letter-spacing: -.04em; line-height: .92; color: #fff;
}
.hero-copy h1 {
  margin: 0; font-size: clamp(17px, 4.5vw, 22px); font-weight: 700;
  letter-spacing: -.025em; line-height: 1.2; max-width: 22ch;
}
.lede {
  margin: 0; color: rgba(244,251,248,.78); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-cta .btn { min-height: 42px; flex: 1 1 auto; }
.proof-row { display: none; list-style: none; margin: 0; padding: 0; }

/* —— Rail —— */
.rail {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.rail-head h2 { margin: 0 0 2px; font-size: 14px; font-weight: 800; }
.rail-head p { margin: 0; color: var(--mute); font-size: 12px; line-height: 1.35; }

.lane-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.lane {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  text-align: left;
}
.lane-lg { grid-column: auto; }
.lane-dark {
  background: linear-gradient(145deg, #04161c, #0c3840);
  color: #f3faf7; border-color: transparent;
}
.lane-dark .lane-kicker { color: var(--mint); }
.lane-dark .lane-desc { color: rgba(243,250,247,.62); }
.lane-dark .lane-icon {
  background: rgba(255,255,255,.08); color: var(--mint); border-color: rgba(255,255,255,.12);
}
.lane-icon {
  width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 12px; border: 1px solid var(--line); background: var(--teal-soft); color: var(--teal-2);
}
.lane-meta { display: grid; gap: 2px; min-width: 0; }
.lane-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-2);
}
.lane strong {
  font-size: 15px; font-weight: 780; letter-spacing: -.02em; line-height: 1.2;
}
.lane-desc {
  color: var(--mute); font-size: 12px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lane-go { color: var(--mute); }

.quick-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.quick-strip::-webkit-scrollbar { display: none; }
.quick-strip button {
  flex: 0 0 auto; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.75);
  font-size: 12px; font-weight: 700; color: var(--ink-2);
}
.quick-strip .quick-cta { background: var(--ink); color: #fff; border-color: var(--ink); }

/* —— Dock —— */
.dock {
  position: fixed; z-index: 35;
  left: max(10px, var(--safe-l));
  right: max(10px, var(--safe-r));
  bottom: max(8px, var(--safe-b));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 6px; border-radius: 16px;
  background: rgba(247,250,249,.95); border: 1px solid var(--line);
  backdrop-filter: blur(14px); box-shadow: 0 12px 32px rgba(4,22,28,.16);
}
.dock-item {
  display: grid; place-items: center; gap: 2px; min-height: 46px;
  border-radius: 12px; color: var(--mute); font-size: 10px; font-weight: 750;
}
.dock-item.is-active, .dock-item[aria-current="page"] {
  background: var(--teal-soft); color: var(--teal-2);
}
.app.is-open .dock { opacity: 0; pointer-events: none; visibility: hidden; }

/* —— Overlay / sheet —— */
.overlay {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
}
.overlay.is-open { pointer-events: auto; }
.scrim {
  position: absolute; inset: 0; background: rgba(4,22,28,.48);
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.overlay.is-open .scrim { opacity: 1; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: min(92dvh, 100%);
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  border-radius: 20px 20px 0 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: translate3d(0, 110%, 0);
  transition: transform var(--dur) var(--ease);
  will-change: transform;
}
.overlay.is-open .sheet { transform: translate3d(0, 0, 0); }
.sheet[hidden] { display: none !important; }
.overlay.is-open .sheet[hidden] { display: grid !important; }

.sheet-handle { display: grid; place-items: center; padding-top: 8px; }
.sheet-handle span {
  width: 40px; height: 4px; border-radius: 99px; background: rgba(4,22,28,.16);
}
.sheet-bar {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; align-items: center;
  padding: 6px 12px 10px;
}
.sheet-eyebrow {
  margin: 0; color: var(--teal-2); font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}
.sheet-titles h2 {
  margin: 2px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
}
.sheet-tabs {
  display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none;
}
.sheet-tabs[hidden] { display: none !important; }
.sheet-tabs::-webkit-scrollbar { display: none; }
.sheet-tabs button {
  flex: 0 0 auto; min-height: 32px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12px; font-weight: 750; background: #fff;
}
.sheet-tabs button[aria-selected="true"] {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.sheet-scroll {
  min-height: 0; overflow: auto; padding: 4px 12px 18px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.sheet-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: rgba(247,250,249,.96);
}
.sheet-foot[hidden] { display: none !important; }
.sheet-foot .btn {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}
.sheet-foot .btn-ghost {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 0 12px;
}
.sheet-foot .btn-primary {
  flex: 1 1 auto;
  max-width: 280px;
  margin-left: auto;
}

/* Content */
.hub-grid { display: grid; gap: 8px; grid-template-columns: 1fr; }
.hub-card {
  display: grid; gap: 6px; width: 100%; text-align: left;
  padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff;
}
.hub-card .idx { color: var(--teal-2); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.hub-card strong { font-size: 16px; font-weight: 800; }
.hub-card p { margin: 0; color: var(--mute); font-size: 13px; line-height: 1.4; }
.hub-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 8px; border-radius: 8px; background: var(--teal-soft);
  color: var(--teal-2); font-size: 11px; font-weight: 750;
}

.detail { display: grid; gap: 14px; }
.detail .hero-band {
  padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, #04161c, #0d3d44); color: #f4fbf8;
}
.detail .hero-band p { margin: 8px 0 0; color: rgba(244,251,248,.72); font-size: 13px; line-height: 1.45; }
.detail .hero-band strong { font-size: 16px; letter-spacing: -.02em; }
.block h3 {
  margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal-2);
}
.block p, .block li { margin: 0; color: var(--mute); font-size: 13px; line-height: 1.5; }
.block ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat { padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.stat b { display: block; font-size: 14px; }
.stat span { color: var(--mute); font-size: 10px; }

.steps { border-top: 1px solid var(--line); }
.step {
  display: grid; grid-template-columns: 40px 1fr; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.step i { color: var(--teal); font-style: normal; font-weight: 800; font-size: 12px; }
.step strong { display: block; margin-bottom: 2px; font-size: 15px; }
.step p { margin: 0; color: var(--mute); font-size: 12px; line-height: 1.4; }

.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 5px; font-size: 12px; font-weight: 750; color: var(--ink-2); }
.form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 16px; padding: 12px;
}
.form textarea { min-height: 88px; resize: vertical; font-size: 16px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.form-note { margin: 0; color: var(--mute); font-size: 12px; }
.form-status { min-height: 18px; margin: 0; font-size: 13px; font-weight: 750; color: var(--teal-2); }
.form-status.is-error { color: var(--warn); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ========== Phone landscape ========== */
@media (max-width: 979px) and (orientation: landscape) {
  :root {
    --top: 48px;
    --dock: 0px;
    --stage-pad-b: 10px;
  }

  .dock { display: none !important; }

  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 10px;
    overflow: hidden;
    padding-bottom: 10px;
  }

  .hero-pane {
    min-height: 0;
    height: 100%;
  }
  .hero-copy {
    min-height: 0;
    height: 100%;
    padding: 12px;
    gap: 6px;
  }
  .eyebrow { font-size: 9px; }
  .brand-mark { font-size: 26px; margin-bottom: 0; }
  .hero-copy h1 { font-size: 15px; max-width: none; }
  .lede { display: none; }
  .hero-cta .btn { min-height: 36px; font-size: 12px; padding: 0 10px; }

  .rail {
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .rail-head p { display: none; }
  .lane { min-height: 52px; padding: 10px; }
  .lane-desc { display: none; }
  .quick-strip { display: none; }

  .sheet {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .sheet-handle { display: none; }
}

/* ========== Tablet portrait & small laptop ========== */
@media (min-width: 700px) and (max-width: 1099px) and (orientation: portrait) {
  :root {
    --top: 60px;
    --dock: 0px;
    --stage-pad-b: 16px;
  }

  .brand-text { display: inline; }
  .topnav { display: flex; gap: 2px; margin-left: 8px; flex-wrap: wrap; }
  .topnav button {
    padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--ink-2);
  }
  .dock { display: none !important; }

  .stage {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 14px;
    padding: 0 20px 20px;
    overflow: auto;
  }

  .hero-pane { min-height: 280px; }
  .hero-copy { min-height: 280px; padding: 24px; gap: 12px; }
  .brand-mark { font-size: 48px; }
  .hero-copy h1 { font-size: 26px; }
  .lede { -webkit-line-clamp: 4; font-size: 15px; }
  .hero-cta .btn { flex: 0 0 auto; min-height: 46px; }

  .lane-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lane-lg { grid-column: 1 / -1; }
  .lane { min-height: 84px; padding: 14px; }
  .lane strong { font-size: 17px; }
  .lane-desc { white-space: normal; }

  .hub-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }

  .sheet {
    left: 50%;
    right: auto;
    width: min(640px, 92vw);
    transform: translate3d(-50%, 110%, 0);
    border-radius: 20px 20px 0 0;
  }
  .overlay.is-open .sheet { transform: translate3d(-50%, 0, 0); }
}

/* ========== Tablet landscape / desktop ========== */
@media (min-width: 980px) and (orientation: landscape),
       (min-width: 1100px) {
  :root {
    --top: 64px;
    --dock: 0px;
    --stage-pad-b: 24px;
  }

  .brand-text { display: inline; }
  .topnav { display: flex; gap: 4px; margin-left: 10px; }
  .topnav button {
    padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--ink-2);
  }
  .topnav button:hover { background: rgba(255,255,255,.55); }
  .link-quiet { display: inline; font-size: 13px; font-weight: 650; color: var(--mute); }
  .dock { display: none !important; }

  .topbar { padding: 0 24px; gap: 14px; }

  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.9fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 6px 24px 24px;
    overflow: hidden;
  }

  .hero-pane {
    min-height: 0;
    height: 100%;
  }
  .hero-copy {
    min-height: 0;
    height: 100%;
    padding: clamp(16px, 3vh, 34px);
    gap: 12px;
  }
  .brand-mark { font-size: clamp(40px, 6vh, 64px); }
  .hero-copy h1 { font-size: clamp(22px, 3.4vh, 34px); max-width: 16ch; }
  .lede {
    display: block; -webkit-line-clamp: unset; overflow: visible;
    font-size: clamp(13px, 1.8vh, 16px); max-width: 46ch;
  }
  .proof-row {
    display: flex; gap: 18px; margin-top: 6px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.14);
  }
  .proof-row li { display: grid; gap: 2px; }
  .proof-row strong { font-size: 13px; }
  .proof-row span { font-size: 11px; color: rgba(244,251,248,.62); }
  .hero-cta .btn { flex: 0 0 auto; min-height: 48px; }

  .rail {
    min-height: 0;
    overflow: auto;
    background: rgba(255,255,255,.45);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: var(--radius);
    padding: 16px;
    backdrop-filter: blur(10px);
  }
  .lane-grid { grid-template-columns: 1fr; }
  .lane { min-height: 72px; padding: 14px; }
  .lane strong { font-size: 17px; }
  .lane-desc { white-space: normal; }

  .sheet {
    left: auto; right: 0; bottom: 0; top: 0;
    width: min(720px, 52vw);
    height: 100%;
    max-height: none;
    border-radius: 0;
    transform: translate3d(104%, 0, 0);
  }
  .overlay.is-open .sheet { transform: translate3d(0, 0, 0); }
  .sheet-handle { display: none; }
  .sheet-bar { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
  .sheet-titles h2 { font-size: 22px; }
  .sheet-tabs { padding: 10px 18px; border-bottom: 1px solid var(--line); }
  .sheet-scroll { padding: 16px 18px 24px; }
  .sheet-foot { padding: 10px 18px; }
  .sheet-foot .btn { min-height: 38px; font-size: 12px; }
  .sheet-foot .btn-primary { max-width: 220px; }
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* Short landscape phones / short windows */
@media (max-height: 500px) {
  .lede, .eyebrow, .rail-head p, .quick-strip, .proof-row { display: none !important; }
  .brand-mark { font-size: 22px !important; }
  .hero-copy h1 { font-size: 14px !important; }
  .hero-copy { padding: 10px !important; gap: 6px !important; }
  .lane { min-height: 48px; padding: 8px; }
  .lane-desc { display: none; }
}

/* Very narrow phones */
@media (max-width: 380px) {
  .brand-text { display: none !important; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
