/* themes.css — "Showroom", the site's chosen style (Nov 2026).
   Applied through <html data-theme="showroom"> in partials/layout.html.
   site.css holds the base layout and the navy "Blueprint" palette underneath; this file overrides it.
   Light pages, serif headlines echoing the API wordmark, and the rotating 3D Freedom plate on the home page. */

.brand-logo-color { display: none; }

[data-theme="showroom"] {
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --photo-bg: #E8EEF8;
}
[data-theme="showroom"] h1,
[data-theme="showroom"] h2 { font-family: var(--display); font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--hull-2); }
[data-theme="showroom"] h1 { font-size: clamp(2.8rem, 1.6rem + 4.4vw, 5.4rem); line-height: .98; max-width: 13ch; text-wrap: balance; }
[data-theme="showroom"] h2 { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.9rem); line-height: 1.05; }
[data-theme="showroom"] h3 { font-stretch: 100%; }

/* Header: white bar, color logo */
[data-theme="showroom"] .site-header { background: #FFFFFF; color: var(--ink); border-bottom: 1px solid var(--rule); }
[data-theme="showroom"] .site-header .brand-logo-white { display: none; }
[data-theme="showroom"] .site-header .brand-logo-color { display: block; }
[data-theme="showroom"] .site-nav a,
[data-theme="showroom"] .menu-btn { color: var(--ink); }
[data-theme="showroom"] .site-nav a:hover,
[data-theme="showroom"] .menu-btn:hover { background: var(--gelcoat); color: var(--ink); }
[data-theme="showroom"] .site-nav .nav-cta .btn { color: #FFFFFF; }
[data-theme="showroom"] .nav-toggle { color: var(--ink); border-color: var(--rule); }

/* Hero: light studio backdrop with the rotating plate */
[data-theme="showroom"] .hero {
  background: radial-gradient(ellipse 70% 80% at 72% 45%, #FFFFFF 0%, var(--photo-bg) 60%, #DCE4F0 100%);
  color: var(--ink); padding-top: clamp(32px, 5vw, 64px); overflow: hidden;
}
[data-theme="showroom"] .hero h1 { color: var(--hull-2); }
[data-theme="showroom"] .hero .lede { color: #3C4A5C; }
[data-theme="showroom"] .hero .btn-ghost-light,
[data-theme="showroom"] .cta-band .btn-ghost-light { border-color: var(--hull-2); color: var(--hull-2); }
[data-theme="showroom"] .hero .btn-ghost-light:hover,
[data-theme="showroom"] .cta-band .btn-ghost-light:hover { background: var(--hull-2); color: #FFFFFF; }
[data-theme="showroom"] .hero-proof { border-top-color: rgba(27,51,96,.15); }
[data-theme="showroom"] .hero-proof p { color: var(--muted); }
[data-theme="showroom"] .hero-proof strong { color: var(--hull-2); }

/* Page heads */
[data-theme="showroom"] .page-head { background: var(--photo-bg); color: var(--ink); }
[data-theme="showroom"] .page-head .lede { color: #3C4A5C; }
[data-theme="showroom"] .crumb, [data-theme="showroom"] .crumb a { color: var(--muted); }
[data-theme="showroom"] .page-head.page-head-dark { background: var(--hull); color: #FFFFFF; }
[data-theme="showroom"] .page-head.page-head-dark h1 { color: #FFFFFF; }
[data-theme="showroom"] .page-head.page-head-dark .lede { color: var(--billet-2); }
[data-theme="showroom"] .page-head.page-head-dark .crumb,
[data-theme="showroom"] .page-head.page-head-dark .crumb a { color: var(--billet); }

/* Sections */
[data-theme="showroom"] .section-steel { background: #F2F4F7; }
[data-theme="showroom"] .cta-band { background: #FFFFFF; color: var(--ink); border-top: 1px solid var(--rule); }
[data-theme="showroom"] .cta-band p { color: var(--muted); }
[data-theme="showroom"] .steps li::before { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 2.6rem; }
[data-theme="showroom"] .path { border-top: 1px solid var(--hull-2); }

@media (max-width: 960px) {
  [data-theme="showroom"] .site-nav { background: #FFFFFF; }
  [data-theme="showroom"] .menu a { color: var(--ink); }
  [data-theme="showroom"] .menu a:hover { background: var(--gelcoat); color: var(--ink); }
}

/* ---------- Rotating 3D jack plate (plate3d.js) ---------- */
.plate3d { position: relative; margin: 0; width: 100%; max-width: 640px; aspect-ratio: 1 / 1; justify-self: end; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.plate3d.is-grabbing { cursor: grabbing; }
.plate3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.plate3d::before {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: 7%; height: 8%; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(19, 40, 74, .42), rgba(19, 40, 74, 0) 70%);
  transform: scaleX(var(--shadow-scale, 1)); opacity: var(--shadow-opacity, .6);
}
.plate3d-fallback { display: none; }
.ar-btn { position: absolute; top: 10px; right: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgba(12, 22, 38, 0.82); color: #fff; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; line-height: 1; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); cursor: pointer; }
.ar-btn img { display: block; width: 18px; height: 18px; }
.ar-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.plate3d.plate3d-failed canvas { display: none; }
.plate3d.plate3d-failed .plate3d-fallback { display: block; width: 100%; height: 100%; object-fit: contain; }
.plate3d.plate3d-failed::before { display: none; }
.plate3d figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: center;
  font-size: var(--t-xs); color: var(--muted); opacity: 0; transition: opacity .6s ease 2.4s;
}
.plate3d.is-live figcaption { opacity: 1; }
.plate3d.plate3d-failed figcaption { display: none; }
@media (max-width: 960px) {
  .plate3d { justify-self: center; max-width: 480px; }
}


/* Illuminated cleat preview over the real photo (lit red). A masked copy of the photo covers only the
   cleat and its spill on the deck; each mode shifts that copy's color, so the rest of the scene is untouched. */
.cleat-demo .glow { display: none; }
.cleat-tint {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 21% 14% at 57% 51%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 21% 14% at 57% 51%, #000 55%, transparent 100%);
}
.media.is-empty .cleat-tint { display: none; }
.cleat-demo[data-mode="dock"] .cleat-tint { filter: saturate(.25) brightness(1.45) contrast(1.05); }
.cleat-demo[data-mode="tow"] .cleat-tint { filter: hue-rotate(46deg) saturate(1.6) brightness(1.2); animation: tint-pulse 1.8s ease-in-out infinite; }
.cleat-demo[data-mode="emergency"] .cleat-tint { filter: saturate(1.3) brightness(1.35); animation: tint-strobe 1.2s steps(1) infinite; }
.cleat-demo[data-mode="ambient"] .cleat-tint { animation: tint-hue 9s linear infinite; }
@keyframes tint-pulse { 50% { filter: hue-rotate(46deg) saturate(1.6) brightness(.55); } }
@keyframes tint-strobe { 0%, 30% { filter: saturate(1.4) brightness(1.5); } 15%, 45%, 100% { filter: brightness(.35) saturate(.6); } }
@keyframes tint-hue { from { filter: hue-rotate(0deg) saturate(1.4); } to { filter: hue-rotate(360deg) saturate(1.4); } }
@media (prefers-reduced-motion: reduce) { .cleat-tint { animation: none !important; } }

/* 3D cleats on the pull-up cleat page */
.plate3d-flat { aspect-ratio: 4 / 3; justify-self: stretch; max-width: none; }
.plate3d-flat[hidden] { display: none; }
.model-switch { display: flex; flex-direction: column; gap: 10px; }
.seg-light { border-color: var(--rule); align-self: flex-start; }
.seg-light .seg-btn { color: var(--ink); }
.seg-light .seg-btn[aria-pressed="true"] { color: #FFFFFF; }
.seg-wrap { flex-wrap: wrap; }

/* Home product cards: 3D viewers and photos share one frame shape and a soft studio panel */
[data-theme="showroom"] .line .media,
[data-theme="showroom"] .line .plate3d-flat { aspect-ratio: 4 / 3; }
[data-theme="showroom"] .line .plate3d-flat { background: radial-gradient(120% 90% at 50% 35%, #ffffff 0%, #eef1f5 60%, #e3e8ee 100%); border-radius: var(--radius); overflow: hidden; }

/* Illuminated cleat hero: 3D cleat on the dark page head, lens lit by the mode buttons */
.cleat-3d { aspect-ratio: 16 / 10; border-radius: var(--radius); background: radial-gradient(90% 80% at 50% 45%, #2a3550 0%, #121a2b 60%, #0b1220 100%); overflow: hidden; }
.cleat-3d figcaption { color: rgba(255,255,255,.6); }

/* Product gallery: photo grid + full-screen viewer (site.js) */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.gallery:has(> li:nth-child(4)) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gallery-one { grid-template-columns: minmax(0, 560px); }
.gallery li { margin: 0; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: #e9edf2; cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); }
.gallery a:focus-visible { outline: 3px solid #B41E44; outline-offset: 3px; }

.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 12, 20, .94); color: #fff; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; min-height: 0; display: grid; place-items: center; padding: 56px 64px 8px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-cap { text-align: center; padding: 10px 16px 22px; font-size: .95rem; color: rgba(255,255,255,.8); }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.1); color: #fff; width: 48px; height: 48px; border-radius: 50%; font: 400 26px/1 system-ui, sans-serif; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255,255,255,.22); outline: none; }
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox.lb-single .lb-prev, .lightbox.lb-single .lb-next { display: none; }
@media (max-width: 640px) { .lightbox figure { padding: 60px 8px 4px; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 64px; transform: none; } }

/* Jack plate card: one-line lab-test proof linking to the full results on the jack plates page */
.line-proof { display: block; margin-top: 14px; padding: 10px 14px; border-left: 3px solid #B41E44; background: #f4f6f9; border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink, #1B3360); text-decoration: none; font-size: var(--t-sm, .95rem); line-height: 1.45; }
.line-proof strong { font-weight: 700; }
.line-proof span { color: #B41E44; font-weight: 600; white-space: nowrap; }
.line-proof span::after { content: " \2192"; }
.line-proof:hover span, .line-proof:focus-visible span { text-decoration: underline; }

/* Comparison tables: scroll sideways on phones instead of squeezing */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { min-width: 720px; }
.compare-table thead th:nth-child(2), .compare-table tbody td:nth-child(2) { background: rgba(180, 30, 68, .05); font-weight: 600; }
.compare-table tbody th { width: 18%; }
.compare-table td { padding-left: 12px; }
.builder-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.builder-list li { padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); font-weight: 650; }
.section-compact { padding-block: 20px; border-top: 1px solid var(--rule); }

/* Copy deterrent: no selection or iOS long-press save on product media */
img, canvas, .plate3d, .gallery a { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }

/* Slogan accents */
.kicker { margin: 0 0 6px; font-size: var(--t-xs, .8rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #B41E44; }
.hero-proof .proof-line { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.35rem; font-weight: 600; font-style: italic; margin-bottom: 4px; color: inherit; }

/* Finish switch */
.seg-finish .seg-btn { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); flex: none; }
.swatch-black { background: radial-gradient(circle at 35% 30%, #5a5f66, #1d2024 70%); }
.swatch-silver { background: linear-gradient(135deg, #f4f6f8 0%, #b9bec4 45%, #e3e6e9 60%, #9fa5ab 100%); }
.media-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.media-controls .seg { margin-bottom: 0; }
.page-head-dark .seg-finish, .cleat-demo .seg-finish { border-color: rgba(255,255,255,.3); }
.cleat-demo .seg-finish .seg-btn { color: #fff; }

/* Credentials chips (custom manufacturing) */
.cred-list { list-style: none; padding: 0; margin: 18px 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.cred-list li { margin: 0; padding: 7px 12px; border: 1px solid var(--rule); border-left: 3px solid #B41E44; border-radius: 0 var(--radius) var(--radius) 0; font-size: var(--t-sm, .95rem); font-weight: 650; background: #fff; }

/* Certification badges */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 18px 0 12px; }
.badges img { height: 96px; width: auto; }
.badges-sm img { height: 64px; }
.badges img[src*="aegis"] { height: 72px; }
.badges-sm img[src*="aegis"] { height: 48px; }

/* Footer column headings: the showroom h2 style made them navy on navy */
[data-theme="showroom"] .site-footer .footer-h { font-family: var(--font, Archivo, sans-serif); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #FFFFFF; margin: 0 0 14px; line-height: 1.3; }
