/* Finn landing page. Builds on tokens.css (read-only); page-level values live here. */
:root {
  --panel: #08080b;               /* Dogtooth's near-black band: the chat lives in it */
  --panel-ink: #ffffff;
  --panel-bubble: #1b1a25;        /* Finn's bubbles inside the panel */
  --sun-ink: #ffffff;             /* text on the owner's purple bubbles */
  --field-line: #8f8c9c;
  --tint: var(--tint-bg);
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(56px, 9vw, 112px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --panel: #111118;
    --panel-ink: #ffffff;
    --panel-bubble: #1f1d2b;
    --field-line: #4a4857;
    --tint: var(--tint-bg);
  }
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h3 { font-weight: 600; }
p { text-wrap: pretty; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* Brand mark */
.mark-pic { display: block; flex: none; line-height: 0; }
.mark { width: 32px; height: 32px; flex: none; display: block; object-fit: contain; }
.mark-bg { fill: var(--brand); }
.mark-fin { fill: var(--brand-ink); }
.mark-wave { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }
.mark-bg-light { fill: var(--panel-ink); }
.mark-fin-dark { fill: var(--panel); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 10px;
  font: 600 1.0625rem/1 var(--font); text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, #000); text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, #fff); }
}

/* Header */
.site-header { padding-block: 14px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.5rem; line-height: 1; letter-spacing: -0.01em;
}
.brand-by { font-size: 0.875rem; color: var(--ink-soft); padding-top: 3px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  padding: 10px 8px; border-radius: 8px;
}
.site-nav a:hover { text-decoration: underline; }
@media (max-width: 479px) {
  .site-nav a[href="#how"] { display: none; }
}

/* Hero */
.hero {
  padding-block: clamp(16px, 4vw, 56px) clamp(48px, 8vw, 104px);
  background: radial-gradient(900px 480px at 78% 18%, color-mix(in srgb, var(--brand-soft) 30%, transparent), transparent 70%),
              radial-gradient(700px 420px at 10% 0%, color-mix(in srgb, var(--brand-soft) 16%, transparent), transparent 70%);
}
.hero-grid {
  display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "chat" "scan";
}
.hero-copy { grid-area: copy; min-width: 0; }
.chat { grid-area: chat; min-width: 0; }
.scan-card { grid-area: scan; min-width: 0; }

.hero h1 {
  font-size: clamp(2.6rem, 7.4vw + 0.55rem, 4.75rem);
  line-height: 1.02;
  margin: 8px 0 16px;
}
.h1-line { display: block; }
.hero-sub {
  font-size: clamp(1.125rem, 0.6vw + 1rem, 1.3125rem);
  line-height: 1.5; color: var(--ink-soft);
  margin: 0; max-width: 36ch;
}
.hero-note { font-size: 0.9375rem; color: var(--ink-soft); margin: 14px 0 0; }

/* Chat mock */
.chat {
  margin: 0;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 28px;
  padding: 14px 16px 64px;
  box-shadow: 0 30px 80px -30px rgba(94, 16, 236, .45), var(--shadow);
  border: 1px solid color-mix(in srgb, var(--brand-soft) 18%, transparent);
}
.chat-bar {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--panel-ink) 18%, transparent);
}
.mark-sm { width: 36px; height: 36px; }
.chat-who { display: flex; flex-direction: column; line-height: 1.2; }
.chat-name { font-weight: 600; }
.chat-role { font-size: 0.8125rem; opacity: 0.85; }

.thread { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.day {
  align-self: center;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--panel-ink) 14%, transparent);
}
.composer { display: none; }
.bubble {
  margin: 0; max-width: 86%;
  padding: 10px 15px; border-radius: 20px;
  font-size: 1.0625rem; line-height: 1.38;
}
.bubble-out {
  align-self: flex-end;
  background: var(--accent); color: var(--sun-ink);
  border-bottom-right-radius: 6px;
  transform-origin: 100% 100%;
}
.reply { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.bubble-in {
  background: var(--panel-bubble); color: var(--panel-ink);
  border-bottom-left-radius: 6px;
  transform-origin: 0 100%;
}
.typing {
  position: absolute; top: 0; left: 0;
  display: none; gap: 5px; align-items: center;
  background: var(--panel-bubble); padding: 16px 16px; border-radius: 20px 20px 20px 6px;
}
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); display: block; }

.chip {
  display: flex; align-items: center; gap: 12px;
  max-width: 92%;
  background: var(--surface); color: var(--ink);
  border-radius: 16px; padding: 8px 14px 8px 8px;
  transform-origin: 0 0;
}
.chip-thumb {
  flex: none; width: 66px; height: 66px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line);
}
.chip-thumb b { display: block; border-radius: 3px; }
.t-bar { height: 7px; background: var(--brand); }
.t-line { height: 4px; width: 82%; background: var(--line); }
.t-short { width: 58%; }
.t-hit {
  margin-top: auto;
  font: 700 0.5625rem/1 var(--font); white-space: nowrap;
  background: var(--accent); color: var(--sun-ink);
  padding: 4px 4px;
}
.chip-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chip-url { font-weight: 600; font-size: 0.9375rem; overflow-wrap: anywhere; }
.chip-check { display: flex; align-items: center; gap: 5px; font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.3; }
.chip-check svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* The one orchestrated moment: the conversation plays once on load. */
@media (prefers-reduced-motion: no-preference) {
  .bubble-out { animation: pop 0.38s cubic-bezier(.2, .8, .2, 1) 0.45s both; }
  .typing { display: flex; animation: typing 1.45s ease 1.05s both; }
  .typing i { animation: dot 0.9s ease-in-out infinite; }
  .typing i:nth-child(2) { animation-delay: 0.15s; }
  .typing i:nth-child(3) { animation-delay: 0.3s; }
  .bubble-in { animation: pop 0.38s cubic-bezier(.2, .8, .2, 1) 2.45s both; }
  .chip { animation: pop 0.38s cubic-bezier(.2, .8, .2, 1) 2.85s both; }
  .t-hit { animation: hit 0.9s ease 3.15s both; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes typing {
  0% { opacity: 0; transform: translateY(6px); }
  14% { opacity: 1; transform: none; }
  86% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes dot {
  0%, 60%, 100% { transform: none; opacity: 0.55; }
  30% { transform: translateY(-3px); opacity: 1; }
}
@keyframes hit {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
  to { box-shadow: 0 0 0 8px transparent; }
}

/* Scan card (hosts the scan widget) */
.scan-card {
  position: relative;
  margin: -48px 10px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.scan-title { font-size: 1.375rem; line-height: 1.2; margin: 0 0 14px; }
.scan-fallback label { display: block; font-size: 0.9375rem; font-weight: 600; margin-bottom: 6px; }
.scan-row { display: flex; flex-wrap: wrap; gap: 10px; }
.scan-row input {
  flex: 1 1 210px; min-width: 0;
  font: 400 1.0625rem/1.2 var(--font); color: var(--ink);
  background: var(--surface);
  padding: 14px 16px; min-height: 52px;
  border: 1.5px solid var(--field-line); border-radius: 14px;
}
.scan-row input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.scan-row input:focus-visible { outline-offset: 1px; border-color: var(--brand); }
.scan-row .btn { flex: 1 0 auto; }
.scan-status { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }
.scan-status:not(:empty) { margin-top: 10px; }
.scan-note { font-size: 0.875rem; color: var(--ink-soft); margin: 12px 0 0; }

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    grid-template-areas: "copy chat" "scan chat";
    column-gap: clamp(40px, 5vw, 72px);
    row-gap: 36px;
    align-items: start;
  }
  .hero-copy { padding-top: 36px; }
  .chat { align-self: center; padding: 20px 24px 22px; border-radius: 32px; }
  .mark-sm { width: 42px; height: 42px; }
  .chat-name { font-size: 1.125rem; }
  .thread { padding-top: 20px; gap: 14px; }
  .bubble { font-size: 1.25rem; padding: 12px 18px; border-radius: 22px; }
  .bubble-out { border-bottom-right-radius: 6px; }
  .bubble-in { border-bottom-left-radius: 6px; }
  .chip { padding: 10px 18px 10px 10px; gap: 14px; max-width: 96%; }
  .chip-thumb { width: 78px; height: 78px; }
  .t-hit { font-size: 0.625rem; padding: 5px; }
  .chip-url { font-size: 1.0625rem; }
  .chip-check { font-size: 0.875rem; }
  .composer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 26px; padding: 8px 8px 8px 18px; border-radius: 999px;
    background: color-mix(in srgb, var(--panel-ink) 12%, transparent);
    font-size: 1rem; color: color-mix(in srgb, var(--panel-ink) 78%, transparent);
  }
  .composer svg { width: 34px; height: 34px; flex: none; }
  .composer circle { fill: var(--accent); }
  .composer path { fill: none; stroke: var(--sun-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .scan-card { margin: 0; padding: 24px; }
}

/* Sections */
.section { padding-block: var(--section-y); }
.section h2 {
  font-size: clamp(2rem, 3.4vw + 0.9rem, 3.125rem);
  line-height: 1.06;
  margin: 0 0 16px;
  max-width: 18ch;
}
.lead { font-size: clamp(1.0625rem, 0.5vw + 1rem, 1.25rem); color: var(--ink-soft); margin: 0; max-width: 46ch; }
.section h3 { font-size: 1.1875rem; line-height: 1.3; margin: 0 0 6px; }
:where(.section) p { margin: 0; }

/* Who it's for */
.fit { padding-top: clamp(24px, 4vw, 48px); }
.fit-grid { display: grid; gap: 32px; }
.fit-cols { display: grid; gap: 24px; }
.fit-item { padding-top: 18px; border-top: 2px solid var(--line); }
.fit-yes { border-top-color: var(--brand); }
.fit-item h3 { display: flex; align-items: center; gap: 10px; }
.fit-item h3 svg { width: 22px; height: 22px; flex: none; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fit-yes svg circle { fill: var(--brand); stroke: none; }
.fit-yes svg path { stroke: var(--brand-ink); }
.fit-no svg circle { stroke: var(--ink-soft); stroke-width: 1.5; }
.fit-no svg path { stroke: var(--ink-soft); }
.fit-item > p { color: var(--ink-soft); max-width: 42ch; }
@media (min-width: 640px) { .fit-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .fit-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); column-gap: 64px; align-items: end; }
}

/* How it works */
.how { background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; }
.step {
  position: relative;
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 18px;
  padding-bottom: 30px;
}
.step::before {
  content: ""; position: absolute; left: 23px; top: 52px; bottom: 4px;
  width: 2px; background: var(--line);
}
.step-num {
  grid-row: span 2;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--brand);
  border: 2px solid var(--brand);
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.375rem; line-height: 1;
  position: relative; z-index: 1;
}
.step h3 { margin-top: 10px; }
.step > p { color: var(--ink-soft); max-width: 40ch; }
.then {
  display: inline-block;
  margin: 4px 0 0 66px;
  padding: 12px 18px;
  background: var(--accent); color: var(--sun-ink);
  border-radius: 20px 20px 20px 6px;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.35;
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; margin-top: 48px; }
  .step { display: block; padding-bottom: 0; }
  .step::before { left: 60px; right: -20px; top: 23px; bottom: auto; width: auto; height: 2px; }
  .step:last-child::before { display: none; }
  .step h3 { margin-top: 20px; }
  .then { margin: 40px 0 0; }
}
@media (max-width: 899px) {
  .step:last-child { padding-bottom: 18px; }
  .step:last-child::before { bottom: -18px; }
}

/* Day to day */
.daily-head { max-width: 720px; }
.apps { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.apps li {
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.9375rem; font-weight: 600;
}
.apps .apps-later { background: transparent; border-style: dashed; border-color: var(--field-line); color: var(--ink-soft); font-weight: 500; }
.daily-grid { display: grid; gap: 36px; margin-top: 44px; }
.daily-item > p { color: var(--ink-soft); max-width: 40ch; }
.mini {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; margin-bottom: 18px;
  background: var(--tint); border-radius: 20px;
}
.mini-b { margin: 0; padding: 8px 12px; border-radius: 16px; font-size: 0.875rem; line-height: 1.35; max-width: 88%; }
.mini-out { align-self: flex-end; background: var(--accent); color: var(--sun-ink); border-bottom-right-radius: 5px; }
.mini-in { align-self: flex-start; background: var(--surface); color: var(--ink); border-bottom-left-radius: 5px; }
.mini-link { display: inline-block; margin-left: 4px; font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.mini-apps { flex-direction: row; align-items: center; justify-content: space-between; position: relative; }
.mini-apps::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: 50%; height: 2px;
  background: var(--brand); opacity: 0.5;
}
.mini-apps span {
  position: relative; padding: 6px 11px; border-radius: 999px;
  background: var(--surface); font-size: 0.8125rem; font-weight: 600;
  border: 1px solid var(--line);
}
@media (min-width: 760px) {
  .daily-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .mini { min-height: 132px; }
}

/* Trust */
.trust { border-top: 1px solid var(--line); }
.trust-grid { display: grid; gap: 36px; }
.promises { margin: 0; display: grid; gap: 26px; }
.promises div { padding-top: 16px; border-top: 1px solid var(--line); }
.promises dt { font-weight: 600; font-size: 1.125rem; }
.promises dd { margin: 4px 0 0; color: var(--ink-soft); }
@media (min-width: 640px) { .promises { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
@media (min-width: 900px) {
  .trust-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 64px; }
}

/* Pricing */
.pricing { background: var(--surface); border-block: 1px solid var(--line); }
.plans { display: grid; gap: 16px; margin-top: 36px; align-items: start; }
.plan { border-radius: 24px; padding: 24px; }
.plan-main { border: 2px solid var(--brand); }
.plan-alt { background: var(--bg); border: 1px solid var(--line); }
.plan h3 { font-size: 1.125rem; margin: 0; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 0; }
.amount {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3rem, 6vw + 1rem, 4.5rem); line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}
.per { font-size: 1.0625rem; color: var(--ink-soft); }
.plan-sub { margin-top: 8px; font-weight: 600; }
.plan-alt p:last-child { color: var(--ink-soft); margin-top: 6px; }
.includes { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px 24px; }
.includes li { position: relative; padding-left: 28px; }
.includes li::before {
  content: ""; position: absolute; left: 3px; top: 0.32em;
  width: 7px; height: 13px;
  border: solid var(--brand); border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}
.fine { display: grid; gap: 28px; margin-top: 40px; }
.fine-item ul { margin: 8px 0 0; padding-left: 1.15em; color: var(--ink-soft); }
.fine-item li { margin: 0 0 6px; padding-left: 2px; }
.fine-item li::marker { color: var(--brand); }
.pricing-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.pricing-cta p { color: var(--ink-soft); font-size: 0.9375rem; max-width: 44ch; }
@media (min-width: 480px) { .includes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 760px) {
  .plans { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .plan { padding: 30px; }
  .fine { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

/* FAQ */
.faq-grid { display: grid; gap: 24px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 44px 20px 0;
  font-weight: 600; font-size: 1.125rem; line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  color: var(--brand);
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: background-size 0.2s ease;
}
.faq-list details[open] summary::after { background-size: 100% 2px, 2px 0; }
.faq-list summary:hover { color: var(--brand); }
.answer { padding: 0 0 22px; color: var(--ink-soft); max-width: 62ch; }
.answer p + p { margin-top: 10px; }
@media (min-width: 900px) {
  .faq-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); column-gap: 64px; }
}

/* Closer */
.closer { background: var(--tint); padding-block: clamp(56px, 8vw, 104px); }
.closer-inner { display: flex; align-items: flex-end; gap: 12px; }
.mark-lg { width: 44px; height: 44px; }
.closer-bubble {
  background: var(--surface);
  border-radius: 28px 28px 28px 8px;
  padding: 24px;
  max-width: 720px;
  box-shadow: var(--shadow);
}
.closer-bubble h2 { font-size: clamp(1.5rem, 2.4vw + 0.9rem, 2.25rem); line-height: 1.12; margin: 0 0 8px; }
.closer-bubble p { color: var(--ink-soft); margin: 0 0 20px; }
@media (min-width: 640px) { .closer-bubble { padding: 30px 34px; } .closer-inner { gap: 16px; } }

/* Footer */
.site-footer { padding-block: 28px 40px; font-size: 0.875rem; color: var(--ink-soft); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-row p { margin: 0; }
