:root {
  --base: hsl(19, 65%, 40%);
  --deep: hsl(19, 58%, 28%);
  --ink: hsl(20, 42%, 10%);
  --ink-2: hsl(18, 34%, 16%);
  --text: #fffefb;
  --soft: hsl(32, 40%, 94%);
  --ice: hsl(199, 62%, 78%);
  --mist: hsl(199, 70%, 92%);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --header-h: 72px;
  --pad: 20px;
  color-scheme: dark;
}

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

html { overflow-x: clip; background: var(--base); }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--base);
}

img, svg { max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1, h2, h3, p { overflow-wrap: break-word; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  overflow-wrap: anywhere;
}

h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); margin-bottom: 12px; }

h3 { font-size: 1.35rem; letter-spacing: -0.03em; margin-bottom: 8px; }

p { margin: 0 0 14px; }

a { color: var(--mist); }

p a, .prose a, .text-link { text-underline-offset: 3px; }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

#main:focus { outline: none; }

::selection { background: var(--ice); color: var(--ink); }

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 80;
  background: var(--ice);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transform: translateY(-160%);
}

.skip:focus { transform: none; }

#contour {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 12px;
}

.brand {
  position: relative;
  z-index: 45;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1rem;
  line-height: 1.15;
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.nav-toggle {
  position: relative;
  z-index: 45;
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  color: var(--text);
  flex: none;
  border-radius: 12px;
  touch-action: manipulation;
}

.site-nav:focus,
.site-nav:focus-visible { outline: none; }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  border-radius: 2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after { transition: transform 0.2s ease, opacity 0.2s ease; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
}

.site-nav a[aria-current="page"] { color: var(--ice); }

.nav-ridge { display: none; width: min(100%, 420px); margin-top: auto; color: var(--ice); }

@media (max-width: 899px) {
  .bar { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; margin-left: 0; }
  html.js .nav-toggle { display: inline-grid; }
  html.js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 30;
    margin: 0;
    background: var(--ink);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 6px;
    padding: calc(var(--header-h) + env(safe-area-inset-top) + 12px) 24px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  html.js .site-nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  html.js .site-nav a {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2rem, 8vw, 3rem);
    letter-spacing: -0.04em;
    padding: 0;
  }
  html.js .site-nav.is-open .nav-ridge { display: block; }
}

html.nav-open,
html.nav-open body { overflow: hidden; }

.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 8px 0 36px;
}

.hero-grid, .assist-grid, .sticky-split, .page-hero-grid {
  display: grid;
  gap: 28px;
  width: 100%;
}

.hero-grid > *,
.assist-grid > *,
.sticky-split > *,
.page-hero-grid > * { min-width: 0; }

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.eyebrow {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.lede { font-size: 1.125rem; line-height: 1.55; max-width: 62ch; color: var(--soft); }

.actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-primary { background: var(--ice); color: var(--ink); }

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-primary:active { background: var(--mist); color: var(--ink); }

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

.btn-ghost:hover,
.btn-ghost:focus-visible,
.btn-ghost:active { background: var(--text); color: var(--ink); }

.chips, .trail, .toc-list { list-style: none; padding: 0; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid hsl(32 40% 94% / 0.45);
  font-size: 1rem;
}

.phone {
  width: min(100%, 340px);
  margin-inline: auto;
  background: var(--ink);
  color: var(--text);
  border-radius: 36px;
  border: 2px solid hsl(32 40% 96% / 0.28);
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  aspect-ratio: 9 / 16;
}

.phone-notch {
  width: 96px;
  height: 22px;
  margin: 2px auto 0;
  border: 2px solid var(--ice);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.phone-kicker { margin: 0; color: var(--mist); font-weight: 600; }

.phone-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.msg {
  margin: 0;
  padding: 10px 12px;
  max-width: 92%;
  line-height: 1.45;
}

.who { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 2px; }

.msg-user {
  margin-left: auto;
  background: var(--base);
  border-radius: 18px 18px 6px 18px;
}

.msg-guide {
  background: hsl(199 28% 18%);
  border-radius: 18px 18px 18px 6px;
}

.band { padding: 56px 0; }

.band-ink {
  background: hsl(20 42% 10% / 0.96);
  border-top: 1px solid hsl(199 62% 78% / 0.28);
}

.band-deep {
  background: hsl(19 58% 28% / 0.96);
  border-top: 1px solid hsl(199 62% 78% / 0.28);
}

.section-head { margin-bottom: 28px; max-width: 68ch; }

.center-head { text-align: center; margin-inline: auto; }
.center-head p { margin-inline: auto; }

.face-grid, .contact-grid, .bento { display: grid; gap: 16px; }

.face-card, .panel, .bento-card, .stake {
  background: var(--ink-2);
  border-radius: 28px;
  padding: 22px 20px 24px;
}

.band-ink .face-card,
.face-card.vivid, .tablet {
  background: var(--base);
}

.symbol { width: min(100%, 300px); margin-bottom: 18px; }

.mark {
  width: 64px;
  height: 52px;
  display: grid;
  place-items: end center;
  border: 2px solid var(--ice);
  border-bottom: none;
  border-radius: 36px 36px 0 0;
  color: var(--mist);
  font-family: var(--display);
  font-weight: 800;
  padding-bottom: 4px;
}

.trail { display: grid; gap: 16px; }

.stake {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
  background: transparent;
  padding: 0;
}

.faq-list { display: grid; gap: 0; border-bottom: 1px solid hsl(32 40% 94% / 0.2); }

.faq { border-top: 1px solid hsl(32 40% 94% / 0.2); }

.faq summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ice);
  border-bottom: 2px solid var(--ice);
  transform: rotate(45deg);
  flex: none;
  transition: transform 0.2s ease;
}

.faq[open] summary::after { transform: rotate(225deg); }

.faq p { max-width: 70ch; color: var(--soft); padding-bottom: 8px; }

.bento-card .icon { width: 72px; height: 64px; margin-bottom: 16px; color: var(--ice); }

.assist-grid .tablet {
  border-radius: 72px 72px 24px 24px;
  padding: 28px 22px 22px;
  min-height: 420px;
}

.flow-board {
  display: grid;
  gap: 12px;
  margin: 8px 0 28px;
}

.flow-node {
  background: var(--ink);
  color: var(--text);
  border-radius: 56px 56px 18px 18px;
  min-height: 128px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 20px 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.flow-node span {
  display: block;
  margin-top: 6px;
  font-family: var(--body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--soft);
}

.flow-arrow {
  margin: 0;
  text-align: center;
  color: var(--mist);
  font-weight: 600;
}

.flow-pair { display: grid; gap: 12px; }

.flow-stop {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1.5px dashed hsl(199 62% 78% / 0.7);
  text-align: center;
}

.ridge-key { color: var(--soft); max-width: 62ch; }

.cta-panel {
  background: var(--ink);
  border-radius: 72px 72px 28px 28px;
  padding: 28px 20px 32px;
  text-align: center;
}

.cta-panel .ridge { width: min(100%, 460px); margin: 0 auto 8px; }

.cta-panel p { margin-inline: auto; }

.cta-panel .actions { align-items: stretch; }

.site-footer {
  background: var(--ink);
  border-top: 1px solid hsl(199 62% 78% / 0.28);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.foot { display: grid; gap: 18px; }

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }

.foot a {
  color: var(--ice);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.page-hero { padding: 28px 0 8px; }

.dated { color: var(--mist); font-weight: 600; }

.toc-desktop { display: none; }

.toc-mobile {
  background: var(--ink-2);
  border-radius: 16px;
  padding: 8px 14px;
  margin-bottom: 20px;
}

.toc-mobile summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.toc-list { margin: 0; padding: 0 0 8px; list-style: none; display: grid; gap: 4px; }

.toc-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ice);
}

.prose h2 { margin-top: 2rem; font-size: clamp(1.6rem, 3vw, 2.15rem); }

.prose p, .prose li { max-width: 68ch; }

.prose ul { margin: 0 0 14px; padding-left: 1.2rem; }

.prose li { margin-bottom: 8px; }

.panel .mail {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.04em;
  color: var(--ice);
  text-decoration: none;
}

.field { display: grid; gap: 6px; margin-bottom: 14px; }

.field span { font-weight: 600; }

.field input, .field textarea {
  width: 100%;
  background: hsl(20 30% 14%);
  color: var(--text);
  border: 1px solid hsl(199 62% 78% / 0.5);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.5;
}

.field textarea { min-height: 140px; resize: vertical; }

.form-note { color: var(--soft); }

.form-error { color: var(--mist); font-weight: 600; }

.form-error:empty { display: none; }

.line-ice { fill: none; stroke: var(--ice); stroke-linecap: round; stroke-linejoin: round; }
.line-paper { fill: none; stroke: var(--text); stroke-linecap: round; stroke-linejoin: round; }
.fill-ink { fill: var(--ink); }
.fill-base { fill: var(--base); }
.svg-text { fill: var(--text); font-family: var(--body); font-size: 20px; }

html.js .reveal { opacity: 0; transform: translateY(16px); }

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .drift { animation: drift 16s ease-in-out infinite alternate; will-change: transform; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -10px, 0); }
}

@media (min-width: 640px) {
  .actions { flex-direction: row; flex-wrap: wrap; width: auto; }
  .actions .btn { width: auto; }
  .bento, .face-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .wrap {
    width: min(1120px, 100%);
    padding-left: max(32px, env(safe-area-inset-left));
    padding-right: max(32px, env(safe-area-inset-right));
  }
  .nav-toggle { display: none; }
  .brand { flex: 0 1 auto; font-size: 1.15rem; max-width: 320px; }
  .site-nav {
    position: static;
    inset: auto;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    padding: 0;
    margin-left: auto;
    z-index: auto;
  }
  .site-nav a {
    font-family: var(--body);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0;
    min-height: 44px;
    padding: 0 12px;
  }
  .nav-ridge { display: none; }
  .hero {
    justify-content: center;
    min-height: calc(100dvh - var(--header-h));
    padding: 20px 0;
  }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
  .phone {
    width: auto;
    max-width: 100%;
    height: min(680px, calc(100dvh - var(--header-h) - 96px));
    aspect-ratio: 9 / 17;
    margin-inline: auto;
  }
  .band { padding: 84px 0; }
  .sticky-split, .assist-grid, .page-hero-grid { grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; }
  .sticky-side { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
  .trail { grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
  .trail::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50px;
    height: 2px;
    background: hsl(199 62% 78% / 0.45);
  }
  .stake { grid-template-columns: 1fr; position: relative; }
  .prose-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px; }
  .flow-board { grid-template-columns: 1fr auto 1fr auto 1.15fr; align-items: center; }
  .doc-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
  .toc-desktop { display: block; position: sticky; top: calc(var(--header-h) + 16px); }
  .toc-mobile { display: none; }
  .contact-grid { align-items: stretch; }
  .foot { grid-template-columns: 1.3fr 1fr auto; align-items: center; }
  .cta-panel { padding: 48px 48px 52px; }
  .face-card:hover, .bento-card:hover, .face-card:focus-within, .bento-card:focus-within { transform: translateY(-4px); }
  .face-card, .bento-card { transition: transform 0.25s ease; }
}

@media (min-width: 1200px) {
  .wrap {
    width: min(1180px, 100%);
    padding-left: max(40px, env(safe-area-inset-left));
    padding-right: max(40px, env(safe-area-inset-right));
  }
  .bento { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; }
}

@supports (height: 100dvh) {
  .hero { min-height: calc(100dvh - var(--header-h)); }
}

@media (max-height: 520px) and (max-width: 899px) {
  .hero { min-height: 0; padding-top: 4px; }
  .hero h1 { font-size: 2rem; }
  .chips { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}
