/* ==========================================================================
   ClearStartAI — Furniture visualisation demo
   Page styles for furniture-visualisation.html. Depends on core.css tokens;
   every block inherits its palette from the .tone-* band it sits in.
   Class names carry an fv- prefix so nothing collides with sections.css.
   ========================================================================== */

/* Elements toggled with the hidden attribute also carry display rules below. */
[data-visualiser] [hidden],
.fv-lb [hidden] { display: none !important; }

/* Shared image treatment: fades in once decoded rather than popping. */
.fv-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
}

.fv-img.is-loaded { opacity: 1; }

/* Small photos in the panel; while a file is replaced it dims until the new one arrives. */
.fv-model__photo,
.fv-swatch-img,
.fv-sel__swatch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out), filter var(--dur-2) var(--ease-out);
}

.fv-model__photo.is-loaded,
.fv-swatch-img.is-loaded,
.fv-sel__swatch img.is-loaded { opacity: 1; }

.fv-model__photo.is-swapping,
.fv-swatch-img.is-swapping,
.fv-sel__swatch img.is-swapping { opacity: 0.45; filter: blur(2px); }

.fv-img-missing {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cs-paper-200);
}

.fv-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   1. Hero
   -------------------------------------------------------------------------- */

.fv-hero { padding-bottom: clamp(4.5rem, 9vw, 7.5rem); }

.fv-hero__glow {
  width: 760px;
  height: 540px;
  right: -14%;
  top: -12%;
  background: radial-gradient(ellipse, rgba(37, 154, 202, 0.24), transparent 68%);
}

.fv-hero__inner {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 940px) {
  .fv-hero__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2.5rem, 4vw, 4.5rem);
  }
}

.fv-hero__copy {
  display: grid;
  gap: var(--space-6);
  justify-items: start;
  align-content: start;
  max-width: 36rem;
}

.fv-hero__title {
  font-size: clamp(2.6rem, 3.6vw + 1.2rem, 4.9rem);
  line-height: 1.02;
}

.fv-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
}

.fv-hero__note,
.fv-jump a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* In-page shortcuts to the three main sections. */
.fv-jump {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  justify-self: stretch;
}

.fv-jump a {
  display: inline-block;
  padding-block: 0.45rem;
  transition: color var(--dur-2) var(--ease-out);
}

.fv-jump a:hover,
.fv-jump a:focus-visible { color: var(--color-accent); }

/* --- media --- */

.fv-hero__media { position: relative; }

.fv-hero__frame {
  position: relative;
  aspect-ratio: 1150 / 772;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--color-border);
  background: var(--cs-ink-800);
  box-shadow: var(--shadow-lg);
}

/* The drawing the hero sofa was generated from. */
.fv-hero__inset {
  position: absolute;
  left: clamp(-0.75rem, -1.2vw, 0rem);
  bottom: clamp(-1.5rem, -2.2vw, -1rem);
  width: clamp(9rem, 26%, 14rem);
  padding: 0.5rem 0.5rem 0.4rem;
  border-radius: var(--r-md);
  border: 1px solid var(--color-border-strong);
  background: var(--cs-ink-850);
  box-shadow: var(--shadow-lg);
}

.fv-hero__inset-img {
  aspect-ratio: 1150 / 772;
  overflow: hidden;
  border-radius: var(--r-xs);
  background: #fff;
}

.fv-hero__inset-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.25rem 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.fv-hero__inset-cap strong { font-weight: 500; color: var(--cs-cyan-400); }
.fv-hero__inset-cap svg { flex: none; opacity: 0.7; }

@media (max-width: 560px) {
  .fv-hero__inset { width: 8.75rem; left: 0; bottom: -1.25rem; }
  .fv-hero__inset-cap { gap: 0.3rem; font-size: 0.5rem; letter-spacing: 0.09em; }
}

/* --------------------------------------------------------------------------
   1b. The film — furniture-visualisation-film.html, embedded, with what it
   means for a furniture business beside it. The film brings its own
   controls (a 48px bar under the 4:5 frame), so the iframe is 125% of its
   width plus that bar.
   -------------------------------------------------------------------------- */

.fv-film__layout {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
  align-items: center;
}

/* Side by side once the text has room to sit level with the film; before
   that, the text follows the film. */
@media (min-width: 1000px) {
  .fv-film__layout {
    grid-template-columns: minmax(0, min(500px, 46%)) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
  }
}

.fv-film__player {
  container-type: inline-size;
  width: 100%;
  max-width: 520px;
}

.fv-film__frame {
  display: block;
  width: 100%;
  aspect-ratio: 500 / 673;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--cs-ink-900);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-border);
}

@supports (height: 1cqw) {
  .fv-film__frame { aspect-ratio: auto; height: calc(125cqw + 48px); }
}

.fv-film__side {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 1000px) {
  .fv-film__side { max-width: 36rem; }
}

.fv-film__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
}

.fv-film__intro {
  max-width: 60ch;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

.fv-gains { border-top: 1px solid var(--color-border); }

/* Under the film on a tablet, two by two. */
@media (min-width: 640px) and (max-width: 999px) {
  .fv-gains {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-8);
  }
}

.fv-gain {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-content: start;
  column-gap: var(--space-4);
  row-gap: 0.25rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* The icons the film's closing benefits use, so the two read as one. */
.fv-gain__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-md);
  color: var(--color-accent);
  background-color: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.fv-gain__icon svg { width: 1.2rem; height: 1.2rem; }

.fv-gain__title {
  padding-top: 0.15rem;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.35;
}

.fv-gain__body {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

.fv-film__open { justify-self: start; }

/* --------------------------------------------------------------------------
   2. The problem — traditional vs AI assisted
   -------------------------------------------------------------------------- */

.fv-compare {
  display: grid;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

@media (min-width: 860px) {
  .fv-compare { grid-template-columns: 1fr 1fr; }
}

.fv-compare__col {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: var(--space-5);
  padding: clamp(2rem, 1.2rem + 2.4vw, 3.25rem) clamp(1.25rem, 0.5rem + 2.4vw, 3rem);
  background-color: var(--color-background);
}

.fv-compare__col > :not(.bg-grid) { position: relative; }

.fv-compare__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.fv-compare__col--ai .fv-compare__label { color: var(--color-accent); }

.fv-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: start;
  gap: 0.5rem 0.35rem;
  min-height: 5.5rem;
}

.fv-term-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.fv-term {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--r-pill);
  background-color: var(--color-surface);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: border-color var(--dur-2) var(--ease-out);
}

.fv-compare__col:hover .fv-term { border-color: var(--color-secondary); }

.fv-op {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-inline: 0.15rem;
}

/* The "=" is drawn as a short rule; the glyph stays for screen readers off. */
.fv-equals {
  display: block;
  width: 1.5rem;
  height: 2px;
  margin-bottom: 1.25rem;
  border-radius: 2px;
  background: var(--color-border-strong);
  text-indent: -999em;
  overflow: hidden;
}

.fv-compare__col--ai .fv-equals { background: var(--gradient-brand); }

.fv-result {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  max-width: 20ch;
  text-wrap: balance;
}

.fv-compare__col--traditional .fv-result { color: var(--color-text-secondary); }

/* --------------------------------------------------------------------------
   3. Visualiser — layout
   -------------------------------------------------------------------------- */

.fv-viz__layout {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

@media (min-width: 1000px) {
  .fv-viz__layout {
    grid-template-columns: minmax(0, 1.62fr) minmax(19rem, 0.85fr);
    align-items: start;
    column-gap: clamp(1.75rem, 3vw, 3.25rem);
  }
}

/* Main image and its thumbnail strip, kept tight so they read as one unit. */
.fv-viz__stage {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   4. Visualiser — main viewer
   -------------------------------------------------------------------------- */

.fv-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1150 / 772;
  overflow: hidden;
  border-radius: var(--r-md);
  background-color: var(--color-background-alt);
  box-shadow: var(--shadow-lg);
}

.fv-stage__layer {
  position: absolute;
  inset: 0;
  /* Short delay, so frames that load instantly never visibly dim. */
  transition: opacity var(--dur-2) var(--ease-out) 120ms,
              filter var(--dur-2) var(--ease-out) 120ms;
}

.fv-stage__layer.is-current { animation: fv-layer-in 320ms var(--ease-out) both; }

/* The small preview, scaled up and softened, holds the frame until the full
   photograph arrives and fades in over it. */
.fv-stage__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(14px) saturate(1.05);
  transform: scale(1.06);
  transition: opacity 360ms var(--ease-out);
}

.fv-stage__preview.is-loaded { opacity: 1; }

.fv-stage__layer > .fv-img,
.fv-stage__layer > .fv-ph {
  position: relative;
  transition: opacity 520ms var(--ease-out);
}

/* The outgoing frame waits, dimmed, under the loader while the next downloads. */
.fv-stage__layer.is-previous {
  opacity: 0.6;
  filter: saturate(0.85) blur(1.5px);
}

@keyframes fv-layer-in { from { opacity: 0; } }

/* A soft light sweep across the frame while the photograph downloads. */
.fv-stage.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.34) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: fv-sweep 1.5s linear infinite, fv-fade-in 260ms var(--ease-out) 150ms both;
}

@keyframes fv-sweep {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@keyframes fv-fade-in { from { opacity: 0; } }

.fv-stage__loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* A change of finish: an indeterminate brand bar runs along the top edge. */
.fv-stage.is-loading.is-switching .fv-stage__loading::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background-image: linear-gradient(90deg, transparent, #39C6C8, #1B67AF, transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: fv-bar 1.1s var(--ease-out) infinite, fv-fade-in 200ms var(--ease-out) 100ms both;
}

@keyframes fv-bar {
  from { background-position: -70% 0; }
  to { background-position: 170% 0; }
}

.fv-stage__loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.1rem 0.65rem 0.9rem;
  border-radius: var(--r-pill);
  font-size: var(--text-sm);
  color: var(--cs-slate-700);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -12px rgba(12, 58, 102, 0.3);
  animation: fv-pill-in 280ms var(--ease-out) 150ms both;
}

.fv-stage__loading-pill .fv-spinner { color: var(--cs-blue-700); }

.fv-stage.is-switching .fv-stage__loading-pill {
  padding: 0.8rem 1.35rem 0.8rem 1.05rem;
  font-weight: 500;
  color: var(--cs-ink-900);
}

/* Trailing dots that count up while the photograph downloads. */
.fv-stage__loading-text::after {
  content: "";
  display: inline-block;
  width: 1.1em;
  text-align: left;
  animation: fv-dots 1.2s steps(1, end) infinite;
}

@keyframes fv-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* What is on screen: sofa, fabric, colour and the image count. It sits in its
   own row above the photograph, so the whole image is always visible. */
.fv-now {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
}

.fv-now.is-new .fv-now__swatch,
.fv-now.is-new .fv-now__text { animation: fv-pill-in 420ms var(--ease-out) both; }

.fv-now__swatch {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cs-paper-200);
  box-shadow: inset 0 0 0 1px rgba(12, 30, 50, 0.12), 0 0 0 3px var(--color-surface-raised), 0 0 0 4px var(--color-border);
}

.fv-now__swatch img { display: block; width: 100%; height: 100%; object-fit: cover; }

.fv-now__text {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.fv-now__text strong {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text-primary);
}

.fv-now__text span {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fv-now__count {
  flex: none;
  margin-left: auto;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
}

.fv-now__count:empty { display: none; }

@keyframes fv-pill-in {
  from { opacity: 0; transform: translateY(4px) scale(0.97); }
}

/* The whole frame opens the full screen view. */
.fv-stage__open {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  cursor: zoom-in;
}

/* Arrows and expand: small frosted discs sitting on the photograph. */
.fv-stage__nav,
.fv-stage__expand {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cs-ink-900);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 26px -12px rgba(12, 58, 102, 0.45);
  transition: background-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}

.fv-stage__nav:hover,
.fv-stage__expand:hover {
  background: #fff;
  color: var(--cs-blue-700);
}

/* Keep the discs round when the global focus ring applies. */
.fv-stage__nav:focus-visible,
.fv-stage__expand:focus-visible { border-radius: 50%; }

.fv-stage__nav {
  top: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translateY(-50%);
}

.fv-stage__nav--prev { left: 0.85rem; }
.fv-stage__nav--next { right: 0.85rem; }
.fv-stage__nav--prev:hover { transform: translate(-2px, -50%); }
.fv-stage__nav--next:hover { transform: translate(2px, -50%); }
.fv-stage__nav svg { width: 1.15rem; }

.fv-stage__expand {
  right: 0.85rem;
  bottom: 0.85rem;
  width: 2.5rem;
  height: 2.5rem;
}

.fv-stage__expand:hover { transform: scale(1.06); }
.fv-stage__expand svg { width: 1.05rem; }

@media (max-width: 640px) {
  .fv-stage__nav { width: 2.375rem; height: 2.375rem; }
  .fv-stage__nav--prev { left: 0.6rem; }
  .fv-stage__nav--next { right: 0.6rem; }
  .fv-stage__expand { right: 0.6rem; bottom: 0.6rem; width: 2.25rem; height: 2.25rem; }
  .fv-now { gap: 0.6rem; min-height: 2.25rem; }
  .fv-now__swatch { width: 2.1rem; height: 2.1rem; }
  .fv-now__text strong { font-size: var(--text-base); }
  .fv-now__text span { font-size: var(--text-xs); }
}

/* --------------------------------------------------------------------------
   5. Visualiser — thumbnail strip
   -------------------------------------------------------------------------- */

.fv-thumbs {
  position: relative;
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.2rem 0.2rem 0.3rem;
  margin: -0.2rem;
  scrollbar-width: none;
}

.fv-thumbs::-webkit-scrollbar { display: none; }

.fv-thumb {
  position: relative;
  flex: none;
  width: clamp(4.5rem, 18vw, 7rem);
  aspect-ratio: 1150 / 772;
  overflow: hidden;
  border-radius: var(--r-sm);
  /* Skeleton shimmer until the thumbnail arrives. */
  background: linear-gradient(100deg, var(--cs-paper-200) 35%, var(--cs-paper-050) 50%, var(--cs-paper-200) 65%) var(--cs-paper-200);
  background-size: 250% 100%;
  animation: fv-sweep 1.4s linear infinite;
  opacity: 0.6;
  transition: opacity var(--dur-2) var(--ease-out);
}

.fv-thumb:has(.fv-img.is-loaded) { animation: none; }

/* A new set of thumbnails arrives left to right. */
.fv-thumb > .fv-img { transition-delay: calc(var(--i, 0) * 60ms); }

.fv-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: inherit;
  transition: border-color var(--dur-2) var(--ease-out);
}

.fv-thumb:hover { opacity: 0.85; }
.fv-thumb.is-active { opacity: 1; }
.fv-thumb.is-active::after { border-color: var(--color-primary); }

/* --------------------------------------------------------------------------
   6. Visualiser — configuration panel
   -------------------------------------------------------------------------- */

.fv-viz__panel { min-width: 0; }

@media (min-width: 1000px) {
  .fv-viz__panel {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
  }
}

.fv-cfg {
  display: grid;
  gap: 1.75rem;
  padding: clamp(1.25rem, 0.9rem + 1vw, 1.75rem);
  background-color: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.fv-cfg__group {
  display: grid;
  gap: 0.85rem;
}

.fv-cfg__label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.fv-cfg__step {
  color: var(--color-accent);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.fv-cfg__hint {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-text-muted);
}

.fv-cfg__status {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-muted);
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}


/* --- view the selection --- */

.fv-cfg__apply {
  display: grid;
  gap: 0.7rem;
}

.fv-cfg__view { width: 100%; }

.fv-cfg__view .fv-spinner { width: 1rem; height: 1rem; }

/* The current selection, read back above the button. */
.fv-sel {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.8rem 0.65rem 0.65rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-background-alt);
  transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
}

.fv-sel.is-changed {
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  background-color: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
}

.fv-sel__swatch {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cs-paper-200);
  box-shadow: inset 0 0 0 1px rgba(12, 30, 50, 0.12);
}

.fv-sel__text {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.fv-sel__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* The same marker the option cards carry for what is on display. */
.fv-sel__label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.fv-sel.is-changed .fv-sel__label { color: var(--color-primary); }

.fv-sel.is-changed .fv-sel__label::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--color-primary);
}

.fv-sel__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
}

.fv-sel__finish {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Already showing this selection: the button steps back rather than vanishing. */
.fv-cfg .fv-cfg__view:disabled,
.fv-cfg .fv-cfg__view:disabled:hover {
  cursor: default;
  color: var(--color-text-muted);
  background-color: transparent;
  border-color: var(--color-border-strong);
  box-shadow: none;
}

.fv-cfg .fv-cfg__view:disabled::before { opacity: 0; }

.fv-cfg__view:disabled .btn__arrow { opacity: 0.45; transform: none; }

.fv-cfg .fv-cfg__view.is-busy:disabled { color: var(--color-text-secondary); }
.fv-cfg .fv-cfg__view.is-busy .fv-spinner { color: var(--color-primary); }
.fv-cfg__view-icon { color: var(--color-accent); }

/* A small nudge the moment there is something new to show. */
.fv-cfg__view.has-changes { animation: fv-view-ready 480ms var(--ease-out); }

@keyframes fv-view-ready {
  0% { transform: scale(0.97); }
  60% { transform: scale(1.015); }
}

.fv-cfg__showing {
  font-size: var(--text-xs);
  line-height: 1.45;
  text-align: center;
  color: var(--color-text-muted);
}

.fv-cfg__showing-label {
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* --- shared option card --- */

.fv-model,
.fv-fabric,
.fv-colour {
  border-radius: var(--r-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface-raised);
  text-align: left;
  transition: border-color var(--dur-2) var(--ease-out),
              background-color var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}

.fv-model:hover,
.fv-fabric:hover,
.fv-colour:hover { border-color: var(--color-border-strong); }

.fv-model.is-active,
.fv-fabric.is-active,
.fv-colour.is-active {
  border-color: var(--color-primary);
  background-color: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

/* What the viewer is showing: a small accent marker on the matching cards. */
.fv-model,
.fv-fabric,
.fv-colour { position: relative; }

.fv-model.is-shown::after,
.fv-fabric.is-shown::after,
.fv-colour.is-shown::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-surface-raised);
}

.fv-model.is-shown::after { top: 0.7rem; right: 0.7rem; box-shadow: 0 0 0 2px #fff; }

/* --- model cards --- */

.fv-cfg__models {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.fv-model {
  display: grid;
  gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.55rem;
}

.fv-model:hover { transform: translateY(-2px); }

.fv-model__img {
  display: block;
  aspect-ratio: 1150 / 772;
  overflow: hidden;
  border-radius: var(--r-xs);
  /* Skeleton shimmer until the photo arrives. */
  background: linear-gradient(100deg, var(--cs-paper-200) 35%, var(--cs-paper-050) 50%, var(--cs-paper-200) 65%) var(--cs-paper-200);
  background-size: 250% 100%;
  animation: fv-sweep 1.4s linear infinite;
  filter: saturate(0.9);
  transition: filter var(--dur-2) var(--ease-out);
}

.fv-model__img:has(.is-loaded) { animation: none; background: #fff; }

.fv-model.is-active .fv-model__img { filter: none; }

.fv-model__name {
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
  color: var(--color-text-secondary);
}

.fv-model.is-active .fv-model__name { color: var(--color-text-primary); font-weight: 600; }

/* --- fabric cards --- */

.fv-cfg__fabrics {
  display: grid;
  gap: 0.5rem;
}

.fv-fabric {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem;
}

.fv-fabric__swatch {
  flex: none;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: var(--r-xs);
  background: var(--cs-paper-200);
  box-shadow: inset 0 0 0 1px rgba(12, 58, 102, 0.08);
}

.fv-fabric__text,
.fv-colour__text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.fv-fabric__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
}

.fv-fabric__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- colour swatches --- */

.fv-cfg__colours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.fv-colour {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem;
}

.fv-colour__chip {
  flex: none;
  overflow: hidden;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(12, 30, 50, 0.12),
              inset 0 -3px 6px rgba(12, 30, 50, 0.1);
  transition: transform var(--dur-2) var(--ease-out);
}

.fv-colour.is-active .fv-colour__chip {
  transform: scale(1.08);
  box-shadow: inset 0 0 0 1px rgba(12, 30, 50, 0.16),
              inset 0 -3px 6px rgba(12, 30, 50, 0.12),
              0 0 0 3px var(--color-surface-raised),
              0 0 0 4.5px var(--color-primary);
}

.fv-colour__name {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fv-colour.is-active .fv-colour__name { font-weight: 600; }

.fv-colour.is-shown .fv-colour__meta { color: var(--color-accent); }

.fv-colour__meta {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .fv-cfg { gap: 1.5rem; }
  .fv-colour,
  .fv-fabric { min-height: 3.25rem; }
}

/* --------------------------------------------------------------------------
   7. Pending asset placeholder
   Always a light, softly lit panel — it stands in for a photograph, so it
   keeps photographic tones in both site themes.
   -------------------------------------------------------------------------- */

.fv-ph {
  --ph-base: var(--cs-paper-100);
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--ph-base);
  isolation: isolate;
}

/* Hairline inner frame — reads as considered, not as a broken asset. */
.fv-ph--panel::after {
  content: "";
  position: absolute;
  inset: clamp(0.75rem, 2.2%, 1.5rem);
  border: 1px solid rgba(12, 58, 102, 0.1);
  border-radius: var(--r-xs);
  z-index: 1;
  pointer-events: none;
}

.fv-ph__body {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  max-width: 22rem;
  padding: 1.5rem;
  text-align: center;
}

.fv-ph__mark {
  width: 2.5rem;
  margin-bottom: 0.9rem;
  color: var(--cs-slate-700);
  opacity: 0.75;
}

.fv-ph__mark svg { width: 100%; height: auto; }

.fv-ph__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.65rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  color: var(--cs-ink-900);
}

.fv-ph__msg {
  max-width: 20rem;
  margin-top: 0.4rem;
  font-size: var(--text-sm);
  color: var(--cs-slate-600);
}

/* --------------------------------------------------------------------------
   8. Spinner
   -------------------------------------------------------------------------- */

.fv-spinner {
  display: inline-block;
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
  border-top-color: currentColor;
  animation: fv-spin 0.8s linear infinite;
}

@keyframes fv-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   9. Full screen view
   Sits above the header (1000) and the scroll progress hairline (1100).
   -------------------------------------------------------------------------- */

.fv-lb {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  color: #EAF2F9;
  animation: fv-fade-in 260ms var(--ease-out);
}

/* Room either side for the arrows, so they never sit on the photograph. */
@media (min-width: 700px) {
  .fv-lb--gallery { padding-inline: clamp(4.5rem, 7vw, 6.5rem); }
}

.fv-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 18, 0.97);
  cursor: zoom-out;
}

.fv-lb__figure {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  min-width: 0;
  max-width: 100%;
  animation: fv-lb-rise 380ms var(--ease-out);
}

@keyframes fv-lb-rise {
  from { opacity: 0; transform: scale(0.975); }
}

/* As large as the viewport allows, leaving a line for the caption. */
.fv-lb__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 6.5rem);
  max-height: calc(100dvh - 6.5rem);
  object-fit: contain;
  border-radius: var(--r-sm);
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}

.fv-lb__img.is-loaded { opacity: 1; }

.fv-lb__frame {
  max-width: 100%;
  line-height: 0;
}

.fv-lb__hd {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--cs-cyan-400);
}

.fv-lb__hd:empty { display: none; }
.fv-lb__hd .fv-spinner { width: 0.8rem; height: 0.8rem; }

/* While loading, hold a frame the size the photograph will take (the renders
   share one aspect ratio), so the caption does not jump when it arrives. */
.fv-lb__img:not(.is-loaded) {
  width: min(100%, calc((100dvh - 6.5rem) * 1150 / 772));
  aspect-ratio: 1150 / 772;
}

.fv-lb__loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: var(--cs-cyan-400);
}

.fv-lb__loading .fv-spinner {
  width: 2rem;
  height: 2rem;
  border-width: 2px;
  animation: fv-spin 0.8s linear infinite, fv-fade-in 220ms var(--ease-out) 150ms both;
}

.fv-lb__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  text-align: center;
  font-size: var(--text-sm);
  color: #A6BACE;
}

.fv-lb__finish { color: #EAF2F9; }

.fv-lb__count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--cs-cyan-400);
}

.fv-lb__nav,
.fv-lb__close {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #EAF2F9;
  border: 1px solid rgba(150, 200, 235, 0.22);
  background: rgba(7, 17, 32, 0.55);
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}

.fv-lb__nav:hover,
.fv-lb__close:hover {
  background: rgba(37, 154, 202, 0.18);
  border-color: rgba(57, 198, 200, 0.5);
}

.fv-lb__nav:focus-visible,
.fv-lb__close:focus-visible { border-radius: 50%; }

.fv-lb__close {
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 2.75rem;
  height: 2.75rem;
}

.fv-lb__close svg { width: 1.1rem; }

.fv-lb__nav {
  top: 50%;
  width: 3rem;
  height: 3rem;
  transform: translateY(-50%);
}

.fv-lb__nav--prev { left: clamp(0.75rem, 2vw, 1.5rem); }
.fv-lb__nav--next { right: clamp(0.75rem, 2vw, 1.5rem); }
.fv-lb__nav svg { width: 1.2rem; }

/* --------------------------------------------------------------------------
   10. How it works
   -------------------------------------------------------------------------- */

.fv-steps {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 3vw, 3rem);
}

@media (min-width: 700px) {
  .fv-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(1.25rem, 3vw, 2rem);
  }
}

@media (min-width: 1040px) {
  .fv-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 2.4vw, 2.75rem);
    row-gap: 3.25rem;
  }
}

.fv-step {
  display: grid;
  gap: var(--space-5);
  align-content: start;
}

.fv-step__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--color-border);
  background: #fff;
}

.fv-step__media > img { transition: transform 900ms var(--ease-out); }
.fv-step:hover .fv-step__media > img { transform: scale(1.03); }

/* 01: the drawing, whole, on its own white sheet (in both themes). */
.fv-step__media--drawing { background: #fff; }

.fv-step__media--drawing > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6% 5%;
}

.fv-step__chip {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--cs-blue-700);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(12, 58, 102, 0.12);
}

/* Small illustrations built from the real images: the configurator, the
   image set, the colour range and a product page. */
.fv-mini {
  display: grid;
  align-content: center;
  background: var(--color-background-alt);
}

.fv-mini img { display: block; width: 100%; height: 100%; object-fit: cover; }

.fv-mini--configure {
  gap: 0.45rem;
  padding: 1.25rem 1.5rem;
}

.fv-mini__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Six equal swatches in three pairs (one per fabric). The wider gaps between
   pairs are narrow grid tracks of their own, so every swatch stays the same size. */
.fv-mini__swatches {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) minmax(0, 1fr) 0.3rem
    minmax(0, 1fr) minmax(0, 1fr) 0.3rem
    minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.fv-mini__swatches span,
.fv-mini__legs span {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(12, 30, 50, 0.08);
}

.fv-mini__swatches span { aspect-ratio: 1; }

.fv-mini__swatches span:nth-child(3) { grid-column: 4; }
.fv-mini__swatches span:nth-child(4) { grid-column: 5; }
.fv-mini__swatches span:nth-child(5) { grid-column: 7; }
.fv-mini__swatches span:nth-child(6) { grid-column: 8; }

.fv-mini__legs { display: flex; gap: 0.55rem; }

.fv-mini__legs span {
  width: 2.75rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  background: #F4F1EC;
}

.fv-mini__legs img { width: auto; height: 2.9rem; object-fit: contain; }

.fv-mini .is-on {
  box-shadow: 0 0 0 2px var(--color-surface-raised), 0 0 0 4px var(--color-primary);
}

.fv-mini--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  gap: 5px;
  padding: 5px;
}

.fv-mini--grid > img { border-radius: 8px; }

.fv-mini--six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 0.5rem;
  padding: 1rem;
}

.fv-mini--six figure { display: grid; gap: 0.3rem; }

.fv-mini--six img {
  aspect-ratio: 1150 / 772;
  border-radius: 6px;
}

.fv-mini--six figcaption {
  font-size: 0.6875rem;
  line-height: 1.2;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 06: a product page on a dark screen. */
.fv-mini--page {
  padding: 1.1rem 1.25rem;
  background: linear-gradient(160deg, var(--cs-ink-800), var(--cs-ink-900));
}

.fv-page {
  overflow: hidden;
  border-radius: 8px;
  color: #1B2430;
  background: #fff;
  box-shadow: 0 22px 40px -18px rgba(0, 0, 0, 0.7);
}

.fv-page__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 16px;
  padding: 0 8px;
  background: #EEF1F5;
}

.fv-page__bar i { width: 6px; height: 6px; border-radius: 50%; background: #CBD3DD; }

.fv-page__body {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  padding: 10px;
}

.fv-page .fv-page__main { height: auto; aspect-ratio: 1150 / 772; border-radius: 4px; }

.fv-page__thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 4px;
}

.fv-page__thumbs img { height: auto; aspect-ratio: 1150 / 772; border-radius: 3px; }

.fv-page__info { display: grid; align-content: start; gap: 4px; min-width: 0; }

.fv-page__name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.1;
}

.fv-page__price { font-size: 0.75rem; font-weight: 600; }

.fv-page__line { height: 4px; border-radius: 4px; background: #E6EAEF; }
.fv-page__line--short { width: 65%; }

.fv-page__dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }

.fv-page .fv-page__dots img {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.fv-page .fv-page__dots img.is-on { box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #1B2430; }

.fv-page__btn {
  margin-top: 5px;
  padding: 5px 0;
  border-radius: 99px;
  font-size: 0.5625rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: #1B2430;
}

.fv-steps__note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(2.25rem, 4vw, 3rem);
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  border: 1px dashed var(--color-border-strong);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.fv-steps__note svg { flex: none; color: var(--color-accent); }

.fv-step__badge {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--cs-blue-700);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 2px rgba(12, 58, 102, 0.12);
}

.fv-step__text {
  display: grid;
  gap: var(--space-2);
}

.fv-step__title {
  font-size: var(--text-xl);
  font-weight: 600;
}

.fv-step__body {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 36ch;
}

/* --------------------------------------------------------------------------
   10b. Materials — the same cushion in weave, suede and leather
   -------------------------------------------------------------------------- */

.fv-materials { position: relative; isolation: isolate; overflow: hidden; }
.fv-materials > .bg-grid { z-index: -1; }

.fv-mats {
  display: grid;
  gap: 2rem;
}

@media (min-width: 760px) {
  .fv-mats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
  }
}

.fv-mat__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border);
  background: var(--cs-ink-800);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 759px) {
  .fv-mat__media { aspect-ratio: 4 / 3; }
}

.fv-mat__media > img { transition: transform 1.2s var(--ease-out); }
.fv-mat:hover .fv-mat__media > img { transform: scale(1.04); }

.fv-mat__tag {
  position: absolute;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #EAF2F9;
  background: rgba(7, 17, 32, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(150, 200, 235, 0.22);
}

/* The magnifier: native-resolution texture from the same spot. It opens
   once the card has scrolled into view. */
.fv-mat__loupe {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 54%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.55);
  transition:
    transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--reveal-delay, 0ms) + 300ms),
    opacity 400ms ease calc(var(--reveal-delay, 0ms) + 300ms);
  box-shadow:
    0 0 0 3px var(--cs-cyan-400),
    0 0 0 10px rgba(57, 198, 200, 0.16),
    0 24px 50px -12px rgba(0, 0, 0, 0.75);
}

@media (max-width: 759px) {
  .fv-mat__loupe { width: 40%; }
}

.fv-mat.is-revealed .fv-mat__loupe {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.fv-mat.is-revealed:hover .fv-mat__loupe {
  transform: translate(-50%, -50%) scale(1.06);
  transition-delay: 0ms;
}

.fv-mat__loupe img { width: 100%; height: 100%; object-fit: cover; }

.fv-mat__loupe::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.2), transparent 45%);
}

.fv-mat__text {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.1rem;
}

.fv-mat__title { font-size: var(--text-xl); font-weight: 600; }

.fv-mat__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
}

.fv-mats__note {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   11. Use cases and applications
   -------------------------------------------------------------------------- */

.fv-uses {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 820px) {
  .fv-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fv-use {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-md);
}

.fv-use__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cs-paper-100);
}

.fv-use__media > img { transition: transform 900ms var(--ease-out); }
.fv-use:hover .fv-use__media > img { transform: scale(1.03); }

.fv-use__inset {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  width: clamp(8rem, 36%, 12rem);
  padding: 0.4rem 0.4rem 0.3rem;
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: 0 16px 36px -14px rgba(12, 30, 50, 0.45);
}

.fv-use__inset img { display: block; width: 100%; height: auto; }

.fv-use__inset figcaption {
  padding-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  color: var(--cs-blue-700);
}

/* The image set: one room shot and three more views beside it. */
.fv-use__media--set {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 5px;
  padding: 5px;
}

.fv-use__media--set > img { border-radius: 10px; }

.fv-use__thumbs {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-height: 0;
}

.fv-use__thumbs img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 8px;
}

.fv-use__text {
  display: grid;
  gap: 0.5rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.fv-use__kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
}

.fv-use__title {
  font-size: var(--display-4);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
}

.fv-use__body {
  max-width: 44ch;
  font-size: var(--text-base);
  line-height: 1.62;
  color: var(--color-text-secondary);
}

.fv-apps__label {
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.fv-apps {
  display: grid;
  gap: 1px;
  background: var(--color-border);
  border-block: 1px solid var(--color-border);
}

@media (min-width: 680px) {
  .fv-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1060px) {
  .fv-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.fv-app {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.5rem) clamp(1.25rem, 0.8rem + 1.4vw, 2rem);
  background-color: var(--color-background);
  transition: background-color var(--dur-2) var(--ease-out);
}

/* The brand rule draws in along the top edge on hover. */
.fv-app::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-3) var(--ease-out);
}

.fv-app:hover { background-color: var(--color-surface-raised); }
.fv-app:hover::before { transform: scaleX(1); }

.fv-app__index {
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  color: var(--color-accent);
}

.fv-app__title {
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.3;
}

.fv-app__body {
  font-size: var(--text-base);
  line-height: 1.62;
  color: var(--color-text-secondary);
  max-width: 38ch;
}

/* --------------------------------------------------------------------------
   12. Closing call to action
   -------------------------------------------------------------------------- */

.fv-cta { isolation: isolate; }

.fv-cta__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.5;
}

.fv-cta__media img { filter: grayscale(0.2) brightness(0.9); }

/* A scrim in the brand ink, so the type always holds whatever the photograph. */
.fv-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg,
    rgba(7, 17, 32, 0.96) 0%,
    rgba(7, 17, 32, 0.86) 40%,
    rgba(7, 17, 32, 0.42) 100%);
}

.fv-cta__note {
  max-width: 64ch;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
}
