/* Shared foundation for every page: tokens, type, header, footer, CTA, prose. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("/assets/fonts/PlusJakartaSans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/assets/fonts/PlusJakartaSans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/SpaceGrotesk-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/SpaceGrotesk-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #ffffff;
  --paper-warm: #f8f6f1;
  --paper-sand: #f1ede4;
  --ink: #202022;
  --ink-soft: #2c2c2f;
  --muted: #55555c; /* 7.4:1 on white */
  --muted-dark: #c9c9cf; /* on ink */
  --line: #e4e2dd;
  --line-dark: #45454b;
  --accent: #b83b0b; /* accent text on light backgrounds (5.9:1) */
  --marker: #f66b24; /* decorative strokes and pins only */
  --gutter: max(20px, calc((100% - 1240px) / 2));
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --type-hero: clamp(46px, 6.4vw, 92px);
  --type-section: clamp(34px, 4.4vw, 60px);
  --type-title: clamp(22px, 2vw, 28px);
  --type-lead: clamp(18px, 1.5vw, 21px);
  --type-body: 17px;
  --type-small: 15px;
  --type-label: 13px;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--type-body)/1.65 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: var(--type-hero); }
h2 { font-size: var(--type-section); }
h3 { font-size: var(--type-title); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Labels and accents */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 var(--type-label)/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--marker); flex: none; }
.accent { color: var(--accent); }
.lead { font-size: var(--type-lead); line-height: 1.6; color: var(--muted); }

/* Hand-drawn markup motif, drawn in when it scrolls into view. */
.marked { position: relative; display: inline-block; white-space: nowrap; isolation: isolate; }
.marked > svg { position: absolute; z-index: -1; pointer-events: none; overflow: visible; fill: none; stroke: var(--marker); stroke-linecap: round; stroke-linejoin: round; }
.marked--circle > svg { top: -12%; left: -5%; width: 112%; height: 126%; stroke-width: 4; }
.marked--underline > svg { left: -2%; right: -2%; bottom: -0.2em; width: 104%; height: 0.36em; stroke-width: 5; }
.draw path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .draw path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease) 0.25s; }
.js .draw.is-drawn path { stroke-dashoffset: 0; }
.js .draw.is-drawn path + path { transition-delay: 1s; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 13px 24px; border-radius: 100px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 600 16px/1.2 var(--body); transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.button:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.button .arrow { font-size: 20px; line-height: 1; transition: transform 0.2s var(--ease); }
.button:hover .arrow { transform: translate(2px, -2px); }
.button--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button--ghost:hover { background: var(--paper); color: var(--accent); border-color: var(--accent); }
.button--small { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--ink); background: linear-gradient(var(--accent), var(--accent)) 0 calc(100% - 8px) / 100% 2px no-repeat; transition: color 0.2s, background-size 0.25s var(--ease); }
.text-link:hover { color: var(--accent); }
.play-badge { display: block; width: 190px; transition: transform 0.2s var(--ease); }
.play-badge:hover { transform: translateY(-2px); }

/* Header */
.site-header { position: sticky; top: 14px; z-index: 50; margin: 14px var(--gutter) 0; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; padding: 0 12px 0 22px; border: 1px solid #ebe9e4; border-radius: 100px; background: #ffffffe6; -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 6px 28px #2020220d; }
.brand { display: block; width: 150px; flex: none; }
.brand img { width: 100%; }
.main-nav { display: flex; gap: 6px; font-size: 15px; font-weight: 600; }
.main-nav a { padding: 10px 14px; border-radius: 100px; color: var(--muted); transition: color 0.2s, background 0.2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); background: var(--paper-warm); }
.menu-toggle { display: none; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; background: var(--paper); font-weight: 600; font-size: 15px; }

/* Breadcrumbs */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; font-size: var(--type-small); color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #aaa9a4; }
.breadcrumbs a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.breadcrumbs a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Get-the-app band, shared by every page */
.cta-band { margin: 0 var(--gutter) 24px; padding: clamp(40px, 6vw, 88px); border-radius: 36px; background: var(--ink); color: #fff; display: grid; grid-template-columns: 1.4fr auto; gap: 40px 64px; align-items: center; overflow: hidden; position: relative; isolation: isolate; }
.cta-band::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, #f66b2433, transparent); z-index: -1; }
.cta-band .eyebrow { color: #ffb48c; }
.cta-band h2 { margin: 18px 0 20px; font-size: clamp(40px, 5.6vw, 80px); }
.cta-band h2 .marked > svg { stroke: var(--marker); }
.cta-band p { color: var(--muted-dark); max-width: 460px; }
.cta-actions { display: flex; align-items: center; gap: 28px; }
.cta-qr { display: grid; justify-items: center; gap: 10px; padding: 14px 14px 12px; border-radius: 20px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; line-height: 1.35; }
.cta-qr img { width: 124px; height: 124px; }
.cta-note { margin-top: 20px; font-size: var(--type-small); color: var(--muted-dark); }

/* Footer */
.site-footer { padding: 64px var(--gutter) 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { margin-top: 16px; color: var(--muted); max-width: 280px; }
.footer-grid h2 { font: 600 var(--type-label)/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.footer-grid li a { display: inline-block; padding: 6px 0; font-weight: 600; }
.footer-grid li a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--type-small); color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }

/* Content pages */
.page-hero { padding: clamp(56px, 8vw, 110px) var(--gutter) clamp(40px, 5vw, 72px); background: var(--paper-warm); background-image: linear-gradient(#20202205 1px, transparent 1px), linear-gradient(90deg, #20202205 1px, transparent 1px); background-size: 48px 48px; margin-top: -82px; padding-top: calc(clamp(56px, 8vw, 110px) + 82px); }
.page-hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px 72px; align-items: center; }
.page-hero-inner.is-single { grid-template-columns: minmax(0, 860px); }
.page-hero h1 { font-size: clamp(42px, 5.6vw, 76px); margin: 22px 0 24px; }
.page-hero .lead { max-width: 640px; }
.page-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.page-hero .breadcrumbs { margin-bottom: 28px; }
.page-meta { margin-top: 24px; font-size: var(--type-small); color: var(--muted); }
.page-figure { justify-self: center; width: min(100%, 400px); }
.page-figure img { border-radius: 24px; box-shadow: 0 30px 80px #4a2a1224; }

.article-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 72px; padding: clamp(48px, 6vw, 88px) var(--gutter); justify-content: center; }
.toc { position: sticky; top: 110px; align-self: start; font-size: var(--type-small); }
.toc h2 { font: 600 var(--type-label)/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-weight: 600; }
.toc a:hover { color: var(--ink); border-color: var(--marker); }

.prose { font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(28px, 3vw, 40px); margin-top: 2.2em; scroll-margin-top: 110px; }
.prose h3 { margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; }
.prose figure img { border-radius: 16px; border: 1px solid var(--line); }
.prose figcaption { margin-top: 10px; font-size: var(--type-small); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; background: var(--paper-warm); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.table-wrap table tr:last-child td { border-bottom: 0; }

.note { padding: 22px 24px; border-radius: 16px; background: var(--paper-warm); border-left: 4px solid var(--marker); font-size: 17px; }
.note strong { display: block; margin-bottom: 4px; }
.summary-box { padding: 26px 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 12px 40px #2020220a; }
.summary-box h2 { font-size: 22px; margin: 0 0 12px; }

/* Room-by-room checklist */
.checklist { list-style: none; padding: 0 !important; display: grid; gap: 0; border-top: 1px solid var(--line); }
.checklist li { position: relative; margin: 0 !important; padding: 12px 0 12px 40px; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.55; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 20px; height: 20px; border: 2px solid #b9b6ae; border-radius: 6px; }

.step-list { list-style: none; padding: 0 !important; counter-reset: step; display: grid; gap: 14px; }
.step-list > li { counter-increment: step; position: relative; margin: 0 !important; padding: 22px 24px 22px 76px; border: 1px solid var(--line); border-radius: 18px; }
.step-list > li::before { content: counter(step); position: absolute; left: 22px; top: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 17px/1 var(--display); }
.step-list strong { display: block; font-family: var(--display); font-size: 20px; letter-spacing: -0.02em; margin-bottom: 4px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.link-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s; }
.link-card:hover { transform: translateY(-4px); border-color: #d7d3ca; box-shadow: 0 18px 50px #2020220f; }
.link-card .kicker { font: 600 var(--type-label)/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.link-card h3 { font-size: 24px; }
.link-card p { color: var(--muted); font-size: 16px; }
.link-card .more { margin-top: auto; padding-top: 8px; font-weight: 600; }
.link-card:hover .more { color: var(--accent); }

.related { padding: clamp(56px, 7vw, 96px) var(--gutter); background: var(--paper-warm); }
.related h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 32px; }

/* Scroll reveal — content is visible without JavaScript. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .main-nav a { padding: 10px 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .article-layout { grid-template-columns: minmax(0, 720px); gap: 32px; }
  .toc { position: static; padding: 20px 22px; border-radius: 16px; background: var(--paper-warm); }
}
@media (max-width: 900px) {
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .header-bar { flex-wrap: wrap; padding: 8px 8px 8px 18px; min-height: 60px; border-radius: 30px; }
  .brand { width: 132px; }
  .header-cta { display: none; }
  .main-nav { order: 3; width: 100%; flex-wrap: wrap; justify-content: center; padding: 4px 0 8px; }
  .js .main-nav { display: none; flex-direction: column; align-items: stretch; padding: 8px 4px 12px; gap: 2px; }
  .js .main-nav.is-open { display: flex; }
  .js .main-nav a { padding: 14px 16px; font-size: 17px; }
  .page-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-band { grid-template-columns: minmax(0, 1fr); border-radius: 28px; }
  .cta-qr { display: none; }
}
@media (max-width: 600px) {
  :root { --type-body: 17px; }
  .site-header { top: 10px; margin-top: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { margin: 0 12px 12px; padding: 40px 24px; }
  .prose { font-size: 17px; }
  .step-list > li { padding: 20px 18px 20px 66px; }
  .step-list > li::before { left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .draw path { stroke-dashoffset: 0; }
}
@media print {
  .site-header, .site-footer, .cta-band, .toc, .related, .skip-link, .no-print { display: none !important; }
  body { font-size: 12pt; }
  .page-hero { margin: 0; padding: 0 0 16pt; background: none; }
  .article-layout { display: block; padding: 0; }
  .checklist li { break-inside: avoid; }
  .prose h2 { break-after: avoid; }
}
.prose .prose-shot { width: min(100%, 300px); border-radius: 28px; border: 6px solid #1a1b1c; }
.print-button { margin-top: 28px; }
.prose .prose-report { width: min(100%, 420px); border-radius: 6px; box-shadow: 0 20px 50px #4a2a1220; }
.page-phone { width: min(100%, 290px); margin: auto; border: 8px solid #1a1b1c; border-radius: 40px !important; }
.template-figure { width: 100%; }
.template-figure img { border-radius: 10px; }
.guides-hub-pro { padding: clamp(56px, 7vw, 96px) var(--gutter); }
.guides-hub-pro h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 32px; }
.error-page { padding: clamp(80px, 12vw, 160px) var(--gutter); text-align: center; }
.error-page h1 { margin: 20px auto 20px; max-width: 800px; }
.error-page .lead { max-width: 560px; margin: 0 auto 32px; }
.error-page .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
/* Legal pages */
.legal .article-layout { grid-template-columns: minmax(0, 760px); }
.legal-summary { padding: 24px 26px; border-radius: 18px; background: var(--paper-warm); border-left: 4px solid var(--marker); }
.legal-summary strong { display: block; margin-bottom: 6px; }
.prose h2.legal-h { font-size: clamp(24px, 2.4vw, 30px); }
/* Store availability (not links until the apps are live) */
.store-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding: 0; list-style: none; }
.store-button { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: 600 16px/1.15 var(--body); }
.store-button svg { width: 26px; height: 26px; flex: none; color: var(--muted); }
.store-button small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); }
.cta-band .store-buttons { margin-top: 0; }
.cta-band .store-button { background: transparent; border-color: #ffffff38; color: #fff; }
.cta-band .store-button svg { color: var(--muted-dark); }
.cta-band .store-button small { color: var(--muted-dark); }
.cta-band .cta-actions { flex-direction: column; align-items: flex-start; gap: 18px; }
.button--light { background: #fff; color: var(--ink); border-color: #fff; }
.button--light:hover { background: var(--marker); border-color: var(--marker); color: var(--ink); }
