/* Folii landing page (folii.co). Colours follow app/static/tokens.css, light and dark.
   Fonts are self-hosted (site/static/fonts, SIL OFL): no font CDN, no third-party requests.
   No JavaScript: the pricing toggle is two radio buttons and the CSS below. */
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/geist.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/newsreader.woff2) format("woff2"); }

:root {
  color-scheme: light dark;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --paper: #f8f6f1; --surface: #ffffff; --sunken: #f1eee7; --line: #e3dfd6; --line-strong: #8a8f8c;
  --ink: #14232a; --muted: #4f5d63; --brand: #0f4c5c; --brand-hover: #0b3c49; --on-brand: #ffffff;
  --tint: #e3eff1; --accent: #f5b83d; --on-accent: #14232a; --accent-tint: #fcefd2;
  --positive: #0a6b62; --positive-tint: #dff1ee; --caution: #8a5600; --caution-tint: #fbeed3;
  --info: #2a5a9e; --info-tint: #e4ecf7;
  /* The deep teal bands (hero desk, final call to action) stay dark in both themes. */
  --band: #0f4c5c; --band-ink: #ffffff; --band-muted: #c6dde2; --band-line: rgba(255, 255, 255, .16);
  --shadow: 0 1px 2px rgba(20, 35, 42, .06), 0 12px 32px rgba(20, 35, 42, .14);
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1719; --surface: #172225; --sunken: #0b1214; --line: #2a383c; --line-strong: #6f8186;
    --ink: #eef2f1; --muted: #a9b7bb; --brand: #7fcbda; --brand-hover: #a0dae5; --on-brand: #0b2730;
    --tint: #16343c; --accent-tint: #3b2f14; --positive: #5cd0c0; --positive-tint: #12332f;
    --caution: #f0b84c; --caution-tint: #37290f; --info: #93bcf5; --info-tint: #1a2c46;
    --band: #0c3a46; --band-muted: #b5ced4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 17px/1.6 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); line-height: 1.02; letter-spacing: -0.028em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.06; letter-spacing: -0.022em; }
h3 { font: 600 1.06rem/1.35 var(--sans); letter-spacing: -0.005em; margin: 0; }
.lede { font-size: clamp(1.1rem, 1.9vw, 1.28rem); line-height: 1.55; color: var(--muted); max-width: 36em; }
.head { max-width: 46rem; margin-bottom: 48px; }
.head .lede { margin-top: 18px; }
section { padding: 104px 0; }
@media (max-width: 700px) { section { padding: 72px 0; } }

/* Buttons. Primary is the brand teal; on the teal bands it turns amber. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 600 1rem/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; white-space: nowrap; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 0.94rem; }
.band .btn.primary { background: var(--accent); color: var(--on-accent); }
.band .btn.primary:hover { background: #ffc95e; }
.band .btn.ghost { color: var(--band-ink); border-color: rgba(255, 255, 255, .45); }
.band .btn.ghost:hover { border-color: #fff; }
.band :focus-visible { outline-color: var(--accent); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Header */
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.logo { color: var(--ink); display: inline-flex; align-items: center; margin-right: auto; border-radius: 6px; }
.logo svg { height: 28px; width: auto; }
.logo-ink { stroke: currentColor; }
.logo-dot { stroke: var(--accent); fill: var(--accent); }
nav.main { display: flex; gap: 26px; }
nav.main a, .top .link { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
nav.main a:hover, .top .link:hover { color: var(--brand); }
.top .lang { color: var(--muted); font-weight: 400; }
.top .actions { display: flex; align-items: center; gap: 20px; }
@media (max-width: 960px) { nav.main { display: none; } }
@media (max-width: 520px) {
  header.top .wrap { gap: 12px; min-height: 60px; }
  .top .actions { gap: 14px; }
  .top .lang { display: none; }
  .top .btn.small { padding: 0 14px; }
}

/* Hero */
.hero { padding: 80px 0 0; }
.hero h1 { max-width: 13.5em; }
.hero .lede { margin: 28px 0 36px; }
.hero .note { margin-top: 20px; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 700px) { .hero { padding-top: 56px; } }

/* The product picture: one booking travelling through Folii, on a teal desk. */
.desk { margin-top: 64px; background: var(--band); padding: 56px 0 64px; position: relative; overflow: hidden; }
.desk::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--band-line) 1px, transparent 1px), linear-gradient(90deg, var(--band-line) 1px, transparent 1px); background-size: 48px 48px; opacity: .35; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.flow { position: relative; display: grid; grid-template-columns: 1fr 1.18fr 1fr; gap: 40px; align-items: start; }
.flow-step { position: relative; }
.flow-step > .label { display: flex; align-items: baseline; gap: 10px; color: var(--band-ink); font-weight: 500; font-size: 0.95rem; margin-bottom: 14px; }
.flow-step > .label b { font: 400 1.5rem/1 var(--serif); color: var(--accent); }
.flow-step + .flow-step::before { content: ""; position: absolute; left: -32px; top: 47px; width: 24px; height: 24px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg) scale(.55); }
.flow .sample { grid-column: 1 / -1; color: var(--band-muted); font-size: 0.85rem; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 36px; max-width: 520px; margin: 0 auto; }
  .flow-step + .flow-step::before { left: 50%; top: -30px; transform: translateX(-50%) rotate(135deg) scale(.55); }
}

.ui { background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow); font-size: 0.86rem; line-height: 1.45; overflow: hidden; }
.ui-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ui-bar strong { font: 500 1.08rem/1.2 var(--serif); letter-spacing: -0.01em; }
.ui-body { padding: 8px 18px 16px; }
.field { display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.field:last-of-type { border-bottom: 0; }
.field span { color: var(--muted); }
.field small { display: block; color: var(--muted); font-size: 0.8rem; }
.ui-actions { display: flex; justify-content: flex-end; padding-top: 10px; }
.ui-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-weight: 500; font-size: 0.82rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px; border-radius: 6px; font: 500 0.76rem/1 var(--sans); white-space: nowrap; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.badge.info, .badge.ok, .badge.wait, .badge.brand { box-shadow: none; }
.badge.info { background: var(--info-tint); color: var(--info); }
.badge.ok { background: var(--positive-tint); color: var(--positive); }
.badge.wait { background: var(--caution-tint); color: var(--caution); }
.badge.brand { background: var(--tint); color: var(--brand); }
.badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Mini flatplan: spreads of pages, page 1 alone on the right, the last page alone on the left. */
.fp { padding: 14px 18px 16px; }
.spreads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.spread { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pg { position: relative; aspect-ratio: 3 / 4; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 2px; overflow: hidden; }
.pg.none { visibility: hidden; }
.pg i { position: absolute; left: 0; right: 0; }
.pg i.ed { background: repeating-linear-gradient(0deg, var(--line) 0 2px, transparent 2px 5px); inset: 12% 12%; }
.pg i.ad { background: var(--tint); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.pg i.full { inset: 0; }
.pg i.half { bottom: 0; height: 50%; }
.pg i.top-half { top: 0; height: 50%; }
.pg i.qtr { bottom: 0; height: 25%; }
.pg i.new { background: var(--accent); border-color: #c98f16; }
.pg em { position: absolute; left: 4px; bottom: 2px; font: 500 9px/1 var(--sans); color: var(--muted); font-style: normal; }
.fp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; color: var(--muted); font-size: 0.8rem; }
.fp-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--tint); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.fp-legend .k-new::before { background: var(--accent); border-color: #c98f16; }
.fp-legend .k-ed::before { background: repeating-linear-gradient(0deg, var(--line-strong) 0 1px, transparent 1px 3px); border-color: var(--line); }

/* Mini invoice draft */
.rows { width: 100%; border-collapse: collapse; }
.rows th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.78rem; padding: 10px 0 6px; }
.rows td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.rows .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.rows tfoot td { font-weight: 600; }
.rows .vat td { font-weight: 400; color: var(--muted); }
.check { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }

/* The highlighted ad, the same in all three pictures. One short sequence on load. */
.hl { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.field.hl, td.hl:first-child { box-shadow: inset 3px 0 0 var(--accent); }
td.hl:first-child, .field.hl { padding-left: 8px; }
td.hl:last-child { padding-right: 6px; }
.field.hl { margin: 0 -8px; padding-right: 8px; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .flow-step:nth-child(1) .hl { animation: mark 700ms ease-out 500ms both; }
  .flow-step:nth-child(2) .pg i.new { animation: drop 600ms cubic-bezier(.2, .8, .3, 1.2) 1300ms both; }
  .flow-step:nth-child(3) .hl { animation: mark 700ms ease-out 2100ms both; }
  @keyframes mark { from { background-color: transparent; box-shadow: inset 0 0 0 transparent; } }
  @keyframes drop { from { opacity: 0; transform: translateY(-40%); } }
}

/* Problem */
.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: none; }
.pain { border-top: 2px solid var(--ink); padding-top: 22px; }
.pain h3 { font: 400 1.5rem/1.2 var(--serif); letter-spacing: -0.012em; }
.pain p { margin-top: 12px; color: var(--muted); }
.pain .fix { margin-top: 18px; color: var(--ink); display: flex; gap: 10px; align-items: flex-start; }
.pain .fix svg { flex: none; width: 20px; height: 20px; margin-top: 3px; fill: none; stroke: var(--positive); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) { .pains { grid-template-columns: 1fr; gap: 32px; } }

/* Benefits: a sticky introduction beside a list, each with a piece of the real interface. */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.split > .head { position: sticky; top: 108px; margin-bottom: 0; }
.split > .head .cta { margin-top: 32px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } .split > .head { position: static; } }
.benefits > li { padding: 30px 0; border-top: 1px solid var(--line); }
.benefits > li:first-child { padding-top: 0; border-top: 0; }
.benefits h3 { font: 400 1.6rem/1.2 var(--serif); letter-spacing: -0.014em; }
.benefits p { margin-top: 10px; color: var(--muted); max-width: 36em; }
.benefits .chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.benefits .tag { font: 500 0.78rem/1 var(--sans); color: var(--muted); margin-left: 8px; vertical-align: 3px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; }

/* How it works */
.alt { background: var(--sunken); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 400 4.2rem/1 var(--serif); color: var(--brand); margin-bottom: 18px; }
.steps p { margin-top: 10px; color: var(--muted); }
.steps + .cta { margin-top: 56px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 36px; } .steps li::before { font-size: 3.2rem; } }

/* Trust */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.facts li { padding: 22px 0; border-top: 1px solid var(--line); }
.facts p { margin-top: 6px; color: var(--muted); }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

/* Pricing */
.pricing .head { margin-left: auto; margin-right: auto; text-align: center; }
.pricing .head .lede { margin-left: auto; margin-right: auto; }
.billing-in { position: absolute; opacity: 0; pointer-events: none; }
.toggle { display: flex; justify-content: center; margin: -12px 0 40px; }
.toggle-track { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); }
.toggle label { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 500; cursor: pointer; color: var(--muted); }
.toggle label { white-space: nowrap; }
.toggle label small { font-size: 0.78rem; font-weight: 600; color: var(--positive); }
@media (max-width: 520px) {
  .toggle-track { border-radius: 18px; }
  .toggle label { flex-direction: column; justify-content: center; gap: 2px; min-height: 54px; padding: 0 22px; border-radius: 14px; line-height: 1.15; }
}
#bill-m:checked ~ .toggle label[for="bill-m"], #bill-y:checked ~ .toggle label[for="bill-y"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 35, 42, .15); }
#bill-m:focus-visible ~ .toggle label[for="bill-m"], #bill-y:focus-visible ~ .toggle label[for="bill-y"] { outline: 3px solid var(--brand); outline-offset: 2px; }
.y { display: none; }
#bill-y:checked ~ .plans .m, #bill-y:checked ~ .extras .m { display: none; }
#bill-y:checked ~ .plans .y, #bill-y:checked ~ .extras .y { display: block; }
#bill-y:checked ~ .plans .btn.y { display: inline-flex; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px 28px; }
.plan h3 { font: 400 1.7rem/1.1 var(--serif); letter-spacing: -0.015em; }
.plan .for { margin-top: 8px; color: var(--muted); min-height: 3.2em; }
.price { margin-top: 24px; font: 500 2.6rem/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price small { font-size: 0.95rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.price-note { margin-top: 10px; font-size: 0.88rem; color: var(--muted); min-height: 2.8em; }
.plan .btn { margin-top: 24px; width: 100%; }
.plan ul { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 0.95rem; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; fill: none; stroke: var(--positive); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plan li.all { font-weight: 600; }
.plan li.all svg { stroke: var(--brand); }
.plan.pop { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan.pop .badge { position: absolute; top: -13px; left: 26px; background: var(--brand); color: var(--on-brand); min-height: 26px; padding: 0 12px; border-radius: 999px; font-size: 0.8rem; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } .plan .for, .price-note { min-height: 0; } .plan.pop { order: -1; } }

.founding { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; padding: 26px 30px; border-radius: 18px; background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.founding h3 { font: 400 1.5rem/1.2 var(--serif); letter-spacing: -0.01em; }
.founding p { margin-top: 6px; max-width: 44em; }
.founding .btn { background: var(--ink); color: var(--paper); }
.founding .btn:hover { background: var(--brand); color: var(--on-brand); }
.extras { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.extras > div { border-top: 1px solid var(--line); padding-top: 18px; }
.extras p { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .extras { grid-template-columns: 1fr; gap: 20px; } }
.fine { margin-top: 32px; font-size: 0.86rem; color: var(--muted); max-width: 60em; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.faq-grid .head p { margin-top: 18px; color: var(--muted); }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; } }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font-weight: 600; font-size: 1.06rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); transition: transform 160ms ease; }
details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
summary:hover { color: var(--brand); }
details p { padding: 0 40px 24px 0; color: var(--muted); max-width: 40em; }
details p + p { margin-top: -10px; }

/* Final call to action */
.band { background: var(--band); color: var(--band-ink); }
.band a:not(.btn) { color: var(--band-ink); }
.final { padding: 112px 0; text-align: center; }
.final h2 { max-width: 16em; margin: 0 auto; }
.final p { margin: 22px auto 36px; color: var(--band-muted); font-size: 1.2rem; max-width: 34em; }
.final .cta { justify-content: center; }

footer { padding: 48px 0 56px; font-size: 0.92rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
footer .logo { margin: 0 0 14px; }
footer ul { display: flex; flex-wrap: wrap; gap: 10px 24px; }
footer a { color: var(--ink); }

/* 404 */
.lost { padding: 120px 0; }
.lost p { margin-top: 20px; }
