/* Coverly — /uae/ reading pages. Brand tokens from docs/BRAND.md. One stylesheet for the five chapters. */
:root {
  --ink-950: #0b0d1c; --ink-900: #14172e; --ink-800: #1c2040; --ink-700: #282d57; --ink-600: #3a4077;
  --on-ink: #f2f3fb; --on-ink-muted: #a3a9cf;
  --iris: #5457e8; --orchid: #a56bf2; --apricot: #ff9f7a;
  --good: #3dd6b5; --risk: #ff8a7a; --info: #b3a6ff;
  --page: #f6f7fc; --sheet: #ffffff; --text: #14172e; --text-2: #4a4f75; --line: #e3e5f2;
  --dawn: linear-gradient(60deg, #5b5fef 0%, #a56bf2 50%, #ff9f7a 100%);
  --gutter: clamp(18px, 5vw, 56px);
  --measure: 44rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 1.0625rem/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; padding-bottom: 72px; }
img, video { max-width: 100%; display: block; }
a { color: var(--iris); text-underline-offset: 3px; }
h1, h2, h3 { font-family: Sora, Inter, sans-serif; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.6vw, 4rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; line-height: 1.25; }
h1 em, h2 em { font-style: normal; background: var(--dawn); -webkit-background-clip: text; background-clip: text; color: transparent; }
p { margin: 0 0 1.15em; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); margin: 0 0 0.9rem; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose h2 { margin: 0 0 1.1rem; }
.prose h3 { margin: 1.8rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: var(--text); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--orchid); outline-offset: 3px; border-radius: 6px; }

/* header */
.top { position: sticky; top: 0; z-index: 40; background: rgba(20, 23, 46, 0.94); backdrop-filter: blur(12px); color: var(--on-ink); border-bottom: 1px solid rgba(163, 169, 207, 0.16); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.top .logo img { height: 30px; width: auto; }
.chapters { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.chapters::-webkit-scrollbar { display: none; }
.chapters a { display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 8px 12px; border-radius: 10px; color: var(--on-ink-muted); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.chapters a b { font-family: "Geist Mono", monospace; font-size: 0.75rem; color: var(--ink-600); }
.chapters a:hover { color: var(--on-ink); background: rgba(255, 255, 255, 0.06); }
.chapters a[aria-current="page"] { color: var(--on-ink); background: rgba(165, 107, 242, 0.18); }
.chapters a[aria-current="page"] b { color: var(--apricot); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--dawn); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer; font-size: 1rem; }
.btn.ghost { background: transparent; border: 1.5px solid rgba(163, 169, 207, 0.4); color: var(--on-ink); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 0.875rem; }
@media (max-width: 860px) { .top .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; gap: 6px 12px; } .top .btn { margin-left: auto; } .chapters { order: 3; width: 100%; margin: 0 calc(var(--gutter) * -0.4); } .chapters a span { display: none; } .chapters a[aria-current="page"] span { display: inline; } }

/* ink surfaces */
.ink { color: var(--on-ink); background:
    radial-gradient(60rem 40rem at 8% 110%, rgba(91, 95, 239, 0.34), transparent 70%),
    radial-gradient(52rem 34rem at 98% -10%, rgba(255, 159, 122, 0.2), transparent 70%),
    linear-gradient(160deg, var(--ink-900), var(--ink-950)); }
.ink .eyebrow { color: var(--on-ink-muted); }
.ink a:not(.btn) { color: var(--info); }
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(44px, 7vw, 84px); }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; color: var(--on-ink-muted); max-width: 40rem; margin: 1.4rem 0 2rem; }
.hero .lede strong { color: var(--on-ink); font-weight: 600; }
.hero-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero figure { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); border: 1px solid rgba(163, 169, 207, 0.18); }
.hero figure img { width: 100%; height: auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row small { color: var(--on-ink-muted); font-size: 0.875rem; }
section { padding: clamp(44px, 7vw, 88px) 0; }
section.sheet { background: var(--sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .split.wide-right { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }

/* film */
.film { border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); border: 1px solid rgba(163, 169, 207, 0.18); aspect-ratio: 16 / 9; }
.film video { width: 100%; height: 100%; }
details.transcript { margin-top: 1.4rem; max-width: var(--measure); }
details.transcript summary { cursor: pointer; font-weight: 600; }
details.transcript p { color: var(--on-ink-muted); margin-top: 0.8rem; }

/* reality check */
.asks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 14px; }
.asks li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-radius: 16px; background: rgba(28, 32, 64, 0.82); border: 1px solid rgba(163, 169, 207, 0.2); font-family: Sora, sans-serif; font-weight: 600; font-size: clamp(1.05rem, 2.2vw, 1.4rem); letter-spacing: -0.01em; }
.stamp { flex: none; font-family: "Geist Mono", monospace; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--risk); padding: 6px 12px; border: 2px solid var(--risk); border-radius: 8px; transform: rotate(-4deg); background: rgba(255, 138, 122, 0.1); white-space: nowrap; }
.js .asks .stamp { opacity: 0; transform: rotate(-4deg) scale(1.7); transition: opacity 0.25s, transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1); }
.js .asks li.in .stamp { opacity: 1; transform: rotate(-4deg) scale(1); }
.js .asks li:nth-child(2) .stamp { transition-delay: 0.35s; } .js .asks li:nth-child(3) .stamp { transition-delay: 0.7s; }

/* figures and tiles */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); margin: 1.6rem 0; }
.tile { padding: 22px 24px; border-radius: 18px; background: var(--sheet); border: 1px solid var(--line); }
.ink .tile { background: rgba(28, 32, 64, 0.82); border-color: rgba(163, 169, 207, 0.2); }
.tile .fig { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; margin: 10px 0 8px; display: block; }
.tile p { margin: 0; font-size: 0.95rem; color: var(--text-2); }
.ink .tile p { color: var(--on-ink-muted); }
.tile.hot { border-color: rgba(165, 107, 242, 0.85); box-shadow: 0 0 0 5px rgba(165, 107, 242, 0.12); }
.tile.lost { border-style: dashed; border-color: rgba(255, 138, 122, 0.55); }
.usps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1.8rem; }
.usp { padding: 26px; border-radius: 20px; background: var(--sheet); border: 1px solid var(--line); }
.usp .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--dawn); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }
.usp .ic svg { width: 28px; height: 28px; }
.usp p { margin: 8px 0 0; color: var(--text-2); font-size: 0.98rem; }
.usp a { font-weight: 600; font-size: 0.95rem; display: inline-block; margin-top: 12px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 18px 20px 18px 66px; border-radius: 16px; background: var(--page); border: 1px solid var(--line); margin: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 10px; background: var(--dawn); color: #fff; font: 600 0.8rem "Geist Mono", monospace; display: grid; place-items: center; }
.steps li strong { display: block; }
.photo { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.photo img { width: 100%; height: auto; }
.photo figcaption { font-size: 0.85rem; color: var(--text-2); padding: 10px 16px; background: var(--sheet); }

/* calculator */
.calc { border-radius: 24px; padding: clamp(22px, 4vw, 40px); }
.calc h2, .calc h3 { margin-bottom: 0.4rem; }
.calc .hint { color: var(--on-ink-muted); font-size: 0.95rem; margin-bottom: 1.6rem; }
.fields { display: grid; gap: 20px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.95rem; color: var(--on-ink-muted); margin-bottom: 8px; }
.field output { color: var(--on-ink); font-size: 1.15rem; }
input[type="range"] { width: 100%; height: 28px; accent-color: var(--orchid); margin: 0; }
.result { margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid rgba(163, 169, 207, 0.2); }
.result .sum { font-size: 0.95rem; color: var(--on-ink-muted); }
.result .big { display: block; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.05; color: var(--good); margin-top: 6px; }
.result .big small { font-size: 0.4em; letter-spacing: 0; margin-right: 0.3em; }
.bar { display: flex; height: 54px; border-radius: 14px; overflow: hidden; background: var(--ink-700); margin: 1.4rem 0 0.9rem; }
.bar i { display: block; height: 100%; transition: width 0.5s ease; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9rem; color: var(--on-ink-muted); padding: 0; margin: 0; list-style: none; }
.legend li::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 8px; background: var(--c); vertical-align: -1px; }
.legend strong { color: var(--on-ink); }
.note { font-size: 0.85rem; color: var(--text-2); }
.ink .note { color: var(--on-ink-muted); }

/* capture demo */
.flow { display: grid; gap: 18px; align-items: center; margin-top: 1.6rem; }
@media (min-width: 900px) { .flow { grid-template-columns: 1fr auto 1fr; } }
.flow .col { display: grid; gap: 12px; }
.in-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; background: rgba(28, 32, 64, 0.9); border: 1px solid rgba(163, 169, 207, 0.2); }
.in-card .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(179, 166, 255, 0.14); color: var(--info); }
.in-card .ic svg { width: 24px; height: 24px; }
.in-card b { display: block; font-weight: 600; } .in-card span { font-size: 0.875rem; color: var(--on-ink-muted); }
.hub { width: 92px; height: 92px; border-radius: 26px; background: var(--ink-800); border: 1px solid rgba(165, 107, 242, 0.5); display: grid; place-items: center; box-shadow: 0 0 60px rgba(165, 107, 242, 0.35); margin: 0 auto; }
.hub img { width: 58px; height: 58px; }
.out-card { padding: 14px 18px; border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); }
.out-card small { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #6b7099; }
.out-card b { font-weight: 600; } .out-card span { display: block; font-size: 0.875rem; color: #5a5f85; }
.out-card.done { box-shadow: 0 0 0 3px rgba(61, 214, 181, 0.6), 0 16px 40px rgba(0, 0, 0, 0.3); }
.js .flow .out-card { opacity: 0; transform: translateX(24px); transition: opacity 0.45s, transform 0.45s; }
.js .flow.in .out-card { opacity: 1; transform: none; }
.js .flow.in .out-card:nth-child(2) { transition-delay: 0.5s; } .js .flow.in .out-card:nth-child(3) { transition-delay: 1s; } .js .flow.in .out-card:nth-child(4) { transition-delay: 1.5s; }

/* faq, next, footer, book bar */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: Sora, sans-serif; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: "Geist Mono", monospace; color: var(--iris); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--text-2); max-width: var(--measure); }
.next { display: block; text-decoration: none; color: var(--on-ink); padding: clamp(40px, 7vw, 80px) 0; }
.next .eyebrow { color: var(--apricot); }
.next strong { display: block; font-family: Sora, sans-serif; font-weight: 600; font-size: clamp(1.7rem, 4.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; }
.next strong::after { content: " →"; color: var(--apricot); }
.next p { color: var(--on-ink-muted); margin: 0.8rem 0 0; max-width: 36rem; }
footer { background: var(--ink-950); color: var(--on-ink-muted); padding: 40px 0 28px; font-size: 0.9rem; }
footer .wrap { display: grid; gap: 22px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--on-ink-muted); }
footer img { height: 28px; width: auto; }
.bookbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: rgba(11, 13, 28, 0.96); backdrop-filter: blur(12px); border-top: 1px solid rgba(165, 107, 242, 0.45); color: var(--on-ink); }
.bookbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.bookbar .lbl { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-ink-muted); }
.bookbar .nums { font-size: clamp(0.95rem, 2.6vw, 1.25rem); white-space: nowrap; }
.bookbar .nums .to { color: var(--good); }
.bookbar .nums .arrow { color: var(--ink-600); margin: 0 6px; }
.bookbar .pct { font-size: 0.85rem; color: var(--good); border: 1px solid rgba(61, 214, 181, 0.6); border-radius: 999px; padding: 2px 10px; }
.bookbar .btn { margin-left: auto; }
@media (max-width: 640px) { .bookbar .lbl, .bookbar .pct { display: none; } }

/* reveal on scroll — only when scripting is on, never under reduced motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .asks .stamp, .js .flow .out-card { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .asks .stamp { transform: rotate(-4deg) !important; }
  .bar i { transition: none; }
}
