/* ============================================================
   JING — House of JING
   Mobile-first quiet-luxury design system
   ============================================================ */

:root {
  /* Palette — surfaces of the home */
  --paper:       #F2EADA;
  --paper-2:     #EDE4D3;
  --paper-warm:  #E8DEC7;
  --cream:       #F8F2E5;
  --walnut:      #5C4533;
  --walnut-deep: #3A2C20;
  --ink:         #1A1814;
  --ink-soft:    #2A2620;
  --jade:        #7B9486;
  --jade-deep:   #5A6F65;
  --clay:        #B8826D;
  --clay-deep:   #8E5C4A;

  /* Type */
  --display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --cn:      "Noto Serif SC", "Songti SC", serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* Motion */
  --ease:       cubic-bezier(.16, 1, .3, 1);
  --ease-soft:  cubic-bezier(.4, 0, .2, 1);
  --slow:       1200ms;
  --med:         700ms;
  --fast:        300ms;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.005em;
  background: var(--paper);
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

button {
  font: inherit; color: inherit;
  background: none; border: 0; cursor: pointer;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--cream); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   PAPER GRAIN OVERLAY — the texture that sells everything
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.09  0 0 0 0 0.08  0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================================
   THRESHOLD — the intro
   ============================================================ */
.threshold {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  display: grid;
  place-items: center;
  transition: opacity 1200ms var(--ease), visibility 0s linear 1200ms;
}
.threshold.is-gone {
  opacity: 0;
  visibility: hidden;
}

.threshold__inner {
  text-align: center;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.threshold__char {
  font-family: var(--cn);
  font-size: clamp(8rem, 38vw, 14rem);
  font-weight: 300;
  line-height: 1;
  color: var(--cream);
  opacity: 0;
  transform: translateY(20px);
  animation: rise 2200ms var(--ease) 200ms forwards;
  letter-spacing: -0.04em;
}

.threshold__line {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  animation: rise 1800ms var(--ease) 1400ms forwards;
}

.threshold__line .overline { color: var(--cream); }

.threshold__sub {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: rgba(248, 242, 229, 0.65);
  letter-spacing: 0.01em;
}

.threshold__enter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  opacity: 0;
  animation: rise 1600ms var(--ease) 2400ms forwards;
  color: var(--cream);
  transition: transform 400ms var(--ease);
}
.threshold__enter:hover { transform: translateY(-2px); }

.threshold__enter-label {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.threshold__enter-rule {
  width: 60px;
  height: 1px;
  background: var(--cream);
  opacity: 0.4;
  transition: width 600ms var(--ease), opacity 400ms var(--ease);
}
.threshold__enter:hover .threshold__enter-rule {
  width: 90px;
  opacity: 0.9;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TOPBAR — sticky brand header
   ============================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  padding-top: max(var(--space-3), env(safe-area-inset-top));
  pointer-events: none;
  mix-blend-mode: difference;
  color: var(--paper);
}

.topbar__brand {
  display: flex; align-items: baseline; gap: 0.4em;
}

.brand-mark {
  font-family: var(--cn);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.brand-word {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.topbar__status {
  display: flex; align-items: center; gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--paper);
  animation: pulse 3s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* ============================================================
   FLOORPLAN MINIMAP — the signature device
   ============================================================ */
.floorplan {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-4);
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  z-index: 40;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 800ms var(--ease) 400ms, transform 800ms var(--ease) 400ms;
  pointer-events: none;
}
.floorplan.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.floorplan svg {
  width: 64px;
  height: 64px;
  color: var(--ink);
  opacity: 0.78;
  background: rgba(242, 234, 218, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px;
  border-radius: 4px;
}

.fp-dot {
  opacity: 0.18;
  transition: opacity 500ms var(--ease), r 500ms var(--ease);
}
.fp-dot.is-active {
  opacity: 1;
  r: 2.6;
}

.floorplan__label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.62;
  text-align: right;
  white-space: nowrap;
  padding: 2px 6px;
  background: rgba(242, 234, 218, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 2px;
  transition: opacity 400ms var(--ease);
}

/* ============================================================
   TYPOGRAPHY PRIMITIVES
   ============================================================ */
.overline {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--walnut);
  opacity: 0.85;
}

.italic { font-style: italic; }
.mono   { font-family: var(--mono); font-style: normal; letter-spacing: 0; }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1100ms var(--ease), transform 1100ms var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-chars {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.reveal-chars > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms var(--ease);
}
.reveal-chars.is-in > span {
  transform: translateY(0);
}

/* ============================================================
   SECTIONS — shared room shape
   ============================================================ */
.room,
.lab,
.colors,
.product,
.cta {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--space-6) var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background:
    radial-gradient(80% 60% at 50% 30%, var(--cream), var(--paper) 70%, var(--paper-warm));
  text-align: left;
}

.hero__top {
  margin-bottom: var(--space-6);
}

.hero__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 13.5vw, 5.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-5);
}
.hero__title .reveal-chars { display: block; }

.hero__lede {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  line-height: 1.45;
  max-width: 32ch;
  color: var(--ink);
  margin-bottom: var(--space-6);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--walnut);
}

.hero__rule {
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  max-width: 80px;
}

/* ============================================================
   ROOMS — shared
   ============================================================ */
.room__index {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.room__cn {
  font-family: var(--cn);
  font-size: 1.1rem;
  color: var(--walnut);
  opacity: 0.7;
  letter-spacing: 0.1em;
}

.room__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: var(--space-3) 0 var(--space-5);
  border-radius: 2px;
  overflow: hidden;
}

.vignette {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.room__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.2rem, 9.2vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
}
.room__title .reveal-chars { display: block; }

.room__copy p {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1rem, 4.2vw, 1.2rem);
  line-height: 1.5;
  max-width: 34ch;
  color: var(--ink);
  margin-bottom: var(--space-4);
}

.room__notes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.room__notes li {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--walnut);
  padding-left: 1.2em;
  position: relative;
}
.room__notes li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 1px;
  background: var(--walnut);
  opacity: 0.7;
}
.room__notes em {
  font-style: italic;
  text-transform: none;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

/* ============================================================
   ROOM VIGNETTES — atmospheric backgrounds for each room
   ============================================================ */

/* Living Room — warm ivory, sofa, window */
.room--living {
  background:
    radial-gradient(70% 50% at 30% 40%, var(--cream), var(--paper-warm) 80%);
}
.vignette--living {
  background:
    linear-gradient(180deg, rgba(248, 242, 229, 0.5) 0%, rgba(232, 222, 199, 0.6) 100%);
}
.v-sofa {
  position: absolute;
  bottom: 8%;
  left: 8%;
  right: 8%;
  height: 35%;
  background: linear-gradient(180deg, #D4C5A8 0%, #B8A488 100%);
  border-radius: 12px 12px 4px 4px;
  box-shadow:
    inset 0 8px 0 rgba(255,255,255,0.15),
    0 8px 24px -8px rgba(58, 44, 32, 0.25);
}
.v-sofa::before, .v-sofa::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 22%;
  height: 75%;
  background: linear-gradient(180deg, #C9B89A 0%, #A89478 100%);
  border-radius: 10px 10px 4px 4px;
}
.v-sofa::before { left: 0; }
.v-sofa::after  { right: 0; }

.v-window {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 28%;
  height: 38%;
  background:
    linear-gradient(180deg, rgba(248, 242, 229, 0.9) 0%, rgba(232, 222, 199, 0.5) 100%);
  border: 1px solid rgba(92, 69, 51, 0.2);
}
.v-window::before, .v-window::after {
  content: "";
  position: absolute;
  background: rgba(92, 69, 51, 0.2);
}
.v-window::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.v-window::after  { top: 50%; left: 0; right: 0; height: 1px; }

.v-rug {
  position: absolute;
  bottom: 4%;
  left: 4%;
  right: 4%;
  height: 6%;
  background: linear-gradient(180deg, #B8A488, transparent);
  opacity: 0.4;
  filter: blur(2px);
}

/* Hallway — narrow corridor, perspective, doorway */
.room--hallway {
  background:
    linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%);
}
.vignette--hallway {
  background:
    linear-gradient(180deg, rgba(232, 222, 199, 0.5) 0%, rgba(216, 200, 170, 0.7) 100%);
}
.v-corridor {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 86%;
  height: 78%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(92, 69, 51, 0.06) 100%),
    linear-gradient(90deg, rgba(92, 69, 51, 0.12) 0%, transparent 8%, transparent 92%, rgba(92, 69, 51, 0.12) 100%);
  clip-path: polygon(0% 0%, 100% 0%, 78% 100%, 22% 100%);
}
.v-door {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 24%;
  height: 38%;
  background: linear-gradient(180deg, #5C4533 0%, #3A2C20 100%);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(248, 242, 229, 0.1),
    0 4px 16px -4px rgba(0,0,0,0.2);
}
.v-door::after {
  content: "";
  position: absolute;
  right: 12%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #E8DEC7;
}

/* Balcony — railing, skyline, city light */
.room--balcony {
  background:
    linear-gradient(180deg, #E8DEC7 0%, #D4C5A8 50%, var(--paper-warm) 100%);
}
.vignette--balcony {
  background:
    linear-gradient(180deg,
      rgba(216, 200, 170, 0.3) 0%,
      rgba(232, 222, 199, 0.5) 60%,
      rgba(184, 130, 109, 0.15) 100%);
}
.v-skyline {
  position: absolute;
  top: 18%;
  left: 0; right: 0;
  height: 32%;
  background:
    linear-gradient(180deg,
      transparent 0%,
      rgba(92, 69, 51, 0.08) 60%,
      rgba(92, 69, 51, 0.2) 100%);
  mask-image:
    linear-gradient(90deg,
      transparent 4%,
      black 8%, black 12%, transparent 14%,
      transparent 18%, black 22%, black 32%, transparent 34%,
      transparent 38%, black 42%, black 58%, transparent 60%,
      transparent 64%, black 68%, black 76%, transparent 78%,
      transparent 82%, black 86%, black 92%, transparent 96%);
}
.v-railing {
  position: absolute;
  bottom: 18%;
  left: 0; right: 0;
  height: 1px;
  background: rgba(58, 44, 32, 0.5);
}
.v-railing::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 30px;
  background:
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 18px,
      rgba(58, 44, 32, 0.35) 18px,
      rgba(58, 44, 32, 0.35) 19px);
}
.v-plant {
  position: absolute;
  bottom: 22%;
  left: 8%;
  width: 18%;
  height: 24%;
  background:
    radial-gradient(40% 60% at 50% 30%, var(--jade-deep) 0%, transparent 70%),
    radial-gradient(35% 50% at 35% 50%, var(--jade) 0%, transparent 60%),
    radial-gradient(30% 45% at 65% 60%, var(--jade-deep) 0%, transparent 60%);
  opacity: 0.7;
}

/* Bedroom — quiet morning, soft warm light */
.room--bedroom {
  background:
    radial-gradient(60% 50% at 70% 30%, #F0E5CC 0%, var(--paper-warm) 80%);
}
.vignette--bedroom {
  background:
    linear-gradient(180deg, rgba(240, 229, 204, 0.5) 0%, rgba(216, 200, 170, 0.6) 100%);
}
.v-bed {
  position: absolute;
  bottom: 6%;
  left: 6%;
  right: 18%;
  height: 42%;
  background:
    linear-gradient(180deg, #F2EADA 0%, #D4C5A8 100%);
  border-radius: 4px;
  box-shadow: 0 12px 32px -10px rgba(58, 44, 32, 0.2);
}
.v-bed::before {
  content: "";
  position: absolute;
  top: -8%;
  left: 8%;
  right: 8%;
  height: 18%;
  background: linear-gradient(180deg, #E8DEC7, #C9B89A);
  border-radius: 4px;
  filter: blur(0.5px);
}
.v-bed::after {
  content: "";
  position: absolute;
  top: -25%;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, #B8A488, #8E7960);
  border-radius: 4px 4px 0 0;
  z-index: -1;
}
.v-lamp {
  position: absolute;
  top: 18%;
  right: 10%;
  width: 10%;
  height: 40%;
  background:
    radial-gradient(50% 30% at 50% 20%, rgba(248, 242, 229, 0.7) 0%, transparent 70%);
}
.v-lamp::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 14px;
  background: var(--clay);
  border-radius: 4px 4px 1px 1px;
}
.v-lamp::after {
  content: "";
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 70%;
  background: var(--walnut);
}

/* ============================================================
   THE BALL — CSS-rendered, multiple finishes
   ============================================================ */
.ball {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: end center;
  padding-bottom: 0.6em;
  transition: transform 800ms var(--ease);
  z-index: 2;
}

.ball::before {
  content: "";
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    var(--ball-highlight, rgba(255, 255, 255, 0.4)) 0%,
    transparent 40%);
  z-index: 1;
  pointer-events: none;
}

.ball::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -10%;
  height: 14%;
  background: radial-gradient(50% 100% at 50% 0%, rgba(26, 24, 20, 0.35), transparent 70%);
  filter: blur(8px);
  z-index: 0;
}

.ball__name {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ball-text, var(--ink));
  opacity: 0.5;
  padding: 4px 8px;
  background: rgba(248, 242, 229, 0.5);
  border-radius: 1px;
  backdrop-filter: blur(4px);
}

/* Colorways */
.ball--paper {
  --ball-highlight: #FBF5E8;
  --ball-text: var(--walnut);
  background:
    radial-gradient(circle at 32% 28%, #FBF5E8 0%, #F2EADA 40%, #D9CAA8 90%);
  box-shadow:
    inset -6px -10px 18px rgba(92, 69, 51, 0.18),
    inset 6px 8px 14px rgba(255, 255, 255, 0.5),
    0 20px 40px -16px rgba(58, 44, 32, 0.3);
}

.ball--jade {
  --ball-highlight: #B0C4B7;
  --ball-text: var(--cream);
  background:
    radial-gradient(circle at 32% 28%, #B0C4B7 0%, #7B9486 45%, #4F6157 95%);
  box-shadow:
    inset -6px -10px 18px rgba(0, 0, 0, 0.2),
    inset 6px 8px 14px rgba(255, 255, 255, 0.18),
    0 20px 40px -16px rgba(0, 0, 0, 0.35);
}

.ball--clay {
  --ball-highlight: #DAA88F;
  --ball-text: var(--cream);
  background:
    radial-gradient(circle at 32% 28%, #DAA88F 0%, #B8826D 45%, #7B4F3D 95%);
  box-shadow:
    inset -6px -10px 18px rgba(0, 0, 0, 0.22),
    inset 6px 8px 14px rgba(255, 255, 255, 0.2),
    0 20px 40px -16px rgba(0, 0, 0, 0.35);
}

.ball--walnut {
  --ball-highlight: #8A6E54;
  --ball-text: var(--cream);
  background:
    radial-gradient(circle at 32% 28%, #8A6E54 0%, #5C4533 45%, #2E1F14 95%);
  box-shadow:
    inset -6px -10px 18px rgba(0, 0, 0, 0.3),
    inset 6px 8px 14px rgba(255, 255, 255, 0.12),
    0 20px 40px -16px rgba(0, 0, 0, 0.4);
}

.ball--ink {
  --ball-highlight: #3D3833;
  --ball-text: var(--cream);
  background:
    radial-gradient(circle at 32% 28%, #3D3833 0%, #1A1814 45%, #050403 95%);
  box-shadow:
    inset -6px -10px 18px rgba(0, 0, 0, 0.4),
    inset 6px 8px 14px rgba(255, 255, 255, 0.08),
    0 20px 40px -16px rgba(0, 0, 0, 0.5);
}

.ball--small {
  position: static;
  transform: none;
  width: 110px;
  margin: 0 auto;
}
.ball--small .ball__name { display: none; }

.ball--large {
  position: static;
  transform: none;
  width: 70%;
  max-width: 280px;
  margin: 0 auto;
}
.ball--large .ball__name { display: none; }

/* gentle float */
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-6px); }
}
.room.is-in .ball:not(.ball--small):not(.ball--large) {
  animation: float 5s var(--ease) infinite;
}

/* ============================================================
   QUIET LAB
   ============================================================ */
.lab {
  background: var(--ink);
  color: var(--cream);
  padding: var(--space-7) var(--space-4);
}
.lab .overline { color: var(--paper-warm); opacity: 0.7; }

.lab__intro {
  margin-bottom: var(--space-6);
  max-width: 36ch;
}

.lab__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 8.5vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  margin: var(--space-3) 0 var(--space-4);
}
.lab__title .reveal-chars { display: block; }

.lab__intro p {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(248, 242, 229, 0.75);
  max-width: 32ch;
}

.lab__diagram {
  margin: 0 calc(-1 * var(--space-4)) var(--space-6);
  padding: var(--space-4);
  background: var(--paper);
  color: var(--ink);
}

.lab__specs {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid rgba(248, 242, 229, 0.12);
}
.spec:last-child { border-bottom: 1px solid rgba(248, 242, 229, 0.12); }

.spec__num {
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(248, 242, 229, 0.5);
  padding-top: 0.3em;
}

.spec__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
}

.spec__detail {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.92rem;
  color: rgba(248, 242, 229, 0.7);
  line-height: 1.4;
  margin-top: 0.2em;
}

.lab__note {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 242, 229, 0.5);
  text-align: center;
  border-top: 1px solid rgba(248, 242, 229, 0.12);
  padding-top: var(--space-4);
}
.lab__note em {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ============================================================
   COLORWAYS
   ============================================================ */
.colors {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-warm) 100%);
  padding: var(--space-7) 0 var(--space-6);
}

.colors__head {
  padding: 0 var(--space-4);
  margin-bottom: var(--space-5);
  max-width: 36ch;
}

.colors__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 8.5vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  margin: var(--space-3) 0 var(--space-3);
}
.colors__title .reveal-chars { display: block; }

.colors__head p {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--walnut);
}

.colors__track {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-3) var(--space-4) var(--space-4);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.colors__track::-webkit-scrollbar { display: none; }

.swatch {
  flex: 0 0 70%;
  max-width: 220px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3) var(--space-3);
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 8px 30px -16px rgba(58, 44, 32, 0.25);
}

.swatch__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
}

.swatch__hex {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--walnut);
  opacity: 0.7;
}

/* ============================================================
   PRODUCT
   ============================================================ */
.product {
  background:
    radial-gradient(60% 50% at 50% 30%, var(--cream) 0%, var(--paper-warm) 80%);
  padding: var(--space-7) var(--space-4) var(--space-6);
}

.product__head {
  margin-bottom: var(--space-4);
}

.product__stage {
  margin: var(--space-4) 0 var(--space-5);
  display: grid;
  place-items: center;
  min-height: 280px;
}

.product__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 10vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
}
.product__title .reveal-chars { display: block; }

.product__copy p {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: 34ch;
  margin-bottom: var(--space-5);
}

.product__spec {
  display: grid;
  gap: 0;
  margin-bottom: var(--space-5);
}
.product__spec > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid rgba(92, 69, 51, 0.18);
  align-items: baseline;
}
.product__spec > div:last-child {
  border-bottom: 1px solid rgba(92, 69, 51, 0.18);
}
.product__spec dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--walnut);
}
.product__spec dd {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: -0.005em;
}

.product__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.05rem var(--space-4);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: transform 300ms var(--ease), background 300ms var(--ease);
  text-align: center;
}
.btn:hover, .btn:active {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--walnut-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(26, 24, 20, 0.5);
}
.btn--ghost:hover {
  background: rgba(26, 24, 20, 0.04);
  border-color: var(--ink);
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: var(--space-7) var(--space-4);
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 28rem;
  margin: 0 auto;
}

.cta__char {
  font-family: var(--cn);
  font-size: clamp(7rem, 30vw, 10rem);
  font-weight: 300;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--cream);
  opacity: 0.95;
  margin-bottom: var(--space-2);
}

.cta__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 10vw, 3.6rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
}
.cta__title .reveal-chars { display: block; }

.cta p {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: rgba(248, 242, 229, 0.7);
  max-width: 26ch;
  line-height: 1.5;
}

.cta__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  margin-top: var(--space-3);
}
.cta__form input {
  font: inherit;
  font-family: var(--display);
  font-weight: 300;
  font-size: 1rem;
  padding: 1rem var(--space-3);
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(248, 242, 229, 0.25);
  border-radius: 2px;
  text-align: center;
  transition: border-color 300ms var(--ease);
}
.cta__form input::placeholder {
  color: rgba(248, 242, 229, 0.4);
  font-style: italic;
}
.cta__form input:focus {
  outline: none;
  border-color: var(--cream);
}
.cta__form button {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.05rem var(--space-4);
  background: var(--cream);
  color: var(--ink);
  border-radius: 2px;
  transition: transform 300ms var(--ease), background 300ms var(--ease);
}
.cta__form button:hover {
  transform: translateY(-1px);
  background: var(--paper);
}
.cta__form button.is-done {
  background: var(--jade);
  color: var(--cream);
}

.foot {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 242, 229, 0.4);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(248, 242, 229, 0.12);
}

/* ============================================================
   RESPONSIVE — gentle tablet refinement
   ============================================================ */
@media (min-width: 720px) {
  .room, .lab, .colors, .product, .cta, .hero {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
  .room__stage { max-width: 560px; }
  .swatch { flex: 0 0 32%; }
  .colors__track { padding-left: var(--space-6); padding-right: var(--space-6); }
  .floorplan { width: 84px; }
  .floorplan svg { width: 84px; height: 84px; }
  .product__actions { flex-direction: row; }
  .lab__diagram { margin-left: 0; margin-right: 0; max-width: 480px; }
}

@media (min-width: 1024px) {
  .hero__title  { font-size: 6.5rem; }
  .room__title  { font-size: 4.4rem; }
  .lab__title   { font-size: 4rem; }
  .product__title, .cta__title { font-size: 4.2rem; }
  .colors__title { font-size: 4rem; }
}

/* ============================================================
   MOTION PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-chars > span {
    opacity: 1;
    transform: none;
  }
}
