/* rightdoor.eu: page layout for the approved "Porch light" landing page
   (docs/brand/02-landing-page-spec.md). Colours, type and base components come
   from @rightdoor/brand (tokens.css, components.css, animations.css); this file
   only lays the page out. One breakpoint: 820 px. */

[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
.rd-body h1, .rd-body h2, .rd-body h3 { margin: 0; font-weight: 400; }
.rd-body p { margin: 0; text-wrap: pretty; }
/* Zero-specificity link colour: buttons (.rd-btn-*) keep their own colours. */
:where(.rd-body) a { color: var(--rd-accent); }
.rd-body pre { margin: 0; white-space: pre; overflow-x: auto; }
.muted { color: var(--rd-muted); }
.faint { color: var(--rd-faint); }

/* --- Header --- */
.site-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.site-home { display: flex; align-items: center; min-height: var(--rd-tap); text-decoration: none; color: var(--rd-ink); flex-shrink: 1; min-width: 0; }
.site-home .rd-lockup { width: auto; height: 34px; max-width: 100%; }
@media (max-width: 400px) { .site-home .rd-lockup { height: 26px; } }
.navlinks { font: 500 15px var(--rd-font-sans); }
.navlinks a { color: var(--rd-muted); text-decoration: none; min-height: var(--rd-tap); display: inline-flex; align-items: center; }
.navlinks a:hover { color: var(--rd-ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .rd-icon-btn { width: 50px; height: 50px; }

/* --- Section frame --- */
.section { padding-block: 20px 120px; }
.section-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 44px; max-width: 44em; }
.sec { font-family: var(--rd-font-serif); font-weight: 400; font-size: var(--rd-text-section); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
.sec em, .hero-title em { font-style: italic; color: var(--rd-accent); }
.section-lead { font-size: 19px; color: var(--rd-muted); }
.card-title { font-family: var(--rd-font-serif); font-size: var(--rd-text-card); line-height: 1.05; }
.grid { display: grid; gap: 20px; }
.grid-480 { grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); }
.grid-460 { grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); align-items: start; }
.grid-340 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid-260 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-210 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; min-width: 0; }
.stack-10 { gap: 10px; } .stack-14 { gap: 14px; } .stack-20 { gap: 20px; } .stack-22 { gap: 22px; }
.pad-26 { padding: 26px; } .pad-28 { padding: 28px; } .pad-30 { padding: 30px; } .pad-24 { padding: 24px; }

/* --- Hero --- */
.hero { position: relative; overflow: hidden; }
.hero-art { position: absolute; right: -140px; top: -40px; opacity: .9; pointer-events: none; }
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(transparent, var(--rd-bg)); pointer-events: none; }
.hero-inner { position: relative; padding-block: 56px 40px; display: flex; flex-direction: column; gap: 30px; }
.hero-title { font-family: var(--rd-font-serif); font-size: var(--rd-text-display-xl); line-height: .94; letter-spacing: -0.025em; max-width: 11.5em; }
.hero-lead { font-size: var(--rd-text-lead); color: var(--rd-muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 14px; color: var(--rd-muted); margin-left: 8px; }
.live-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-plate { font-family: var(--rd-font-mono); padding: 6px 12px; border: 1.5px solid var(--rd-accent); border-radius: 10px; font-size: 14px; box-shadow: 0 0 22px var(--rd-glow); }
.live-plate.planned { border-style: dashed; border-color: var(--rd-line); color: var(--rd-faint); box-shadow: none; }

/* --- Demo --- */
.demo-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { min-height: var(--rd-tap); padding: 0 18px; border-radius: var(--rd-radius-pill); border: 1.5px solid var(--rd-line); background: transparent; color: var(--rd-ink); font: 500 15px var(--rd-font-sans); cursor: pointer; }
.tab:hover { border-color: var(--rd-ink); }
.tab[aria-pressed="true"] { background: var(--rd-ink); color: var(--rd-bg); border-color: var(--rd-ink); }
.demo-card { overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, .35); }
:root[data-theme="light"] .demo-card { box-shadow: 0 30px 90px rgba(11, 16, 19, .10); }
.demo-panes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.demo-left { padding: 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.demo-right { padding: 28px 28px 20px; background: var(--rd-bg-2); border-left: 1px solid var(--rd-line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 820px) { .demo-right { border-left: 0; border-top: 1px solid var(--rd-line); } }
.typed { font-family: var(--rd-font-mono); min-height: 58px; display: flex; align-items: center; padding: 0 18px; border: 1.5px solid var(--rd-accent); border-radius: 14px; background: var(--rd-bg-2); font-size: 17px; white-space: nowrap; overflow: hidden; }
.typed-text { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
.tokens { display: flex; flex-wrap: wrap; gap: 10px; }
.token { flex: 1 1 auto; min-width: 64px; border: 1px solid var(--rd-line); border-radius: 12px; padding: 10px 12px; background: var(--rd-bg-2); display: flex; flex-direction: column; gap: 2px; }
.token .rd-eyebrow { font-size: 10.5px; }
.token-value { font-weight: 600; color: var(--rd-ink); white-space: nowrap; }
.token-value.fixed { color: var(--rd-fixed); }
.token-was { font-family: var(--rd-font-mono); font-size: 11px; color: var(--rd-faint); text-decoration: line-through; }
.verdict-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.verdict-row .rd-badge { font-size: 15px; padding: 6px 16px; }
.verdict-note { color: var(--rd-muted); font-size: 14px; max-width: 26em; }
.stage { display: block; max-width: 560px; margin: 0 auto; width: 100%; height: auto; }
.api-disclosure { border-top: 1px solid var(--rd-line); padding: 6px 28px; }
.api-disclosure summary { min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; font: 500 14px var(--rd-font-mono); color: var(--rd-ink); }
.api-disclosure summary::-webkit-details-marker { display: none; }
.api-disclosure summary::after { content: "+"; color: var(--rd-faint); }
.api-disclosure[open] summary::after { content: "\2212"; }
.api-disclosure .code { margin-bottom: 22px; }
.demo-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; margin-top: 20px; }
.demo-foot p { font-size: 13px; color: var(--rd-muted); }
.arrow-link { font-weight: 600; color: var(--rd-accent); min-height: var(--rd-tap); display: inline-flex; align-items: center; }

/* --- Code blocks --- */
.code { position: relative; background: var(--rd-code); border: 1px solid var(--rd-line); border-radius: 18px; padding: 22px; min-width: 0; }
.code-label { font: 12px var(--rd-font-mono); color: var(--rd-faint); margin-bottom: 12px; min-height: 22px; }
.js .code pre { padding-top: 6px; }
/* Code blocks stay dark in both themes (--rd-code), so their text uses the dark theme's ink and accents. */
.code pre { font: 13px/1.7 var(--rd-font-mono); color: #F3EEE4; }
.copy-btn { position: absolute; top: 12px; right: 12px; min-height: 30px; padding: 0 12px; border-radius: var(--rd-radius-pill); border: 1px solid #25343C; background: transparent; color: #9BA9AF; font: 500 12.5px var(--rd-font-mono); cursor: pointer; display: none; align-items: center; gap: 6px; }
.js .copy-btn { display: inline-flex; }
.copy-btn:hover { color: #F3EEE4; border-color: #9BA9AF; }
.code-label { color: #6F7E85; }

/* --- Chips (last 50 metres, embeddable form) --- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.nowrap { flex-wrap: nowrap; overflow-x: auto; }
.chip { font-family: var(--rd-font-mono); padding: 9px 14px; border: 1.5px solid var(--rd-line); border-radius: 10px; font-size: 15px; white-space: nowrap; }
.chip.small { padding: 6px 12px; border-radius: 8px; font-size: 13px; }
.swap-sign { position: relative; height: 64px; border: 2px solid var(--rd-accent); border-radius: 14px; box-shadow: 0 0 30px var(--rd-glow); display: flex; align-items: center; justify-content: center; }
.swap-sign span { position: absolute; font: 20px var(--rd-font-mono); }
@media (prefers-reduced-motion: reduce) { .swap-sign .swapB { display: none; } }

/* --- Fail open lanes --- */
.panel { padding: 56px 48px; border-radius: 28px; background: var(--rd-surface); border: 1px solid var(--rd-line); position: relative; overflow: hidden; }
@media (max-width: 820px) { .panel { padding: 36px 22px; } }
.panel-glow { position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, var(--rd-glow), transparent 70%); pointer-events: none; }
.panel > .section-head { position: relative; margin-bottom: 48px; }
.lanes { position: relative; display: flex; flex-direction: column; gap: 34px; }
.lane-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 20px; align-items: center; }
@media (max-width: 820px) { .lane-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.lane-title { font-weight: 600; }
.lane-sub { font-size: 14px; color: var(--rd-muted); }
.lane { position: relative; height: 64px; margin-inline: 6px; }
.lane-line { position: absolute; left: 12px; right: 12px; top: 31px; height: 2px; background: var(--rd-line); }
.node.n1 { left: 0; } .node.n2 { left: calc(50% - 12px); } .node.n3 { right: 0; }
.lane-label { position: absolute; top: 44px; font: 11px var(--rd-font-mono); color: var(--rd-muted); }
.lane-label.l1 { left: -6px; } .lane-label.l2 { left: calc(50% - 60px); width: 120px; text-align: center; } .lane-label.l3 { right: -6px; text-align: right; }
@media (prefers-reduced-motion: reduce) { .dot.ok, .dot.slow { left: calc(100% - 18px); } .dot.gate { left: calc(50% - 6px); } }

/* --- Developers --- */
.verdict-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.verdict-table td { padding: 16px 20px; border-bottom: 1px solid var(--rd-line); vertical-align: top; color: var(--rd-muted); }
.verdict-table td:first-child { width: 1%; }
.verdict-table tr:last-child td { border-bottom: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Coming soon illustrations --- */
.mini { background: var(--rd-bg-2); border: 1px solid var(--rd-line); border-radius: 16px; }
.mini-form { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mini-fields { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.mini-field { border: 1px solid var(--rd-line); border-radius: 10px; padding: 9px 12px; font-size: 14px; color: var(--rd-muted); }
.mini-field.match { border: 1.5px solid var(--rd-accent); color: var(--rd-ink); display: flex; justify-content: space-between; }
.mini-field.match .mono { font-size: 12px; color: var(--rd-valid); }
.mini-orders { overflow: hidden; }
.mini-order { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rd-line); font-size: 14px; align-items: center; }
.mini-order:last-child { border-bottom: 0; }
.mini-order .mono { color: var(--rd-muted); }
.mini-agent { font: 12.5px/1.7 var(--rd-font-mono); background: var(--rd-code); border: 1px solid var(--rd-line); border-radius: 16px; padding: 16px; color: #9BA9AF; }
.mini-agent .call { color: #FFE2B3; }
.mini-agent .result { color: #7DB4FF; }

/* --- Where we are --- */
.where { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 48px; align-items: center; }
.plates { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.plate-item { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.plate-item span { font-size: 14px; color: var(--rd-muted); }
.plate-item.planned span { color: var(--rd-faint); }
.plate.delay { animation-delay: .8s; }

/* --- Pricing --- */
.calc { padding: 30px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 22px; }
.calc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.calc-volume { font-family: var(--rd-font-serif); font-size: 64px; line-height: 1; }
.calc-plan { font-family: var(--rd-font-serif); font-size: 40px; line-height: 1; text-align: right; }
.calc-plan .price { color: var(--rd-accent); }
@media (max-width: 820px) { .calc-plan { text-align: left; } .calc-volume { font-size: 52px; } }
.calc input[type="range"] { width: 100%; accent-color: var(--rd-accent); height: var(--rd-tap); margin: 0; }
.calc-scale { display: flex; justify-content: space-between; font: 12px var(--rd-font-mono); color: var(--rd-muted); }
.calc-note { font-size: 14px; color: var(--rd-muted); }
.plan h3 { font-family: var(--rd-font-serif); font-size: 30px; line-height: 1; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price .amount { font-family: var(--rd-font-serif); font-size: 48px; line-height: 1; }
.plan-price .per { color: var(--rd-muted); font-size: 14px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.plan li + li { color: var(--rd-muted); }
.explainers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 22px 44px; margin-top: 40px; }
.explainers h3 { font: 600 17px var(--rd-font-sans); margin-bottom: 6px; }
.explainers p { color: var(--rd-muted); }

/* --- FAQ --- */
.faq { max-width: 960px; }
.faq .sec { margin-bottom: 32px; }
.faq details { border-top: 1px solid var(--rd-line); }
.faq details:last-of-type { border-bottom: 1px solid var(--rd-line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 0; font: 400 26px var(--rd-font-serif); display: flex; justify-content: space-between; gap: 16px; min-height: var(--rd-tap); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px var(--rd-font-mono); color: var(--rd-muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 22px; color: var(--rd-muted); }

/* --- Final CTA --- */
.final { position: relative; overflow: hidden; padding: 72px 48px; border-radius: 32px; border: 1px solid var(--rd-line); background: var(--rd-surface); display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center; }
@media (max-width: 820px) { .final { padding: 48px 22px; } }
.final-glow { position: absolute; left: -80px; top: -160px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, var(--rd-glow), transparent 68%); pointer-events: none; }
.final .sec { position: relative; max-width: 12em; font-size: var(--rd-text-display-l); }
.final-actions { position: relative; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.final-actions span { font-size: 14px; color: var(--rd-muted); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--rd-line); background: var(--rd-bg-2); }
.footer-inner { padding-block: 56px 40px; display: flex; flex-direction: column; gap: 44px; }
.footer-row { position: relative; display: flex; align-items: flex-end; }
.footer-cell { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.fd0 { --d: 0s; } .fd1 { --d: .55s; } .fd2 { --d: 1.09s; } .fd3 { --d: 1.64s; } .fd4 { --d: 2.18s; } .fd5 { --d: 2.73s; }
.fd6 { --d: 3.27s; } .fd7 { --d: 3.82s; } .fd8 { --d: 4.36s; } .fd9 { --d: 4.91s; } .fd10 { --d: 5.45s; } .fd11 { --d: 6s; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; grid-column: 1 / -1; }
.footer-brand p { color: var(--rd-muted); max-width: 22em; font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 4px; }
.footer-col .rd-eyebrow { margin-bottom: 6px; }
.footer-col a { min-height: 32px; color: var(--rd-muted); text-decoration: none; display: inline-flex; align-items: center; }
.footer-col a:hover { color: var(--rd-ink); }
.footer-legal { border-top: 1px solid var(--rd-line); padding-top: 24px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--rd-muted); }

.soon-badge { align-self: flex-start; }
.fact-title { font-size: 30px; }
.final-wrap { padding-top: 0; }
.calc-top .stack { gap: 4px; }

/* --- Legal, 404 --- */
.doc { max-width: 760px; padding-block: 40px 120px; display: flex; flex-direction: column; gap: 22px; }
.doc .placeholder { border: 1.5px dashed var(--rd-amb); background: var(--rd-amb-bg); color: var(--rd-amb); border-radius: var(--rd-radius-card); padding: 20px 22px; }
/* Legal pages: notice, contents, numbered sections, tables that stack below 640 px. */
.legal { overflow-wrap: break-word; }
.legal-updated { font: 500 14px var(--rd-font-mono); }
.legal-toc { border: 1px solid var(--rd-line); background: var(--rd-surface); border-radius: var(--rd-radius-card); padding: 22px 24px; }
.legal-toc h2 { margin-bottom: 10px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; columns: 2 18em; column-gap: 32px; }
.legal-toc li { display: flex; gap: 10px; break-inside: avoid; }
.legal-toc a { min-height: 36px; display: inline-flex; align-items: center; text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal-toc .legal-num { min-width: 2.2em; padding-top: 7px; font: 13px var(--rd-font-mono); color: var(--rd-faint); white-space: nowrap; }
.legal-sec { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--rd-line); scroll-margin-top: 16px; }
.legal-h { font-family: var(--rd-font-serif); font-size: var(--rd-text-card); line-height: 1.1; text-wrap: balance; }
.legal-h .legal-num { color: var(--rd-accent); }
.legal-sec p, .legal-sec li { color: var(--rd-muted); }
.legal-sec strong { color: var(--rd-ink); font-weight: 600; }
.legal-sec ul, .legal-sec ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.legal code { font: 0.9em var(--rd-font-mono); color: var(--rd-ink); background: var(--rd-bg-2); border: 1px solid var(--rd-line); border-radius: 6px; padding: 1px 5px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal-table caption { text-align: left; font: 500 12.5px var(--rd-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--rd-faint); padding-bottom: 8px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rd-line); }
.legal-table thead th { font: 500 13px var(--rd-font-mono); color: var(--rd-muted); }
.legal-table tbody th { font-weight: 600; color: var(--rd-ink); }
.legal-table td { color: var(--rd-muted); }
.legal-entity { display: block; margin-top: 4px; font-weight: 400; font-size: 13px; color: var(--rd-faint); }
.legal-foot { border-top: 1px solid var(--rd-line); padding-top: 18px; font-size: 14px; }
@media (max-width: 640px) {
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal-table, .legal-table caption, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; }
  .legal-table tr { padding: 12px 0; border-bottom: 1px solid var(--rd-line); }
  .legal-table th, .legal-table td { padding: 4px 0; border: 0; }
  .legal-table td::before { content: attr(data-label); display: block; font: 500 12px var(--rd-font-mono); color: var(--rd-faint); }
  .legal-toc { padding: 18px; }
}
.lost { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding-block: 80px 140px; }
.lost .rd-symbol { color: var(--rd-line); }

@media (max-width: 820px) {
  .hero-art, .navlinks, .hide-s { display: none; }
  .site-header { gap: 8px; }
  .header-actions { gap: 8px; }
  .header-actions .rd-icon-btn { width: var(--rd-tap); height: var(--rd-tap); }
  .header-actions .rd-btn-primary { min-height: var(--rd-tap); padding: 0 16px; font-size: 15px; }
  .section { padding-block: 12px 88px; }
  .pad-30, .pad-28 { padding: 22px; }
  .chip { padding: 8px 10px; font-size: 14px; }
  .cta-note { margin-left: 0; }
}

/* Address form section and guide */
.form-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 22px; margin: 0; }
.form-points dt { font-weight: 600; margin-bottom: 4px; }
.form-points dd { margin: 0; color: var(--rd-muted); font-size: 15px; }
.form-demo-slot { min-height: 180px; }
.form-demo-status { min-height: 1.4em; font-size: 13px; color: var(--rd-muted); }
.form-demo rightdoor-address { --rd-af-accent: var(--rd-accent); --rd-af-bg: var(--rd-bg-2); --rd-af-border: var(--rd-line); --rd-af-muted: var(--rd-muted); --rd-af-text: var(--rd-ink); }
.guide .code { margin: 4px 0; }
.guide ol, .guide ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

