/* ==========================================================================
   StereoRights, styles.css
   One theme (dark, locked). One accent (tan). One shape system:
   shells 24px, panels 20px, tiles 14px, controls 12px, buttons full pill.
   Dials: variance 7, motion 6, density 3.
   ========================================================================== */
:root {
  --ink-0: #100f0d;
  --ink-1: #171613;
  --ink-2: #221f1b;
  --ink-3: #2c2823;
  --bone: #f1ece3;
  --bone-dim: #a9a297;
  --bone-mute: #8f887d;
  --tan: #d6b58a;
  --tan-hover: #c9a57a;
  --tan-deep: #b3915f;
  --line: rgba(241, 236, 227, 0.1);
  --line-strong: rgba(241, 236, 227, 0.18);
  --font-display: "Bricolage Grotesque", "Bricolage Grotesque Fallback", Arial, sans-serif;
  --font-body: "Schibsted Grotesk", "Schibsted Grotesk Fallback", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r-shell: 24px;
  --r-panel: 20px;
  --r-tile: 14px;
  --r-ctrl: 12px;
  --container: 1280px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(5.5rem, 11vw, 9.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-brand: cubic-bezier(0.32, 0.72, 0, 1);
  --dur: 0.6s;
  --dur-fast: 0.28s;
  --nav-h: 72px;
  --a11y-scale: 100%;
  --a11y-space: 0;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink-0); }
html.a11y-scaled { font-size: var(--a11y-scale); }
html.a11y-spaced body { letter-spacing: var(--a11y-space); word-spacing: calc(var(--a11y-space) * 2); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--bone);
  background: var(--ink-0);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.04;
  text-wrap: balance;
  font-variation-settings: "opsz" 96;
}
h3 { font-weight: 600; line-height: 1.25; }
strong { font-weight: 700; }
:focus-visible { outline: 2px solid var(--tan); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--tan); color: var(--ink-0); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--tan); color: var(--ink-0);
  border-radius: var(--r-ctrl); font-weight: 600; transition: top 0.18s var(--ease);
}
.skip:focus { top: 1rem; }

/* ---------- Layout primitives ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tan);
}
.h-display { font-size: clamp(2.5rem, 5vw, 4.4rem); }
.h-section { font-size: clamp(2.05rem, 4vw, 3.5rem); }
.lead { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--bone-dim); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 52px;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-brand),
              background-color var(--dur-fast) var(--ease-brand),
              border-color var(--dur-fast) var(--ease-brand),
              color var(--dur-fast) var(--ease-brand);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--tan); color: var(--ink-0); }
.btn-primary:hover { background: var(--tan-hover); }
.btn-ic {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--ink-0); color: var(--tan);
  transition: transform var(--dur-fast) var(--ease-brand);
}
.btn-ic svg { width: 16px; height: 16px; fill: currentColor; }
.btn-primary:hover .btn-ic { transform: translate(2px, -1px); }
.btn-ghost {
  padding: 0.5rem 1.5rem;
  border: 1px solid rgba(241, 236, 227, 0.34);
  color: var(--bone);
  /* No backdrop blur: it sits in the scrolling hero, and blur is reserved for fixed layers. */
  background: rgba(16, 15, 13, 0.62);
}
.btn-ghost:hover { border-color: rgba(241, 236, 227, 0.62); background: rgba(16, 15, 13, 0.74); }
.btn-block { width: 100%; justify-content: space-between; }

/* ---------- Floating island nav ---------- */
#pin-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }
.nav-wrap {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: center;
  padding: 18px var(--gutter) 0;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 1.5rem;
  width: min(100%, 1040px); height: var(--nav-h);
  padding: 0 0.6rem 0 0.9rem;
  border-radius: 999px;
  background: rgba(30, 27, 23, 0.55);
  border: 1px solid rgba(214, 181, 138, 0.22);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 40px rgba(16, 15, 13, 0.35), inset 0 1px 0 rgba(241, 236, 227, 0.08);
  transition: background-color var(--dur-fast) var(--ease-brand), border-color var(--dur-fast) var(--ease-brand);
}
.nav.is-scrolled { background: rgba(23, 22, 19, 0.88); border-color: rgba(214, 181, 138, 0.16); }
.nav-logo { display: flex; align-items: center; flex: none; }
.nav-logo img { height: 52px; width: auto; }
.nav-links { display: flex; gap: 1.7rem; margin-inline: auto; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; color: var(--bone-dim);
  padding: 0.5rem 0; transition: color var(--dur-fast) var(--ease-brand);
}
.nav-links a:hover { color: var(--bone); }
.nav .btn { min-height: 46px; padding-left: 1.25rem; }
.nav .btn-ic { width: 32px; height: 32px; }
.nav-toggle {
  display: none; position: relative; flex: none;
  width: 46px; height: 46px; border-radius: 999px; margin-left: auto;
}
.nav-toggle span {
  position: absolute; left: 13px; width: 20px; height: 2px; border-radius: 2px;
  background: var(--bone);
  transition: transform 0.4s var(--ease-brand), top 0.4s var(--ease-brand);
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav-toggle.is-open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem var(--gutter) 3rem;
  background: rgba(16, 15, 13, 0.86);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0; transition: opacity 0.4s var(--ease-brand);
}
.menu[hidden] { display: none; }
.menu.open { opacity: 1; }
.menu a.menu-link {
  display: block;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 9vw, 3.4rem);
  letter-spacing: -0.02em; line-height: 1.1; padding: 0.45rem 0;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.menu.open a.menu-link { opacity: 1; transform: none; }
.menu.open a.menu-link:nth-child(2) { transition-delay: 0.06s; }
.menu.open a.menu-link:nth-child(3) { transition-delay: 0.12s; }
.menu.open a.menu-link:nth-child(4) { transition-delay: 0.18s; }
.menu .btn { align-self: flex-start; margin-top: 2rem; opacity: 0; transition: opacity 0.5s var(--ease) 0.26s; }
.menu.open .btn { opacity: 1; }
.menu-phone { margin-top: 2rem; color: var(--bone-dim); font-size: 0.95rem; }
html.menu-open { overflow: hidden; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 28px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100dvh;
  display: grid; align-items: end;
  overflow: clip;
  padding-top: 6rem;
}
.hero-media { position: absolute; inset: -12% 0 0 0; z-index: -2; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 15, 13, 0.86) 0%, rgba(16, 15, 13, 0.6) 40%, rgba(16, 15, 13, 0.12) 78%, rgba(16, 15, 13, 0) 100%),
    linear-gradient(180deg, rgba(16, 15, 13, 0.4) 0%, rgba(16, 15, 13, 0) 28%, rgba(16, 15, 13, 0.05) 60%, rgba(16, 15, 13, 0.82) 100%);
}
.hero-content { padding-bottom: clamp(3rem, 9vh, 6rem); max-width: 48rem; }
.hero .lead { margin-top: 1.5rem; max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.3rem; }
@keyframes enter-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-in { opacity: 0; animation: enter-up 0.8s var(--ease) forwards; }
.hero-in.h1d { animation-delay: 0.08s; }
.hero-in.h2d { animation-delay: 0.16s; }

/* ---------- Own vs rent (pinned diptych) ---------- */
.own h2 { max-width: 16ch; }
.own-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; }
.own-card {
  display: flex; flex-direction: column;
  min-height: 400px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  border-radius: var(--r-panel);
}
.own-rent { background: var(--tan); color: var(--ink-0); }
.own-own { background: var(--ink-1); border: 1px solid var(--line); }
.own-label { font-size: 1rem; font-weight: 500; }
.own-num {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.own-own .own-num { color: var(--tan); }
.own-text { margin-top: 1rem; font-size: 1.15rem; max-width: 26ch; }
.own-rent .own-text { color: rgba(16, 15, 13, 0.78); }
.own-own .own-text { color: var(--bone-dim); }
.own-own .own-text strong { color: var(--bone); }
.own-years {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin-top: auto; padding-top: 2.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: rgba(16, 15, 13, 0.78);
}
.own-years span { position: relative; padding-top: 0.8rem; border-top: 1px solid rgba(16, 15, 13, 0.32); }
.own-years span::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 3px;
  background: var(--ink-0); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.own-years span.on::before { transform: scaleX(1); }
.own-note { margin-top: 1.4rem; font-size: 0.85rem; color: var(--bone-mute); }

/* ---------- Channels bento ---------- */
.channels-head { display: grid; gap: 0.9rem; max-width: 50rem; }
.ch-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  grid-auto-flow: dense;
  margin-top: 3rem;
}
.tile {
  position: relative; overflow: clip;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-tile);
  background: var(--ink-1);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 15, 13, 0) 48%, rgba(16, 15, 13, 0.8) 100%);
}
.tile-meta {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
  padding: 1rem 1.1rem;
}
.tile-name { font-weight: 600; font-size: 1rem; }
.tile-room { font-family: var(--font-mono); font-size: 0.72rem; color: var(--bone-dim); white-space: nowrap; }

/* ---------- What you keep ---------- */
.keep { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.keep h2 { max-width: 12ch; }
.keep-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2.1rem 1.6rem; margin-top: 2.8rem; }
.keep-list h3 { font-size: 1.2rem; font-weight: 700; }
.keep-list p { margin-top: 0.5rem; font-size: 0.98rem; color: var(--bone-dim); }
.shell {
  padding: 8px;
  border-radius: var(--r-shell);
  background: var(--ink-1);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(241, 236, 227, 0.06), 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.shell > * { border-radius: calc(var(--r-shell) - 8px); overflow: clip; }
.shell img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- How it works ---------- */
.how { text-align: center; }
.how h2 { max-width: 22ch; margin-inline: auto; }
.how-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  margin-top: 3.5rem;
  border-top: 1px solid var(--line-strong);
  text-align: left;
}
.how-row > div { position: relative; padding-top: 1.7rem; }
.how-row > div::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 1px; height: 14px; background: var(--tan);
}
.how-row h3 { font-size: 1.15rem; }
.how-row p { margin-top: 0.35rem; font-size: 0.95rem; color: var(--bone-dim); }

/* ---------- Pricing ---------- */
.pricing { text-align: center; }
.price-shell { max-width: 640px; margin: 1.5rem auto 0; text-align: left; }
.price-panel { background: var(--ink-0); padding: clamp(1.6rem, 4vw, 2.8rem); }
.price-row { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.price-big { font-family: var(--font-mono); font-size: clamp(3rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; }
.price-tag { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; }
.price-sub { margin-top: 0.8rem; font-size: 0.95rem; color: var(--bone-dim); }
.stepper {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 1.6rem; padding: 1.2rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.step-btn {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--tan); color: var(--ink-0);
  transition: background-color var(--dur-fast) var(--ease-brand), transform var(--dur-fast) var(--ease-brand), opacity var(--dur-fast);
}
.step-btn svg { width: 18px; height: 18px; fill: currentColor; }
.step-btn:hover { background: var(--tan-hover); }
.step-btn:active { transform: scale(0.94); }
.step-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.step-qty { min-width: 2.2ch; text-align: center; font-family: var(--font-mono); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.step-label { font-size: 1.1rem; color: var(--bone-dim); }
.step-total { margin-left: auto; font-family: var(--font-mono); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.price-line { margin-top: 1rem; font-size: 0.95rem; color: var(--bone-dim); }
.price-line a { color: var(--tan); text-decoration: underline; text-underline-offset: 3px; }
.price-panel .btn { margin-top: 1.4rem; }
.price-fine { margin-top: 1rem; font-size: 0.85rem; color: var(--bone-mute); text-align: center; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.faq h2 { max-width: 12ch; }
.faq-intro { margin-top: 1rem; color: var(--bone-dim); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq details:first-of-type { border-top: 1px solid var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.3rem 0;
  font-size: 1.15rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; fill: var(--bone-dim); transition: transform 0.35s var(--ease), fill 0.35s; }
.faq details[open] summary svg { transform: rotate(45deg); fill: var(--tan); }
.faq .answer { padding: 0 3rem 1.4rem 0; max-width: 60ch; color: var(--bone-dim); }

/* ---------- Closing statement ---------- */
.closing {
  position: relative; isolation: isolate;
  min-height: 82vh;
  display: grid; align-items: end;
  overflow: clip;
}
.closing-media { position: absolute; inset: 0; z-index: -2; }
.closing-media img { width: 100%; height: 100%; object-fit: cover; object-position: 32% center; }
.closing::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(270deg, rgba(16, 15, 13, 0.78) 0%, rgba(16, 15, 13, 0.35) 45%, rgba(16, 15, 13, 0.1) 100%),
    linear-gradient(180deg, rgba(16, 15, 13, 0.3) 0%, rgba(16, 15, 13, 0) 30%, rgba(16, 15, 13, 0.85) 100%);
}
.closing-content { margin-left: auto; text-align: right; padding-bottom: clamp(3rem, 9vh, 6rem); }
.closing h2 { max-width: 16ch; margin-left: auto; }
.closing .btn { margin-top: 2rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-logo img { height: 56px; width: auto; }
.footer-addr { margin-inline: auto; font-size: 0.85rem; color: var(--bone-mute); }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--bone-dim); }
.footer-links a:hover { color: var(--bone); }
.footer-links button { color: inherit; }

/* ---------- Scroll reveal (IntersectionObserver, never a scroll listener).
   Content can never stay hidden: a 1.6 s keyframe fallback reveals every .reveal
   even if the observer never fires. ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal-safety 0s linear 1.6s forwards; }
@keyframes reveal-safety { to { opacity: 1; transform: none; } }
.reveal.seen { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.d1.seen { transition-delay: 0.08s; }
.reveal.d2.seen { transition-delay: 0.16s; }
.reveal.d3.seen { transition-delay: 0.24s; }

/* ---------- Responsive collapse ---------- */
@media (max-width: 1023px) {
  .nav-links, .nav .btn { display: none; }
  .nav-toggle { display: block; }
  .nav { padding-right: 0.5rem; }
}
@media (max-width: 899px) {
  .own-stage { grid-template-columns: 1fr; }
  .own-card { min-height: 0; }
  .own-years { padding-top: 1.8rem; }
  .ch-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .keep { grid-template-columns: 1fr; }
  .keep .shell { order: -1; }
  .faq { grid-template-columns: 1fr; gap: 2rem; }
  .how-row { grid-template-columns: 1fr; gap: 0; border-top: 0; }
  .how-row > div { border-top: 1px solid var(--line-strong); padding: 1.3rem 0; }
  .closing-content { margin-left: 0; text-align: left; }
  .closing h2 { margin-left: 0; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-addr { margin-inline: 0; }
}
@media (max-width: 599px) {
  .hero { padding-top: 5.5rem; }
  .hero-cta .btn { width: 100%; justify-content: space-between; }
  .btn-ghost { justify-content: center; }
  .keep-list { grid-template-columns: 1fr; gap: 1.5rem; }
  .stepper { flex-wrap: wrap; }
  .step-total { width: 100%; margin-left: 0; padding-top: 0.6rem; }
  .tile-meta { flex-direction: column; align-items: flex-start; gap: 0.15rem; padding: 0.8rem 0.9rem; }
  .faq .answer { padding-right: 1rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; animation: none; }
  .hero-in { opacity: 1; animation: none; }
  .tile:hover img { transform: none; }
}
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after {
  animation: none !important; transition: none !important;
}
html.a11y-nomotion .reveal, html.a11y-nomotion .hero-in { opacity: 1; transform: none; }

@media print {
  .nav-wrap, .menu, .skip { display: none; }
  .reveal, .hero-in { opacity: 1; transform: none; animation: none; }
  body { background: #fff; color: #000; }
}
