:root {
  --paper:    #EDEFEA;
  --paper-2:  #F7F8F4;
  --ink:      #16211C;
  --ink-2:    #4A5852;
  --ink-3:    #7C8A84;
  --line:     rgba(22,33,28,0.14);
  --brand:    #6750A4;
  --brand-text: #6750A4;
  --brand-hover: #5B4590;
  --accent:   #9C5D0C;
  --on-brand: #FFFFFF;

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --hint-ink: #000;

  --gutter: clamp(1.25rem, 4vw, 2.25rem);
  --section-y: clamp(3.5rem, 8vw, 6rem);
  --hero-y: clamp(4.5rem, 10vw, 7.5rem);
  --max: 1160px;
  --radius: 14px;
}
[data-theme="dark"] {
  --paper:    #000000;
  --paper-2:  #0D0B10;
  --ink:      #E7EDE8;
  --ink-2:    #A2B1AA;
  --ink-3:    #6F807A;
  --line:     rgba(230,225,233,0.18);
  --brand:    #6750A4;
  --brand-text: #D0BCFF;
  --brand-hover: #7965B8;
  --accent:   #E9A93F;
  --on-brand: #FFFFFF;
  --hint-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:    #000000;
    --paper-2:  #0D0B10;
    --ink:      #E7EDE8;
    --ink-2:    #A2B1AA;
    --ink-3:    #6F807A;
    --line:     rgba(230,225,233,0.18);
    --brand:    #6750A4;
    --brand-text: #D0BCFF;
    --brand-hover: #7965B8;
    --accent:   #E9A93F;
    --on-brand: #FFFFFF;
    --hint-ink: #FFFFFF;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-text); }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
}
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* NAV */
header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
header.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand-lock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.15rem;
  -webkit-tap-highlight-color: transparent;
}
.brand-lock svg { width: 28px; height: 28px; }
.theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  height: 38px;
  width: 38px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { border-color: var(--ink-3); }
.theme-toggle svg { width: 18px; height: 18px; }

/* HERO */
.hero {
  padding-top: var(--hero-y);
  padding-bottom: var(--hero-y);
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.hero-logo {
  width: clamp(140px, 26vw, 260px);
  height: auto;
  margin: 0 0 1.5rem;
}
h1.headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--ink);
  max-width: 18ch;
}
.subhead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-2);
  max-width: 34ch;
  margin: 0 0 1.75rem;
}
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 1rem;
  justify-content: center;
}
@media (min-width: 560px) {
  .cta-row { flex-direction: row; }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
@media (max-width: 559px) { .btn { width: 100%; } }
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--brand-text);
  border: 1px solid var(--brand-text);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--brand-text) 12%, transparent);
  color: var(--brand-text);
}
.btn-arrow {
  display: inline-block;
  margin-left: .4rem;
  transition: transform .18s ease;
}
.btn-secondary:hover .btn-arrow { transform: translateY(2px); }
@media (prefers-reduced-motion: reduce) {
  .btn-arrow { transition: none; }
  .btn-secondary:hover .btn-arrow { transform: none; }
}
.btn-disabled {
  background: transparent;
  color: var(--ink-3);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
}
.hero-foot { margin-top: 1.25rem; }

/* WHAT IT DOES */
.blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2rem);
}
@media (min-width: 700px) { .blocks { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blocks { grid-template-columns: repeat(4, 1fr); } }
.block { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.block h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0.4rem 0 0.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.block p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

/* APP SCREENS — three-across on desktop, single-item carousel on narrow viewports */
.screens {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 2rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
  padding-block: 0.5rem 1rem;
}
.screens::-webkit-scrollbar { display: none; }
.screen {
  margin: 0;
  flex: 0 0 clamp(220px, 24vw, 300px);
  scroll-snap-align: center;
  text-align: center;
}
.screen img { width: 100%; height: auto; display: block; }
.screen figcaption { margin-top: 1rem; color: var(--ink-3); }

/* Narrow viewports: one phone at a time with peek on either side */
@media (max-width: 900px) {
  .screens {
    justify-content: flex-start;
    gap: 1rem;
    padding-inline: calc((100% - min(320px, 75vw)) / 2);
    scroll-padding-inline: calc((100% - min(320px, 75vw)) / 2);
  }
  .screen { flex-basis: min(320px, 75vw); }
}

/* TWO WAYS */
.two-ways {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}
@media (min-width: 800px) { .two-ways { grid-template-columns: 1fr 1fr; } }
.way h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0.4rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.way p { color: var(--ink-2); margin: 0; }
.way .steps {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 1.02rem;
}
.way .steps li {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

/* ANDROID SETUP */
.android-setup { border-top: 1px solid var(--line); padding-top: var(--section-y); }
.android-setup h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  letter-spacing: -0.01em;
  margin: 0.5rem 0 1.25rem;
}
.android-setup ol { margin: 0 0 1.75rem; padding-left: 1.25rem; color: var(--ink); }
.android-setup ol li { margin-bottom: 0.5rem; }
.warn {
  border-left: 2px solid var(--line);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1rem 0;
  color: var(--ink-2);
}
.warn strong { color: var(--ink); font-weight: 600; }
.note{margin-top:.9rem;border-top:1px solid var(--line);padding-top:.9rem}
.note summary{cursor:pointer;color:var(--brand-text);font-weight:500;
  list-style:none;display:flex;align-items:center;gap:.5rem}
.note summary::-webkit-details-marker{display:none}
.note summary::before{content:"";width:.42rem;height:.42rem;flex:none;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(-45deg);transition:transform .18s ease;margin-left:.1rem}
.note[open] summary::before{transform:rotate(45deg)}
.note summary:focus-visible{outline:2px solid var(--brand-text);outline-offset:3px;
  border-radius:3px}
.note-body{margin-top:.75rem;color:var(--ink-2)}
.note-body ol{margin:.6rem 0;padding-left:1.2rem}
.note-body li{margin:.35rem 0}
.note-body code{font-family:'DM Mono',ui-monospace,monospace;font-size:.88em;
  background:var(--paper-2);padding:.12em .4em;border-radius:4px;
  overflow-wrap:anywhere}
.note{interpolate-size:allow-keywords}
.note::details-content{opacity:0;block-size:0;overflow:hidden;
  transition:content-visibility .28s allow-discrete,opacity .22s ease,block-size .28s ease}
.note[open]::details-content{opacity:1;block-size:auto}
@media (prefers-reduced-motion:reduce){.note summary::before,.note::details-content{transition:none}}

/* SECTION HEADS — kicker may be either <p> or <h2>, so reset browser h2 margins */
.kicker { margin: 1em 0 0.5rem; }

/* CLOSING CTA */
.cta-close { text-align: center; }
.cta-close .cta-row { justify-content: center; }
.cta-lead { margin: .6rem 0 1.8rem; color: var(--ink-2); }

/* FOOTER */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: var(--section-y);
  padding: 2rem 0 3rem;
}
.foot-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-3);
  font-size: 0.9rem;
  text-align: center;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* SCROLL HINT — mobile-only pulsing arrow at the very top of the page */
.scroll-hint { display: none; }
@media (max-width: 560px) {
  .scroll-hint {
    display: block;
    position: fixed;
    right: 1.25rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    color: var(--hint-ink);
    z-index: 15;
    pointer-events: none;
    transition: opacity 300ms ease;
    animation: scrollPulse 2.4s ease-in-out infinite;
  }
  .scroll-hint svg { width: 28px; height: 28px; display: block; }
  .scroll-hint.is-hidden { opacity: 0; animation: none; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; opacity: 0.85; }
}

/* MOTION — reduced-motion path renders final state instantly */
@media (prefers-reduced-motion: no-preference) {
  .hero-logo,
  h1.headline,
  .subhead {
    opacity: 0;
    transform: translateY(10px);
    animation: heroRise 400ms cubic-bezier(.2,.7,.2,1) forwards;
  }
  h1.headline { animation-delay: 120ms; }
  .subhead { animation-delay: 220ms; }
}
@keyframes heroRise { to { opacity: 1; transform: translateY(0); } }
