/* Flufflin landing page. Colours and type from the app (app/src/theme/tokens.ts, fonts.ts): ink outlines, offset
   "sticker" shadows, pastel surfaces. Light only, like the app. */
@font-face { font-family: 'Bricolage Grotesque'; src: url('/assets/fonts/BricolageGrotesque_800ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('/assets/fonts/BricolageGrotesque_600SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/assets/fonts/Figtree_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/assets/fonts/Figtree_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/assets/fonts/Figtree_800ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #2B2340; --ink2: #5C5478; --cream: #F8F6FF; --card: #FFFFFF; --line: #EFE6DA;
  --butter: #FFE38A; --mint: #BDEBD3; --peach: #FFCDB8; --lav: #D9D3FF; --room: #FFE7D6;
  --spark: #FFC93C; --tomato: #FF6B4A; --leaf: #4FB286; --done: #1F6B49; --error: #B3261E;
  --display: 'Bricolage Grotesque', ui-rounded, system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-card: 22px; --r-btn: 14px;
  --stroke: 2.5px solid var(--ink);
  --lift: 0 4px 0 var(--ink);
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 500 17px/1.55 var(--body); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink2); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 72px); }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: 21px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; justify-content: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--butter); padding: 8px 14px; border: var(--stroke); border-radius: 10px; z-index: 20; }
.skip:focus { left: 8px; }
.kicker { font: 800 13px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); margin-bottom: 14px; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink2); max-width: 36em; }
.fine { font-size: 14px; color: var(--ink2); }
.todo { background: #FFD6D0; color: var(--error); font-weight: 800; padding: 0 4px; border-radius: 4px; }
.fluff { width: 100%; height: auto; overflow: visible; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px;
  background: var(--spark); color: var(--ink); border: var(--stroke); border-radius: var(--r-btn); box-shadow: var(--lift);
  font: 800 17px/1.1 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-ghost { background: var(--card); }
.btn-sm { min-height: 42px; padding: 8px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 22px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: var(--r-btn);
  background: var(--ink); color: #fff; border: var(--stroke); font: 800 18px/1.05 var(--display); text-decoration: none;
}
.store:hover { color: #fff; opacity: .92; }
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font: 700 11px/1.2 var(--body); letter-spacing: .04em; opacity: .85; }
.store.is-soon { background: transparent; color: var(--ink2); border-style: dashed; border-color: #B9B0CF; cursor: default; }
.stores-lg .store { min-height: 60px; font-size: 21px; padding-right: 22px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(248, 246, 255, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 2px solid transparent; }
.top.is-scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 24px/1 var(--display); letter-spacing: -0.02em; }
.brand .fluff { width: 46px; }
.links { display: flex; align-items: center; gap: 22px; }
.links a:not(.btn) { font-weight: 700; font-size: 16px; text-decoration: none; }
.links a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 760px) {
  .links a:not(.btn):not(.lang) { display: none; }
  .links { gap: 14px; }
  .brand span { font-size: 21px; }
  .brand .fluff { width: 38px; }
}
@media (max-width: 380px) { .brand span { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px); overflow-x: clip; }
.hero-in { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hl { background: linear-gradient(transparent 58%, var(--butter) 58%, var(--butter) 92%, transparent 92%); padding: 0 .08em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-art { position: relative; justify-self: center; width: min(100%, 440px); padding: 10px 0 30px; }
.blob { position: absolute; inset: 8% -6% 4% 4%; background: var(--room); border: var(--stroke); border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; }
.phone {
  /* status bar (44 of 888) on top of the 390×844 screenshot */
  position: relative; margin: 0; width: min(100%, 300px); aspect-ratio: 390 / 888; border: 3px solid var(--ink); border-radius: 40px;
  overflow: hidden; background: var(--cream); box-shadow: 0 8px 0 var(--ink); display: flex; flex-direction: column;
  container-type: inline-size;
}
.phone img { width: 100%; height: auto; aspect-ratio: 390 / 844; flex: none; }
.statusbar {
  flex: none; height: calc(100% * 44 / 888); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 9% 0 11%; color: var(--ink); font: 800 4.2cqi/1 var(--body);
}
.sb-cam { width: 3.6cqi; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.sb-icons { justify-self: end; display: flex; align-items: center; gap: 1.6cqi; }
.sb-icons svg { height: 3.4cqi; width: auto; }
.phone-hero { margin-left: auto; margin-right: 6%; transform: rotate(2.5deg); }
.hero-fluff { position: absolute; width: 46%; left: -4%; bottom: 0; filter: drop-shadow(0 4px 0 rgba(43, 35, 64, .12)); animation: bob 4.5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.bubble {
  position: absolute; left: -2%; top: 14%; max-width: 220px; padding: 12px 16px; background: var(--card); border: var(--stroke);
  border-radius: 18px; box-shadow: var(--lift); font: 700 15px/1.35 var(--body);
}
.bubble::after { content: ''; position: absolute; right: 28px; bottom: -11px; width: 18px; height: 18px; background: var(--card); border-right: var(--stroke); border-bottom: var(--stroke); transform: rotate(45deg); }
.spark { position: absolute; width: 30px; animation: twinkle 3s ease-in-out infinite; }
.spark.a { right: 0; top: 4%; }
.spark.b { left: 40%; top: -2%; width: 22px; animation-delay: 1s; }
.spark.c { right: -2%; bottom: 24%; width: 24px; animation-delay: 2s; }
@keyframes twinkle { 50% { transform: scale(.75) rotate(20deg); } }
@media (max-width: 880px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { width: min(100%, 380px); }
  .phone-hero { width: 72%; }
}

/* ---------- promise strip ---------- */
.strip { border-block: var(--stroke); background: var(--card); }
.strip-in { list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 18px; margin: 0 auto; }
.strip li { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.dot-butter { background: var(--butter); } .dot-mint { background: var(--mint); } .dot-peach { background: var(--peach); } .dot-lav { background: var(--lav); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.tint-mint { background: #E7F7EE; border-block: var(--stroke); }
.tint-lav { background: #EEEBFF; border-block: var(--stroke); }
.tint-butter { background: #FFF3C9; border-block: var(--stroke); }
.card { background: var(--card); border: var(--stroke); border-radius: var(--r-card); box-shadow: var(--lift); padding: clamp(20px, 3vw, 28px); }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps .card p { color: var(--ink2); }
.num { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border: var(--stroke); border-radius: 50%; background: var(--butter); font: 800 22px/1 var(--display); }
.steps li:nth-child(2) .num { background: var(--mint); }
.steps li:nth-child(3) .num { background: var(--peach); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
.grid3 .card p { color: var(--ink2); }
@media (max-width: 880px) { .steps, .grid3 { grid-template-columns: 1fr; } }

.feature-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 6vw, 88px); align-items: center; }
.feature .phone { justify-self: center; width: min(100%, 290px); }
.feature-flip .phone { order: 2; transform: rotate(-2deg); }
.feature:not(.feature-flip) .phone { transform: rotate(1.5deg); }
.feature-copy > p { font-size: 19px; color: var(--ink2); max-width: 32em; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 38px; font-weight: 700; }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 8px;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232B2340' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
@media (max-width: 880px) {
  .feature-in { grid-template-columns: 1fr; }
  .feature-flip .phone { order: 0; }
  .feature .phone { width: min(70%, 280px); }
}

.who h2 { text-align: center; }
.who-card { border: var(--stroke); border-radius: var(--r-card); padding: 24px 24px 26px; text-align: center; box-shadow: var(--lift); }
.who-card .fluff { width: 120px; margin: 0 auto 10px; }
.who-card p { color: var(--ink2); margin: 0; }
.tint-butter-card { background: #FFF3C9; } .tint-peach-card { background: #FFE7DD; } .tint-mint-card { background: #E7F7EE; }

.plus-in { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; background: var(--ink); color: #fff; }
.plus-in h2, .plus-in .kicker { color: #fff; }
.plus-in .kicker { color: var(--butter); }
.plus-in p { color: #E4DFF5; }
.plus-in .ticks li::before { border-color: #fff; background-color: var(--butter); }
.plus { padding-top: 0; }
@media (max-width: 880px) { .plus-in { grid-template-columns: 1fr; } }

/* ---------- sign-up ---------- */
.signup { background: var(--room); border-block: var(--stroke); }
.signup-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.signup-copy > p { font-size: 19px; color: var(--ink2); }
.mini-steps { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.mini-steps li { counter-increment: s; position: relative; padding-left: 46px; }
.mini-steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--card); font: 800 16px/1 var(--display);
}
.form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 800; margin-bottom: 8px; }
.field input {
  width: 100%; min-height: 54px; padding: 12px 16px; font: 600 18px/1.2 var(--body); color: var(--ink);
  border: 2px solid #8A81A6; border-radius: var(--r-btn); background: var(--card);
}
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lav); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.hint { font-size: 14px; color: var(--ink2); margin: 8px 0 0; }
.error { color: var(--error); font-weight: 700; font-size: 15px; margin: 6px 0 0; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.45; color: var(--ink2); cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--leaf); cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; font-weight: 700; min-height: 1px; }
.status.is-error { color: var(--error); }
.done { text-align: center; }
.done .fluff { width: 140px; margin: 0 auto 8px; }
.form.is-done > :not(.done) { display: none; }
@media (max-width: 880px) { .signup-in { grid-template-columns: 1fr; } }

.download-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.download-in .stores { justify-content: flex-end; }
@media (max-width: 880px) { .download-in { grid-template-columns: 1fr; } .download-in .stores { justify-content: flex-start; } }

/* ---------- FAQ ---------- */
.faq h2 { margin-bottom: 28px; }
details { background: var(--card); border: var(--stroke); border-radius: 18px; margin-bottom: 14px; box-shadow: 0 3px 0 var(--ink); }
summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; position: relative; font: 800 18px/1.3 var(--body); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font: 800 26px/1 var(--display); }
details[open] summary::after { content: '–'; }
details p { padding: 0 22px 20px; margin: 0; color: var(--ink2); }

/* ---------- invite, results, documents ---------- */
.invite-in, .result .wrap { text-align: center; }
.pair { display: flex; justify-content: center; gap: 0; margin-bottom: 10px; }
.pair .fluff { width: 132px; }
.pair .fluff + .fluff { margin-left: -18px; }
.invite-in .lede { margin-inline: auto; }
.invite h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 48px; }
.code-card { margin: 28px auto 0; max-width: 520px; }
.code-label { font-weight: 800; color: var(--ink2); margin-bottom: 6px; }
.code { font: 800 clamp(26px, 6vw, 36px)/1.1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .08em; word-break: break-all; margin-bottom: 6px; }
.code-bad { color: var(--error); font-weight: 700; }
.code-card .cta-row { margin: 18px 0 6px; }
.invite .mini-steps { text-align: left; max-width: 520px; margin: 18px auto 0; }
.result .fluff { width: 170px; margin: 0 auto 12px; }
.result .lede { margin-inline: auto; }
.doc { padding-block: 48px 72px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); }
.doc h2 { font-size: 26px; margin-top: 1.6em; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 16px; background: var(--card); border: var(--stroke); border-radius: 14px; overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { background: var(--butter); }
.doc ul { padding-left: 1.2em; }
.lost { text-align: center; padding-block: 80px; }
.lost .fluff { width: 160px; margin: 0 auto 16px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #E4DFF5; padding: 48px 0 36px; }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 24px 32px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand .fluff { width: 64px; }
.foot-brand strong { display: block; font: 800 22px/1.1 var(--display); color: #fff; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot a { color: #fff; font-weight: 700; }
.foot a:hover { color: var(--butter); }
.foot .fine { grid-column: 1 / -1; color: #B9B0CF; margin: 0; font-size: 13px; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* ---------- small phones ---------- */
.links .btn { white-space: nowrap; }
@media (max-width: 460px) {
  .links .btn { display: none; }
  .bubble { max-width: 170px; font-size: 13px; padding: 10px 12px; top: 10%; }
  .cta-row .btn { flex: 1 1 100%; }
}
