/* Cleo site. Tokens mirror lib/utils/theme.dart in the app. */
:root {
  --canvas: #F6F3EE;
  --surface: #FFFFFF;
  --sunk: #EFEBE4;
  --line: #ECE7DF;
  --line-strong: #DCD5CA;
  --ink: #1C1B19;
  --ink-muted: #6E6A63;
  --ink-faint: #9A958C;
  --brand: #0F5B4B;
  --brand-pressed: #0B4A3D;
  --brand-tint: #E3F1EC;
  --brand-soft: #BFE3D6;
  --on-brand: #F6F3EE;
  --amber-tint: #F7EBD5;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(28, 27, 25, .04), 0 8px 24px rgba(28, 27, 25, .06);
  --shadow-lg: 0 2px 6px rgba(28, 27, 25, .06), 0 30px 60px -20px rgba(28, 27, 25, .28);
  --max: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-pressed); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; line-height: 1.12; margin: 0; font-optical-sizing: auto; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; color: var(--canvas); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--body); letter-spacing: .02em; color: var(--brand);
}
.eyebrow svg { width: 15px; height: 15px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--body); white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-dark { background: var(--ink); color: var(--canvas); }
.btn-dark:hover { background: #000; color: var(--canvas); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-pressed); color: var(--on-brand); }
.btn-light { background: var(--canvas); color: var(--brand); }
.btn-light:hover { background: #fff; color: var(--brand); }
.btn-ghost { color: var(--ink); padding: 0 8px; }
.btn-ghost:hover { color: var(--brand); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-sm svg { width: 16px; height: 16px; }
.appstore .lead { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.appstore .lead small { font-size: 11px; font-weight: 500; opacity: .75; letter-spacing: .01em; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 243, 238, .82);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 500 22px/1 var(--display); letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) { color: var(--ink-muted); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.nav-links .btn { margin-left: 8px; }
@media (max-width: 760px) {
  .nav-links .hide-sm { display: none; }
}

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); margin: 18px 0 22px; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero .sub { font-size: clamp(18px, 1.7vw, 20px); color: var(--ink-muted); max-width: 33em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.fine { margin-top: 16px; font-size: 14px; color: var(--ink-faint); }
.hero-art { position: relative; display: flex; justify-content: center; min-height: 560px; }
.hero-art .glow { position: absolute; inset: 8% 4% 4% 10%; background: radial-gradient(closest-side, var(--brand-tint), transparent); border-radius: 50%; }
.phone {
  position: relative; width: min(300px, 70vw); padding: 9px; border-radius: 48px;
  background: var(--ink); box-shadow: var(--shadow-lg);
}
.phone img { border-radius: 40px; width: 100%; aspect-ratio: 660 / 1434; object-fit: cover; background: var(--canvas); }
.hero-art .phone.front { z-index: 2; transform: translateX(14%); }
.hero-art .phone.back { position: absolute; z-index: 1; width: min(260px, 60vw); left: 4%; top: 70px; transform: rotate(-6deg); opacity: .96; }
.float-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.3;
}
.float-chip strong { display: block; font-weight: 600; }
.float-chip span { color: var(--ink-muted); font-size: 13px; }
.float-chip .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.float-chip .dot svg { width: 18px; height: 18px; }
.float-chip.one { right: -2%; top: 18%; }
.float-chip.two { left: 0; bottom: 12%; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; margin-top: 8px; }
  .hero-art .phone.back { display: none; }
  .hero-art .phone.front { transform: none; }
  .float-chip.one { right: 0; }
}
@media (max-width: 520px) {
  .float-chip { display: none; }
}

/* Proof strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.strip-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip-item { display: flex; align-items: center; gap: 14px; padding: 26px 0; }
.strip-item + .strip-item { padding-left: 28px; border-left: 1px solid var(--line); }
.strip-item svg { width: 22px; height: 22px; color: var(--brand); flex: none; }
.strip-item strong { display: block; font-weight: 600; font-size: 15px; }
.strip-item span { color: var(--ink-muted); font-size: 14px; }
@media (max-width: 760px) {
  .strip-inner { grid-template-columns: 1fr; }
  .strip-item { padding: 18px 0; }
  .strip-item + .strip-item { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 50px); margin: 14px 0 16px; }
.section-head p { color: var(--ink-muted); font-size: 18px; }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 9vw, 120px); }
.feature.flip .feature-art { order: -1; }
.feature-copy h3 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 16px; }
.feature-copy > p { color: var(--ink-muted); font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 3px; }
.feature-art {
  display: flex; justify-content: center; padding: clamp(32px, 5vw, 56px) 0;
  background: var(--sunk); border-radius: 32px;
}
.feature-art .phone { width: min(280px, 66vw); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--amber-tint); color: #7A4F12; font-size: 12px; font-weight: 600; vertical-align: middle; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-art { order: 0; }
}

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(64px, 8vw, 104px); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card .ico { width: 44px; height: 44px; border-radius: 13px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.card .ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--ink-muted); font-size: 16px; }
@media (max-width: 860px) { .cards3 { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 32px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step .n { font: 500 56px/1 var(--display); color: var(--brand-soft); }
.step h3 { font-size: 24px; margin: 18px 0 8px; }
.step p { color: var(--ink-muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 16px; justify-content: center; }
.plan { border-radius: 28px; padding: 36px 32px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.plan.pro { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.plan h3 { font-size: 26px; }
.plan .tag { font-size: 15px; color: var(--ink-muted); margin-top: 6px; }
.plan.pro .tag { color: var(--brand-soft); }
.plan .price { display: flex; align-items: baseline; gap: 6px; margin: 28px 0 4px; font: 500 52px/1 var(--display); letter-spacing: -.02em; }
.plan .price small { font: 500 16px/1 var(--body); color: var(--ink-muted); letter-spacing: 0; }
.plan.pro .price small, .plan.pro .alt { color: var(--brand-soft); }
.plan .alt { font-size: 14px; color: var(--ink-faint); min-height: 22px; }
.plan .ticks { margin: 28px 0 32px; flex: 1; }
.plan.pro .ticks svg { color: var(--brand-soft); }
.plan .btn { width: 100%; }
.price-note { text-align: center; margin-top: 24px; font-size: 14px; color: var(--ink-faint); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Post cards */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card {
  display: flex; flex-direction: column; gap: 12px; padding: 26px; min-height: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.post-card h2, .post-card h3 { font-size: 22px; line-height: 1.2; }
.post-card p { color: var(--ink-muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .meta { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--ink-faint); }
.topic { display: inline-flex; align-self: flex-start; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.post-card.featured { grid-column: 1 / -1; min-height: 0; padding: clamp(28px, 4vw, 48px); background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.post-card.featured:hover { color: var(--on-brand); }
.post-card.featured h2 { font-size: clamp(28px, 3.6vw, 44px); max-width: 20em; }
.post-card.featured p { color: var(--brand-soft); font-size: 17px; max-width: 46em; }
.post-card.featured .meta { color: var(--brand-soft); }
.post-card.featured .topic { background: rgba(246, 243, 238, .14); color: var(--on-brand); }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 28px; }
.more-link svg { width: 18px; height: 18px; }
@media (max-width: 960px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .posts { grid-template-columns: 1fr; } }

/* Blog index */
.page-head { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(28px, 4vw, 40px); }
.page-head h1 { font-size: clamp(40px, 6vw, 68px); margin: 14px 0 14px; }
.page-head p { color: var(--ink-muted); font-size: 19px; max-width: 36em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.filters button {
  height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 14px/1 var(--body);
}
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.filters button .count { color: var(--ink-faint); margin-left: 4px; }
.filters button[aria-pressed="true"] .count { color: var(--ink-faint); }
.post-card[hidden] { display: none; }

/* Article */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-faint); padding-top: clamp(28px, 4vw, 48px); }
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--brand); }
.article { max-width: 720px; margin: 0 auto; }
.article-head { padding: 24px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.article-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-faint); }
.article-head h1 { font-size: clamp(36px, 5.2vw, 56px); margin: 20px 0 20px; }
.article-head .lede { font-size: 20px; line-height: 1.55; color: var(--ink-muted); }
.prose { font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(26px, 3vw, 32px); margin-top: 2em; }
.prose h3 { font-size: 22px; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--brand); }
.prose strong { font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: var(--brand-soft); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand-soft); color: var(--ink-muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose .updated { color: var(--ink-faint); font-size: 15px; }

.cta-card {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
  margin: 56px 0 0; padding: 28px; border-radius: var(--radius);
  background: var(--brand-tint); border: 1px solid #CFE6DD;
}
.cta-card img { width: 64px; height: 64px; border-radius: 16px; }
.cta-card h2 { font-size: 24px; margin-bottom: 6px; }
.cta-card p { color: var(--ink-muted); font-size: 16px; }
.cta-card .btn { margin-top: 16px; }
@media (max-width: 560px) { .cta-card { grid-template-columns: 1fr; } }

.related { padding: clamp(56px, 7vw, 88px) 0; }
.related h2 { font-size: 30px; margin-bottom: 24px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font: 500 21px/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; color: var(--ink-faint); flex: none; transition: transform .2s ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-muted); max-width: 44em; }

/* Closing band */
.band { background: var(--brand); color: var(--on-brand); border-radius: 36px; padding: clamp(48px, 7vw, 88px) clamp(24px, 5vw, 72px); text-align: center; position: relative; overflow: hidden; }
.band h2 { font-size: clamp(32px, 4.6vw, 52px); max-width: 16em; margin: 0 auto 16px; }
.band p { color: var(--brand-soft); font-size: 18px; margin-bottom: 32px; }
.band::before, .band::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(191, 227, 214, .18); }
.band::before { width: 420px; height: 420px; left: -140px; top: -180px; }
.band::after { width: 560px; height: 560px; right: -220px; bottom: -320px; }
.band > * { position: relative; }

/* Footer */
.footer { margin-top: clamp(64px, 8vw, 96px); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer p.tag { color: var(--ink-muted); margin-top: 14px; max-width: 22em; }
.footer h4 { font: 600 13px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin: 6px 0 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--ink-muted); }
.footer ul a:hover { color: var(--brand); }
.footer .base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 14px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* 404 */
.lost { text-align: center; padding: clamp(72px, 12vw, 140px) 0; }
.lost h1 { font-size: clamp(40px, 6vw, 64px); margin: 16px 0; }
.lost p { color: var(--ink-muted); font-size: 18px; margin-bottom: 32px; }
.lost .cta-row { justify-content: center; }

/* Reveal on scroll (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .post-card, .btn { transition: none; }
}
