/* Room Planner AI — shared styles for the marketing, support and legal pages. */

:root {
  --paper: #f6f4f0;
  --paper-raised: #ffffff;
  --paper-sunken: #eceae4;
  --ink: #202020;
  --ink-soft: #55534e;
  --ink-faint: #8d8a83;
  --line: #dedad2;
  --accent: #fd7412;
  --accent-soft: #fff2e9;
  --accent-ink: #b84f05;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(32, 32, 32, .04), 0 12px 32px -12px rgba(32, 32, 32, .14);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151412;
    --paper-raised: #1f1d1a;
    --paper-sunken: #0f0e0d;
    --ink: #f3f0ea;
    --ink-soft: #bdb8ae;
    --ink-faint: #8a857c;
    --line: #2f2c28;
    --accent: #ff8a3d;
    --accent-soft: #2b1d12;
    --accent-ink: #ffb07a;
    --on-accent: #1a0e05;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #151412;
  --paper-raised: #1f1d1a;
  --paper-sunken: #0f0e0d;
  --ink: #f3f0ea;
  --ink-soft: #bdb8ae;
  --ink-faint: #8a857c;
  --line: #2f2c28;
  --accent: #ff8a3d;
  --accent-soft: #2b1d12;
  --accent-ink: #ffb07a;
  --on-accent: #1a0e05;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { 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(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--paper-sunken); }
.nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 16px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(180deg, #ffa653 -40%, var(--accent) 70%);
  color: #fff;
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-ghost { background: var(--paper-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--paper-sunken); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -.02em; text-wrap: balance; }
.display { font-family: var(--serif); font-size: clamp(46px, 8vw, 92px); line-height: .98; }
.display em { font-style: italic; color: var(--accent); }
.h2 { font-family: var(--serif); font-size: clamp(36px, 5vw, 56px); line-height: 1.04; }
.h3 { font: 700 20px/1.3 var(--sans); letter-spacing: -.01em; }
.lede { font-size: clamp(18px, 2vw, 20px); color: var(--ink-soft); max-width: 34em; text-wrap: pretty; }
.muted { color: var(--ink-soft); }

section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 680px; }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-note { font-size: 14px; color: var(--ink-faint); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Before / after comparison */

.compare {
  --pos: 50%;
  position: relative; aspect-ratio: 1; width: 100%;
  border-radius: 28px; overflow: hidden; background: var(--paper-sunken);
  box-shadow: var(--shadow); user-select: none; touch-action: pan-y;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); pointer-events: none;
}
.compare-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff center / 22px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23202020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E");
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
.compare input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
}
.compare-tag {
  position: absolute; top: 16px; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(20, 20, 20, .55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.compare-tag.before { left: 16px; }
.compare-tag.after-tag { right: 16px; background: var(--accent); }

.room-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.room-tabs button {
  font: 600 14px/1 var(--sans); color: var(--ink-soft); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; min-height: 40px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.room-tabs button:hover { color: var(--ink); border-color: var(--ink-faint); }
.room-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature {
  display: grid; gap: 12px; align-content: start;
  padding: 28px 24px; border-radius: var(--radius);
  background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--line);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); counter-reset: step; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; display: grid; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--accent); }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- Styles marquee ---------- */

/* The band stays dark in both themes; in dark mode it lifts slightly off the page instead of inverting. */
.band { --band-ink: #f6f4f0; background: #201e1b; color: var(--band-ink); border-block: 1px solid var(--line); }
.band .muted { color: color-mix(in srgb, var(--band-ink) 65%, transparent); }
.band .eyebrow { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li {
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid color-mix(in srgb, var(--band-ink) 22%, transparent);
}
.chips li:nth-child(5n + 1) { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure { margin: 0; display: grid; gap: 10px; }
.gallery img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; width: 100%; }
.gallery figcaption { font-size: 14px; font-weight: 600; color: var(--ink-soft); }

/* ---------- CTA ---------- */

.cta {
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 32px;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.cta img { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.cta p { margin: 8px 0 0; color: var(--ink-soft); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; text-align: left; } }

/* ---------- Document pages (privacy, terms, support) ---------- */

.doc-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.doc-hero .wrap { display: grid; gap: 18px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink-faint); }

.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 112px); }
.doc .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .doc .wrap { grid-template-columns: minmax(0, 1fr); } }

.toc { position: sticky; top: 88px; font-size: 14px; }
.toc p { margin: 0 0 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; color: var(--ink-faint); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 900px) { .toc { display: none; } }

.prose { max-width: 720px; }
.prose > section { padding: 0; scroll-margin-top: 88px; }
.prose > section + section { margin-top: 48px; }
.prose h2 { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 36px); line-height: 1.1; margin-bottom: 16px; }
.prose h3 { font: 700 17px/1.4 var(--sans); margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }

.prose .btn-primary { color: #fff; text-decoration: none; }

.prose .summary {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 48px; padding: 0; list-style: none;
}
@media (max-width: 600px) { .prose .summary { grid-template-columns: 1fr; } }
.summary li {
  padding: 18px 20px; border-radius: 16px; background: var(--paper-raised);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; color: var(--ink-soft);
}
.summary strong { display: block; margin-bottom: 4px; font-size: 15px; }

.table-scroll { overflow-x: auto; margin: 0 0 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font-weight: 700; color: var(--ink); background: var(--paper-sunken); font-size: 13px; letter-spacing: .02em; }
td { color: var(--ink-soft); }
tr:last-child td { border-bottom: 0; }

.callout {
  padding: 18px 20px; border-radius: 16px; margin: 0 0 16px;
  background: var(--accent-soft); color: var(--ink); font-size: 15px;
}

/* ---------- Support ---------- */

.contact-card {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 28px; border-radius: var(--radius); background: var(--paper-raised); box-shadow: var(--shadow);
  margin-bottom: 48px;
}
.contact-card p { margin: 6px 0 0; }
@media (max-width: 640px) { .contact-card { grid-template-columns: 1fr; } }

.faq { display: grid; gap: 10px; }
.faq details {
  border-radius: 16px; background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--line);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative;
  font-weight: 700; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 20px 18px; }
.faq .answer p:last-child, .faq .answer ul:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--ink-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
