/* Foli website. Layout: centered hero with fanned phones, then alternating text/screen rows, then legal-style long reads. */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --line: #e7e5df;
  --ink: #1c2320;
  --muted: #5d6661;
  --green: #2f7a27;
  --green-press: #286b21;
  --moss: #163f12;
  --sprout: #7dc169;
  --mint: #e9f5e3;
  --butter: #fdf6d8;
  --peach: #ffe9dc;
  --lavender: #efebff;
  --btn: #1c2320;
  --btn-fg: #ffffff;
  --frame: #15191a;
  --shadow: 0 1px 2px rgba(28,35,32,.04), 0 4px 16px rgba(28,35,32,.06);
  --shadow-phone: 0 2px 6px rgba(28,35,32,.08), 0 30px 60px -20px rgba(28,35,32,.28);

  --font-display: "Outfit", "Avenir Next", system-ui, sans-serif;
  --font-text: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --r-sm: 12px; --r-md: 20px; --r-lg: 28px; --r-pill: 999px;
  --ease-out: cubic-bezier(0.22,1,0.36,1);
  --wrap: 1120px;
  color-scheme: light;
  --read: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-press); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 520px) { .wrap { padding-inline: 16px; } }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.nav.is-home { background: color-mix(in srgb, var(--butter) 70%, transparent); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 22px/1 var(--font-display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } .nav-in { gap: 12px; } .nav-links { gap: 16px; } }

/* App Store pill */
.store { display: inline-flex; align-items: center; gap: 10px; background: var(--btn); color: var(--btn-fg); text-decoration: none; border-radius: var(--r-pill); padding: 12px 22px 12px 18px; transition: transform .2s var(--ease-out); }
.store:hover { color: var(--btn-fg); transform: translateY(-1px); }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store small { font-size: 11px; opacity: .75; letter-spacing: .01em; }
.store b { font: 600 17px/1.15 var(--font-text); }
.store.sm { padding: 8px 14px 8px 12px; gap: 7px; }
.store.sm svg { width: 17px; height: 17px; }
.store.sm b { font-size: 14px; }
.nav-links .store, .nav-links .store:hover { color: #fff; background: var(--green); }
.nav-links .store:hover { background: var(--green-press); }

/* Leaf glyph */
.leaf { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; }
.leaf path { fill: var(--green); }
.leaf .stem { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; }

/* Hero */
.hero { position: relative; background: linear-gradient(180deg, var(--butter) 0%, var(--mint) 55%, var(--bg) 100%); overflow: hidden; padding-block: 56px 0; margin-top: -64px; padding-top: 120px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.hero::before { width: 480px; height: 420px; background: var(--peach); left: -120px; top: 380px; opacity: .9; }
.hero::after { width: 520px; height: 460px; background: var(--lavender); right: -140px; top: 300px; opacity: .9; }
.hero-copy { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero h1 { font-size: clamp(44px, 8.4vw, 92px); }
.hero h1 em { font-style: normal; color: var(--green); display: block; }
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 34em; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 13px; }
.chip svg { width: 15px; height: 15px; }

.fan { --pw: clamp(170px, 29vw, 290px); position: relative; z-index: 1; margin-top: 56px; height: calc(var(--pw) * 1.55); }
.fan .phone { position: absolute; left: 50%; top: 0; width: var(--pw); margin-left: calc(var(--pw) / -2); }
.fan .p1 { transform: translate(-64%, 14%) rotate(-7deg); }
.fan .p2 { z-index: 2; }
.fan .p3 { transform: translate(64%, 14%) rotate(7deg); }
@media (max-width: 560px) { .fan .p1 { transform: translate(-50%, 12%) rotate(-7deg); } .fan .p3 { transform: translate(50%, 12%) rotate(7deg); } }
.phone { border-radius: 11.5% / 5.3%; background: #fff; padding: 1.4%; box-shadow: 0 0 0 1px var(--line), var(--shadow-phone); }
.phone img { border-radius: 10.4% / 4.8%; width: 100%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; }

/* Sections */
section { padding-block: 104px; }
@media (max-width: 720px) { section { padding-block: 72px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.h2 { font-size: clamp(34px, 5vw, 56px); }
.sub { color: var(--muted); font-size: 18px; max-width: 34em; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.row + .row { margin-top: 120px; }
.row.flip .row-art { order: -1; }
.row-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.row-copy ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.row-copy li { display: flex; gap: 10px; align-items: baseline; color: var(--ink); }
.row-copy li .leaf { flex: none; font-size: 15px; transform: translateY(2px); }
.row-art { position: relative; display: flex; justify-content: center; gap: 20px; padding: 48px 24px; border-radius: var(--r-lg); min-width: 0; }
.row-art .phone { width: min(250px, 46%); }
.row-art .phone:nth-child(2) { transform: translateY(40px); }
.tint-mint { background: var(--mint); }
.tint-peach { background: var(--peach); }
.tint-lav { background: var(--lavender); }
.tint-butter { background: var(--butter); }
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; gap: 36px; }
  .row.flip .row-art { order: 0; }
  .row + .row { margin-top: 88px; }
}
@media (max-width: 420px) { .row-art { padding: 28px 12px 48px; gap: 12px; } }

/* Leaf maths band */
.math { background: var(--moss); color: var(--bg); border-radius: var(--r-lg); padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
:root .math { --on: #f7f5f0; --on-muted: #c9dcc2; }
.math h2 { color: var(--on); font-size: clamp(32px, 4.6vw, 52px); }
.math p { color: var(--on-muted); margin-top: 16px; max-width: 30em; }
.equation { display: grid; gap: 12px; }
.eq { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 4px; font-family: var(--font-display); font-weight: 700; color: var(--on); font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; border-bottom: 1px solid rgba(247,245,240,.16); padding-bottom: 12px; }
.eq:last-child { border-bottom: 0; }
.eq span { color: #9fd38c; }
.eq small { flex-basis: 100%; font: 500 14px/1.3 var(--font-text); color: var(--on-muted); letter-spacing: 0; }
@media (max-width: 860px) { .math { grid-template-columns: 1fr; gap: 32px; } }

/* Cards grid (privacy etc.) */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; text-align: left; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { font-size: 21px; letter-spacing: -0.01em; line-height: 1.2; }
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.card .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--mint); display: grid; place-items: center; }
.card .ico svg { width: 20px; height: 20px; stroke: var(--green); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; max-width: 860px; margin-inline: auto; text-align: left; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.plan.pro { border: 2px solid var(--green); box-shadow: var(--shadow); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan h3 { font-size: 28px; }
.badge { font: 600 12px/1 var(--font-text); letter-spacing: .06em; text-transform: uppercase; background: var(--mint); color: var(--green); border-radius: var(--r-pill); padding: 7px 11px; }
.price { font: 700 44px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price small { font: 500 16px var(--font-text); color: var(--muted); letter-spacing: 0; }
.price-note { color: var(--muted); font-size: 15px; margin-top: -8px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.plan li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.plan li::before { content: ""; flex: none; width: 16px; height: 16px; transform: translateY(3px); background: var(--green); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.plan li.no { color: var(--muted); }
.plan li.no::before { background: var(--muted); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.fine { color: var(--muted); font-size: 14px; margin-top: 24px; text-align: center; max-width: 52em; margin-inline: auto; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } .plan { padding: 24px; } }

/* Closing CTA */
.cta { background: linear-gradient(160deg, var(--butter), var(--mint)); border-radius: var(--r-lg); padding: clamp(36px, 7vw, 72px) clamp(24px, 6vw, 72px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; overflow: hidden; }
.cta-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; min-width: 0; }
.cta img { width: clamp(150px, 22vw, 240px); }
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; text-align: left; } .cta img { justify-self: center; } }

/* Long-read pages */
.page-head { background: linear-gradient(180deg, var(--butter), var(--bg)); padding-block: 120px 56px; margin-top: -64px; }
.page-head .wrap { display: flex; flex-direction: column; gap: 16px; max-width: calc(var(--read) + 48px); }
.page-head h1 { font-size: clamp(40px, 6.6vw, 68px); }
.page-head .meta { color: var(--muted); font-size: 15px; }
.prose { max-width: calc(var(--read) + 48px); padding-block: 8px 104px; }
.prose h2 { font-size: 28px; margin-top: 56px; margin-bottom: 14px; letter-spacing: -0.015em; line-height: 1.15; }
.prose h3 { font: 600 18px/1.35 var(--font-text); letter-spacing: 0; margin-top: 28px; margin-bottom: 8px; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 20px; margin: 14px 0 0; display: grid; gap: 10px; }
.prose li::marker { color: var(--green); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .caps { text-transform: none; font-size: 15px; letter-spacing: .005em; }
.short { background: var(--mint); border-radius: var(--r-md); padding: 24px 26px; display: grid; gap: 12px; margin-top: 8px; }
.short .eyebrow { margin-bottom: 2px; }
.short p { color: var(--ink) !important; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.toc a { font-size: 14px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px; }
.toc a:hover { border-color: var(--green); }

/* Steps (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step::before { counter-increment: s; content: counter(s); font: 700 15px/1 var(--font-display); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--bg); }
.step h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }
.step p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* Stage strip */
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 16px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.stage svg { width: 44px; height: 44px; }
.stage b { font: 700 19px/1 var(--font-display); }
.stage span { font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Two column counts list */
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.counts .card ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 15.5px; }
@media (max-width: 720px) { .counts { grid-template-columns: 1fr; } }

/* Calculator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; box-shadow: var(--shadow); }
.calc label { font-weight: 600; display: block; margin-bottom: 14px; }
.calc output.big { font: 700 56px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: block; }
.calc input[type=range] { width: 100%; accent-color: var(--green); height: 28px; }
.calc .scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.calc-out { display: grid; gap: 12px; min-width: 0; }
.calc-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.calc-line:last-child { border-bottom: 0; }
.calc-line span { color: var(--muted); font-size: 15px; }
.calc-line b { font: 700 24px/1.1 var(--font-display); font-variant-numeric: tabular-nums; text-align: right; }
.calc-line b.green { color: var(--green); }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; gap: 28px; } }

/* Project feature */
.project { display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: 48px; }
.project img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; background: var(--mint); }
.project-copy { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.project-copy p { color: var(--muted); }
@media (max-width: 760px) { .project { grid-template-columns: 1fr; } .project img { min-height: 0; aspect-ratio: 4 / 3; } }

/* FAQ */
.faq { display: grid; gap: 10px; margin-top: 32px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 0; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--font-text); color: var(--green); transition: transform .25s var(--ease-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 20px; color: var(--muted); display: grid; gap: 10px; }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group h2 { font-size: 26px; }

.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.contact .card b { font: 600 16px var(--font-text); word-break: break-word; }
.copy { align-self: flex-start; font: 600 14px var(--font-text); background: var(--mint); color: var(--green); border: 0; border-radius: var(--r-pill); padding: 8px 14px; cursor: pointer; }
.copy:hover { filter: brightness(.97); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 48px 40px; margin-top: 24px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot p { color: var(--muted); font-size: 15px; margin-top: 12px; max-width: 26em; }
.foot h4 { margin: 0 0 12px; font: 600 13px/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot ul a:hover { color: var(--green); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } }

/* Consent banner */
.consent { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 520px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-phone); padding: 18px 20px; display: grid; gap: 14px; font-size: 15px; }
.consent p { color: var(--muted); }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.consent button { font: 600 14px var(--font-text); border-radius: var(--r-pill); padding: 9px 18px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.consent button.yes { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }

@media (prefers-reduced-motion: no-preference) {
    .fan .phone { animation: rise .9s var(--ease-out) both; }
  .fan .p1 { animation-delay: .08s; } .fan .p3 { animation-delay: .16s; }
  @keyframes rise { from { translate: 0 40px; } to { translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
