/* ==========================================================================
   Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: transparent;
  --btn-border: color-mix(in srgb, var(--color-text) 28%, transparent);
  --btn-color: var(--color-text);
  --btn-bg-hover: var(--btn-bg);
  --btn-border-hover: var(--color-accent);
  --btn-color-hover: var(--color-accent);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 15px 22px;
  border: 1px solid var(--btn-border);
  border-radius: 0;
  background-color: var(--btn-bg);
  color: var(--btn-color);
  font: 500 var(--text-label)/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-hover) var(--ease-out),
    border-color var(--duration-hover) var(--ease-out),
    color var(--duration-hover) var(--ease-out);
}

.btn:hover {
  background-color: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
  color: var(--btn-color-hover);
}

.btn:active {
  translate: 0 1px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn--primary {
  --btn-bg: var(--color-accent);
  --btn-border: var(--color-accent);
  --btn-color: var(--color-ink);
  --btn-bg-hover: var(--color-secondary);
  --btn-border-hover: var(--color-secondary);
  --btn-color-hover: var(--color-ink);
  font-weight: 600;
}

/* Call-to-action on imagery: same fill as primary, but hovers to white so it
   stays distinct from the cyan secondary action beside it. */
.btn--cta {
  --btn-bg: var(--color-accent);
  --btn-border: var(--color-accent);
  --btn-color: var(--color-ink);
  --btn-bg-hover: var(--color-text);
  --btn-border-hover: var(--color-text);
  --btn-color-hover: var(--color-ink);
  font-weight: 600;
}

.btn--glass {
  --btn-bg: color-mix(in srgb, var(--color-bg) 40%, transparent);
  --btn-border: var(--color-border-glass);
  --btn-border-hover: var(--color-secondary);
  --btn-color-hover: var(--color-secondary);
  -webkit-backdrop-filter: var(--blur-glass);
  backdrop-filter: var(--blur-glass);
}

.btn--dark {
  --btn-bg: var(--color-bg);
  --btn-border: var(--color-accent);
  --btn-color: var(--color-accent);
  --btn-bg-hover: var(--color-accent);
  --btn-border-hover: var(--color-accent);
  --btn-color-hover: var(--color-ink);
  font-weight: 600;
}

.btn--sm {
  min-height: 40px;
  padding: 10px 16px;
}

.btn--lg {
  min-height: 52px;
  padding: 18px 28px;
  font-size: var(--text-meta);
}

.btn--block {
  width: 100%;
}

.btn__arrow {
  font-size: 0.8125rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row--tight {
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Chips — toggle buttons and radio choices
   -------------------------------------------------------------------------- */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 12px 20px;
  border: 1px solid var(--color-border-strong);
  background-color: transparent;
  color: var(--color-text);
  font: 500 var(--text-label)/1 var(--font-mono);
  letter-spacing: 0.16em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-hover) var(--ease-out),
    border-color var(--duration-hover) var(--ease-out),
    color var(--duration-hover) var(--ease-out);
}

.chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.chip[aria-pressed="true"],
.chip:has(:checked) {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-ink);
}

.chip:has(:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.chip--sm {
  min-height: 40px;
  padding: 11px 16px;
  letter-spacing: 0.14em;
}

/* Coarse pointers get the full 44px target on compact controls. */
@media (pointer: coarse) {
  .btn--sm,
  .chip,
  .chip--sm {
    min-height: 44px;
  }
}

.chip__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Media frames
   -------------------------------------------------------------------------- */

.media {
  position: relative;
  overflow: hidden;
  background-color: var(--color-surface);
}

.media__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-x, 50%) var(--focus-y, 50%);
}

.media--4x3 {
  aspect-ratio: 4 / 3;
}

.media--3x2 {
  aspect-ratio: 3 / 2;
}

.media--5x3 {
  aspect-ratio: 5 / 3;
}

.media--16x10 {
  aspect-ratio: 16 / 10;
}

.media--shade::after,
.explorer__view--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--color-bg) 75%, transparent));
  pointer-events: none;
}

.media__caption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 1;
}

.media__tag {
  position: absolute;
  bottom: 10px;
  left: 12px;
  z-index: 1;
  padding: 4px 6px;
  background-color: var(--color-overlay);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .media--zoom .media__image {
    transition: transform var(--duration-slow) var(--ease-out);
  }

  .media--zoom:hover .media__image {
    transform: scale(1.06);
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

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

@media (min-width: 1024px) {
  .detail-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Image-backed tile with a bottom caption */
.photo-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background-color: var(--color-surface);
  color: var(--color-text);
}

.photo-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--color-bg) 55%, transparent) 65%, color-mix(in srgb, var(--color-bg) 94%, transparent));
  pointer-events: none;
}

.photo-tile__body {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  z-index: 1;
}

.photo-tile__meta {
  margin-bottom: 6px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

/* Placeholder tile describing a photograph still to be supplied */
.brief-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  padding: 20px;
  background-color: var(--color-light-muted);
  background-image: repeating-linear-gradient(115deg, color-mix(in srgb, var(--color-ink) 5.5%, transparent) 0 2px, transparent 2px 14px);
  color: var(--color-ink);
}

.brief-tile__brief {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  width: fit-content;
  padding: 8px 10px;
  border: 1px dashed color-mix(in srgb, var(--color-ink) 30%, transparent);
  font: 400 var(--text-label)/1.6 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--color-ink-subtle);
}

.brief-tile--feature .card-title {
  font-size: clamp(1.125rem, 2.2vw, 1.75rem);
  letter-spacing: -0.03em;
}

/* Interior mosaic. Default (home): the feature tile fills the right half of a
   4 × 2 grid on desktop. Compact (caravan page): the feature tile leads a single row. */
.interior-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

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

  .interior-grid__feature {
    grid-column: span 2;
    aspect-ratio: 16 / 10;
  }
}

@media (min-width: 1024px) {
  .interior-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .interior-grid__feature {
    grid-row: 1 / span 2;
    grid-column: 3 / span 2;
    aspect-ratio: auto;
  }

  .interior-grid--compact .interior-grid__feature {
    grid-row: auto;
    grid-column: span 2;
    aspect-ratio: 16 / 10;
  }
}

.interior-grid--compact {
  gap: 12px;
}

.interior-grid--compact > * {
  min-height: 200px;
}

/* --------------------------------------------------------------------------
   Page hero and call-to-action band
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 64svh;
  overflow: hidden;
}

.page-hero--tall {
  min-height: 74svh;
}

.page-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg) 68%, transparent) 0%, color-mix(in srgb, var(--color-bg) 22%, transparent) 40%, var(--color-bg) 100%);
}

.page-hero__content {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(40px, 8vw, 90px) var(--gutter);
}

.page-hero__lead {
  max-width: 52ch;
  margin-top: 22px;
  color: var(--color-text-lead);
}

.product-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.product-summary__meta {
  line-height: 1.7;
  letter-spacing: 0.12em;
  color: var(--color-text-subtle);
}

.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56svh;
  overflow: hidden;
}

.cta-band--tall {
  min-height: 60svh;
}

.cta-band__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, color-mix(in srgb, var(--color-bg) 45%, transparent) 45%, var(--color-bg) 100%);
}

.cta-band__content {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(50px, 7vw, 100px) var(--gutter);
}

.cta-band__title {
  margin-bottom: 26px;
}

@media (prefers-reduced-motion: no-preference) {
  .page-hero .media__image {
    animation: kv-scale-in 1.4s var(--ease-out) both;
  }

  .page-title {
    animation: kv-rise 0.8s var(--ease-out) both;
  }

  .page-hero .eyebrow {
    animation: kv-rise 0.8s var(--ease-out) 0.2s both;
  }

  .page-hero .page-title {
    animation-delay: 0.35s;
  }

  .page-hero__lead {
    animation: kv-rise 0.9s var(--ease-out) 0.55s both;
  }

  .section--intro .eyebrow,
  .section--compact-intro .eyebrow {
    animation: kv-rise 0.8s var(--ease-out) both;
  }

  .section--intro .page-title,
  .section--compact-intro .page-title {
    animation-delay: 0.08s;
  }
}

/* --------------------------------------------------------------------------
   Placeholder and status notices
   -------------------------------------------------------------------------- */

.notice {
  max-width: 70ch;
  padding: 14px 18px;
  border: 1px dashed var(--color-accent-soft);
  font: 400 var(--text-meta)/1.6 var(--font-mono);
  letter-spacing: var(--tracking-note);
  color: var(--color-accent);
}

.notice--spaced {
  margin-bottom: var(--stack-md);
}

.notice__detail {
  display: block;
  margin-top: 2px;
  color: var(--color-text-muted);
}

.notice--compact {
  max-width: 44ch;
}

.notice--neutral {
  max-width: none;
  padding: 11px 14px;
  border-color: color-mix(in srgb, var(--color-text) 20%, transparent);
  font-weight: 300;
  letter-spacing: 0;
  color: var(--color-text-subtle);
}

/* --------------------------------------------------------------------------
   Lists and cells
   -------------------------------------------------------------------------- */

.rule-list > li {
  padding-block: 16px;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.rule-list > li:last-child {
  border-bottom: 0;
}

.rule-list--compact > li {
  padding-block: 12px;
  font-size: 0.875rem;
}

.rule-list--muted > li {
  color: var(--color-text-subtle);
}

.cell {
  padding: 26px 22px 30px;
}

.cell--roomy {
  padding: 28px 24px 34px;
}

.cell__label {
  margin-bottom: 14px;
}

.cell__number {
  margin-bottom: 16px;
  font-size: clamp(1.875rem, 3vw, 2.625rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: var(--tracking-display);
  line-height: 1;
  /* 36% is the lowest alpha that keeps these large step numbers at 3:1 on --color-bg. */
  color: color-mix(in srgb, var(--color-text) 36%, transparent);
}

.cell__title {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cell__title--lg {
  margin-bottom: 10px;
  font-size: 1.25rem;
  letter-spacing: var(--tracking-title);
}

.cell__text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.cell__text--lg {
  font-size: 0.875rem;
}

.section--light .cell__text {
  color: var(--color-ink-muted);
}

.cell--highlight {
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--color-accent) 9%, transparent), transparent 70%);
}

.cell__foot {
  margin-top: 14px;
  font: 300 var(--text-meta)/1.6 var(--font-mono);
  letter-spacing: var(--tracking-note);
  color: var(--color-text-faint);
}

.cell__foot--accent {
  color: color-mix(in srgb, var(--color-accent) 80%, transparent);
}

@media (hover: hover) {
  .cell--interactive {
    transition: background-color var(--duration-hover) var(--ease-out);
  }

  .cell--interactive:hover {
    background-color: var(--color-surface-hover);
  }
}

/* Card with media on top (materials) */
.card__body {
  padding: 26px 24px 30px;
}

.card__title {
  margin-bottom: 10px;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: var(--tracking-title);
}

/* --------------------------------------------------------------------------
   Shell cross-section layers
   -------------------------------------------------------------------------- */

.layers {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.layer {
  --layer-color: color-mix(in srgb, var(--color-text) 45%, transparent);
  --layer-index-color: color-mix(in srgb, var(--color-text) 55%, transparent);
  --layer-tint: color-mix(in srgb, var(--color-text) 7%, transparent);

  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--layer-tint), color-mix(in srgb, var(--color-text) 1%, transparent));
  border-left: 2px solid var(--layer-color);
}

.layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--layer-tint), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.layer--secondary {
  --layer-color: var(--color-secondary);
  --layer-index-color: var(--color-secondary);
  --layer-tint: color-mix(in srgb, var(--color-secondary) 12%, transparent);
}

.layer--accent {
  --layer-color: var(--color-accent);
  --layer-index-color: var(--color-accent);
  --layer-tint: color-mix(in srgb, var(--color-accent) 13%, transparent);
}

.layer__index {
  min-width: 22px;
  font: 400 var(--text-label) var(--font-mono);
  color: var(--layer-index-color);
}

.layer__name {
  min-width: 140px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.layer__role {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.layers__title {
  margin-bottom: 14px;
}

.layers__note {
  margin-top: 14px;
}

@media (hover: hover) {
  .layer:hover::before {
    opacity: 1;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .layer {
    transition: transform var(--duration-base) var(--ease-out);
  }

  .layer:hover {
    transform: translateX(8px);
  }
}

/* --------------------------------------------------------------------------
   Specification figures
   -------------------------------------------------------------------------- */

.spec-groups {
  display: flex;
  flex-direction: column;
  gap: var(--stack-lg);
}

.spec-group__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}

.spec-group__index {
  font: 400 var(--text-meta) var(--font-mono);
  letter-spacing: 0.2em;
  color: var(--color-text-faint);
}

.spec-group__head--section {
  margin-bottom: var(--stack-sm);
}

/* The full sheet packs up to six figures per row on desktop. */
.spec-grid--sheet {
  --grid-min: 180px;
}

/* The home overview holds exactly ten figures: two rows of five, never a ragged tail. */
.spec-grid--overview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 700px) {
  .spec-grid--overview {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Two columns on phones keep long spec sheets scannable instead of one figure per screen. */
@media (max-width: 599px) {
  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-grid .spec {
    padding: 18px 14px;
  }
}

.spec {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--color-text) 2%, transparent) 0 1px, transparent 1px 9px);
}

.spec__label {
  margin-bottom: 14px;
}

/* Grid rows stretch every cell to the tallest one; pinning the figure to the
   bottom keeps values aligned even when a neighbour's label wraps. */
.spec__figure {
  display: block;
  margin-top: auto;
}

.spec__value {
  display: block;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: var(--tracking-display);
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.spec__value--pending {
  color: var(--color-text-disabled);
}

.spec__unit {
  display: block;
  margin-top: 10px;
  font: 300 var(--text-label) var(--font-mono);
  color: var(--color-secondary);
}

.spec--lg {
  padding: 26px 22px 24px;
}

.spec--lg .spec__label {
  margin-bottom: 16px;
}

.spec--lg .spec__value {
  font-size: clamp(2.5rem, 4.4vw, 4rem);
}

.spec--lg .spec__unit {
  margin-top: 12px;
}

@media (hover: hover) {
  .spec--interactive {
    transition: background-color var(--duration-hover) var(--ease-out);
  }

  .spec--interactive:hover {
    background-color: var(--color-surface-hover);
  }
}

/* --------------------------------------------------------------------------
   Caravan explorer — exterior hotspots and view switcher
   -------------------------------------------------------------------------- */

.explorer__toolbar {
  margin-bottom: 2px;
}

.explorer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .explorer__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.explorer__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1880 / 1000;
  overflow: hidden;
  container-type: size;
}

@media (min-width: 900px) {
  .explorer__stage {
    align-self: stretch;
  }
}

.explorer__view {
  position: absolute;
  inset: 0;
  background-color: var(--color-surface);
}

/* The canvas reproduces object-fit: cover geometry at the photo's native ratio,
   so percentage hotspot positions stay locked to the caravan at any stage size. */
.explorer__canvas {
  --hot-x: 55%;
  --hot-y: 76%;

  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 100cqh * 1.88);
  height: max(100cqh, 100cqw / 1.88);
  translate: -50% -50%;
}

.explorer__canvas .media__image {
  object-fit: fill;
}

/* A spotlight twice the canvas size, centred on the active hotspot. Moving it with
   translate keeps the change on the compositor instead of repainting a gradient. */
.explorer__mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle 150px at 50% 50%, transparent 55%, color-mix(in srgb, var(--color-bg) 62%, transparent) 100%);
  translate: calc(var(--hot-x) / 2 - 50%) calc(var(--hot-y) / 2 - 50%);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .explorer__mask {
    transition: translate var(--duration-base) var(--ease-in-out);
  }

  /* A view panel that becomes visible (its `hidden` is removed) fades in. */
  .explorer__view {
    transition: opacity var(--duration-fast) var(--ease-out);
  }

  @starting-style {
    .explorer__view {
      opacity: 0;
    }
  }
}

.hotspot {
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  translate: -50% -50%;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--color-bg) 70%, transparent);
  color: var(--color-accent);
  font: 500 var(--text-label)/1 var(--font-mono);
  transition:
    background-color var(--duration-hover) var(--ease-out),
    color var(--duration-hover) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

/* Enlarges the touch target without changing the marker's drawn size. */
.hotspot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}

.hotspot[aria-pressed="true"] {
  background-color: var(--color-accent);
  color: var(--color-ink);
}

@media (hover: hover) {
  .hotspot:hover {
    background-color: var(--color-accent);
    color: var(--color-ink);
  }
}

.hotspot[aria-pressed="true"] {
  font-weight: 600;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

@media (max-width: 599px) {
  .hotspot {
    width: 28px;
    height: 28px;
  }

  .hotspot[aria-pressed="true"] {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 20%, transparent);
  }
}

.hotspot--solar { --x: 38%; --y: 28%; }
.hotspot--systems { --x: 52%; --y: 8%; }
.hotspot--awning { --x: 80%; --y: 12%; }
.hotspot--entry { --x: 63%; --y: 48%; }
.hotspot--window { --x: 78%; --y: 41%; }
.hotspot--storage { --x: 26%; --y: 65%; }
.hotspot--chassis { --x: 74%; --y: 84%; }
.hotspot--shell { --x: 55%; --y: 76%; }

.explorer__callout {
  position: absolute;
  top: var(--hot-y);
  left: calc(var(--hot-x) + 26px);
  display: flex;
  align-items: center;
  translate: 0 -50%;
  pointer-events: none;
}

.explorer__callout.is-flipped {
  right: calc(100% - var(--hot-x) + 26px);
  left: auto;
  flex-direction: row-reverse;
}

.explorer__callout-line {
  display: block;
  width: 38px;
  height: 1px;
  background-color: var(--color-accent);
  transform-origin: left;
}

.explorer__callout.is-flipped .explorer__callout-line {
  transform-origin: right;
}

.explorer__callout-label {
  padding: 8px 10px;
  background-color: color-mix(in srgb, var(--color-bg) 82%, transparent);
  font: 500 var(--text-label) var(--font-mono);
  letter-spacing: 0.16em;
  white-space: nowrap;
}

@media (max-width: 599px) {
  .explorer__callout {
    display: none;
  }
}

.explorer__panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 3vw, 42px);
}

.explorer__kicker {
  margin-bottom: 14px;
}

.explorer__title {
  margin-bottom: 14px;
  font-size: clamp(1.625rem, 3vw, 2.625rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.explorer__body {
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.explorer__spec {
  padding-left: 12px;
  border-left: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
  font: 300 var(--text-meta)/1.6 var(--font-mono);
  letter-spacing: var(--tracking-note);
  color: var(--color-text-subtle);
}

.explorer__action {
  align-self: flex-start;
}

.explorer__hint {
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field__label {
  font: 400 var(--text-label)/1.4 var(--font-mono);
  letter-spacing: 0.24em;
  color: var(--color-text-subtle);
}

.field__control {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--color-border-control);
  border-radius: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.4;
  transition:
    border-color var(--duration-hover) var(--ease-out),
    box-shadow var(--duration-hover) var(--ease-out);
}

.field__control:hover {
  border-color: color-mix(in srgb, var(--color-text) 50%, transparent);
}

.field__control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.field__control:user-invalid,
.field__control[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.field__control[aria-invalid="true"]:focus {
  box-shadow: inset 0 0 0 1px var(--color-danger);
}

.field__error {
  font: 400 var(--text-meta)/1.5 var(--font-mono);
  letter-spacing: var(--tracking-note);
  color: var(--color-danger);
}

textarea.field__control {
  min-height: 7.5em;
  resize: vertical;
}

.choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group__legend {
  margin-bottom: 10px;
  padding: 0;
}

.choice-group__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form__submit {
  margin-top: 6px;
  padding: 19px;
  font-size: var(--text-meta);
}

.form__note {
  font: 300 var(--text-meta)/1.6 var(--font-mono);
  letter-spacing: var(--tracking-note);
  color: var(--color-text-faint);
}

.form-success {
  padding: clamp(24px, 3vw, 28px);
  border: 1px solid var(--color-accent);
  font: 400 var(--text-meta)/1.8 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

@media (prefers-reduced-motion: no-preference) {
  .form-success:not([hidden]) {
    animation: kv-rise var(--duration-slow) var(--ease-out) both;
  }
}

.form-success:focus {
  outline: none;
}

.form-success__detail {
  display: block;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Enquiry drawer (dialog)
   -------------------------------------------------------------------------- */

.drawer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  /* clip, not hidden: a hidden overflow is still scrollable, and focusing the
     panel on open would scroll the dialog sideways and cancel the slide-in. */
  overflow: hidden;
  overflow: clip;
  background: transparent;
  color: var(--color-text);
}

.drawer[open] {
  display: flex;
  justify-content: flex-end;
}

.drawer::backdrop {
  background: transparent;
}

.drawer__scrim {
  position: absolute;
  inset: 0;
  background-color: var(--color-scrim);
  -webkit-backdrop-filter: var(--blur-glass);
  backdrop-filter: var(--blur-glass);
}

.drawer__panel {
  position: relative;
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 44px);
  background-color: var(--color-bg-raised);
  border-left: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

.drawer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.drawer__title {
  margin-bottom: 12px;
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-weight: 900;
  font-stretch: 114%;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.drawer__blurb {
  margin-bottom: clamp(24px, 3vw, 34px);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .drawer[open] .drawer__scrim {
    animation: kv-fade var(--duration-base) var(--ease-out) both;
  }

  .drawer[open] .drawer__panel {
    animation: kv-drawer-in 0.45s var(--ease-drawer) both;
  }

  .drawer.is-closing .drawer__scrim {
    animation: kv-fade-out var(--duration-exit) var(--ease-out) both;
  }

  .drawer.is-closing .drawer__panel {
    animation: kv-drawer-out var(--duration-exit) var(--ease-out) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer[open] .drawer__scrim,
  .drawer[open] .drawer__panel {
    animation: kv-fade 0.15s var(--ease-out) both;
  }
}

/* --------------------------------------------------------------------------
   Sticky enquiry button
   -------------------------------------------------------------------------- */

.sticky-cta {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: var(--z-sticky-cta);
  box-shadow: var(--shadow-float);
}

/* JavaScript removes `hidden` and toggles `.is-visible`, so showing and hiding
   are transitions that can reverse mid-way. Without JavaScript the `hidden`
   attribute keeps the button out of the page. */
.sticky-cta:not(.is-visible) {
  visibility: hidden;
  opacity: 0;
  translate: 0 16px;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .sticky-cta {
    transition:
      opacity 0.2s var(--ease-out),
      translate 0.2s var(--ease-out),
      visibility 0s linear 0.2s,
      background-color var(--duration-hover) var(--ease-out),
      border-color var(--duration-hover) var(--ease-out),
      color var(--duration-hover) var(--ease-out);
  }

  .sticky-cta.is-visible {
    transition-delay: 0s;
  }
}

/* --------------------------------------------------------------------------
   Scroll scenes and reveals
   Static layout is the default. `has-scroll-fx` / `has-reveal` are added by
   JavaScript only when motion is allowed, so no-JS and reduced-motion visitors
   always get fully visible content.

   Each .scrub element plays a keyframe animation across its own window
   (--scrub-start → --scrub-end) of its scene's scroll progress. Browsers with
   scroll-driven animations run it on the scene's view timeline, off the main
   thread; elsewhere scroll-scenes.js supplies --scene-progress and the paused
   animation is seeked with a negative delay.
   -------------------------------------------------------------------------- */

@keyframes kv-scrub-rise {
  from {
    opacity: 0;
    translate: 0 46px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes kv-scrub-fade {
  to {
    opacity: 0;
  }
}

@keyframes kv-scrub-out {
  from {
    opacity: 1;
    translate: 0 0;
  }

  to {
    opacity: 0;
    translate: 0 -70px;
  }
}

.has-scroll-fx .scrub {
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
}

.has-scroll-fx .scrub--rise {
  animation-name: kv-scrub-rise;
}

.has-scroll-fx .scrub--out {
  animation-name: kv-scrub-out;
}

.has-scroll-fx .scrub--fade {
  animation-name: kv-scrub-fade;
}

@supports (animation-timeline: view()) {
  .has-scroll-fx .scrub {
    animation-timeline: var(--scene-timeline);
    animation-range: contain calc(var(--scrub-start, 0) * 100%) contain calc(var(--scrub-end, 1) * 100%);
  }
}

.is-scroll-polyfilled .scrub {
  --t: clamp(0, (var(--scene-progress, 0) - var(--scrub-start, 0)) / (var(--scrub-end, 1) - var(--scrub-start, 0)), 1);
  animation-play-state: paused;
  animation-delay: calc(var(--t) * -1s);
}

/* Elements revealed together enter 60ms apart (--reveal-order is set by
   in-view.js), capped at six steps. background-color keeps the hover timing
   of interactive cells, with no reveal delay. */
.has-reveal [data-reveal],
.has-reveal [data-reveal-group] > * {
  --reveal-delay: calc(min(var(--reveal-order, 0), 6) * 60ms);

  transition:
    opacity 0.9s var(--ease-out) var(--reveal-delay),
    translate 0.9s var(--ease-out) var(--reveal-delay),
    clip-path 0.9s var(--ease-out) var(--reveal-delay),
    background-color var(--duration-hover) var(--ease-out);
}

.has-reveal [data-reveal]:not(.is-revealed),
.has-reveal [data-reveal-group] > :not(.is-revealed) {
  opacity: 0;
  translate: 0 28px;
}

/* clip-path only interpolates between two inset() shapes, so the revealed
   state needs an explicit inset as well. The -1px keeps .ruled-grid's 1px
   outline (a box-shadow outside the box) visible. */
.has-reveal [data-reveal="wipe"] {
  clip-path: inset(-1px);
}

.has-reveal [data-reveal="wipe"]:not(.is-revealed) {
  translate: none;
  clip-path: inset(-1px -1px 100% -1px);
}

.has-reveal [data-reveal="dim"]:not(.is-revealed) {
  opacity: 0.22;
  translate: none;
}

.has-reveal [data-reveal].reveal-delay {
  --reveal-delay: 0.15s;
}
