/* PPF + Ceramics. Light, full-bleed interactive heroes, then the white ARKS page.
   Section styles (dt-section, dt-h2, dt-stats) come from detailing.css. All sizes are fluid. */
.panel-page { --ink-1: #121111; --ink-2: #52525b; --ink-3: #a1a1aa; --line: #e4e4e7; --ease: cubic-bezier(.16, 1, .3, 1); }

/* ---------- Hero shell ---------- */
.panel-hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 96px var(--gutter) clamp(36px, 7vh, 80px); overflow: hidden; background: #f4f5f7; text-align: center; }
.panel-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hero-controls { position: relative; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.panel-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 24px; border-radius: 999px; background: var(--ink-1); color: #fff; font-family: Archivo, Arial, sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); transition: transform .22s var(--ease), background .2s; }
.panel-btn:hover { background: #000; transform: translateY(-1px); }
.panel-btn span { font-family: Arial, sans-serif; font-size: 15px; transition: transform .22s var(--ease); }
.panel-btn:hover span { transform: translateX(3px); }

/* Segmented control with a sliding thumb */
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .78); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .06); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--seg-count, 2)); border-radius: 999px; background: var(--ink-1); transform: translateX(calc(100% * var(--seg-index, 0))); transition: transform .5s var(--ease); }
.seg button { position: relative; z-index: 1; min-height: 36px; padding: 0 clamp(14px, 1.6vw, 20px); border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: color .35s; }
.seg button[aria-checked="true"] { color: #fff; }

/* ---------- PPF: stone-chip test ---------- */
.ppf-hero { justify-content: center; gap: clamp(28px, 6vh, 64px); cursor: crosshair; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  background:
    linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, .7) 46%, transparent 56%),
    radial-gradient(120% 95% at 30% 12%, #ffffff 0%, #f0f1f3 48%, #dfe2e6 100%); }
.ppf-title { position: relative; z-index: 0; margin: 0; padding: 0 .1em .04em 0; color: var(--ink-1); font-family: Archivo, 'Arial Black', Arial, sans-serif; font-size: clamp(120px, min(34vw, 46svh), 500px); font-weight: 900; font-style: italic; letter-spacing: -.085em; line-height: .82; text-transform: uppercase; }
/* The film: a sheet laid over the panel, visible by its edge and sheen. */
.ppf-film { position: absolute; inset: clamp(10px, 1.4vw, 20px); z-index: 2; border-radius: clamp(14px, 2vw, 28px); pointer-events: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07), inset 0 1px 0 rgba(255, 255, 255, .9); background: linear-gradient(160deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 45%); opacity: 0; transition: opacity .6s var(--ease); }
.ppf-hero[data-film="on"] .ppf-film { opacity: 1; }
.ppf-hero .hero-controls { position: absolute; left: 0; right: 0; bottom: clamp(36px, 7vh, 80px); }

/* ---------- Coverage map (PPF) ---------- */
.cov-stage { position: relative; display: grid; place-items: center; padding: clamp(10px, 3vw, 40px) 0; }
.cov-car { width: min(100%, 880px); height: auto; overflow: visible; }
.cov-car .zone { fill: #eceef1; stroke: #fff; stroke-width: 1.6; transition: fill .45s var(--ease) var(--d, 0s); }
.cov-car .zone.is-on { fill: var(--ink-1); }
.cov-car .glass { fill: #d6dbe1; stroke: #fff; stroke-width: 1.6; }
.cov-car .shadow { fill: rgba(0, 0, 0, .06); filter: blur(8px); }
.cov-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: clamp(18px, 3vw, 40px); }
.cov-controls .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cov-meta { display: flex; align-items: baseline; gap: 18px; }
.cov-count { color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.cov-price { color: var(--ink-1); font-family: Archivo, Arial, sans-serif; font-size: clamp(22px, 2.4vw, 32px); font-weight: 800; letter-spacing: -.03em; }

/* ---------- Layer stack (Ceramics) ---------- */
.layers { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 6vw, 110px); }
.layer-stage { display: grid; place-items: center; min-height: clamp(280px, 38vw, 520px); perspective: 1600px; }
.layer-stack { --gap: clamp(20px, 2.8vw, 40px); position: relative; width: clamp(190px, 24vw, 330px); aspect-ratio: 4 / 3; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-36deg); animation: stack-float 9s ease-in-out infinite; }
@keyframes stack-float { 50% { transform: rotateX(56deg) rotateZ(-30deg) translateZ(12px); } }
.slab { position: absolute; inset: 0; border-radius: 18px; transform: translateZ(calc(var(--i, 0) * var(--gap))); transition: transform .8s var(--ease), opacity .5s ease; }
.slab--paint { background: linear-gradient(135deg, #2c2e33, #0c0c0e); box-shadow: 0 40px 70px rgba(0, 0, 0, .22); }
.slab--coat { background: linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(226, 232, 238, .4)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95), 0 0 0 1px rgba(0, 0, 0, .08); }
.slab--top { background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(205, 238, 248, .5)); box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px rgba(0, 150, 190, .2); }
.slab.is-off { opacity: 0; transform: translateZ(calc(var(--i, 0) * var(--gap) + 70px)); }
.pkg-options { border-top: 1px solid var(--line); }
.pkg-option { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px; width: 100%; padding: clamp(16px, 1.8vw, 24px) 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink-3); font: inherit; text-align: left; cursor: pointer; transition: color .3s; }
.pkg-option:hover, .pkg-option[aria-checked="true"] { color: var(--ink-1); }
.opt-name { font-family: Archivo, Manrope, Arial, sans-serif; font-size: clamp(26px, 3.2vw, 46px); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.opt-price { font-family: Archivo, Arial, sans-serif; font-size: clamp(13px, 1.1vw, 15px); font-weight: 800; }
.opt-detail { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; color: var(--ink-2); font-size: clamp(13px, 1.05vw, 14.5px); transition: grid-template-rows .45s var(--ease); }
.opt-detail > span { overflow: hidden; }
.pkg-option[aria-checked="true"] .opt-detail { grid-template-rows: 1fr; }
.pkg-option[aria-checked="true"] .opt-detail > span { padding-top: 8px; }

/* Switch */
.addon { display: flex; align-items: center; gap: 14px; margin-top: clamp(20px, 2.4vw, 32px); color: var(--ink-1); font-size: 15px; font-weight: 600; cursor: pointer; }
.addon .opt-price { margin-left: auto; }
.switch { position: relative; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 999px; background: #e4e4e7; appearance: none; -webkit-appearance: none; cursor: pointer; transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .4s var(--ease); }
.switch:checked { background: var(--ink-1); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- Photo slots (replace a figure's contents with <img>) ---------- */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.6vw, 22px); }
.photo-slot { position: relative; display: grid; place-items: center; margin: 0; border-radius: clamp(6px, 1vw, 14px); background: #f4f4f5; overflow: hidden; }
.photo-slot--wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.photo-slot--tall { aspect-ratio: 4 / 5; }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot-label { color: var(--ink-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }

.dt-stats--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 860px) {
  .layers { grid-template-columns: 1fr; }
  .cov-controls { justify-content: center; }
}
@media (max-width: 600px) {
  .photo-slot--wide { aspect-ratio: 16 / 10; }
  .dt-stats--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 520px) { .panel-hero { padding-top: 72px; padding-bottom: 28px; } .ppf-hero .hero-controls { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .layer-stack { animation: none; } }
.cov-car .zone[data-zone^="headlight"] { fill: #dfe2e6; }
.cov-car .zone[data-zone^="headlight"].is-on { fill: #4b4f56; }

/* ======================= Customs ======================= */
.customs-hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 96px var(--gutter) clamp(32px, 6vh, 64px); overflow: hidden; background: radial-gradient(110% 80% at 50% 20%, #ffffff 0%, #f3f4f6 60%, #e9ebee 100%); text-align: center; }
.customs-title { position: relative; z-index: 0; margin: 0; padding: 0 .1em .04em 0; color: var(--ink-1); font-family: Archivo, 'Arial Black', Arial, sans-serif; font-size: clamp(76px, min(19vw, 28svh), 320px); font-weight: 900; font-style: italic; letter-spacing: -.085em; line-height: .82; text-transform: uppercase; }
.wrap-stage { --wrap-color: #151517; position: relative; z-index: 1; width: min(100%, 1120px, calc((100svh - 330px) * 2.73)); min-width: min(100%, 300px); aspect-ratio: 2072 / 759; margin-top: calc(-1 * clamp(26px, 5.4vw, 96px)); }
.wrap-stage::after { content: ""; position: absolute; left: 8%; right: 6%; bottom: 1%; height: 9%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0)); filter: blur(6px); }
.wrap-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.wrap-stage.is-ready canvas { opacity: 1; }
.wrap-over { clip-path: inset(0 100% 0 0); }
.wrap-line { position: absolute; top: 4%; bottom: 4%; left: 0; width: 2px; border-radius: 2px; background: linear-gradient(180deg, transparent, var(--wrap-color) 20%, var(--wrap-color) 80%, transparent); box-shadow: 0 0 18px var(--wrap-color); opacity: 0; pointer-events: none; }
.wrap-stage.is-wiping .wrap-over { animation: wrap-wipe .9s cubic-bezier(.65, 0, .35, 1) forwards; }
.wrap-stage.is-wiping .wrap-line { animation: wrap-line .9s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes wrap-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wrap-line { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.wrap-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: clamp(18px, 4vh, 44px); }
.swatches { display: flex; gap: 10px; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .78); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .06); }
.swatch { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), inset 0 6px 10px rgba(255, 255, 255, .25); cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 2px #fff, 0 0 0 3.5px var(--ink-1); }

.hover-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.hover-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: clamp(14px, 1.8vw, 26px) 0; border-bottom: 1px solid var(--line); transition: opacity .35s; }
.hl-name { color: var(--ink-1); font-family: Archivo, Manrope, Arial, sans-serif; font-size: clamp(30px, 5.2vw, 84px); font-weight: 800; letter-spacing: -.05em; word-spacing: .1em; line-height: 1; transition: transform .45s var(--ease); }
.hl-price { flex: none; color: var(--ink-1); font-family: Archivo, Arial, sans-serif; font-size: clamp(13px, 1.1vw, 15px); font-weight: 800; text-align: right; white-space: nowrap; }
.hl-price small { display: block; margin-top: 4px; color: var(--ink-3); font-family: Manrope, Arial, sans-serif; font-size: 12px; font-weight: 600; }
@media (hover: hover) {
  .hover-list:hover li:not(:hover) { opacity: .28; }
  .hover-list li:hover .hl-name { transform: translateX(clamp(8px, 1.4vw, 20px)); }
}
.hover-preview { position: fixed; left: 0; top: 0; z-index: 30; width: clamp(220px, 22vw, 340px); aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; scale: .86; box-shadow: 0 24px 60px rgba(0, 0, 0, .18); transition: opacity .25s ease, scale .4s var(--ease); }
.hover-preview.is-on { opacity: 1; scale: 1; }
.hover-preview img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }

/* ======================= Gallery ======================= */
.gallery-hero { padding: clamp(120px, 18vh, 170px) 0 clamp(28px, 4vw, 48px); }
.gallery-title { margin: 0 0 clamp(22px, 3.4vw, 44px); padding: 0 .1em .04em 0; color: var(--ink-1); font-family: Archivo, 'Arial Black', Arial, sans-serif; font-size: clamp(56px, 17vw, 290px); font-weight: 900; font-style: italic; letter-spacing: -.085em; line-height: .82; text-transform: uppercase; }
.gallery-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.seg-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px; }
.seg-scroll::-webkit-scrollbar { display: none; }
.gallery-count { color: var(--ink-3); font-family: Archivo, Arial, sans-serif; font-size: clamp(28px, 3vw, 44px); font-weight: 900; font-style: italic; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.g-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(130px, 15vw, 250px); grid-auto-flow: dense; gap: clamp(8px, 1.2vw, 16px); padding-bottom: var(--dt-space); }
.g-tile { position: relative; display: block; padding: 0; border: 0; border-radius: clamp(6px, .9vw, 12px); background: none; overflow: hidden; cursor: zoom-in; font: inherit; text-align: left; }
.g-tile.tall { grid-row: span 2; }
.g-tile.wide { grid-column: span 2; }
.g-tile.big { grid-row: span 2; grid-column: span 2; }
.g-media { position: absolute; inset: 0; display: grid; place-items: center; background: #f4f4f5; transition: transform .7s var(--ease); }
.g-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-cap { position: absolute; left: 12px; bottom: 12px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .88); color: var(--ink-1); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease); }
@media (hover: hover) {
  .g-tile:hover .g-media { transform: scale(1.035); }
  .g-tile:hover .g-cap { opacity: 1; transform: none; }
}
.g-tile:focus-visible .g-cap { opacity: 1; transform: none; }

.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: clamp(16px, 3vw, 40px); border: 0; background: rgba(255, 255, 255, .94); color: var(--ink-1); }
.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; gap: 16px; }
.viewer::backdrop { background: rgba(255, 255, 255, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.viewer-meta { color: var(--ink-2); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.viewer-stage { display: grid; place-items: center; min-height: 0; }
.viewer-frame { --arn: 1.333; position: relative; width: min(100%, calc((100dvh - 200px) * var(--arn))); border-radius: clamp(8px, 1vw, 14px); overflow: hidden; }
.viewer-frame .g-media { transition: none; }
.viewer-btns { display: flex; gap: 8px; }
.viewer-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink-1); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); font: inherit; font-size: 18px; cursor: pointer; transition: background .2s, color .2s; }
.viewer-btn:hover { background: var(--ink-1); color: #fff; }

@media (max-width: 700px) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 42vw; }
  .g-tile.wide, .g-tile.big { grid-column: span 2; }
  .gallery-bar { flex-direction: column-reverse; align-items: flex-start; }
  .g-cap { opacity: 1; transform: none; left: 8px; bottom: 8px; font-size: 9.5px; }
}
@media (max-height: 520px) { .customs-hero { padding-top: 72px; } .wrap-stage { margin-top: -20px; } }
