/* Talehook site. Warm paper by day, lamplight by night. Tokens match the app (src/style.css). */
:root {
  --bg: #f5efe4; --bg-2: #ede5d6; --card: #fffcf6; --ink: #2b241b; --ink-2: #5a4f41; --muted: #8b7f6e;
  --line: #e3d8c5; --line-2: #d6c8b0; --accent: #a24a22; --accent-2: #c4673a; --accent-ink: #fff8f2; --accent-soft: #f3dfd1;
  --bezel: #2b241b;
  --radius: 16px; --radius-s: 11px;
  --shadow: 0 1px 1px rgba(70,45,10,.05), 0 4px 16px rgba(70,45,10,.06);
  --shadow-lg: 0 2px 4px rgba(70,45,10,.06), 0 24px 60px rgba(70,45,10,.16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --gutter: 16px; --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120e; --bg-2: #1c1813; --card: #211c16; --ink: #efe6d6; --ink-2: #c9bca7; --muted: #998d7b;
    --line: #342c22; --line-2: #45392b; --accent: #e4895b; --accent-2: #f0a27a; --accent-ink: #1d120b; --accent-soft: #3a2619;
    --bezel: #0a0806;
    --shadow: 0 1px 1px rgba(0,0,0,.25); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  }
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .1px; text-wrap: balance; }
h1 { font-size: clamp(40px, 9vw, 64px); }
h2 { font-size: clamp(28px, 5.5vw, 40px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.lede { font-size: clamp(18px, 2.6vw, 21px); color: var(--ink-2); line-height: 1.5; }
.kicker { font: 600 12.5px/1 var(--sans); text-transform: uppercase; letter-spacing: 1.2px; color: var(--accent); margin: 0 0 14px; }
.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 21px/1 var(--serif); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav .btn { padding: 8px 14px; font-size: 14.5px; }
@media (max-width: 719px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 20px; border-radius: 12px; font: 600 16px/1.2 var(--sans); text-decoration: none; border: 1px solid transparent; transition: transform .12s ease, background .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-store { background: var(--ink); color: var(--bg); }
.btn-store:hover { opacity: .9; }
.btn-store small { display: block; font-size: 11px; font-weight: 500; opacity: .8; letter-spacing: .2px; }
.btn-store span { text-align: left; }
.btn-store .ico { width: 26px; height: 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.nav .btn { color: var(--accent-ink); }
.nav .btn-ghost { color: var(--ink); }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; gap: 44px; align-items: center; }
.hero-icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 22px; }
.hero h1 { margin-bottom: .2em; }
.hero .promise { font: 500 clamp(22px, 3.6vw, 28px)/1.3 var(--serif); color: var(--ink); margin-bottom: .7em; text-wrap: balance; }
.hero .fine { font-size: 14px; color: var(--muted); margin: 0; }
@media (min-width: 900px) {
  .hero { padding: 84px 0 64px; }
  .hero .wrap { grid-template-columns: 1.15fr .85fr; }
}

/* Phone frames and screenshot slots */
.phone { position: relative; width: min(280px, 76vw); aspect-ratio: 9 / 19.5; margin: 0 auto; border-radius: 44px; background: var(--bezel); padding: 10px; box-shadow: var(--shadow-lg); }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 74px; height: 20px; margin-left: -37px; border-radius: 12px; background: var(--bezel); z-index: 2; }
.screen { position: absolute; inset: 10px; border-radius: 35px; overflow: hidden;
  background:
    linear-gradient(var(--line-2), var(--line-2)) 18px 62px / 46% 12px no-repeat,
    linear-gradient(var(--line), var(--line)) 18px 84px / 30% 8px no-repeat,
    linear-gradient(var(--card), var(--card)) 14px 112px / calc(100% - 28px) 78px no-repeat,
    linear-gradient(var(--card), var(--card)) 14px 200px / calc(100% - 28px) 78px no-repeat,
    linear-gradient(var(--card), var(--card)) 14px 288px / calc(100% - 28px) 78px no-repeat,
    linear-gradient(170deg, var(--bg-2), var(--accent-soft));
}
.screen::after { content: attr(data-label); position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; font: 500 13px/1.3 var(--serif); font-style: italic; color: var(--muted); }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; z-index: 1; }
.phones { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.phones { flex-wrap: nowrap; }
.phones .phone { width: min(220px, calc(50% - 10px)); margin: 0; border-radius: 36px; padding: 8px; }
.phones .screen { inset: 8px; border-radius: 29px; }
.phones .phone::before { top: 16px; width: 58px; height: 16px; margin-left: -29px; }

/* Sections */
section { padding: 48px 0; }
@media (min-width: 900px) { section { padding: 72px 0; } }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem p { font: 400 clamp(21px, 3.4vw, 27px)/1.45 var(--serif); color: var(--ink); margin: 0; text-wrap: pretty; }
.problem em { color: var(--accent); font-style: italic; }
.section-head { max-width: 640px; margin-bottom: 36px; }

.feature { display: grid; gap: 36px; align-items: center; padding: 28px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; padding: 44px 0; }
  .feature.flip .feature-text { order: 2; }
}
.feature-text .ico { color: var(--accent); width: 30px; height: 30px; margin-bottom: 12px; }
.feature-text p { color: var(--ink-2); }
.quote { font: italic 500 19px/1.4 var(--serif); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-s); padding: 12px 16px; margin: 4px 0 16px; }

.cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 40px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card .ico { color: var(--accent); width: 28px; height: 28px; margin-bottom: 10px; }
.card h3 { font-size: 20px; margin-bottom: .4em; }
.card p { color: var(--ink-2); font-size: 16px; margin: 0; }
.card p + p { margin-top: .7em; }

/* AI section */
.ai-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 960px) { .ai-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
.points li { display: flex; gap: 14px; align-items: flex-start; }
.points .ico { color: var(--accent); margin-top: 2px; }
.points b { display: block; font-family: var(--serif); font-size: 18.5px; font-weight: 600; }
.points span { color: var(--ink-2); font-size: 16px; }

/* Pricing */
.plans { display: grid; gap: 18px; margin-top: 8px; }
@media (min-width: 800px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.plan.plus { border: 2px solid var(--accent); }
.plan h3 { font-size: 24px; margin-bottom: .15em; }
.price { font: 600 34px/1.1 var(--serif); margin: 10px 0 4px; }
.price small { font: 400 16px var(--sans); color: var(--muted); }
.plan .note { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; color: var(--ink-2); }
.ticks .ico { width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative; font: 600 18.5px/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 18px; color: var(--ink-2); }
.faq details > div p:last-child { margin: 0; }

/* Closing call */
.closing { text-align: center; }
.closing .actions { justify-content: center; }

/* Prose pages: legal and support */
.doc { padding: 48px 0 64px; }
.doc h1 { font-size: clamp(36px, 7vw, 50px); }
.doc .meta { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.doc h2 { font-size: 25px; margin: 2em 0 .5em; }
.doc h3 { font-size: 19px; margin: 1.5em 0 .4em; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.doc strong { color: var(--ink); }
.summary-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.summary-box ul { margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: 14.5px; color: var(--ink-2); }
.toc a:hover { border-color: var(--accent); color: var(--accent); }
.path { font-weight: 600; color: var(--ink); white-space: nowrap; }
@media (max-width: 420px) { .path { white-space: normal; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand { font-size: 18px; }
.site-footer .brand img { width: 26px; height: 26px; border-radius: 7px; }
.phones .screen::after { bottom: 16px; font-size: 12px; }
