/* ---------- Tokens ---------- */
:root {
  --bg: #fbfbf9;
  --surface: #f1f2ee;
  --card: #ffffff;
  --ink: #141510;
  --muted: #6a6c62;
  --line: color-mix(in oklab, var(--ink) 12%, transparent);
  --accent: #4cb782;

  /* Pastel "moment" tones for tiles and cards */
  --blue: #b5d5f4;
  --coral: #f9b59f;
  --pink: #f6cedf;
  --yellow: #f5df8d;
  --green: #cfe8d6;

  /* Illustrations: outline + fill */
  --ill-stroke: var(--ink);
  --ill-fill: var(--bg);
  --sticker-ink: #141510;
  --sticker-paper: #ffffff;

  --font-display: "Fraunces", ui-serif, Georgia, Cambria, serif;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 22px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141510;
    --surface: #1d1d16;
    --card: #1a1b15;
    --ink: #f1f2ee;
    --muted: #abab9c;
    --blue: #8fb8e0;
    --coral: #e79a82;
    --pink: #e2b2c7;
    --yellow: #e3c86a;
    --green: #a9d1b5;
  }
}
:root[data-theme="dark"] {
  --bg: #141510;
  --surface: #1d1d16;
  --card: #1a1b15;
  --ink: #f1f2ee;
  --muted: #abab9c;
  --blue: #8fb8e0;
  --coral: #e79a82;
  --pink: #e2b2c7;
  --yellow: #e3c86a;
  --green: #a9d1b5;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
section[id], main[id] { scroll-margin-top: 80px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.lede {
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
  max-width: 58ch;
  margin: 18px auto 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); }
.fine { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ---------- Illustrations ---------- */
.ill {
  color: var(--ill-stroke);
  fill: var(--ill-fill);
  stroke: currentColor;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  overflow: visible;
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { box-shadow: 0 6px 20px -8px color-mix(in oklab, var(--ink) 60%, transparent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

a:focus-visible, .btn:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 80;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand-mark { width: 26px; height: 26px; stroke-width: 7; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 56px; padding-bottom: 72px; }
.portraits {
  list-style: none;
  padding: 0;
  margin: 0 auto 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 860px;
}
.tile {
  --ill-stroke: var(--sticker-ink);
  --ill-fill: var(--sticker-paper);
  width: 60px;
  height: 60px;
  border-radius: 28%;
  display: grid;
  place-items: center;
  background: var(--tone);
  animation: bob 5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.42s);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
  cursor: default;
}
.tile .ill { width: 38px; height: 38px; stroke-width: 6; }
.tile:hover { animation-play-state: paused; transform: translateY(-6px) rotate(-8deg) scale(1.08); }
.portraits .tile:nth-child(even):hover { transform: translateY(-6px) rotate(8deg) scale(1.08); }
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

.t-blue { --tone: var(--blue); }
.t-coral { --tone: var(--coral); }
.t-pink { --tone: var(--pink); }
.t-yellow { --tone: var(--yellow); }
.t-green { --tone: var(--green); }

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  max-width: 14ch;
  margin: 0 auto;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 30px; }

/* ---------- Meet (inline illustrations in headline) ---------- */
.meet { text-align: center; padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--line); }
.inline-ill { font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.2; max-width: 22ch; margin: 0 auto; }
.nw { white-space: nowrap; }
.inl {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  margin: 0 .12em;
  stroke-width: 6;
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.inl:hover { transform: rotate(-10deg) scale(1.15); }

/* ---------- Section heads ---------- */
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .h2 { max-width: 20ch; margin: 0 auto; }

/* ---------- Apps ---------- */
.apps { padding-top: 72px; padding-bottom: 72px; }
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}
.app {
  --ill-stroke: var(--sticker-ink);
  --ill-fill: var(--sticker-paper);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.app:hover, .app:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px color-mix(in oklab, var(--ink) 45%, transparent); }
.app-art {
  background: var(--tone);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.app-art .ill { width: 96px; height: 96px; stroke-width: 4.5; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.app:hover .app-art .ill { transform: rotate(-6deg) scale(1.06); }
.app-body { padding: 18px 18px 20px; }
.app-top { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.app h3 { font-family: var(--font-display); font-weight: 450; font-size: 1.35rem; letter-spacing: -0.01em; }
.app p { color: var(--muted); font-size: 14px; }
.pill {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}
.pill-live { background: color-mix(in oklab, var(--accent) 18%, transparent); color: color-mix(in oklab, var(--accent) 70%, var(--ink)); }

/* ---------- Try: SIP mock ---------- */
.try { padding-top: 72px; padding-bottom: 72px; }
.mock {
  max-width: 860px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 30px 60px -40px color-mix(in oklab, var(--ink) 50%, transparent);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-url { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sip { display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 720px) { .sip { grid-template-columns: 1fr; } }
.sip-inputs { padding: 28px; display: grid; gap: 26px; align-content: center; }
.field { display: block; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; margin-bottom: 10px; }
.field output {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface);
  padding: 3px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(var(--ink), var(--ink)) 0 / var(--p, 50%) 100% no-repeat, var(--surface);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--ink);
  transition: transform .15s;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--ink);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

.sip-result { padding: 28px; background: var(--yellow); color: #141510; display: flex; flex-direction: column; justify-content: center; }
.sip-result .muted, .sip-result .fine { color: color-mix(in oklab, #141510 65%, transparent); }
.big { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 4px 0 18px; font-variant-numeric: tabular-nums; }
.split { height: 12px; border-radius: 999px; background: #141510; overflow: hidden; }
.split span { display: block; height: 100%; width: 50%; background: #ffffff; border-right: 2px solid #141510; transition: width .25s ease; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.legend dt { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.legend dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.sw { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid #141510; display: inline-block; }
.sw-inv { background: #ffffff; }
.sw-gain { background: #141510; }

/* ---------- Why ---------- */
.why { padding-top: 72px; padding-bottom: 72px; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.why-card {
  padding: 28px 26px 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color .2s;
}
.why-card:hover { background: var(--surface); }
.why-card .ill { width: 56px; height: 56px; margin-bottom: 20px; stroke-width: 5; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.why-card:hover .ill { transform: rotate(-8deg) scale(1.08); }
.why-card h3 { font-family: var(--font-display); font-weight: 450; font-size: 1.3rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.why-card p { color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq { padding-top: 72px; padding-bottom: 72px; max-width: 820px; }
.faq-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.faq-head .eyebrow { margin-bottom: 8px; }
.faq-ill { width: 76px; height: 76px; flex-shrink: 0; stroke-width: 5; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 4px;
  font-size: 17px;
  font-weight: 500;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--muted);
  transition: transform .2s;
}
details[open] summary::after { transform: rotate(45deg); }
.num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-weight: 400; }
details p { padding: 0 4px 22px 40px; color: var(--muted); max-width: 62ch; }

/* ---------- Closing ---------- */
.closing { text-align: center; padding-top: 80px; padding-bottom: 96px; }
.closing-ill { width: 110px; height: 110px; margin: 0 auto 24px; stroke-width: 4.5; animation: sway 6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes sway { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }
.closing .btn { margin-top: 28px; }
.tagline { margin-top: 28px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0 56px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p + p { margin-top: 2px; }
.footer-cols { display: flex; gap: 56px; }
.footer-cols h4 { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.footer-cols a { display: block; text-decoration: none; color: var(--muted); font-size: 14px; padding: 3px 0; }
.footer-cols a:hover { color: var(--ink); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .portraits { gap: 8px; max-width: 340px; }
  .tile { width: 48px; height: 48px; }
  .tile .ill { width: 30px; height: 30px; }
  .app { flex-direction: row; }
  .app-art { aspect-ratio: auto; width: 108px; flex-shrink: 0; }
  .app-art .ill { width: 60px; height: 60px; }
  .app-body { padding: 16px; }
}
