/* ============================================================
   Floor visualizer additions (2026-10-09): the section on the
   one-scroller (index.html) and the Visualizer page
   (visualizer.html). Load after color-slate.css; same tokens.
   ============================================================ */

/* ---------- index.html · section after 3D Rendering ---------- */
.viz-teaser { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.viz-teaser .eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-500); display: block; margin-bottom: 18px;
}
.viz-teaser h2 {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(36px, 4.4vw, 56px);
  letter-spacing: -0.02em; line-height: 1.0; color: var(--ink-800); margin: 0 0 18px;
}
.viz-teaser p { font-size: 17px; line-height: 1.55; color: var(--fg-2); max-width: 46ch; }
.viz-teaser .hero-ctas { margin-top: 28px; }

/* ---------- visualizer.html ---------- */
/* The hero render is brighter than the landing page's video: a deeper scrim behind the headline */
.viz-hero .hero-scrim {
  background:
    linear-gradient(90deg, rgba(11,18,24,0.62) 0%, rgba(11,18,24,0.40) 30%, rgba(11,18,24,0.10) 56%, rgba(11,18,24,0) 74%),
    linear-gradient(180deg, rgba(11,18,24,0.36) 0%, rgba(11,18,24,0.10) 30%, rgba(11,18,24,0) 50%);
}
.nav-links a.is-active { color: #fff !important; text-decoration: underline; text-underline-offset: 7px; }
.promo-grid .problem-compare { align-self: start; }
.problem-body li b { color: var(--ink-800); font-weight: 500; }
.viz-crops { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 64px; }
.viz-crops .img-card { aspect-ratio: 3/2; height: auto; flex: none; }
.viz-crop-note {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); margin-top: 12px; max-width: none;
}
.viz-gate { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.viz-gate input {
  font-family: var(--font-sans); font-size: 15px; padding: 14px 16px; min-width: 320px; border-radius: 4px;
  border: 1px solid var(--border-hair-strong); background: #fff; color: var(--ink-800);
}
.viz-gate input:focus { outline: none; border-color: var(--ink-800); }
.viz-gate + .final-ctas { margin-top: 16px; }
.viz-gate-note {
  font-family: var(--font-mono); font-size: 10px !important; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3) !important; margin: 20px auto 0 !important;
}

/* ---------- visualizer.html · live demo (#try, visualizer/demo.js) ---------- */
.viz-demo[hidden] { display: none !important; }  /* until the demo's data loads */
.viz-demo { background: var(--surface-paper-2); }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.demo-view { aspect-ratio: 3 / 2; }
.demo-view canvas.compare-img { z-index: 1; }
.demo-view .demo-poster { z-index: 3; }
.demo-start {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; padding: 14px 24px; border-radius: 4px; border: 0;
  background: var(--ink-800); color: #fff; cursor: pointer; box-shadow: 0 10px 30px rgba(11,18,24,0.28); text-align: center;
}
.demo-start:hover { background: var(--accent-500); }
.demo-start small {
  display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 400; opacity: 0.7;
}
.demo-loading {
  position: absolute; left: 14px; bottom: 14px; z-index: 6; padding: 6px 10px; background: rgba(255,255,255,0.92);
  color: var(--ink-800); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
}
.demo-loading[hidden] { display: none; }
.demo-caption { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); max-width: none; }
.demo-caption b { color: var(--ink-800); font-weight: 500; }
.demo-side { display: flex; flex-direction: column; gap: 22px; }
.demo-label {
  display: block; margin-bottom: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-3);
}
.demo-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-floors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-rooms button, .demo-floors button {
  display: flex; flex-direction: column; padding: 0; border: 1px solid var(--border-hair-strong); background: #fff;
  cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.demo-rooms img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.demo-floors img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.demo-rooms span { padding: 6px 8px 7px; font-size: 12px; color: var(--ink-800); line-height: 1.25; }
.demo-floors .nm { padding: 7px 8px 0; font-size: 12.5px; font-weight: 500; color: var(--ink-800); line-height: 1.3; }
.demo-floors .sz { padding: 2px 8px 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.demo-rooms button:hover, .demo-floors button:hover { border-color: var(--ink-800); }
.demo-rooms button.on, .demo-floors button.on { outline: 2px solid var(--ink-800); outline-offset: -1px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-chips button {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 7px 9px;
  border: 1px solid var(--border-hair-strong); background: #fff; color: var(--fg-2); cursor: pointer; white-space: nowrap;
}
.demo-chips button.on { background: var(--ink-800); border-color: var(--ink-800); color: #fff; }
.demo-chips button:disabled { opacity: 0.4; cursor: not-allowed; }
.demo-credit {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
  line-height: 1.6; max-width: none;
}

@media (max-width: 900px) {
  .demo { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 900px) {
  /* on a phone the headline and buttons span the full width: darken the top half instead of the left */
  .viz-hero .hero-scrim {
    background: linear-gradient(180deg, rgba(11,18,24,0.58) 0%, rgba(11,18,24,0.42) 50%, rgba(11,18,24,0.12) 75%, rgba(11,18,24,0) 90%);
  }
  .viz-teaser { grid-template-columns: 1fr; gap: 32px; }
  .viz-crops { grid-template-columns: 1fr; }
  .viz-gate input { min-width: 0; width: 100%; }
}

/* ---------- visualizer.html · AI + rendering (#ai-render), 2026-10-15 ---------- */
/* The sections' backgrounds alternate by their data-tone (landing.css; the site admin sets it, nav.js corrects it while
   the demos wait for their data). These are the colours without it. */
.ai-render { background: var(--surface-paper); }
.grid-planner { background: var(--surface-paper); }
.air-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border-hair-strong); border: 1px solid var(--border-hair-strong);
}
.air-col { background: var(--surface-paper); padding: 36px 32px 40px; display: flex; flex-direction: column; gap: 12px; }
.air-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-500);
}
.air-col h3 {
  font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.1; letter-spacing: -0.015em;
  color: var(--ink-800); margin: 0;
}
.air-col p { font-size: 15px; line-height: 1.55; color: var(--fg-2); margin: 0; max-width: 40ch; }
.air-col.feat { background: var(--ink-800); }
.air-col.feat .air-tag { color: var(--accent-300); }
.air-col.feat h3 { color: #fff; }
.air-col.feat p { color: rgba(255, 255, 255, 0.78); }
.air-note { margin-top: 28px; font-size: 17px; line-height: 1.55; color: var(--fg-2); max-width: 70ch; }
.air-note b { color: var(--ink-800); font-weight: 500; }
@media (max-width: 900px) {
  .air-grid { grid-template-columns: 1fr; }
  .air-col { padding: 28px 24px 32px; }
}

/* ---------- visualizer.html · grid planner (#grid, visualizer/gridplanner.js), 2026-10-15 ---------- */
.grid-planner[hidden] { display: none !important; }  /* until the live demo's data loads */
.gp { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 32px; align-items: start; }
.gp-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.gp-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* the tiles as a row of swatches, with the chosen one's name above them */
.gp-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.gp-tiles button {
  aspect-ratio: 1 / 1; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border-hair-strong); background: #fff;
}
.gp-tiles img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gp-tiles button:hover { border-color: var(--ink-800); }
.gp-tiles button.on { outline: 2px solid var(--ink-800); outline-offset: 2px; }
.gp-tiles button:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; }
#gp-tile-name { text-transform: none; letter-spacing: 0.04em; color: var(--fg-2); }
/* a square box that keeps its size; the design inside it, its tiles as big as fit (gridplanner.js sets the counts) */
.gp-grid-box { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.5); }
.gp-grid {
  display: grid; gap: 2px; padding: 2px; background: var(--border-hair-strong);
  width: calc(100% * var(--cols, 4) / var(--most, 4)); aspect-ratio: var(--cols, 4) / var(--rows, 4);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.gp-cell {
  position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; overflow: hidden; cursor: pointer;
  background: var(--surface-paper-3, #e2e5e9);
}
.gp-cell img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none; transition: transform 160ms ease;
}
.gp-cell:hover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px #fff; pointer-events: none; }
.gp-cell:focus-visible { outline: 2px solid var(--accent-500); outline-offset: -2px; z-index: 1; }
#gp-dims { text-transform: none; letter-spacing: 0.04em; color: var(--fg-2); }
.gp-size { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.gp-step { display: flex; align-items: center; gap: 8px; }
.gp-step-label {
  min-width: 52px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
}
.gp-step button {
  width: 30px; height: 30px; padding: 0; border: 1px solid var(--border-hair-strong); background: #fff; color: var(--ink-800);
  font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
}
.gp-step button:hover { border-color: var(--ink-800); }
.gp-step button:disabled { opacity: 0.4; cursor: not-allowed; }
.gp-step output { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-800); }
.gp-view {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--surface-paper-3, #e2e5e9); border: 1px solid var(--border-hair-strong);
}
.gp-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gp-view canvas[hidden] { display: none; }
.gp-view .gp-room { z-index: 1; }
.gp-tag {
  position: absolute; top: 14px; left: 14px; z-index: 5; padding: 6px 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(20, 32, 44, 0.82); color: #fff;
}
@media (max-width: 900px) {
  /* on a phone: the room, the grid right under it (so a change shows while painting), then the rest */
  .gp { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .gp-side, .gp-main { display: contents; }
  #gp-view { order: 1; }
  .gp-b-grid { order: 2; }
  .gp-b-tiles { order: 3; }
  .gp-b-tools { order: 4; }
  #gp-size { order: 5; }
  .gp-b-presets { order: 6; }
  #gp-caption { order: 7; }
  .gp-b-rooms { order: 8; }
  .gp-b-grid .gp-grid-box { max-width: 300px; }
}

/* ---------- visualizer.html · phone and laptop (#devices, Joep 2026-10-16) ---------- */
/* Text beside a phone: a drawn phone (iPhone-like, no logo) with a screenshot of the real app (v/) on its screen,
   below a status bar as on a phone. Stacked on narrow screens. */
/* the text at its own width and the phone right beside it (Joep, 2026-10-19: "they belong together"); the text
   starts at the top, the same distance from the section's edge as in the other sections */
.devices-grid { display: grid; grid-template-columns: minmax(0, 640px) auto; justify-content: start; gap: clamp(40px, 6vw, 96px); align-items: start; }
.devices-text .sec-head { margin-bottom: 0; }
.devices-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; max-width: 58ch; }
.devices-points li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.6; color: var(--fg-2); }
.devices-points li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 12px; height: 2px; background: var(--accent-500); }
.devices-points b { font-weight: 500; color: var(--ink-800); }
.devices-phone { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.devices-phone figcaption { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); text-align: center; max-width: 30ch; }
/* two phones side by side: the visualizer and the grid planner (Joep, 2026-10-21) */
.devices-phones { display: flex; gap: clamp(18px, 2vw, 32px); align-items: flex-start; }
.devices-phones .phone { --phone-w: 260px; }
.devices-phones .devices-phone figcaption { max-width: 26ch; }
@media (max-width: 1180px) {  /* too narrow for the text and two phones in one row: the phones go under the text */
  .devices-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {  /* a phone screen: both mockups scaled as a whole, so bezel, island and status bar keep their shape */
  .devices-phones { gap: 12px; justify-content: center; }
  .devices-phones .phone { --phone-w: 260px; padding: 12px; border-radius: 52px; zoom: 0.62; }
  .devices-phones .phone-screen { border-radius: 41px; padding-bottom: 22px; }
  .devices-phones .phone-status { height: 44px; padding: 4px 18px 0 28px; font-size: 14px; }
  .devices-phones .phone-status svg { width: 66px; }
  .devices-phones .devices-phone figcaption { font-size: 10px; max-width: 20ch; }
}
.phone {
  --phone-w: 300px;
  position: relative; width: var(--phone-w); padding: 12px; border-radius: 52px; box-sizing: border-box;
  background: linear-gradient(145deg, #2c3138, #0d1014 55%, #23272d);
  box-shadow: 0 0 0 1.5px #3c424a inset, 0 0 0 1px rgba(0, 0, 0, 0.6);  /* the frame's edge only: no shadow under it (Joep, 2026-10-21) */
}
.phone::before, .phone::after {  /* the side buttons */
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2a2f36;
}
.phone::before { left: -3px; top: 132px; height: 62px; box-shadow: 0 -46px 0 -1px #2a2f36; }
.phone::after { right: -3px; top: 168px; height: 92px; }
.phone-screen { position: relative; overflow: hidden; border-radius: 41px; background: #fff; padding-bottom: 22px; }  /* the strip under the app, as on a phone */
.phone-screen::before {  /* the island */
  content: ""; position: absolute; z-index: 2; top: 10px; left: 50%; width: 27%; height: 25px; margin-left: -13.5%;
  border-radius: 20px; background: #000;
}
.phone-screen::after {  /* the home indicator */
  content: ""; position: absolute; z-index: 2; bottom: 8px; left: 50%; width: 36%; height: 4px; margin-left: -18%;
  border-radius: 3px; background: rgba(14, 22, 30, 0.85);
}
.phone-status { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 4px 18px 0 28px;
  font: 600 14px/1 -apple-system, "SF Pro Text", system-ui, sans-serif; letter-spacing: -0.01em; color: #0e161e; }
.phone-status svg { display: block; }
.phone-screen img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .devices-grid { grid-template-columns: 1fr; }
  .phone { --phone-w: 270px; }
}
@media (max-width: 420px) {
  .phone { --phone-w: 240px; padding: 10px; border-radius: 44px; }
  .phone-screen { border-radius: 35px; padding-bottom: 18px; }
  .phone-screen::after { bottom: 6px; }
  .phone-status { height: 38px; padding: 4px 14px 0 22px; font-size: 13px; }
  .phone-status svg { width: 56px; height: auto; }
}
