/* Snapout website. Same ink and coral as the Android app (see the app's DESIGN.md). Dark only, like the app. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0b0e13;
  --raised: #131821;
  --high: #1b212c;
  --highest: #242b38;
  --hair: #2a3345;
  --hair-soft: #1f2633;
  --text: #f2f5fa;
  --muted: #9aa6b8;
  --quiet: #8995aa;
  --coral: #ff6a3d;
  --coral-bright: #ff8a63;
  --coral-soft: #3a1f17;
  --green: #3ddc97;
  --green-soft: #12352a;
  --amber: #ffc83d;
  --sheet: #151b22;

  --display: "Bricolage", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--coral-bright); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* Scrollbar in the ink ramp, where the browser supports it. */
html { scrollbar-color: var(--highest) var(--ink); }

.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 10;
  background: var(--coral); color: var(--ink); padding: 12px 18px; border-radius: 12px; font-weight: 600;
  transition: top 0.2s var(--ease-std);
}
.skip:focus { top: 12px; }

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

/* ---------- header ---------- */

.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span {
  font: 700 1.5rem/1 var(--display); letter-spacing: -0.02em; font-stretch: 90%;
}

.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 10px 2px; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a.btn, .nav a.btn:hover { color: var(--ink); }

@media (max-width: 720px) {
  .nav .nav-text { display: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 18px; border: 0; cursor: pointer;
  background: var(--coral); color: var(--ink);
  font: 600 1rem/1 var(--body); letter-spacing: 0.01em; text-decoration: none;
  transition: transform 0.16s var(--ease-std), background-color 0.24s var(--ease-std);
}
.btn:hover { background: var(--coral-bright); color: var(--ink); }
.btn:active { transform: scale(0.96); }
.btn.small { min-height: 44px; padding: 0 20px; border-radius: 14px; font-size: 0.95rem; }
.btn.tonal { background: var(--highest); color: var(--text); min-height: 48px; border-radius: 16px; }
.btn.tonal:hover { background: var(--hair); color: var(--text); }
.btn[disabled] { background: var(--high); color: var(--quiet); cursor: default; transform: none; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* ---------- headings and text ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 680; font-stretch: 92%; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.25rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 720; font-stretch: 86%; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.02; letter-spacing: -0.03em; }
h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 52ch; }
.prose p, .prose li { max-width: 68ch; }
.prose p + p { margin-top: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-stretch: 86%; font-weight: 700; }

/* ---------- hero ---------- */

.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(64px, 9vw, 120px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { margin-bottom: 36px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.fine { color: var(--quiet); font-size: 0.9rem; margin-top: 20px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .demo-col { order: 2; }
}

/* ---------- the demo phone ---------- */

.demo-col { display: grid; justify-items: center; gap: 18px; }

.phone {
  position: relative; width: min(310px, 100%); aspect-ratio: 9 / 18.2;
  background: var(--raised); border: 1px solid var(--hair); border-radius: 38px; padding: 10px;
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 29px; overflow: hidden; background: var(--ink); touch-action: pan-y; user-select: none; -webkit-user-select: none; }

.reel {
  position: absolute; inset: 0; display: grid; align-content: end; padding: 18px 16px 22px;
  background: var(--tone, #12353a);
  transform: translateY(0);
  transition: transform 0.52s var(--ease-out);
}
.reel.out { transform: translateY(-100%); }
.reel.in { transform: translateY(100%); transition: none; }
.reel .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.reel .cap { position: relative; display: grid; gap: 8px; max-width: 70%; }
.reel .cap i { display: block; height: 9px; border-radius: 5px; background: rgba(255, 255, 255, 0.62); }
.reel .cap i:nth-child(2) { width: 72%; background: rgba(255, 255, 255, 0.34); }
.reel .cap b { font: 600 0.8rem/1 var(--body); color: rgba(255, 255, 255, 0.82); }
.reel .rail { position: absolute; right: 12px; bottom: 26px; display: grid; gap: 18px; justify-items: center; color: rgba(255, 255, 255, 0.9); font: 600 0.72rem/1 var(--body); }
.reel .rail svg { width: 26px; height: 26px; margin-bottom: 4px; }

/* the counter pill: top right, like the app's */
.pill {
  position: absolute; top: 14px; right: 12px; z-index: 3;
  display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 11px;
  background: rgba(19, 24, 33, 0.92); border: 1px solid var(--hair); border-radius: 18px;
  transition: transform 0.3s var(--ease-out);
}
.pill.pulse { animation: pulse 0.7s var(--ease-out); }
@keyframes pulse { 40% { transform: scale(1.07); } }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.pill .count { display: inline-grid; height: 1.25em; font: 700 1.2rem/1.25 var(--display); font-stretch: 86%; font-variant-numeric: tabular-nums; overflow: hidden; min-width: 1.1ch; }
.pill .count span { grid-area: 1 / 1; display: block; }
.pill .count .up { animation: roll-in 0.42s var(--ease-out) both; }
.pill .count .gone { animation: roll-out 0.42s var(--ease-out) both; }
@keyframes roll-in { from { transform: translateY(100%); opacity: 0; } }
@keyframes roll-out { to { transform: translateY(-100%); opacity: 0; } }
.pill .label { color: var(--muted); font-size: 0.72rem; }
.segs { display: flex; gap: 3px; }
.segs i { width: 8px; height: 4px; border-radius: 2px; background: var(--highest); transition: background-color 0.24s var(--ease-std); }
.segs i.on { background: var(--coral); }
.segs i.last { background: var(--amber); }

/* the pause sheet */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  background: var(--sheet); border-top: 1px solid var(--hair); border-radius: 22px 22px 0 0;
  padding: 18px 16px 16px; display: grid; gap: 12px;
  transform: translateY(105%); visibility: hidden;
  transition: transform 0.46s var(--ease-out), visibility 0s linear 0.46s;
}
.sheet.open { transform: none; visibility: visible; transition: transform 0.46s var(--ease-out); }
.scrim { position: absolute; inset: 0; z-index: 3; background: rgba(11, 14, 19, 0.62); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease-std); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet .title, .homeview .title { margin: 0; font: 680 1.15rem/1.2 var(--display); font-stretch: 92%; letter-spacing: -0.015em; }
.sheet .use { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.sheet blockquote { margin: 0; padding: 11px 12px; background: #141922; border-radius: 14px; font-size: 0.82rem; line-height: 1.45; font-style: italic; color: #c9d1dd; }
.breath { display: grid; gap: 6px; }
.breath p { color: var(--amber); font-size: 0.78rem; font-weight: 600; }
.breath div { height: 5px; border-radius: 3px; background: var(--high); overflow: hidden; }
.breath div i { display: block; height: 100%; width: 100%; background: var(--amber); transform-origin: left; }
.breath.run div i { animation: drain var(--wait, 3s) linear forwards; }
@keyframes drain { to { transform: scaleX(0); } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices button, .sheet .done {
  min-height: 42px; border: 0; border-radius: 14px; background: #1c2330; color: var(--text); cursor: pointer;
  font: 600 0.85rem/1 var(--body); transition: opacity 0.3s var(--ease-std), transform 0.16s var(--ease-std);
}
.choices button:active, .sheet .done:active { transform: scale(0.96); }
.choices button:disabled { opacity: 0.35; cursor: default; transform: none; }
.sheet .done { background: var(--coral); color: var(--ink); }
.sheet .done:disabled { opacity: 0.35; cursor: default; transform: none; }

/* after "I am done" */
.homeview {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 14px;
  padding: 24px; text-align: center; background: var(--ink);
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease-std), visibility 0s linear 0.4s;
}
.homeview.on { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease-std); }
.homeview .ring { width: 150px; }
.homeview p { color: var(--muted); font-size: 0.9rem; max-width: 24ch; }

.demo-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.demo-note { color: var(--quiet); font-size: 0.82rem; text-align: center; max-width: 36ch; }

/* ---------- the open ring ---------- */

.ring path { fill: none; stroke-width: 8; stroke-linecap: round; }
.ring .track { stroke: var(--high); }
.ring .fill { stroke: var(--coral); transition: stroke 0.36s var(--ease-std); }
.ring .gap { stroke: var(--coral); stroke-dasharray: 38; stroke-dashoffset: 38; transition: stroke 0.36s var(--ease-std); }
.ring.closed .fill, .ring.closed .gap { stroke: var(--green); }
.ring.closed .gap { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s var(--ease-out), stroke 0.36s var(--ease-std); }
.ring .dot { fill: var(--text); }

/* ---------- sections ---------- */

section { padding: clamp(56px, 8vw, 112px) 0; }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); display: grid; gap: 16px; }

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* four ways to limit an app: rows on one raised surface, not a grid of cards */
.group { background: var(--raised); border-radius: 24px; overflow: hidden; }
.group dl, .group ul { margin: 0; padding: 0; list-style: none; }
.group .row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 8px 28px; padding: 22px 26px; align-items: baseline; }
.group .row + .row { border-top: 1px solid var(--hair-soft); }
.group dt { font: 680 1.5rem/1.1 var(--display); font-stretch: 90%; letter-spacing: -0.02em; }
.group dd { margin: 0; color: var(--muted); }
@media (max-width: 620px) { .group .row { grid-template-columns: 1fr; padding: 18px 20px; } }

.focus { display: grid; justify-items: center; gap: 4px; }
.focus .ring { width: min(300px, 70vw); }
.focus .readout { text-align: center; margin-top: -4px; }
.focus .readout .num { font-size: clamp(2.8rem, 6vw, 4rem); line-height: 1; letter-spacing: -0.03em; display: block; }
.focus .readout span:last-child { color: var(--muted); font-size: 0.95rem; }
.focus .ring-wrap { position: relative; display: grid; place-items: center; }
.focus .ring-wrap .inside { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }

.facts { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--hair-soft); color: var(--muted); }
.facts li:first-child { border-top: 0; }
.facts li strong { color: var(--text); font-weight: 600; }
.facts svg { width: 22px; height: 22px; margin-top: 3px; color: var(--green); }

.perm { display: grid; gap: 0; }
.perm div { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 6px 28px; padding: 20px 0; border-top: 1px solid var(--hair-soft); }
.perm div:first-child { border-top: 0; }
.perm dt { font-weight: 600; }
.perm dd { margin: 0; color: var(--muted); max-width: 62ch; }
@media (max-width: 700px) { .perm div { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plans h3 { margin-bottom: 14px; }
.plans ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.plans li { padding: 11px 0; border-top: 1px solid var(--hair-soft); color: var(--muted); }
.plans li:first-child { border-top: 0; }
.plans .pro h3 .tag { font: 600 0.72rem/1 var(--body); letter-spacing: 0.04em; vertical-align: middle; margin-left: 10px; padding: 5px 9px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-bright); }
.plans-note { margin-top: 28px; color: var(--quiet); font-size: 0.95rem; max-width: 64ch; }

details { border-top: 1px solid var(--hair-soft); }
details:last-of-type { border-bottom: 1px solid var(--hair-soft); }
summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font: 600 1.05rem/1.4 var(--body); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.24s var(--ease-std);
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
details > div { padding: 0 0 22px; color: var(--muted); max-width: 68ch; }
details > div p + p { margin-top: 12px; }

/* closing band: the one place the page spends coral at full size */
.close { background: var(--coral); color: var(--ink); padding: clamp(64px, 9vw, 120px) 0; }
.close .wrap { display: grid; gap: 28px; justify-items: start; }
.close h2 { font-size: clamp(2.4rem, 6vw, 4.75rem); line-height: 0.98; max-width: 14ch; }
.close p { font-size: 1.15rem; max-width: 46ch; color: #2a1109; }
.close .btn { background: var(--ink); color: var(--text); }
.close .btn:hover { background: var(--raised); color: var(--text); }
.close a:not(.btn) { color: var(--ink); }

/* ---------- footer ---------- */

.site-footer { padding: 56px 0 48px; color: var(--quiet); font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 28px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-start; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .legal { max-width: 78ch; line-height: 1.55; }

/* ---------- document pages (privacy, terms, refund, support) ---------- */

.doc { padding: clamp(24px, 4vw, 48px) 0 clamp(64px, 8vw, 112px); }
.doc .wrap { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .doc .wrap { grid-template-columns: 1fr; gap: 28px; } }
.toc { position: sticky; top: 24px; display: grid; gap: 2px; font-size: 0.92rem; }
.toc a { color: var(--muted); text-decoration: none; padding: 7px 0 7px 14px; border-left: 1px solid var(--hair); }
.toc a:hover { color: var(--text); border-left-color: var(--coral); }
@media (max-width: 860px) { .toc { position: static; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .toc a { border-left: 0; padding-left: 0; } }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); margin-bottom: 14px; }
.doc .effective { color: var(--quiet); margin-bottom: 40px; font-size: 0.95rem; }
.doc h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 52px 0 14px; line-height: 1.15; }
.doc h2:first-of-type { margin-top: 0; }
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 14px; }
.doc ul { padding-left: 1.2rem; display: grid; gap: 8px; margin: 14px 0 0; }
.doc li { color: var(--muted); }
.doc p { color: var(--muted); }
.doc p strong, .doc li strong { color: var(--text); font-weight: 600; }
.doc .callout { margin: 28px 0; padding: 18px 20px; background: var(--raised); border-radius: 18px; color: var(--text); }
.doc .callout p { color: var(--text); }

/* ---------- invite and 404 ---------- */

.center { min-height: 62vh; display: grid; align-content: center; justify-items: start; gap: 24px; padding: 48px 0 96px; }
.center h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); max-width: 16ch; }
.code {
  display: inline-flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px; background: var(--raised);
  border: 1px solid var(--hair); border-radius: 18px; font: 700 1.6rem/1 var(--display); letter-spacing: 0.06em; font-stretch: 90%;
}
.code button { font: 600 0.9rem/1 var(--body); letter-spacing: 0; }

/* ---------- entrance: one authored moment, content visible by default ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero .cta-row, .hero .fine, .hero .phone {
    animation: rise 0.8s var(--ease-out) both;
  }
  .hero .lead { animation-delay: 0.08s; }
  .hero .cta-row { animation-delay: 0.16s; }
  .hero .fine { animation-delay: 0.22s; }
  .hero .phone { animation-delay: 0.12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
  .breath.run div i { animation: none; transform: scaleX(0); }
}
