/*
 * Decision fields — shared design.
 *
 * Four documents share this composition: advisory, waterproofing, underfloor
 * heating and substrate preparation. Each is a standalone page and is also
 * shown inside the homepage primary-service modal (an iframe).
 *
 *   .decision-field            fixed full-viewport root (reveal state classes)
 *     .backdrop                dimmed backdrop
 *     .shell                   bordered panel (scaled as one canvas on large screens)
 *       .close                 standalone close control
 *       .frame                 grid: brand | overview / nav | copy | image / footer
 *
 * Page-specific values are tokens (--df-*) set by
 * css/embeds/decision-field-<page>.css on .decision-field--<page>. The default
 * token values below are the teal palette shared by three of the four pages.
 *
 * Responsive routes (identical in every page of the original):
 *   desktop          (min-width: 861px) and (min-height: 601px), (min-width: 1001px)
 *   mobile           (max-width: 860px), (max-width: 1000px) and (max-height: 600px) and (orientation: landscape)
 *   mobile landscape (max-width: 1000px) and (max-height: 600px) and (orientation: landscape)
 *   small phone      (max-width: 460px)
 *   tablet landscape (min-width: 861px) and (max-width: 1180px) and (orientation: landscape),
 *                    (min-width: 1181px) and (max-width: 1366px) and (orientation: landscape) and (pointer: coarse)
 */

:root {
  color-scheme: dark;
  --gold: #d9a45e;
  --pale-gold: #f1c77d;
  --cream: #f4ead8;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --accordion-ease: cubic-bezier(.16, 1, .3, 1);
}

.decision-field {
  /* Palette */
  --df-backdrop: rgba(2, 4, 3, .88);
  --df-shell-bg:
    radial-gradient(circle at 72% 41%, rgba(55, 112, 103, .11), transparent 34%),
    radial-gradient(circle at 8% 9%, rgba(188, 111, 46, .1), transparent 28%),
    linear-gradient(145deg, #111714 0%, #080c0a 57%, #060806 100%);
  --df-nav-bg: linear-gradient(180deg, rgba(10, 15, 13, .84), rgba(6, 9, 8, .91));
  --df-tab-tint: rgba(75, 136, 129, .045);
  --df-stage-bg: #172b27;
  --df-stage-shade:
    linear-gradient(90deg, rgba(3, 7, 6, .72) 0%, rgba(4, 8, 7, .58) 25%, rgba(4, 8, 7, .34) 45%, rgba(4, 8, 7, .07) 69%, rgba(3, 7, 6, .14) 100%),
    linear-gradient(180deg, rgba(3, 7, 6, .04), transparent 58%, rgba(3, 7, 6, .22));
  --df-copy-bg: linear-gradient(90deg, rgba(4, 8, 7, .27), rgba(4, 8, 7, .08));
  --df-method-border: rgba(75, 136, 129, .95);
  --df-method-bg: linear-gradient(90deg, rgba(75, 136, 129, .48), transparent);
  --df-method-color: rgba(250, 244, 232, .88);
  --df-footer-bg: rgba(6, 9, 8, .78);
  --df-topic-bg: linear-gradient(180deg, rgba(10, 15, 13, .92), rgba(6, 9, 8, .96));
  --df-topic-tint: rgba(75, 136, 129, .025);
  --df-mobile-method-border: rgba(100, 190, 178, 1);
  --df-mobile-method-bg: linear-gradient(90deg, rgba(75, 136, 129, .58), rgba(75, 136, 129, .18) 70%, transparent);
  --df-mobile-footer-bg: linear-gradient(180deg, rgba(6, 9, 8, .88), rgba(6, 9, 8, .98));
  --df-tablet-copy-bg: linear-gradient(90deg, rgba(3, 7, 6, .78), rgba(3, 7, 6, .48));
  --df-tablet-stage-shade: linear-gradient(90deg, rgba(3, 7, 6, .22), transparent 24%), linear-gradient(180deg, transparent 55%, rgba(3, 7, 6, .28));

  /* Desktop composition */
  --df-columns: minmax(250px, 310px) minmax(440px, 1.1fr) minmax(470px, 1.18fr);
  --df-columns-narrow: 245px minmax(430px, 1.08fr) minmax(380px, 1fr);
  --df-footer-columns: minmax(250px, 310px) 1fr auto;
  --df-mark-size: 104px;
  --df-mark-margin: -34px;
  --df-mark-shift: translate(-22px, -17px);
  --df-mark-filter: drop-shadow(0 9px 18px rgba(0, 0, 0, .36)) drop-shadow(0 0 12px rgba(217, 164, 94, .12));
  --df-tab-count: 6;
  --df-stagger-start: 45ms;
  --df-stagger-step: 35ms;
  --df-copy-padding: clamp(38px, 4.2vw, 72px) clamp(32px, 3.4vw, 56px);
  --df-copy-title-size: clamp(34px, 3.2vw, 54px);
  --df-copy-rule-margin: 15px;
  --df-copy-text-color: rgba(244, 234, 216, .88);
  --df-copy-kicker-margin: 24px;
  --df-photo-position: center center;
  --df-photo-filter: saturate(.88) contrast(1.03) brightness(.9);

  /* Mobile */
  --df-mobile-photo-position: 60% center;
  --df-mobile-stage-shade: linear-gradient(180deg, rgba(3, 7, 6, .68) 0%, rgba(3, 7, 6, .52) 48%, rgba(3, 7, 6, .1) 76%, rgba(3, 7, 6, .18) 100%);
  --df-mobile-title-size: clamp(36px, 9.6vw, 44px);
  --df-mobile-title-size-small: clamp(36px, 9.6vw, 44px);
  --df-mobile-title-size-landscape: clamp(28px, 4vw, 34px);
  --df-mobile-text-size: 18px;
  --df-mobile-text-leading: 1.55;
  --df-mobile-text-leading-landscape: 1.5;
  --df-mobile-method-size: 18px;
  --df-mobile-method-leading: 1.55;
  --df-mobile-method-size-landscape: 18px;
  --df-mobile-method-leading-landscape: 1.5;
  --df-mobile-copy-index-size: 120px;
  --df-mobile-copy-index-top: 15px;

  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 30px);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  background: #080c0a;
  color: var(--cream);
}

body { overflow: hidden; }

button { font: inherit; }

button:focus-visible {
  outline: 1px solid var(--pale-gold);
  outline-offset: 4px;
}

.backdrop {
  position: absolute;
  inset: 0;
  background: var(--df-backdrop);
  backdrop-filter: blur(20px) saturate(.8);
}

/* ── Shell ─────────────────────────────────────────────────────────────── */

.shell {
  position: relative;
  z-index: 1;
  width: min(1540px, calc(100vw - 56px));
  height: min(920px, calc(100vh - 56px));
  overflow: visible;
  border: 1px solid rgba(217, 164, 94, .42);
  background: var(--df-shell-bg);
  box-shadow: 0 48px 140px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 235, 194, .08);
  isolation: isolate;
}

/* Faint architectural grid fading out to the right. */
.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

/* Standalone close control (hidden inside the homepage modal, which has its own). */
.close {
  position: fixed;
  z-index: 8;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(241, 199, 125, .36);
  border-radius: 50%;
  background: rgba(5, 8, 7, .68);
  color: var(--pale-gold);
  cursor: pointer;
  transition: transform .45s var(--ease), background .25s ease, border-color .25s ease;
}

.close::before,
.close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: currentColor;
}

.close::before { transform: translate(-50%, -50%) rotate(45deg); }
.close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.close:hover {
  transform: rotate(90deg);
  background: rgba(38, 31, 19, .88);
  border-color: var(--pale-gold);
}

.close[hidden] { display: none; }

/* ── Frame grid ────────────────────────────────────────────────────────── */

.frame {
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--df-columns);
  grid-template-rows: 124px minmax(0, 1fr) 72px;
}

.brand {
  grid-column: 1 / 3;
  padding: 28px 38px 20px;
  border-bottom: 1px solid rgba(241, 199, 125, .2);
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.brand-mark {
  width: var(--df-mark-size);
  height: var(--df-mark-size);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-right: var(--df-mark-margin);
  transform: var(--df-mark-shift);
  filter: var(--df-mark-filter);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(241, 199, 125, .76);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .36em;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  color: var(--pale-gold);
  font: 500 clamp(28px, 2.55vw, 43px) / .92 var(--font-serif);
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.brand h1 span { color: rgba(244, 234, 216, .96); }

.overview {
  grid-column: 3;
  padding: 22px 70px 18px 44px;
  border-left: 1px solid rgba(217, 164, 94, .15);
  border-bottom: 1px solid rgba(241, 199, 125, .2);
  display: flex;
  align-items: center;
}

.subline {
  position: relative;
  margin: 0;
  max-width: 780px;
  padding-left: 22px;
  color: rgba(244, 234, 216, .94);
  font: 500 clamp(16px, 1.18vw, 20px) / 1.38 var(--font-serif);
  letter-spacing: -.005em;
  text-wrap: balance;
}

.subline::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  bottom: .15em;
  width: 2px;
  background: linear-gradient(var(--cream), var(--pale-gold), var(--gold));
  box-shadow: 0 0 14px rgba(241, 199, 125, .35);
}

/* ── Topic rail (desktop tabs) ─────────────────────────────────────────── */

.nav {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  padding: 17px 0;
  display: grid;
  grid-template-rows: repeat(var(--df-tab-count), minmax(0, 1fr));
  border-right: 1px solid rgba(241, 199, 125, .2);
  background: var(--df-nav-bg);
}

.tab {
  position: relative;
  min-height: 0;
  padding: 8px 25px 8px 31px;
  display: grid;
  grid-template-columns: 29px 1fr;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid rgba(217, 164, 94, .1);
  color: rgba(244, 234, 216, .53);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: color .3s ease, background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease), text-shadow .3s ease;
}

.tab:last-child { border-bottom: 0; }

.tab:hover {
  color: rgba(244, 234, 216, .86);
  background: rgba(255, 255, 255, .018);
}

.tab[aria-selected="true"] {
  padding-left: 38px;
  color: #fff4dd;
  background: linear-gradient(90deg, rgba(241, 199, 125, .2) 0%, rgba(217, 164, 94, .115) 48%, var(--df-tab-tint) 100%);
  box-shadow: inset 0 1px rgba(255, 238, 202, .16), inset 0 -1px rgba(217, 164, 94, .17), inset 16px 0 32px rgba(241, 199, 125, .035);
  text-shadow: 0 0 18px rgba(241, 199, 125, .22);
}

/* Glowing edge bar + inset frame on the selected topic. */
.tab[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 238, 202, .7), var(--pale-gold), rgba(217, 164, 94, .68));
  box-shadow: 0 0 10px rgba(241, 199, 125, .72), 0 0 26px rgba(241, 199, 125, .28);
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: 7px 10px 7px 7px;
  border: 1px solid rgba(241, 199, 125, .19);
  box-shadow: inset 0 0 18px rgba(241, 199, 125, .025), 0 0 18px rgba(217, 164, 94, .035);
  pointer-events: none;
}

.tab-num {
  color: rgba(217, 164, 94, .56);
  font: 500 15px / 1 var(--font-serif);
}

.tab[aria-selected="true"] .tab-num {
  color: #f8cf88;
  text-shadow: 0 0 14px rgba(241, 199, 125, .28);
}

.tab-label {
  font-size: 9px;
  font-weight: 720;
  line-height: 1.35;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.tab[aria-selected="true"] .tab-label {
  font-weight: 760;
  letter-spacing: .205em;
}

/* Compact topic switcher (mobile + tablet landscape); hidden on desktop. */
.mobile-topic { display: none; }

/* ── Image stage ───────────────────────────────────────────────────────── */

.image-stage {
  grid-column: 2 / 4;
  grid-row: 2;
  position: relative;
  z-index: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--df-stage-bg);
}

.stage-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--df-photo-position);
  filter: var(--df-photo-filter);
  transform: scale(1.018);
}

.image-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--df-stage-shade);
  pointer-events: none;
}

/* ── Copy panel ────────────────────────────────────────────────────────── */

.copy {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: var(--df-copy-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(217, 164, 94, .15);
  overflow: hidden;
  background: var(--df-copy-bg);
  backdrop-filter: blur(.7px);
}

/* Oversized ghost index ("01") behind the copy. */
.copy::before {
  content: attr(data-index);
  position: absolute;
  right: -5px;
  top: 32px;
  color: rgba(241, 199, 125, .035);
  font: 500 clamp(130px, 13vw, 205px) / 1 var(--font-serif);
  letter-spacing: -.08em;
  pointer-events: none;
}

.copy > * { transition: opacity .28s ease, transform .45s var(--ease); }

/* Desktop copy swap used by the heating field (fade down, swap, fade up). */
.copy.is-changing > * {
  opacity: 0;
  transform: translateY(12px);
}

.copy-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
  color: rgba(241, 199, 125, .62);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .27em;
  text-transform: uppercase;
}

.copy-meta::after {
  content: "";
  width: 62px;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 199, 125, .7), transparent);
}

.copy-title {
  position: relative;
  margin: 0;
  max-width: 590px;
  color: var(--pale-gold);
  font: 500 var(--df-copy-title-size) / .94 var(--font-serif);
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-shadow: 0 14px 36px rgba(0, 0, 0, .5);
}

.copy-rule {
  width: 78px;
  height: 1px;
  margin: var(--df-copy-rule-margin) 0;
  background: linear-gradient(90deg, var(--pale-gold), transparent);
  box-shadow: 0 0 16px rgba(241, 199, 125, .2);
}

.copy-text {
  position: relative;
  margin: 0;
  max-width: 530px;
  color: var(--df-copy-text-color);
  font-size: clamp(13px, 1.03vw, 16px);
  line-height: 1.68;
}

.copy-text strong {
  color: rgba(241, 199, 125, .92);
  font-weight: 630;
}

/* "What this protects / requires" box. */
.copy-method {
  position: relative;
  margin: 20px 0 0;
  max-width: 530px;
  padding: 11px 15px 13px;
  border-left: 1px solid var(--df-method-border);
  background: var(--df-method-bg);
  color: var(--df-method-color);
  font-size: 13px;
  line-height: 1.55;
}

.copy-method b {
  color: rgba(250, 244, 232, .96);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.copy-method-emphasis { color: rgba(241, 199, 125, .98); }

.copy-kicker {
  position: relative;
  margin: var(--df-copy-kicker-margin) 0 0;
  max-width: 530px;
  padding: 13px 15px;
  border-left: 1px solid rgba(241, 199, 125, .78);
  background: linear-gradient(90deg, rgba(217, 164, 94, .2), transparent);
  color: rgba(241, 199, 125, .78);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.5;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* Mobile-only teal box below the visual (waterproofing, substrate). */
.method-panel { display: none; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.footer {
  grid-column: 1 / 4;
  grid-row: 3;
  display: grid;
  grid-template-columns: var(--df-footer-columns);
  align-items: center;
  border-top: 1px solid rgba(241, 199, 125, .2);
  background: var(--df-footer-bg);
}

.counter {
  height: 100%;
  padding: 0 31px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-right: 1px solid rgba(217, 164, 94, .15);
  color: rgba(244, 234, 216, .34);
  font-size: 9px;
  letter-spacing: .18em;
}

.counter strong {
  color: var(--pale-gold);
  font: 500 22px / 1 var(--font-serif);
}

.counter i {
  width: 38px;
  height: 1px;
  background: rgba(241, 199, 125, .25);
}

.footer-kicker {
  margin: 0;
  padding: 0 38px;
  color: rgba(217, 164, 94, .66);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enquire {
  height: 48px;
  min-width: 275px;
  margin-right: 22px;
  border: 1px solid rgba(213, 164, 82, .62);
  background: rgba(26, 21, 14, .14);
  color: #e1b86e;
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}

.enquire:hover { background: rgba(92, 64, 27, .2); }

/* ── Entrance: three connected accordion leaves ────────────────────────────
   The header is present from the start; the topic rail, copy and image open
   in sequence (.reveal-left → .reveal-middle → .reveal-image), then the
   footer settles (.reveal-complete). Classes are set by decision-field.js. */
@media (min-width: 861px) and (min-height: 601px) and (prefers-reduced-motion: no-preference),
       (min-width: 1001px) and (prefers-reduced-motion: no-preference) {
  .decision-field .nav,
  .decision-field .copy,
  .decision-field .image-stage {
    will-change: clip-path, transform, opacity;
    transform-origin: left center;
    pointer-events: none;
  }

  .decision-field .nav {
    clip-path: inset(0 100% 0 0);
    transform: translateX(var(--accordion-entry-x, -32px)) scaleX(.055);
    opacity: .35;
    transition: clip-path 820ms var(--accordion-ease), transform 820ms var(--accordion-ease), opacity 260ms ease;
  }

  .decision-field.reveal-left .nav {
    clip-path: inset(0);
    transform: none;
    opacity: 1;
  }

  .decision-field .tab {
    opacity: 0;
    transform: translateX(-24px);
    transition: color .3s ease, background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease), text-shadow .3s ease, opacity 320ms ease, transform 620ms var(--accordion-ease);
  }

  .decision-field.reveal-left .tab {
    opacity: 1;
    transform: none;
  }

  /* Staggered topic entrance: start + n × step. */
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(1) { transition-delay: var(--df-stagger-start); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(2) { transition-delay: calc(var(--df-stagger-start) + var(--df-stagger-step)); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(3) { transition-delay: calc(var(--df-stagger-start) + 2 * var(--df-stagger-step)); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(4) { transition-delay: calc(var(--df-stagger-start) + 3 * var(--df-stagger-step)); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(5) { transition-delay: calc(var(--df-stagger-start) + 4 * var(--df-stagger-step)); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(6) { transition-delay: calc(var(--df-stagger-start) + 5 * var(--df-stagger-step)); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(7) { transition-delay: calc(var(--df-stagger-start) + 6 * var(--df-stagger-step)); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(8) { transition-delay: calc(var(--df-stagger-start) + 7 * var(--df-stagger-step)); }
  .decision-field.reveal-left:not(.reveal-complete) .tab:nth-child(9) { transition-delay: calc(var(--df-stagger-start) + 8 * var(--df-stagger-step)); }

  .decision-field .copy {
    clip-path: inset(0 100% 0 0);
    transform: translateX(-30px) scaleX(.055);
    opacity: .3;
    transition: clip-path 760ms var(--accordion-ease), transform 760ms var(--accordion-ease), opacity 300ms ease;
  }

  .decision-field.reveal-middle .copy {
    clip-path: inset(0);
    transform: none;
    opacity: 1;
  }

  .decision-field:not(.reveal-middle) .copy > * {
    opacity: 0;
    transform: translateX(-18px);
  }

  .decision-field.reveal-middle:not(.reveal-complete) .copy > * {
    opacity: 1;
    transform: none;
    transition-delay: 250ms;
  }

  .decision-field .image-stage {
    clip-path: inset(0 100% 0 0);
    transform: translateX(-34px) scaleX(.04);
    opacity: .25;
    transition: clip-path 900ms var(--accordion-ease), transform 900ms var(--accordion-ease), opacity 360ms ease;
  }

  .decision-field.reveal-image .image-stage {
    clip-path: inset(0);
    transform: none;
    opacity: 1;
  }

  .decision-field .footer {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 420ms ease, transform 620ms var(--accordion-ease);
  }

  .decision-field.reveal-complete .footer {
    opacity: 1;
    transform: none;
  }

  .decision-field.reveal-complete .nav,
  .decision-field.reveal-complete .copy,
  .decision-field.reveal-complete .image-stage {
    will-change: auto;
    pointer-events: auto;
  }

  .decision-field.reveal-complete .tab { transition-delay: 0ms; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 1180px) {
  .frame { grid-template-columns: var(--df-columns-narrow); }
  .brand { padding-left: 28px; }
  .overview { padding: 17px 30px; }

  .subline {
    font-size: 15px;
    line-height: 1.32;
  }

  .tab { padding-left: 24px; }
  .tab[aria-selected="true"] { padding-left: 30px; }
  .copy { padding: 38px 28px; }
}

/* ── Topic strip (shared by the mobile and tablet-landscape routes) ─────── */

.topic-chevron {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  color: rgba(241, 199, 125, .78);
  background: transparent;
  cursor: pointer;
  transition: color .28s ease, background .35s var(--ease), text-shadow .28s ease;
}

.topic-chevron:hover,
.topic-chevron:focus-visible {
  color: #fff4dd;
  background: rgba(241, 199, 125, .06);
  text-shadow: 0 0 16px rgba(241, 199, 125, .28);
}

.topic-chevron svg {
  width: 18px;
  height: 18px;
  display: block;
}

.topic-box {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  margin: 6px 0;
  padding: 0 10px;
  border: 1px solid rgba(241, 199, 125, .22);
  background: linear-gradient(180deg, rgba(241, 199, 125, .19), rgba(217, 164, 94, .085) 58%, var(--df-topic-tint));
  box-shadow: inset 0 1px rgba(255, 238, 202, .14), inset 0 -1px rgba(217, 164, 94, .13), 0 0 22px rgba(217, 164, 94, .04);
  overflow: hidden;
}

.topic-box::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 238, 202, .7), var(--pale-gold), rgba(217, 164, 94, .68), transparent);
  box-shadow: 0 0 10px rgba(241, 199, 125, .55);
}

.topic-viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 42px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.topic-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 12px;
  color: #fff4dd;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 14px rgba(241, 199, 125, .22);
  white-space: nowrap;
  overflow: hidden;
  will-change: transform, opacity;
  transition: none;
}

.topic-num {
  flex: 0 0 auto;
  color: #f8cf88;
  font: 500 26px / 1 var(--font-serif);
  letter-spacing: .04em;
  text-shadow: 0 0 14px rgba(241, 199, 125, .28);
  transform: translateY(-4px);
}

.topic-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Directional exit / enter of the topic label, mirrored by the copy panel. */
.topic-label.is-idle { opacity: 1; transform: translateX(0); }

.topic-label.is-exit-next,
.topic-label.is-exit-prev {
  opacity: 0;
  transition: opacity 280ms ease, transform 420ms var(--ease);
}

.topic-label.is-exit-next { transform: translateX(-28%); }
.topic-label.is-exit-prev { transform: translateX(28%); }
.topic-label.is-enter-next { opacity: 0; transform: translateX(28%); }
.topic-label.is-enter-prev { opacity: 0; transform: translateX(-28%); }

.topic-label.is-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 320ms ease 40ms, transform 480ms var(--ease);
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 860px), (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .decision-field {
    padding: 0;
    place-items: stretch;
  }

  .close {
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 12;
  }

  .shell {
    width: 100%;
    height: 100svh;
    max-height: 100dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .frame {
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    padding: 22px 22px 14px;
    border-bottom: 0;
  }

  .brand-mark,
  .eyebrow,
  .overview,
  .nav { display: none; }

  .brand h1 {
    font-size: clamp(36px, 9vw, 42px);
    line-height: .94;
  }

  .mobile-topic {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: stretch;
    min-height: 56px;
    border-top: 1px solid rgba(241, 199, 125, .18);
    border-bottom: 1px solid rgba(241, 199, 125, .18);
    background: var(--df-topic-bg);
  }

  /* Copy block — same-direction exit/enter as the topic label. */
  .copy.is-exit-next > *,
  .copy.is-exit-prev > * {
    opacity: 0;
    transition: opacity 280ms ease, transform 420ms var(--ease);
  }

  .copy.is-exit-next > * { transform: translateX(-18px); }
  .copy.is-exit-prev > * { transform: translateX(18px); }

  .copy.is-pre-enter-next > *,
  .copy.is-pre-enter-prev > * {
    opacity: 0;
    transition: none;
  }

  .copy.is-pre-enter-next > * { transform: translateX(18px); }
  .copy.is-pre-enter-prev > * { transform: translateX(-18px); }

  .copy.is-enter > * {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 320ms ease 30ms, transform 480ms var(--ease);
  }

  .copy:not(.is-exit-next, .is-exit-prev, .is-pre-enter-next, .is-pre-enter-prev, .is-enter) > * {
    transition: opacity .32s ease, transform .48s var(--ease);
  }

  .image-stage {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
  }

  .stage-photo { object-position: var(--df-mobile-photo-position); }
  .image-stage::after { background: var(--df-mobile-stage-shade); }

  .copy {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
    padding: 28px 24px 36px;
    justify-content: flex-start;
    border-right: 0;
    background: transparent;
    backdrop-filter: none;
    overflow-y: auto;
  }

  .copy::before {
    font-size: var(--df-mobile-copy-index-size);
    top: var(--df-mobile-copy-index-top);
  }

  .copy-title {
    font-size: var(--df-mobile-title-size);
    line-height: .94;
  }

  .copy-rule { margin: 14px 0; }

  .copy-text {
    font-size: var(--df-mobile-text-size);
    line-height: var(--df-mobile-text-leading);
    color: rgba(250, 244, 232, .94);
  }

  .copy-method {
    margin-top: 16px;
    padding: 9px 14px 13px;
    border-left: 1px solid var(--df-mobile-method-border);
    background: var(--df-mobile-method-bg);
    color: rgba(255, 250, 240, .94);
  }

  .copy-method,
  .copy-method b,
  .copy-method .copy-method-emphasis {
    font-size: var(--df-mobile-method-size);
    line-height: var(--df-mobile-method-leading);
  }

  .copy-method b { color: rgba(255, 250, 240, .98); }
  .copy-method .copy-method-emphasis { color: rgba(245, 210, 140, 1); }

  .copy-meta,
  .copy-kicker { display: none; }

  .footer {
    grid-column: 1;
    grid-row: 4;
    grid-template-columns: 1fr;
    align-self: end;
    width: 100%;
    min-height: 0;
    padding: 12px 14px max(16px, env(safe-area-inset-bottom, 0px));
    gap: 0;
    z-index: 8;
    background: var(--df-mobile-footer-bg);
  }

  .counter,
  .footer-kicker { display: none; }

  .enquire {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 56px;
    min-height: 56px;
    margin: 0;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 740;
    letter-spacing: .22em;
  }
}

/* Phones in landscape: keep a usable content canvas and let the field scroll
   instead of squeezing the copy into the remainder. */
@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .shell {
    height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .frame {
    height: auto;
    min-height: 100%;
    grid-template-rows: auto auto minmax(360px, 1fr) auto;
    overflow: visible;
  }

  .brand { padding: 12px 68px 10px 18px; }
  .brand h1 { font-size: clamp(27px, 4.2vw, 33px); }
  .mobile-topic { min-height: 48px; }
  .topic-box { margin: 4px 0; }
  .topic-viewport { height: 38px; }
  .image-stage { min-height: 360px; }

  .copy {
    min-height: 360px;
    padding: 24px 24px 28px;
  }

  .copy-title { font-size: var(--df-mobile-title-size-landscape); }
  .copy-rule { margin: 12px 0; }
  .copy-text { line-height: var(--df-mobile-text-leading-landscape); }

  .copy-method,
  .copy-method b,
  .copy-method .copy-method-emphasis {
    font-size: var(--df-mobile-method-size-landscape);
    line-height: var(--df-mobile-method-leading-landscape);
  }

  .footer { padding: 8px 12px max(8px, env(safe-area-inset-bottom, 0px)); }

  .enquire {
    height: 48px;
    min-height: 48px;
  }
}

@media (max-width: 460px) {
  .brand h1 { font-size: clamp(34px, 9.5vw, 40px); }
  .mobile-topic { min-height: 52px; }
  .topic-box { margin: 5px 0; }

  .topic-label {
    font-size: 13px;
    letter-spacing: .13em;
    gap: 10px;
  }

  .topic-num { font-size: 24px; }

  .copy {
    padding-top: 25px;
    padding-bottom: 28px;
  }

  .copy-title { font-size: var(--df-mobile-title-size-small); }
  .footer { padding: 12px 12px max(16px, env(safe-area-inset-bottom, 0px)); }

  .enquire {
    height: 54px;
    min-height: 54px;
    font-size: 11.5px;
    letter-spacing: .2em;
  }
}

/* ── Tablet landscape: compact topic switcher, two-pane content ────────── */
@media (min-width: 861px) and (max-width: 1180px) and (orientation: landscape),
       (min-width: 1181px) and (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
  .decision-field { padding: 10px; }

  .shell {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    max-height: none;
    overflow: hidden;
  }

  .frame {
    height: 100%;
    grid-template-columns: minmax(360px, 44%) minmax(0, 56%);
    grid-template-rows: 116px 52px minmax(0, 1fr);
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    padding: 10px 28px;
    gap: 18px;
    align-items: center;
    justify-content: center;
  }

  .brand-mark {
    width: 82px;
    height: 82px;
    margin: 0 -10px 0 0;
    transform: none;
  }

  .brand > div:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
  }

  .eyebrow { margin: 0 0 5px; }

  .brand h1 {
    font-size: clamp(26px, 2.8vw, 34px);
    line-height: .88;
  }

  .brand h1 span { display: block; }

  .overview {
    grid-column: 2;
    grid-row: 1;
    padding: 16px 54px 14px 16px;
  }

  .subline { font-size: clamp(14px, 1.5vw, 17px); }

  .nav { display: none; }

  .mobile-topic {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: stretch;
    min-height: 52px;
    border-top: 1px solid rgba(241, 199, 125, .18);
    border-bottom: 1px solid rgba(241, 199, 125, .18);
    background: var(--df-topic-bg);
  }

  .topic-chevron { touch-action: manipulation; }

  .topic-chevron svg {
    width: 20px;
    height: 20px;
  }

  .topic-box {
    margin: 4px 0;
    padding: 0 12px;
  }

  .topic-box::before {
    left: 28%;
    right: 28%;
  }

  .topic-viewport { max-width: none; }

  .topic-label {
    font-size: 13px;
    letter-spacing: .16em;
  }

  .topic-num {
    font-size: 24px;
    transform: translateY(-3px);
  }

  .copy {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
    padding: clamp(24px, 3vh, 34px) clamp(24px, 3vw, 38px);
    justify-content: safe center;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid rgba(217, 164, 94, .2);
    background: var(--df-tablet-copy-bg);
  }

  .copy-title { font-size: clamp(29px, 3.25vw, 42px); }

  .copy-text {
    font-size: clamp(13px, 1.25vw, 16px);
    line-height: 1.58;
  }

  .image-stage {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
    min-height: 0;
  }

  .image-stage::after { background: var(--df-tablet-stage-shade); }

  .footer { display: none; }
}

/* Desktop and tablet keep the method box at its compact size. */
@media (min-width: 861px) and (min-height: 601px), (min-width: 1001px) {
  .copy .copy-method,
  .copy .copy-method b,
  .copy .copy-method .copy-method-emphasis {
    font-size: 13px;
    line-height: 1.55;
  }
}

/* ── High-resolution type (≥ 1921 × 1081) ──────────────────────────────────
   Fields flagged .decision-field--hires-type (heating, substrate) enlarge
   their working type from the 1920 sizes before the canvas itself is scaled.
   Values: clamp(min, min(vw, vh) ratio of 1920×1080, cap). */
@media (min-width: 1921px) and (min-height: 1081px) {
  .decision-field--hires-type .eyebrow,
  .decision-field--hires-type .copy-meta,
  .decision-field--hires-type .footer-kicker,
  .decision-field--hires-type .tab-label,
  .decision-field--hires-type .copy-kicker,
  .decision-field--hires-type .counter { font-size: clamp(9px, min(.46875vw, .833333vh), 13.95px); }
  .decision-field--hires-type .tab-num { font-size: clamp(15px, min(.78125vw, 1.388889vh), 22.5px); }
  .decision-field--hires-type .copy-title { font-size: clamp(42px, min(2.1875vw, 3.888889vh), 60.9px); }
  .decision-field--hires-type .copy-text { font-size: clamp(16px, min(.833333vw, 1.481481vh), 24px); }
  .decision-field--hires-type .counter strong { font-size: clamp(22px, min(1.145833vw, 2.037037vh), 33px); }
  .decision-field--hires-type .enquire { font-size: clamp(10px, min(.520833vw, .925926vh), 15.5px); }
}
