/* Horento website (ADR-088): static, no cookies, no external resources; JavaScript only on /l/ (ADR-108).
   Font: Figtree (SIL OFL 1.1, fonts/Figtree-OFL.txt), bundled like in the app. Colours follow the app theme (HorentoColors.kt). */

@font-face { font-family: "Figtree"; src: url("fonts/figtree_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree_extrabold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #f3f5f4;
  --bg-2: #e9efec;
  --surface: #ffffff;
  --ink: #14211d;
  --muted: #56635e;
  --line: #dde3e0;
  --primary: #0e5a6e;
  --primary-2: #13788f;
  --on-primary: #ffffff;
  --primary-soft: #dceef2;
  --on-primary-soft: #0b4b5c;
  --wait: #c26a12;
  --wait-soft: #fbebd7;
  --on-wait-soft: #8a4205;
  --ok-soft: #e6f2ea;
  --on-ok-soft: #2b6a45;
  --shadow: 0 1px 2px rgba(20, 33, 29, .06), 0 12px 32px -12px rgba(20, 33, 29, .18);
  --shadow-lg: 0 2px 4px rgba(20, 33, 29, .06), 0 40px 80px -24px rgba(14, 90, 110, .35);
  --radius: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --bg-2: #141c19;
    --surface: #18201d;
    --ink: #e8eeeb;
    --muted: #a3b1ac;
    --line: #2a3531;
    --primary: #6fb3c4;
    --primary-2: #8fcad8;
    --on-primary: #0b1f25;
    --primary-soft: #1c3a42;
    --on-primary-soft: #a8d8e4;
    --wait: #e8a35c;
    --wait-soft: #3a2a17;
    --on-wait-soft: #f2c08a;
    --ok-soft: #1b3326;
    --on-ok-soft: #9fd5b4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 40px 80px -24px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header (all pages) ---------- */
body > header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0; padding: 14px max(16px, calc((100% - 1128px) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo { display: block; border-radius: 8px; }
nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 22px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
nav a:hover { color: var(--ink); }
nav a.cta { color: var(--on-primary); background: var(--primary); padding: 8px 16px; border-radius: 999px; }
nav a.cta:hover { color: var(--on-primary); background: var(--primary-2); }
@media (max-width: 640px) { nav .hide-sm { display: none; } }

/* ---------- Subpages (legal texts) ---------- */
main, footer { max-width: 880px; margin: 0 auto; padding: 0 16px; }
article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 28px 28px; margin-top: 16px; box-shadow: var(--shadow); }
@media (max-width: 640px) { article { padding: 4px 18px 20px; } }
article h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin-top: 28px; }
article h2 { font-size: 1.3rem; margin-top: 32px; }
article h3 { font-size: 1.05rem; margin-top: 24px; }
article table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
article th, article td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.draft { border: 2px dashed var(--wait); background: var(--wait-soft); color: var(--on-wait-soft); border-radius: 12px; padding: 12px 16px; }
/* legacy classes still used by subpages */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.note { background: var(--primary-soft); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }

/* ---------- Footer (all pages) ---------- */
footer { margin-top: 64px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
footer a { display: inline-block; color: var(--muted); margin-right: 18px; text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* ================= Landing page ================= */
body.home main { max-width: none; padding: 0; }
body.home footer { max-width: 1160px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.section { padding: 88px 0; }
@media (max-width: 760px) { .section { padding: 64px 0; } }
.eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 0 0 12px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 96px; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; }
.hero::before { width: 620px; height: 620px; right: -160px; top: -120px; background: radial-gradient(circle at 30% 30%, var(--primary-soft), transparent 65%); }
.hero::after { width: 420px; height: 420px; left: -140px; bottom: -160px; background: radial-gradient(circle, var(--wait-soft), transparent 65%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 56px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .88rem; padding: 6px 14px 6px 8px; border-radius: 999px; box-shadow: var(--shadow); }
.pill b { background: var(--primary); color: var(--on-primary); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin: 22px 0 20px; }
.hero h1 .accent { background: linear-gradient(100deg, var(--primary), var(--primary-2) 55%, var(--wait)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.1rem, 2vw, 1.28rem); color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); text-decoration: none; line-height: 1.15; box-shadow: var(--shadow); }
.store svg { flex: none; }
.store small { display: block; font-size: .72rem; opacity: .75; }
.store strong { font-size: 1.05rem; font-weight: 700; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .92rem; font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { color: var(--primary); }

/* Phone mockup */
.device-stage { position: relative; display: flex; justify-content: center; }
.phone { position: relative; width: min(330px, 86vw); aspect-ratio: 9 / 18.5; background: #0b1210; border-radius: 46px; padding: 11px; box-shadow: var(--shadow-lg); transform: rotate(-3deg); }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%); background: #0b1210; border-radius: 999px; z-index: 2; }
.screen { height: 100%; border-radius: 36px; overflow: hidden; background: #f3f5f4; color: #14211d; padding: 54px 14px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.35; }
.screen .bar { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 4px; }
.screen .bar strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.screen .bar span { color: #56635e; font-weight: 600; font-size: 12px; }
.row { background: #fff; border: 1px solid #dde3e0; border-radius: 16px; padding: 11px 12px; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.a1 { background: #0e5a6e; } .a2 { background: #c26a12; } .a3 { background: #5b6f9e; }
.row h4 { margin: 0; font-size: 13.5px; font-weight: 700; }
.row p { margin: 1px 0 6px; color: #56635e; font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; }
.chip.wait { background: #fbebd7; color: #8a4205; }
.chip.due { background: #dceef2; color: #0b4b5c; }
.chip.ok { background: #e6f2ea; color: #2b6a45; }
.screen .fab { margin-top: auto; align-self: stretch; text-align: center; background: #0e5a6e; color: #fff; font-weight: 700; border-radius: 14px; padding: 11px; font-size: 13.5px; }
.toast { position: absolute; left: max(-24px, calc(50% - 300px)); top: 5%; width: 220px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: .84rem; line-height: 1.35; transform: rotate(2deg); }
.toast b { display: block; font-size: .78rem; color: var(--muted); font-weight: 700; }
.toast-2 { left: auto; right: max(-24px, calc(50% - 300px)); top: auto; bottom: -3%; transform: rotate(-2deg); }
@media (max-width: 900px) { .toast { left: 0; } .toast-2 { left: auto; right: 0; } }
@media (max-width: 520px) { .toast { display: none; } }

/* Three questions */
.questions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .questions { grid-template-columns: 1fr; } }
.q { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow); overflow: hidden; }
.q .num { font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--primary-soft); position: absolute; right: 18px; top: 12px; }
.q h3 { font-size: 1.3rem; margin: 0 0 10px; font-weight: 800; max-width: 85%; }
.q p { margin: 0; color: var(--muted); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; position: relative; padding: 26px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 1.15rem; margin-bottom: 16px; }
.steps h3 { margin: 0 0 6px; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }

/* Bento features */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile { grid-column: span 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.tile.wide { grid-column: span 3; }
.tile.feature { background: linear-gradient(140deg, var(--primary), var(--primary-2)); color: var(--on-primary); border: 0; }
.tile.feature p { color: color-mix(in srgb, var(--on-primary) 82%, transparent); }
.tile.feature .icon { background: color-mix(in srgb, var(--on-primary) 16%, transparent); color: var(--on-primary); }
@media (max-width: 980px) { .tile, .tile.wide { grid-column: span 3; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .tile, .tile.wide { grid-column: auto; } }
.icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--on-primary-soft); margin-bottom: 16px; }
.tile h3 { margin: 0 0 6px; font-size: 1.15rem; }
.tile p { margin: 0; color: var(--muted); }
.mini { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mini .chip.wait { background: var(--wait-soft); color: var(--on-wait-soft); }
.mini .chip.due { background: var(--primary-soft); color: var(--on-primary-soft); }
.mini .chip.ok { background: var(--ok-soft); color: var(--on-ok-soft); }

/* Privacy band */
.privacy { background: radial-gradient(1200px 500px at 85% 0%, #13788f 0%, transparent 60%), #0b3f4d; color: #e8f4f7; }
.privacy .eyebrow { color: #9fd3e0; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800; margin: 0 0 16px; letter-spacing: -0.03em; }
.privacy p { color: #c4dde4; font-size: 1.08rem; }
.privacy a { color: #fff; font-weight: 700; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 16px 18px; }
.checks strong { display: block; color: #fff; }
.checks span { color: #b7d2d9; font-size: .95rem; }
.checks svg { color: #8fe0c0; margin-top: 2px; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 920px; margin: 0 auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan.pro { border: 2px solid var(--primary); position: relative; }
.plan.pro::before { content: attr(data-badge); position: absolute; top: -13px; left: 28px; background: var(--primary); color: var(--on-primary); font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .04em; }
.plan h3 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 4px; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .sub { color: var(--muted); margin: 0 0 18px; font-size: .95rem; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.plan li svg { color: var(--primary); margin-top: 3px; }
.options { display: grid; gap: 8px; margin: 6px 0 20px; }
.options div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); font-weight: 600; }
.options div span:last-child { white-space: nowrap; }

/* Purpose */
.purpose { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--wait); border-radius: var(--radius); padding: 26px; max-width: 920px; margin: 0 auto; }
.purpose h2 { margin: 0 0 8px; font-size: 1.2rem; }
.purpose p { margin: 0; color: var(--muted); }
.purpose .icon { background: var(--wait-soft); color: var(--on-wait-soft); margin: 0; }
@media (max-width: 560px) { .purpose { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0; margin: 0 0 12px; transition: box-shadow .2s; }
details[open] { box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 18px 56px 18px 22px; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* Final call to action */
.final { text-align: center; background: linear-gradient(140deg, var(--primary), var(--primary-2)); color: var(--on-primary); border-radius: 32px; padding: 64px 24px; box-shadow: var(--shadow-lg); }
.final h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 800; margin: 0 0 12px; letter-spacing: -0.03em; }
.final p { margin: 0 auto 28px; max-width: 560px; color: color-mix(in srgb, var(--on-primary) 85%, transparent); font-size: 1.1rem; }
.final .stores { justify-content: center; margin: 0; }
.final .store { background: var(--on-primary); color: var(--primary); }

/* Footer columns on the landing page */
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }
.foot h4 { margin: 0 0 10px; color: var(--ink); font-size: .95rem; }
.foot a { display: block; margin: 0 0 6px; }
.foot p { margin: 8px 0 0; max-width: 340px; }
.copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .85rem; }

/* Section variants (no inline styles: CSP style-src 'self') */
.section.tight-top { padding-top: 24px; }
.section.no-top { padding-top: 0; }
.section.alt { background: var(--bg-2); }
.tint { color: var(--primary); }
.foot a.inline { display: inline; margin: 0; }

/* ---------- Link pages /l/ (mail links) and /i/ (invitations) ---------- */
.linkpage { max-width: 640px; margin: 40px auto 0; }
.linkcard { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px 28px; box-shadow: var(--shadow); }
.linkcard .icon { width: 56px; height: 56px; border-radius: 18px; margin-bottom: 20px; }
.linkcard h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 10px; }
.linkcard .lead { margin: 0 0 24px; }
.code-box { display: grid; gap: 12px; background: var(--bg-2); border: 1px dashed var(--line); border-radius: 16px; padding: 16px; margin: 0 0 24px; }
.code-box .label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.code-box code { font: 600 1.02rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink); word-break: break-all; user-select: all; -webkit-user-select: all; }
.btn { appearance: none; border: 0; cursor: pointer; font: 700 1rem "Figtree", system-ui, sans-serif; color: var(--on-primary); background: var(--primary); padding: 12px 20px; border-radius: 999px; justify-self: start; }
.btn:hover { background: var(--primary-2); }
.btn.done { background: var(--on-ok-soft); color: var(--surface); }
.link-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
.link-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.link-steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 800; }
.link-steps li span { padding-top: 4px; }
.linkpage .note { font-size: .95rem; color: var(--on-primary-soft); }
.linkpage .note h2 { font-size: 1rem; margin: 0 0 4px; color: var(--ink); }
.linkpage .note p { margin: 0; }
.linkpage .other-lang { margin-top: 28px; }
.linkpage .other-lang h2 { font-size: 1.25rem; margin: 0 0 8px; }
.linkpage .other-lang p { color: var(--muted); margin: 0 0 8px; }
.with-code { display: none; }
.has-code .with-code { display: block; }
.has-code .code-box.with-code { display: grid; }
.has-code span.with-code { display: inline; }
.has-code .no-code { display: none; }
@media (max-width: 560px) { .linkcard { padding: 24px 18px; } .linkpage { margin-top: 20px; } }
