.viewer-body { background: #1c1a17; color: #fff; overflow: hidden; }
.viewer-body, html { height: 100%; }

.gate { position: fixed; inset: 0; background: linear-gradient(180deg, #1c1a17 0%, #2a2620 100%); display: flex; align-items: center; justify-content: center; color: #fff; }
.gate-brand { position: absolute; top: 22px; left: 22px; right: 22px; display: flex; justify-content: space-between; align-items: center; }
.gate-card { width: 360px; max-width: 92vw; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 28px; backdrop-filter: blur(20px); }
.gate-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.gate-icon .icon { width: 20px; height: 20px; color: #fff; }
.gate-title { font-family: var(--font-serif); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.gate-sub { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 4px; line-height: 1.5; }
.gate-field-label { font-size: 10px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .15em; margin-bottom: 6px; margin-top: 20px; }
.gate-field { height: 40px; padding: 0 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.gate-field input { flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; letter-spacing: 0.05em; }
.gate-field .icon { width: 14px; height: 14px; color: rgba(255,255,255,.5); cursor: pointer; }
.gate-cta { width: 100%; margin-top: 16px; height: 40px; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-family: inherit; }
.gate-cta:hover { background: oklch(0.55 0.14 35); }
.gate-cta:disabled { opacity: .6; cursor: not-allowed; }
.gate-cta .icon { width: 14px; height: 14px; }
.gate-meta { margin-top: 14px; font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,.4); display: flex; justify-content: space-between; }
.gate-meta .icon { width: 10px; height: 10px; vertical-align: middle; }
.gate-error { color: #ff8a72; font-size: 12px; margin-top: 8px; }

.viewer-shell { position: fixed; inset: 0; overflow: hidden; }
.viewer-toolbar { position: absolute; top: 0; left: 0; right: 0; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; z-index: 30; pointer-events: none; }
.viewer-toolbar > * { pointer-events: auto; }
.viewer-title { display: flex; align-items: center; gap: 10px; color: var(--toolbar-fg, #fff); }
.viewer-title-text { font-family: var(--font-serif); font-size: 14px; font-weight: 500; }
.viewer-title-page { font-size: 10px; color: var(--toolbar-sub, rgba(255,255,255,.6)); font-family: var(--font-mono); }
.viewer-actions { display: flex; align-items: center; gap: 14px; color: var(--toolbar-fg, #fff); }
.viewer-actions button { background: transparent; border: 0; padding: 0; color: inherit; cursor: pointer; display: flex; align-items: center; }
.viewer-actions .icon { width: 15px; height: 15px; }

.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 22px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 30; transition: background .12s; }
.nav-arrow:hover { background: rgba(255,255,255,.18); }
.nav-arrow.left { left: 22px; }
.nav-arrow.right { right: 22px; }
.nav-arrow.light { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.12); color: var(--ink); }
.nav-arrow.light:hover { background: rgba(0,0,0,.12); }
.nav-arrow:disabled { opacity: .3; cursor: not-allowed; }

.thumb-strip { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 22px 14px; background: linear-gradient(to top, rgba(0,0,0,.5), transparent); display: flex; gap: 4px; justify-content: center; z-index: 20; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.thumb-strip::-webkit-scrollbar { display: none; }
.thumb { width: 22px; height: 30px; border-radius: 1px; background: #fff; opacity: .35; flex-shrink: 0; cursor: pointer; transition: opacity .12s; border: 0; padding: 0; }
.thumb:hover { opacity: .8; }
.thumb.active { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.thumb-strip.light { background: linear-gradient(to top, rgba(255,255,255,.85), transparent); }
.thumb-strip.light .thumb { background: var(--ink-2); }

.logo-edge { position: absolute; z-index: 25; display: flex; align-items: center; gap: 14px; padding: 10px 18px; pointer-events: none; font-family: var(--font-serif); font-weight: 600; color: #fff; letter-spacing: 0.02em; }
.logo-edge img { max-height: 18px; max-width: 80px; object-fit: contain; }
.logo-edge .divider { width: 1px; height: 14px; background: currentColor; opacity: .3; }
.logo-edge.top { top: 56px; left: 50%; transform: translateX(-50%); animation: logoSlideTop .6s cubic-bezier(.2,.7,.3,1) both; }
.logo-edge.bottom { bottom: 60px; left: 50%; transform: translateX(-50%); animation: logoSlideBottom .6s cubic-bezier(.2,.7,.3,1) both; }
.logo-edge.left { top: 50%; left: 14px; transform: translateY(-50%); flex-direction: column; gap: 10px; writing-mode: vertical-rl; padding: 18px 10px; animation: logoSlideLeft .6s cubic-bezier(.2,.7,.3,1) both; }
.logo-edge.right { top: 50%; right: 14px; transform: translateY(-50%); flex-direction: column; gap: 10px; writing-mode: vertical-rl; padding: 18px 10px; animation: logoSlideRight .6s cubic-bezier(.2,.7,.3,1) both; }
.logo-edge.left img, .logo-edge.right img { writing-mode: horizontal-tb; }
.logo-edge.left .divider, .logo-edge.right .divider { width: 14px; height: 1px; }
.logo-edge .client { animation-delay: .1s; }
.logo-edge.dark { color: var(--ink); }

.stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; }
/* Landscape phone — pull spread away from the notch / home-indicator
   safe areas so it doesn't render under them. iOS only applies these
   when <meta viewport-fit="cover">. */
@media (max-height: 500px) and (orientation: landscape) {
  .stage {
    padding-left:   env(safe-area-inset-left,   0px);
    padding-right:  env(safe-area-inset-right,  0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
canvas.page { background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.5); }

.flip-stage { perspective: 2400px; display: flex; align-items: center; justify-content: center; position: relative; }

/* Realistic-flip (StPageFlip) container */
.pf-book {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  margin: auto;
}
.pf-page {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--toolbar-fg, #fff);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  z-index: 5;
}
.viewer-has-custom-bg .pf-book { background: transparent !important; }
/* Mobile single-page flip — page is centered with breathing room above
   and below; no left/right margin (the page itself is 95% of viewport). */
.flip-stage.flip-mobile { perspective: 1800px; padding: 50px 0 60px; }
.flip-stage.flip-mobile .flip-page { box-shadow: 0 16px 40px rgba(0,0,0,.5); }
/* Landscape phone — edge-to-edge spread, no top/bottom padding (the
   .stage already handles safe-area), tighter shadow that doesn't bleed
   into the (small) side gutters. */
.flip-stage.flip-landscape { padding: 0; gap: 0; }
.flip-stage.flip-landscape .flip-page { box-shadow: 0 8px 24px rgba(0,0,0,.55); }
/* Landscape phone — hide every piece of floating chrome that would
   otherwise sit on top of the spread. The viewport is only ~390 px tall;
   any overlay (toolbar, template picker, thumbnail strip) noticeably
   covers the page. Arrows stay (they fade with idle). Users rotate
   to portrait if they need to switch template or jump pages. */
@media (max-height: 500px) and (orientation: landscape) {
  .viewer-toolbar,
  .template-picker,
  .thumb-strip { opacity: 0; pointer-events: none; }
}
.flip-spread { display: flex; transform-style: preserve-3d; }
.flip-page { position: relative; background: #fff; transform-style: preserve-3d; transform-origin: right center; backface-visibility: hidden; flex-shrink: 0; }
.flip-page > canvas { display: block; }
.flip-page.right { transform-origin: left center; }
.flip-page-shadow { position: absolute; inset: 0; pointer-events: none; }
.flip-page-shadow.l { background: linear-gradient(to right, rgba(0,0,0,0.18), transparent 25%); }
.flip-page-shadow.r { background: linear-gradient(to left, rgba(0,0,0,0.18), transparent 25%); }

/* SWIPE — Tinder-style card swipe.
   Card-stack with one .swipe-card-active on top (user manipulates),
   and up to two .swipe-card-under behind (next + prev pages). All
   sized inline by JS from `stage.getBoundingClientRect()` so the
   layout recalculates correctly on rotation and respects safe-area. */
.swipe-stack {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.swipe-card {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  transform-origin: center center;
  will-change: transform, opacity;
}
.swipe-card-under {
  pointer-events: none;
  transition: none;     /* JS owns the transitions during drag */
}
.swipe-card-active {
  cursor: grab;
  z-index: 10;
  touch-action: pan-y;
}
.swipe-card-active:active { cursor: grabbing; }
@media (max-width: 720px) {
  .swipe-card { border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.20); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .swipe-card { border-radius: 8px;  box-shadow: 0 6px 18px rgba(0,0,0,.22); }
}

.scroll-stage { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 80px 0 40px; scroll-behavior: smooth; }
.scroll-stage::-webkit-scrollbar { width: 0; }
/* Landscape phone: the toolbar is hidden here, so drop the big top gap and use a
   much tighter inter-page gap — keeps more of each page on screen and removes the
   dead space between pages that readers see after rotating into landscape. */
@media (max-height: 500px) and (orientation: landscape) {
  .scroll-stage { gap: 4px; padding: 14px 0 16px; }
}
.scroll-rail { position: absolute; right: 22px; top: 70px; bottom: 70px; width: 2px; background: rgba(255,255,255,.1); border-radius: 99px; z-index: 25; }
.scroll-rail-fill { width: 100%; background: var(--accent); border-radius: 99px; }

.spread-stage { display: flex; align-items: center; justify-content: center; }
.spread-pages { display: flex; transition: opacity .25s; }
.spread-pages > canvas { box-shadow: 0 16px 40px rgba(0,0,0,.18); background: #fff; }
.spread-stage.spread-mobile > canvas { box-shadow: 0 8px 24px rgba(0,0,0,.18); background: #fff; }
.spread-stage.spread-landscape .spread-pages > canvas { box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.spread-blank { flex-shrink: 0; background: transparent; pointer-events: none; }
.spread-controls { position: absolute; bottom: 60px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 25; }
.spread-controls .btn { border-radius: 99px; height: 36px; }

/* KIOSK — Unattended auto-playing display. No chrome, single page
   fullscreen, auto-advances on a timer, click toggles pause. */
.kiosk-stage {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
  cursor: pointer;
}
.kiosk-page {
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  flex: 1; min-height: 0;
  width: 100%;
}
.kiosk-page canvas {
  max-width: 100%; max-height: 100%;
  box-shadow: 0 16px 50px rgba(0,0,0,.45);
}

/* Pause/play indicator — only visible briefly when toggled */
.kiosk-pause-badge {
  position: absolute; top: 28px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.7);
  color: #fff; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .15em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 99px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  z-index: 50;
}
.kiosk-pause-badge.show { opacity: 1; }

/* Transparent nav-arrows in kiosk mode (correct placement: viewport
   edges left/right, vertically centered with the page). The body gets
   `viewer-kiosk-mode` from renderViewer so the rule scopes correctly. */
.viewer-kiosk-mode .nav-arrow {
  background: transparent;
  border-color: transparent;
  color: #fff;
}
.viewer-kiosk-mode .nav-arrow:hover {
  background: rgba(255,255,255,.08);
}
/* Auto-hide chrome when the reader's idle. The body gets `viewer-idle` after
   2.5s of no mouse / touch / keyboard activity. Hovering on any chrome
   element keeps it visible (via :has selector) so users can read the title
   or click a button without it disappearing under their cursor. */
.viewer-idle .kiosk-meta,
.viewer-idle .viewer-toolbar,
.viewer-idle .nav-arrow,
.viewer-idle .thumb-strip,
.viewer-idle .template-picker,
.viewer-idle .spread-controls {
  opacity: 0;
  pointer-events: none;
}
.viewer-idle .kiosk-meta   { transform: translateX(8px); }
.viewer-idle .viewer-toolbar { transform: translateY(-6px); }
.viewer-idle .thumb-strip,
.viewer-idle .spread-controls { transform: translateY(8px); }
.viewer-toolbar, .nav-arrow, .thumb-strip, .template-picker, .spread-controls {
  transition: opacity .35s ease, transform .35s ease;
}

.tag { position: absolute; bottom: 14px; left: 14px; font-family: var(--font-mono); font-size: 9px; padding: 4px 8px; border-radius: 4px; background: rgba(255,255,255,.1); color: #fff; letter-spacing: .1em; text-transform: uppercase; z-index: 30; }
.tag.dark { background: rgba(0,0,0,.06); color: var(--ink-2); }

.viewer-light .viewer-actions { color: var(--ink); }
.viewer-light .viewer-title { color: var(--ink); }
.viewer-light .viewer-title-page { color: var(--ink-3); }

/* Template picker — icon buttons. Top-right (below the toolbar) so it
   never overlaps thumb strips (flip / swipe), spread controls (spread),
   or kiosk's right-side meta panel with Prev/Next buttons. */
.template-picker {
  position: absolute; top: 56px; right: 18px;
  display: flex; gap: 2px; padding: 4px;
  border-radius: 10px;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08);
  z-index: 30;
}
.template-picker.light {
  background: rgba(255,255,255,.78);
  border-color: rgba(0,0,0,.06);
  box-shadow: 0 6px 18px rgba(20,15,10,.12);
}
.tpl-pick {
  appearance: none; border: 0; background: transparent;
  color: rgba(255,255,255,.55); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 10px; min-width: 56px; border-radius: 7px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  transition: background .15s, color .15s, transform .15s;
}
.tpl-pick svg { width: 20px; height: 20px; transition: transform .15s; }
.tpl-pick:hover { color: #fff; background: rgba(255,255,255,.06); }
.tpl-pick:hover svg { transform: scale(1.08); }
.tpl-pick.active {
  color: #fff; background: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.template-picker.light .tpl-pick { color: var(--ink-3); }
.template-picker.light .tpl-pick:hover { color: var(--ink); background: rgba(0,0,0,.05); }
.template-picker.light .tpl-pick.active { color: #fff; background: var(--accent); }
.tpl-pick-label { line-height: 1; }

@media (max-width: 720px) {
  .template-picker { top: 50px; right: 8px; }
  .tpl-pick { min-width: 44px; padding: 6px 6px; }
  .tpl-pick svg { width: 16px; height: 16px; }
  .tpl-pick-label { font-size: 8px; }
}

/* ─── Custom-background mode ─────────────────────────────────────────────
   When the admin sets a viewer background (color/gradient/image/video),
   the body element carries `viewer-has-custom-bg` AND the bg lives on
   <body> (lowest layer). Every intermediate layer must be transparent so
   the bg shows through. Inline styles on these elements (set by the
   template renderers as their default) are overridden via !important. */
.viewer-has-custom-bg .viewer-shell,
.viewer-has-custom-bg .stage,
.viewer-has-custom-bg .flip-stage,
.viewer-has-custom-bg .swipe-stack,
.viewer-has-custom-bg .scroll-stage,
.viewer-has-custom-bg .spread-stage,
.viewer-has-custom-bg .kiosk-stage,
.viewer-has-custom-bg .cat-menu {
  background: transparent !important;
  background-image: none !important;
}

/* Kiosk frame + page area also disappear so the bg fills the whole
   viewport. The meta panel keeps a translucent fill + backdrop blur so
   the title and Prev/Next buttons remain legible against any bg. */
.viewer-has-custom-bg .kiosk-frame {
  background: transparent !important;
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.viewer-has-custom-bg .kiosk-page {
  background: transparent !important;
}
.viewer-has-custom-bg .kiosk-meta {
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Body keeps its CSS bg (#1c1a17) when no custom bg is set. With custom,
   inline styles set in JS take precedence. The fixed positioning of the
   bg image keeps it pinned during scroll-template scrolling. */
.viewer-has-custom-bg.viewer-body {
  background-attachment: fixed;
}

.viewer-loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: rgba(255,255,255,.7); font-size: 13px; background: #1c1a17; z-index: 100; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.expired { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #1c1a17 0%, #2a2620 100%); color: #fff; text-align: center; padding: 24px; }
.expired h1 { font-family: var(--font-serif); font-weight: 500; margin-bottom: 8px; }
.expired p { color: rgba(255,255,255,.6); }

/* Download modal */
.dl-overlay {
  position: fixed; inset: 0; background: rgba(20,15,10,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px;
  animation: dlFade .15s ease-out;
}
@keyframes dlFade { from { opacity: 0 } to { opacity: 1 } }
.dl-card {
  width: min(440px, 100%);
  background: #fff; color: var(--ink);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  font-family: var(--font-sans);
  animation: dlIn .2s cubic-bezier(.2,.7,.3,1);
}
@keyframes dlIn { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }
.dl-head {
  background: #5a5550; color: #fff;
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
}
.dl-head-title { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.dl-head-title .icon { width: 18px; height: 18px; }
.dl-close { background: transparent; border: 0; color: #fff; cursor: pointer; padding: 4px; opacity: .8; }
.dl-close:hover { opacity: 1; }
.dl-close .icon { width: 16px; height: 16px; }
.dl-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.dl-full {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 4px;
  background: #f6f4ef; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: background .12s, border-color .12s;
}
.dl-full:hover { background: #efebe2; border-color: var(--line-2); }
.dl-full-icon { flex-shrink: 0; }
.dl-full-meta { flex: 1; min-width: 0; }
.dl-full-title { font-weight: 600; font-size: 14px; }
.dl-full-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.dl-link {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 4px; text-decoration: none;
  color: var(--ink-2); font-size: 14px;
  border-bottom: 1px solid transparent;
}
.dl-link:hover { color: var(--ink); }
.dl-link-icon { color: var(--ink-3); display: inline-flex; }
.dl-link-icon .icon { width: 14px; height: 16px; }
.dl-link-label { text-decoration: underline; text-underline-offset: 2px; }
.dl-link:hover .dl-link-label { text-decoration-thickness: 1.5px; }
.dl-disabled {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: #faf7f2; border: 1px dashed var(--line-2);
  border-radius: 4px; font-size: 12px; color: var(--ink-3);
}
.dl-disabled .icon { width: 14px; height: 14px; }

/* ─── Collection catalog menu (landing page) ──────────────────────────────── */
.cat-menu { position: fixed; inset: 0; overflow-y: auto; background: linear-gradient(180deg, #1c1a17 0%, #14110d 100%); color: #fff; }
.cat-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: clamp(32px, 7vh, 88px) clamp(20px, 5vw, 56px) 80px; }
.cat-up { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 9px; margin-bottom: 18px; border-radius: 18px; border: 1px solid rgba(255,255,255,.2); background: rgba(20,17,13,.55); backdrop-filter: blur(10px); color: #fff; font-family: var(--font-sans); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s ease; }
.cat-up:hover { background: rgba(20,17,13,.8); }
.cat-up-ico { display: inline-flex; }
.cat-up-ico svg { width: 16px; height: 16px; }
.viewer-light .cat-up, .cat-menu.light .cat-up { border-color: rgba(0,0,0,.14); background: rgba(255,255,255,.7); color: #1c1a17; }
.cat-brand { display: flex; align-items: center; gap: 18px; min-height: 28px; margin-bottom: clamp(28px, 6vh, 64px); opacity: .9; flex-wrap: wrap; }
.cat-brand img { max-height: 34px; max-width: 200px; width: auto; height: auto; object-fit: contain; }
.cat-title { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.02em; font-size: clamp(30px, 5vw, 52px); line-height: 1.05; margin: 0; }
.cat-sub { font-size: clamp(14px, 1.6vw, 17px); color: rgba(255,255,255,.6); margin: 14px 0 0; max-width: 60ch; line-height: 1.5; }
.cat-empty { margin-top: 40px; color: rgba(255,255,255,.5); font-family: var(--font-mono); font-size: 13px; }

/* Grid layout — cover cards */
.cat-grid { margin-top: clamp(28px, 5vh, 52px); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(16px, 2vw, 26px); }
.cat-grid.no-label .cat-card-meta { display: none; }   /* curtain / mosaic: hide the card label when turned off */
.cat-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.03); color: #fff; cursor: pointer; font-family: inherit; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.cat-card:hover { transform: translateY(-4px); border-color: var(--card-accent, var(--accent)); box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.cat-card-thumb { aspect-ratio: 3 / 4; width: 100%; display: flex; align-items: center; justify-content: center; }
.cat-card-letter { font-family: var(--font-serif); font-size: 56px; color: rgba(255,255,255,.85); }
.cat-card-meta { padding: 14px 16px 16px; border-top: 2px solid var(--card-accent, var(--accent)); }
.cat-card-label { font-family: var(--font-serif); font-size: 17px; font-weight: 500; line-height: 1.25; }
.cat-card-sub { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,.5); margin-top: 5px; text-transform: uppercase; letter-spacing: .08em; }

/* List layout — stacked buttons */
.cat-list { margin-top: clamp(24px, 4vh, 44px); display: grid; grid-template-columns: repeat(var(--list-cols, 1), minmax(0, 1fr)); gap: 10px 18px; max-width: 680px; }
.cat-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--card-accent, var(--accent)); border-radius: 10px; background: rgba(255,255,255,.03); color: #fff; cursor: pointer; font-family: inherit; text-align: left; transition: background .15s ease, transform .15s ease; }
.cat-row:hover { background: rgba(255,255,255,.07); transform: translateX(4px); }
.cat-row-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--card-accent, var(--accent)); flex-shrink: 0; }
.cat-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cat-row-label { font-family: var(--font-serif); font-size: 17px; font-weight: 500; }
.cat-row-sub { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; }
.cat-row-arrow { color: rgba(255,255,255,.45); display: flex; }
.cat-row-arrow .icon { width: 18px; height: 18px; }

/* Floating Back-to-catalog button (shown while an item is open) */
.cat-back { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 18px); left: calc(env(safe-area-inset-left, 0px) + 14px); z-index: 70; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px 0 11px; border-radius: 20px; border: 1px solid rgba(255,255,255,.18); background: rgba(20,17,13,.72); backdrop-filter: blur(12px); color: #fff; font-family: var(--font-sans); font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.3); transition: background .15s ease; }
/* Desktop / large screens have no status-bar inset, so drop it clear of the
   viewer toolbar instead of hugging the top edge. */
@media (min-width: 720px) { .cat-back { top: 52px; } }
.cat-back:hover { background: rgba(40,34,28,.92); }
.cat-back .icon { width: 16px; height: 16px; }

/* Collection menu — button/card size (admin-configurable per collection) */
.cat-grid.size-small  { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.cat-grid.size-large  { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(20px, 2.6vw, 34px); }
.cat-grid.size-small .cat-card-label { font-size: 15px; }
.cat-grid.size-small .cat-card-meta  { padding: 11px 13px 13px; }
.cat-grid.size-large .cat-card-label { font-size: 20px; }
.cat-grid.size-large .cat-card-meta  { padding: 18px 20px 20px; }
.cat-list.size-small .cat-row { padding: 12px 16px; }
.cat-list.size-small .cat-row-label { font-size: 15px; }
.cat-list.size-large .cat-row { padding: 26px 24px; }
.cat-list.size-large .cat-row-label { font-size: 21px; }
.cat-list.size-large { max-width: 760px; }

/* Brand definition — title scale + text color (applied via CSS vars set by applyBrandTheme) */
.cat-title { font-size: calc(clamp(30px, 5vw, 52px) * var(--brand-title-scale, 1)); }
.cat-title, .cat-card-label, .cat-row-label { color: var(--brand-text, #fff); }

/* Brand-defined collection title + subtitle styling (font/color/scale) */
.cat-title { font-family: var(--brand-title-font, var(--font-serif)); color: var(--brand-title-color, var(--brand-text, #fff)); }
.cat-sub { font-family: var(--brand-sub-font, var(--font-sans)); color: var(--brand-sub-color, rgba(255,255,255,.62)); font-size: calc(clamp(14px, 1.6vw, 17px) * var(--brand-sub-scale, 1)); }

/* Brand-defined menu card/button styling — label-area background + text color */
.cat-card-meta { background: var(--brand-card-bg, transparent); }
.cat-row { background: var(--brand-card-bg, rgba(255,255,255,.03)); }
.cat-card-label, .cat-row-label { color: var(--brand-card-text, var(--brand-text, #fff)); }
.cat-card-sub, .cat-row-sub { color: var(--brand-card-text, rgba(255,255,255,.5)); opacity: var(--brand-card-sub-opacity, 1); }

/* Brand-defined text alignment per container (header block + cards) */
.cat-title, .cat-sub { text-align: var(--brand-header-align, left); }
.cat-sub { margin-inline: var(--brand-sub-mi, 0 auto); }
.cat-brand { justify-content: var(--brand-header-justify, flex-start); }
.cat-card-meta { text-align: var(--brand-card-align, left); }
.cat-row-text { align-items: var(--brand-card-justify, flex-start); text-align: var(--brand-card-align, left); }

/* Make the card label area fill the remaining height so its background
   stretches to the bottom when grid cards are equalised to the tallest. */
.cat-card-thumb { flex-shrink: 0; }
.cat-card-meta { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }

/* Extra-small card/button size (one step below Small) */
.cat-grid.size-xsmall { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: clamp(9px, 1vw, 14px); }
.cat-grid.size-xsmall .cat-card-label { font-size: 13px; }
.cat-grid.size-xsmall .cat-card-sub { font-size: 10px; }
.cat-grid.size-xsmall .cat-card-meta { padding: 8px 10px 10px; }
.cat-list.size-xsmall .cat-row { padding: 9px 13px; }
.cat-list.size-xsmall .cat-row-label { font-size: 13px; }
.cat-list.size-xsmall { max-width: 600px; }
.cat-list.cols-2, .cat-list.cols-3 { max-width: min(1180px, 96vw); }
.cat-list.align-left { margin-right: auto; margin-left: 0; }
.cat-list.align-center { margin-inline: auto; }
.cat-list.align-right { margin-left: auto; margin-right: 0; }

/* Card cover aspect ratio (per collection: 1:1 / 5:4 / 3:4 / 9:16 / 16:9) */
.cat-card-thumb { aspect-ratio: var(--cat-card-aspect, 3 / 4); }

/* ─── Extra menu layouts ─────────────────────────────────────────────────── */
/* Masonry — staggered columns */
.cat-masonry { margin-top: clamp(28px, 5vh, 52px); column-width: 240px; column-gap: clamp(16px, 2vw, 26px); }
.cat-masonry.size-xsmall { column-width: 130px; column-gap: 12px; }
.cat-masonry.size-small  { column-width: 175px; }
.cat-masonry.size-large  { column-width: 320px; }
.cat-masonry .cat-card { break-inside: avoid; width: 100%; margin: 0 0 clamp(16px, 2vw, 26px); display: inline-flex; }

/* 3D tilt — grid where each card leans toward the cursor */
.cat-tilt { perspective: 1100px; }
.cat-tilt .cat-card { transition: transform .12s ease, box-shadow .2s ease; transform-style: preserve-3d; will-change: transform; }
.cat-tilt .cat-card:hover { box-shadow: 0 28px 64px rgba(0,0,0,.55); }

/* 3D coverflow — horizontal carousel, side cards rotate away */
.cat-coverflow { margin-top: clamp(28px, 6vh, 56px); perspective: 1500px; }
.cat-cf-track { display: flex; align-items: center; overflow-x: auto; scroll-snap-type: x mandatory; padding: 36px max(40px, 36vw); transform-style: preserve-3d; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cat-cf-track::-webkit-scrollbar { display: none; }
.cat-cf-card { flex: 0 0 auto; width: 260px; margin: 0 -10px; scroll-snap-align: center; border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; transform-style: preserve-3d; transition: opacity .15s ease; font-family: inherit; }
.cat-cf-thumb { width: 100%; aspect-ratio: var(--cat-card-aspect, 3 / 4); border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 34px 80px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.14); }
.cat-cf-label { margin-top: 16px; text-align: center; font-family: var(--brand-title-font, var(--font-serif)); font-size: 18px; color: var(--brand-title-color, var(--brand-text, #fff)); }

/* Coverflow tweaks — GSAP sets per-card perspective, so the scroll track must
   NOT be preserve-3d (overflow flattens it anyway) and cards use a gap. */
.cat-cf-track { gap: 28px; transform-style: flat; }
.cat-cf-card { margin: 0; width: 250px; will-change: transform, opacity; }

/* 3D carousel (rotating ring) */
.cat-ring { position: relative; margin-top: clamp(28px, 6vh, 56px); height: clamp(360px, 56vh, 520px); perspective: 1700px; touch-action: pan-y; cursor: grab; }
.cat-ring:active { cursor: grabbing; }
.cat-ring-stage { position: absolute; top: 0; bottom: 56px; left: 50%; width: 250px; margin-left: -125px; transform-style: preserve-3d; }
.cat-ring-card { position: absolute; inset: 0; display: flex; flex-direction: column; width: 250px; border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; backface-visibility: hidden; }
.cat-ring-card .cat-cf-thumb { flex: 1 1 auto; width: 100%; aspect-ratio: auto; }
.cat-ring-card .cat-cf-label { flex-shrink: 0; }
.cat-ring-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 44px; height: 44px; border-radius: 50%; background: rgba(20,17,13,.62); border: 1px solid rgba(255,255,255,.18); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cat-ring-nav.prev { left: 10px; }
.cat-ring-nav.next { right: 10px; }
.cat-ring-nav .icon { width: 20px; height: 20px; }

/* Coverflow — track must be position:relative so card offsetLeft is measured
   against the track. Card WIDTH and the centre PADDING are set inline by
   buildCoverflow() from menuCardMetrics (device + size + aspect aware), so the
   carousel scales correctly on desktop as well as mobile; CSS only provides the
   non-sizing styling + sensible fallbacks. */
.cat-coverflow { position: relative; }
.cat-cf-track { position: relative; padding: 20px; gap: clamp(8px, 1.4vw, 18px); transform-style: flat; cursor: grab; }
.cat-cf-track:active { cursor: grabbing; }
.cat-cf-track:focus { outline: none; }
.cat-cf-card { margin: 0; }
.cat-cf-label { font-size: clamp(12px, 1.4vw, 16px); margin-top: clamp(8px, 1vh, 14px); }
/* Prev/next arrows — an obvious navigation control (desktop has no native
   horizontal-swipe; this plus drag-to-scroll fixes the "frozen" coverflow). */
.cat-cf-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 46px; height: 46px; border-radius: 50%; background: rgba(20,17,13,.62);
  border: 1px solid rgba(255,255,255,.18); color: #fff; display: flex; align-items: center;
  justify-content: center; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .15s ease; }
.cat-cf-nav:hover { background: rgba(20,17,13,.86); }
.cat-cf-nav.prev { left: 14px; }
.cat-cf-nav.next { right: 14px; }
.cat-cf-nav .icon { width: 20px; height: 20px; }
@media (max-width: 560px) {
  .cat-cf-nav { width: 38px; height: 38px; }
  .cat-cf-nav.prev { left: 6px; }
  .cat-cf-nav.next { right: 6px; }
}

/* Carousel: take full control of touch gestures so the horizontal swipe is
   smooth (the browser won't try to scroll mid-swipe). */
.cat-ring { touch-action: none; }

/* Card grid alignment (left/center/right). Left keeps the stretch grid; center
   and right switch to a wrapping flex row so the cards group and align. */
.cat-grid { --cat-grid-card-w: 220px; }
.cat-grid.size-xsmall { --cat-grid-card-w: 150px; }
.cat-grid.size-small  { --cat-grid-card-w: 175px; }
.cat-grid.size-large  { --cat-grid-card-w: 300px; }
.cat-grid.galign-center, .cat-grid.galign-right { display: flex; flex-wrap: wrap; align-items: stretch; }
.cat-grid.galign-center { justify-content: center; }
.cat-grid.galign-right  { justify-content: flex-end; }
.cat-grid.galign-center > .cat-card, .cat-grid.galign-right > .cat-card { flex: 0 0 auto; width: min(var(--cat-grid-card-w, 220px), 86vw); }

/* ─── Request a quote (RFQ) ─────────────────────────────────────────────── */
.rfq-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border: none; border-radius: 99px;
  background: var(--accent); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.22); transition: transform .15s, box-shadow .15s;
}
.rfq-fab:hover { transform: translateY(-1px); box-shadow: 0 9px 28px rgba(0,0,0,.28); }
.rfq-fab svg { flex: 0 0 auto; }

/* Contact-channels FAB — sits just above the RFQ FAB (or at the bottom when RFQ
   is off, via .solo). Dark to distinguish from the accent RFQ button. */
.contact-fab {
  position: fixed; right: 18px; bottom: 74px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border: none; border-radius: 99px;
  background: #1c1a17; color: #fff; font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.22); transition: transform .15s, box-shadow .15s;
}
.contact-fab.solo { bottom: 18px; }
.contact-fab:hover { transform: translateY(-1px); box-shadow: 0 9px 28px rgba(0,0,0,.28); }
.contact-fab svg { flex: 0 0 auto; }
@media (max-width: 560px) { .contact-fab { bottom: 80px; } .contact-fab.solo { bottom: 18px; } }

/* ─── Per-page video overlays + lightbox ──────────────────────────────────────
   The overlay button is fixed within the content viewport on a 9-grid; rows
   avoid the topbar (top) and the CTA row (bottom). */
.vid-overlay {
  position: fixed; z-index: 59; border: none; cursor: pointer; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 22px rgba(0,0,0,.3); pointer-events: auto;
  transition: transform .15s, box-shadow .15s;
}
.vid-overlay:hover { transform: scale(1.08); box-shadow: 0 9px 28px rgba(0,0,0,.36); }
.vid-overlay svg { pointer-events: none; }
.vid-overlay span { pointer-events: none; font-family: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; }
/* Round play button that periodically "peeks" — expands into a labelled pill
   ("Play video") for a moment, then collapses back to the circle. */
.vid-play { height: 52px; padding: 0 16px; border-radius: 99px; overflow: hidden; }
.vid-play span {
  max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease, padding .3s ease;
}
.vid-play.peek span { max-width: 200px; opacity: 1; padding-right: 4px; }
.vid-pill { height: 42px; padding: 0 18px 0 14px; border-radius: 99px; }
/* 9-grid: rows t/m/b × cols l/c/r */
.vid-pos-tl, .vid-pos-tc, .vid-pos-tr { top: 64px; }
/* Top-right sits below the reading-mode switcher panel. */
.vid-pos-tr { top: 124px; }
.vid-pos-ml, .vid-pos-mc, .vid-pos-mr { top: 50%; transform: translateY(-50%); }
.vid-pos-ml:hover, .vid-pos-mc:hover, .vid-pos-mr:hover { transform: translateY(-50%) scale(1.08); }
.vid-pos-bl, .vid-pos-bc, .vid-pos-br { bottom: 84px; }
.vid-pos-tl, .vid-pos-ml, .vid-pos-bl { left: 18px; }
.vid-pos-tc, .vid-pos-mc, .vid-pos-bc { left: 50%; transform: translateX(-50%); }
.vid-pos-tc:hover, .vid-pos-bc:hover { transform: translateX(-50%) scale(1.08); }
.vid-pos-mc { transform: translate(-50%, -50%); }
.vid-pos-mc:hover { transform: translate(-50%, -50%) scale(1.08); }
.vid-pos-tr, .vid-pos-mr, .vid-pos-br { right: 18px; }
@media (max-width: 560px) { .vid-pos-bl, .vid-pos-bc, .vid-pos-br { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); } }

/* Lightbox — dark backdrop + 16:9 player. */
.video-overlay { background: rgba(0,0,0,.82); }
.video-shell { position: relative; width: min(960px, 94vw); }
.video-box { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 18px 60px rgba(0,0,0,.5); }
.video-box iframe, .video-box video { width: 100%; height: 100%; display: block; border: 0; }
.video-x {
  position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.video-x:hover { background: rgba(255,255,255,.24); }
.video-fs {
  position: absolute; top: -44px; right: 44px; width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.video-fs:hover { background: rgba(255,255,255,.24); }
/* In real fullscreen the shell fills the screen — center the player and keep
   both controls reachable (inside, since there's no space above). */
.video-shell:fullscreen { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; background: #000; }
.video-shell:fullscreen .video-box { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.video-shell:fullscreen .video-x { top: 14px; right: 14px; background: rgba(0,0,0,.45); }
.video-shell:fullscreen .video-fs { top: 14px; right: 58px; background: rgba(0,0,0,.45); }
.video-shell:-webkit-full-screen { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; background: #000; }
.video-shell:-webkit-full-screen .video-box { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.video-shell:-webkit-full-screen .video-x { top: 14px; right: 14px; }
.video-shell:-webkit-full-screen .video-fs { top: 14px; right: 58px; }

/* Play badge on video menu cards. */
.cat-card-thumb { position: relative; }
.cat-card-play {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center;
  pointer-events: none; backdrop-filter: blur(2px);
}
.cat-card-play svg { width: 26px; height: 26px; }

/* ─── Social share speed-dial ──────────────────────────────────────────────
   Fixed wrapper bottom-right; .s0/.s1/.s2 = how many FABs sit below it
   (quote affordance and/or Contact). Fly-out pops upward with a stagger. */
/* The wrap is CLICK-TRANSPARENT — its closed fly-out still occupies ~380px of
   layout above the toggle and was swallowing clicks meant for overlays
   beneath it (e.g. a bottom-right page-video play button). Only the toggle
   and (when open) the channel buttons take pointer events. */
.share-wrap { position: fixed; right: 18px; z-index: 61; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.share-wrap .share-fab { pointer-events: auto; }
.share-wrap.open .share-chan { pointer-events: auto; }
.share-wrap.s0 { bottom: 18px; }
.share-wrap.s1 { bottom: 74px; }
.share-wrap.s2 { bottom: 124px; }
.share-wrap.s3 { bottom: 174px; }
@media (max-width: 560px) {
  .share-wrap.s1 { bottom: 80px; }
  .share-wrap.s2 { bottom: 136px; }
  .share-wrap.s3 { bottom: 186px; }
}
.share-fab {
  width: 40px; height: 40px; border: 1px solid rgba(0,0,0,.08); border-radius: 50%;
  background: #fff; color: #1c1a17; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.22); transition: transform .15s, box-shadow .15s;
}
.share-fab:hover { transform: scale(1.08); box-shadow: 0 9px 28px rgba(0,0,0,.28); }
/* Clicks always target the buttons, never their inner svg — the toggle swaps
   its icon via innerHTML, and a destroyed svg as e.target broke outside-click
   detection (the menu closed in the same click that opened it). */
.share-fab svg, .share-chan svg { pointer-events: none; }
.share-pop {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  padding-bottom: 8px; pointer-events: none;
}
.share-wrap.open .share-pop { pointer-events: auto; }
.share-chan {
  width: 36px; height: 36px; border-radius: 10px; border: none; background: #fff; color: #333;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); opacity: 0; transform: translateY(16px) scale(.8);
  transition: all .28s cubic-bezier(.4,0,.2,1);
}
.share-wrap.open .share-chan { opacity: 1; transform: translateY(0) scale(1); }
.share-wrap.open .share-chan:nth-child(8) { transition-delay: 0s; }
.share-wrap.open .share-chan:nth-child(7) { transition-delay: .04s; }
.share-wrap.open .share-chan:nth-child(6) { transition-delay: .08s; }
.share-wrap.open .share-chan:nth-child(5) { transition-delay: .12s; }
.share-wrap.open .share-chan:nth-child(4) { transition-delay: .16s; }
.share-wrap.open .share-chan:nth-child(3) { transition-delay: .20s; }
.share-wrap.open .share-chan:nth-child(2) { transition-delay: .24s; }
.share-wrap.open .share-chan:nth-child(1) { transition-delay: .28s; }
.share-chan:hover { transform: scale(1.15); }
.share-whatsapp { color: #25D366; }
.share-facebook { color: #1877F2; }
.share-x { color: #000; }
.share-pinterest { color: #E60023; }
.share-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff; }
.share-copy { color: #6c757d; }
.share-native { color: #000; border: 1px solid #e5e5e5; }
.share-qr { color: #333; }
.share-spin { animation: shareSpin 1s linear infinite; }
@keyframes shareSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
/* Like (heart) — sits at the top of the bottom-right FAB column; bottom offset
   is computed in JS from the live stack so it never collides. */
.like-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 61;
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid rgba(0,0,0,.08); border-radius: 99px;
  background: #fff; color: #1c1a17; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.22); transition: transform .15s, box-shadow .15s, bottom .2s;
}
.like-fab:hover { transform: scale(1.08); box-shadow: 0 9px 28px rgba(0,0,0,.28); }
.like-fab svg { flex: 0 0 auto; pointer-events: none; }
.like-fab span { pointer-events: none; }
.like-fab.liked { border-color: rgba(224,49,49,.35); }
.like-fab.pop svg { animation: likePop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes likePop { 0% { transform: scale(.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }

.share-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(90px);
  background: #1c1a17; color: #fff; padding: 9px 18px; border-radius: 99px;
  font-size: 13px; font-weight: 500; opacity: 0; transition: all .3s ease; z-index: 9999;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none;
}
.share-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.share-qr-card { max-width: 320px; text-align: center; }
.share-qr-box { display: inline-block; margin: 14px auto 4px; padding: 10px; background: #fff; border: 1px solid var(--line, #e7e3dc); border-radius: 12px; }
.share-qr-box img { display: block; }

/* Contact sheet — reuses the .rfq-overlay backdrop + .rfq-card shell. */
.contact-chan {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; margin-top: 10px; border: 1px solid var(--line, #e7e3dc); border-radius: 12px;
  background: #fff; color: #1c1a17; font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background .12s, border-color .12s, transform .12s;
}
.contact-chan:hover { background: #faf8f5; border-color: #c9c2b6; transform: translateY(-1px); }
.contact-chan svg { flex: 0 0 auto; color: var(--accent); }
/* On phones the FAB collapses to a circular icon, but the label slides out
   when the `.peek` class is toggled on (a periodic attention nudge). */
@media (max-width: 560px) {
  .rfq-fab { height: 52px; padding: 0; border-radius: 26px; gap: 0; overflow: hidden;
    transition: transform .15s, box-shadow .15s; }
  .rfq-fab svg { width: 22px; height: 22px; margin: 0 15px; }
  .rfq-fab span { max-width: 0; opacity: 0; white-space: nowrap;
    transition: max-width .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease; }
  .rfq-fab.peek { box-shadow: 0 10px 30px rgba(0,0,0,.32); }
  .rfq-fab.peek svg { margin-right: 4px; }
  .rfq-fab.peek span { max-width: 240px; opacity: 1; padding-right: 20px; }
}

.rfq-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(15,12,10,.55); backdrop-filter: blur(3px);
  animation: rfqFade .18s ease;
}
@keyframes rfqFade { from { opacity: 0; } to { opacity: 1; } }
.rfq-card {
  width: 100%; max-width: 440px; max-height: 92vh; overflow: auto;
  background: #fff; color: var(--ink); border-radius: 16px; padding: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.4); animation: rfqPop .2s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes rfqPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.rfq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rfq-title { font-family: var(--font-head, Georgia, serif); font-size: 22px; font-weight: 600; }
.rfq-x { border: none; background: none; color: var(--ink-3); cursor: pointer; padding: 4px; display: flex; border-radius: 8px; }
.rfq-x:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.rfq-sub { color: var(--ink-2); font-size: 13.5px; line-height: 1.45; margin: 6px 0 16px; }
.rfq-input {
  width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 11px 13px;
  border: 1px solid rgba(0,0,0,.14); border-radius: 9px; font-family: inherit; font-size: 14px;
  color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.rfq-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.rfq-textarea { resize: vertical; min-height: 88px; }
.rfq-row2 { display: flex; gap: 10px; }
.rfq-row2 .rfq-input { flex: 1; }
.rfq-err { color: #c4341f; font-size: 13px; min-height: 18px; margin: 2px 0 8px; }
.rfq-submit {
  width: 100%; height: 44px; border: none; border-radius: 9px; cursor: pointer;
  background: var(--accent); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.rfq-submit:disabled { opacity: .6; cursor: default; }
.rfq-submit.rfq-wa { background: #25d366; margin-top: 12px; text-decoration: none; }
.rfq-submit.rfq-ghost { background: none; color: var(--ink-2); border: 1px solid rgba(0,0,0,.12); margin-top: 8px; }
/* Form-response attachment (upload / capture) */
.rfq-attach { margin: 4px 0 12px; padding: 12px; border: 1px dashed rgba(0,0,0,.18); border-radius: 10px; background: rgba(0,0,0,.015); }
.rfq-attach-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.rfq-attach-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rfq-attach-btn { border: 1px solid rgba(0,0,0,.14); background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.rfq-attach-btn:hover { border-color: var(--accent); color: var(--accent); }
.rfq-attach-status { font-size: 12px; color: var(--ink-3); margin-top: 8px; word-break: break-all; }
.rfq-attach-status.ok { color: #1a8f4c; }
.rfq-attach-status.bad { color: #c4341f; }
.rfq-attach-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.rfq-attach-list:empty { display: none; }
.rfq-attach-slot { border: 1px solid rgba(0,0,0,.1); border-radius: 9px; padding: 8px; background: #fff; }
.rfq-attach-slot-cat { font-size: 11px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.rfq-attach-preview { position: relative; display: flex; }
.rfq-attach-preview:empty { display: none; }
.rfq-attach-img { max-width: 100%; max-height: 180px; border-radius: 8px; display: block; }
.rfq-attach-media { width: 100%; border-radius: 8px; }
.rfq-attach-file { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); padding: 10px 12px; background: #fff; border: 1px solid rgba(0,0,0,.1); border-radius: 8px; }
.rfq-attach-rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rfq-attach-rm svg { width: 15px; height: 15px; }

/* Live capture overlay (camera / mic) */
.rfq-cap-overlay { position: fixed; inset: 0; z-index: 240; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8,6,5,.82); backdrop-filter: blur(4px); }
.rfq-cap-card { width: 100%; max-width: 520px; background: #14110f; color: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.rfq-cap-hint { font-size: 13px; color: rgba(255,255,255,.78); text-align: center; margin-bottom: 10px; }
.rfq-cap-card { position: relative; }
.rfq-cap-video { width: 100%; max-height: 60vh; border-radius: 12px; background: #000; display: block; }
.rfq-cap-video.mirror { transform: scaleX(-1); }
.rfq-cap-flip { position: absolute; top: 24px; right: 24px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.45); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rfq-cap-flip:hover { background: rgba(0,0,0,.65); }
.rfq-cap-flip:disabled { opacity: .4; cursor: default; }
.rfq-cap-flip svg { width: 22px; height: 22px; }
.rfq-cap-audio { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 0; }
.rfq-cap-mic { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; }
.rfq-cap-mic svg { width: 28px; height: 28px; }
.rfq-cap-timer { font-family: var(--font-mono, monospace); font-size: 22px; letter-spacing: .04em; }
.rfq-cap-actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.rfq-cap-go { min-width: 130px; height: 46px; border: none; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.rfq-cap-go.is-rec { background: #c4341f; }
.rfq-cap-cancel { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rfq-cap-cancel svg { width: 20px; height: 20px; }

.rfq-done { text-align: center; padding: 10px 4px 4px; }
.rfq-done-icon {
  width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, #fff);
  color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.rfq-done-icon svg { width: 26px; height: 26px; }
.rfq-done .rfq-title { justify-content: center; }
.rfq-done .rfq-sub { margin-bottom: 4px; }

/* RFQ — PDF-info context banner + field labels */
.rfq-ctx {
  display: flex; align-items: center; gap: 11px; margin: 4px 0 14px;
  padding: 10px 13px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.rfq-ctx-ico { display: flex; color: var(--accent); flex: 0 0 auto; }
.rfq-ctx-ico svg, .rfq-ctx-ico .icon { width: 20px; height: 20px; }
.rfq-ctx-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 600; }
.rfq-ctx-title { font-size: 13.5px; color: var(--ink); font-weight: 600; margin-top: 1px; }
.rfq-flabel { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin: 4px 0 5px; }
.rfq-wa-ask { margin-top: 16px; font-size: 13.5px; color: var(--ink-2); }
.rfq-wa-note { font-size: 12px; color: var(--ink-3); line-height: 1.45; margin: 10px 2px 2px; }
.rfq-ctx-thumb { width: 40px; height: auto; max-height: 54px; border-radius: 5px; display: block; border: 1px solid rgba(0,0,0,.12); }
.rfq-ctx-ico.is-glyph { width: 20px; }
.rfq-submit.rfq-sms { background: #2563eb; margin-top: 10px; text-decoration: none; }

/* ─── PWA install affordance ────────────────────────────────────────────── */
.pwa-install {
  position: fixed; left: 16px; bottom: 16px; z-index: 55;
  display: inline-flex; align-items: stretch; border-radius: 99px; overflow: hidden;
  background: var(--ink, #1c1a17); color: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.28);
  animation: pwaIn .3s ease;
}
@keyframes pwaIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pwa-install-main {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 16px; height: 44px;
  background: none; border: none; color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.pwa-install-x {
  background: none; border: none; color: rgba(255,255,255,.6); font-size: 13px; cursor: pointer;
  padding: 0 14px 0 8px; line-height: 44px;
}
.pwa-install-x:hover { color: #fff; }
@media (max-width: 560px) { .pwa-install { left: 12px; bottom: 12px; } }

/* ─── Desktop QR card (above the install button, bottom-left) ────────────────
   Only rendered by viewer.js on desktop when branding.show_qr is on, so it
   never collides with the bottom-right Buy-Now / Request-a-quote buttons. The
   76px bottom offset clears the install bar (bottom 16px, ~44px tall). */
.viewer-qr {
  position: fixed; left: 16px; bottom: 76px; z-index: 54;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 12px 10px; border-radius: 14px;
  background: #fff; color: var(--ink, #1c1a17);
  box-shadow: 0 8px 28px rgba(0,0,0,.22); animation: pwaIn .3s ease;
}
.viewer-qr-img { width: 116px; height: 116px; display: block; border-radius: 4px; }
.viewer-qr-cap { font-size: 11px; font-weight: 600; letter-spacing: .01em; color: var(--ink-2, #555); white-space: nowrap; }

.pwa-ios-overlay {
  position: fixed; inset: 0; z-index: 210; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15,12,10,.5); backdrop-filter: blur(3px); animation: rfqFade .18s ease; padding: 16px;
}
.pwa-ios-card {
  width: 100%; max-width: 420px; background: #fff; color: var(--ink, #1c1a17);
  border-radius: 16px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.4);
  animation: rfqPop .22s cubic-bezier(.2,.9,.3,1.2); margin-bottom: env(safe-area-inset-bottom, 0);
}
.pwa-ios-title { font-family: var(--font-head, Georgia, serif); font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.pwa-ios-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 14.5px; color: var(--ink, #1c1a17); }
.pwa-ios-ico { display: inline-flex; color: var(--accent, #c4663f); flex: 0 0 auto; }
.pwa-ios-done {
  width: 100%; height: 44px; margin-top: 14px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--accent, #c4663f); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600;
}

/* Prominent notification opt-in card (post-install / app launch). A tap on its
   CTA is the user gesture that lets the permission dialog show — browsers
   suppress auto-requested prompts. Bottom-left, clear of the bottom-right FABs. */
.pwa-card {
  position: fixed; left: 16px; bottom: 16px; z-index: 56;
  width: min(340px, calc(100vw - 32px));
  background: #fff; color: var(--ink, #1c1a17);
  border-radius: 16px; padding: 18px 18px 16px; box-shadow: 0 14px 48px rgba(0,0,0,.32);
  animation: pwaIn .3s ease; margin-bottom: env(safe-area-inset-bottom, 0);
}
.pwa-card-x {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: none; cursor: pointer;
  background: var(--bg, #f4f1ec); color: var(--ink-3, #80796f); border-radius: 50%; font-size: 13px; line-height: 1;
}
.pwa-card-emoji { font-size: 26px; line-height: 1; }
.pwa-card-title { font-family: var(--font-head, Georgia, serif); font-size: 18px; font-weight: 600; margin: 8px 0 4px; }
.pwa-card-sub { font-size: 13px; line-height: 1.5; color: var(--ink-2, #4a463f); margin-bottom: 14px; }
.pwa-card-cta {
  width: 100%; height: 46px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--accent, #c4663f); color: #fff; font-family: inherit; font-size: 15px; font-weight: 600;
}
.pwa-card-cta:disabled { opacity: .7; cursor: default; }

/* Taps on icons/labels should register on the button itself (prevents the
   "needs two taps" issue with icon links like Send via WhatsApp). */
.rfq-submit svg, .rfq-submit span,
.rfq-fab svg, .rfq-fab span,
.cat-back svg, .cat-back .icon, .cat-back span,
.pwa-install-main svg, .pwa-install-main span { pointer-events: none; }

/* Logo placement — Always corner + Watermark modes */
.logo-edge.logo-corner { top: auto; bottom: 22px; right: 16px; left: auto; transform: none; flex-direction: row; writing-mode: horizontal-tb; padding: 8px 12px; animation: none; opacity: .92; }
.logo-watermark {
  position: absolute; inset: 0; z-index: 22; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; color: #000; opacity: .07;
}
.logo-watermark.dark { color: #fff; opacity: .1; }
.logo-watermark .supplier { transform: scale(2.6) rotate(-22deg); transform-origin: center; white-space: nowrap; }
.logo-watermark img { max-height: 80px; max-width: 320px; object-fit: contain; }

/* ── Email-gate: soft-mode skip link ── */
.gate-skip { margin-top: 14px; width: 100%; background: none; border: none; color: rgba(255,255,255,.55);
  font-family: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.gate-skip:hover { color: rgba(255,255,255,.85); }

/* ── Per-page CTA layer (Buy-Now / quote), positioned per visible page ── */
.cta-layer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; pointer-events: none;
  padding: 0 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
.cta-btn {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px;
  border: 2px solid transparent; border-radius: 99px; font-family: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.22);
  transition: transform .15s, box-shadow .15s; pointer-events: auto; white-space: nowrap;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 28px rgba(0,0,0,.28); }
.cta-btn svg, .cta-btn span { pointer-events: none; }
.cta-quote { background: var(--accent); color: #fff; }
/* Shapes (buy-now only; quote stays pill) */
.cta-buynow.shape-square { border-radius: 8px; }
.cta-buynow.shape-rounded { border-radius: 12px; }
.cta-buynow.shape-pill { border-radius: 99px; }
/* Positioning: single = bottom-right; spread = one per side */
.cta-btn.side-single, .cta-btn.side-right { right: 18px; }
.cta-btn.side-left { left: 18px; }
@media (max-width: 560px) {
  .cta-btn { height: 50px; }
  .cta-btn.side-left, .cta-btn.side-right, .cta-btn.side-single { left: 50%; right: auto; transform: translateX(-50%); }
  .cta-btn.side-left { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  .cta-btn:hover { transform: translateX(-50%) translateY(-1px); }
}

/* "Powered by" badge (free tier) */
#powered-by { position: fixed; left: 12px; bottom: calc(10px + env(safe-area-inset-bottom,0px)); z-index: 55;
  font-family: system-ui, sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  color: rgba(255,255,255,.92); background: rgba(20,15,10,.6); backdrop-filter: blur(4px);
  padding: 4px 9px; border-radius: 99px; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
#powered-by:hover { background: rgba(20,15,10,.8); }

/* ══ New animated menu layouts (ported from CND widgets) ══════════════════════ */
/* Card width per size for the custom-container layouts (fan / deck / marquee). */
.cat-fan, .cat-deck, .cat-marquee { --lc-w: 220px; }
.cat-fan.size-xsmall, .cat-deck.size-xsmall, .cat-marquee.size-xsmall { --lc-w: 130px; }
.cat-fan.size-small, .cat-deck.size-small, .cat-marquee.size-small { --lc-w: 170px; }
.cat-fan.size-large, .cat-deck.size-large, .cat-marquee.size-large { --lc-w: 290px; }

/* ── Fan ── */
.cat-fan { margin-top: clamp(28px, 5vh, 52px); perspective: 1400px; }
.cat-fan-stage { position: relative; height: clamp(300px, 48vh, 480px); }
.cat-fan-card { position: absolute; left: 50%; bottom: 0; width: var(--lc-w, 220px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; transform-origin: 50% 92%; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.cat-fan-card .cat-cf-thumb { box-shadow: 0 24px 60px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.16); }
.cat-fan-card:hover { z-index: 200 !important; }
.cat-fan-card:hover .cat-cf-thumb { box-shadow: 0 34px 80px rgba(0,0,0,.7); }

/* ── Deck ── */
.cat-deck { margin-top: clamp(28px, 5vh, 52px); perspective: 1400px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cat-deck-stage { position: relative; width: 100%; height: clamp(320px, 52vh, 520px); }
.cat-deck-card { position: absolute; left: 50%; top: 50%; width: var(--lc-w, 220px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s ease; }
.cat-deck-card .cat-cf-thumb { box-shadow: 0 28px 70px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.16); }
.cat-deck-nav { display: flex; gap: 12px; }
.cat-deck-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cat-deck-btn:hover { background: rgba(255,255,255,.16); }
.cat-deck-btn svg { width: 20px; height: 20px; }

/* ── Orbit ── */
.cat-orbit { --lc-w: 150px; margin-top: clamp(20px, 4vh, 44px); width: 100%; display: flex; justify-content: center; }
.cat-orbit.size-xsmall { --lc-w: 96px; }
.cat-orbit.size-small  { --lc-w: 122px; }
.cat-orbit.size-large  { --lc-w: 190px; }
.cat-orbit-stage { position: relative; width: min(720px, 92vw); height: clamp(320px, 56vh, 540px); }
.cat-orbit-card { position: absolute; width: var(--lc-w, 150px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; transition: opacity .4s ease; will-change: transform, top, left; }
.cat-orbit-card .cat-cf-thumb { box-shadow: 0 22px 56px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.14); }
.cat-orbit-card:hover { z-index: 200 !important; }

/* ── Curtain reveal (Content-Reveal port): thumb wipes open on hover ── */
.cat-fx-curtain .cat-card .cat-card-thumb { transition: clip-path .6s cubic-bezier(.7,0,.3,1), filter .6s ease; filter: brightness(.62); }
.cat-fx-curtain.dir-bottom_up .cat-card .cat-card-thumb { clip-path: inset(48% 0 0 0); }
.cat-fx-curtain.dir-top_down  .cat-card .cat-card-thumb { clip-path: inset(0 0 48% 0); }
.cat-fx-curtain.dir-left_right .cat-card .cat-card-thumb { clip-path: inset(0 48% 0 0); }
.cat-fx-curtain.dir-right_left .cat-card .cat-card-thumb { clip-path: inset(0 0 0 48%); }
.cat-fx-curtain .cat-card:hover .cat-card-thumb { clip-path: inset(0 0 0 0); filter: brightness(1); }

/* ── Spread (Spread-on-Scroll port) ── */
.cat-spread { --lc-w: 200px; margin-top: clamp(28px, 5vh, 52px); perspective: 1400px; width: 100%; display: flex; justify-content: center; }
.cat-spread.size-xsmall { --lc-w: 120px; } .cat-spread.size-small { --lc-w: 160px; } .cat-spread.size-large { --lc-w: 260px; }
.cat-spread-stage { position: relative; width: 100%; height: clamp(300px, 48vh, 480px); transform-style: preserve-3d; }
.cat-spread-card { position: absolute; left: 50%; top: 50%; width: var(--lc-w, 200px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; }
.cat-spread-card .cat-cf-thumb { box-shadow: 0 24px 60px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.16); }
.cat-spread-card:hover { z-index: 200 !important; }

/* ── Slideshow (Hero-Slideshow port) ── */
.cat-slideshow { --lc-w: 440px; position: relative; margin-top: clamp(20px, 4vh, 44px); width: 100%; display: flex; flex-direction: column; align-items: center; }
.cat-slideshow.size-xsmall { --lc-w: 260px; } .cat-slideshow.size-small { --lc-w: 340px; } .cat-slideshow.size-large { --lc-w: 540px; }
.cat-slideshow-stage { position: relative; width: min(var(--lc-w), 92vw); height: clamp(320px, 58vh, 580px); }
.cat-slideshow-slide { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.cat-slideshow-slide .cat-cf-thumb { box-shadow: 0 28px 70px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.16); }
.cat-slideshow-slide.off { opacity: 0; pointer-events: none; z-index: 1; }
.cat-slideshow-slide.on { opacity: 1; z-index: 2; }
.cat-slideshow.trans-slide .cat-slideshow-slide.off { transform: translateX(8%); }
.cat-slideshow.trans-zoom .cat-slideshow-slide.off { transform: scale(.85); }
.cat-slideshow-nav { position: absolute; top: 42%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.4); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; z-index: 5; }
.cat-slideshow-nav.prev { left: 4px; } .cat-slideshow-nav.next { right: 4px; }
.cat-slideshow-nav svg { width: 20px; height: 20px; }
.cat-slideshow-dots { display: flex; gap: 8px; margin-top: 16px; }
.cat-slideshow .cat-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.3); cursor: pointer; padding: 0; transition: transform .2s ease, background .2s ease; }
.cat-slideshow .cat-dot.active { background: #fff; transform: scale(1.3); }

/* ── Rail (Horizontal-Gallery port) ── */
.cat-rail { --lc-w: 220px; margin-top: clamp(20px, 4vh, 44px); width: 100%; }
.cat-rail.size-xsmall { --lc-w: 130px; } .cat-rail.size-small { --lc-w: 170px; } .cat-rail.size-large { --lc-w: 290px; }
.cat-rail-track { display: flex; gap: clamp(14px, 1.8vw, 24px); overflow-x: auto; overflow-y: hidden; padding: 8px clamp(16px, 8vw, 120px) 20px; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
.cat-rail-track::-webkit-scrollbar { display: none; }
.cat-rail.snap .cat-rail-track { scroll-snap-type: x mandatory; }
.cat-rail.snap .cat-rail-card { scroll-snap-align: center; }
.cat-rail-card { flex: 0 0 auto; width: var(--lc-w, 220px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; transition: transform .25s ease; }
.cat-rail-card:hover { transform: translateY(-8px) scale(1.03); }
.cat-rail-card .cat-cf-thumb { box-shadow: 0 18px 44px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); }

/* ── Snap deck (Snap-Scroll port) ── */
.cat-snap { --lc-w: 480px; margin-top: clamp(16px, 3vh, 32px); width: 100%; max-height: 78vh; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 5vh, 56px); padding: 6vh 0; scrollbar-width: none; -ms-overflow-style: none; }
.cat-snap::-webkit-scrollbar { display: none; }
.cat-snap.size-xsmall { --lc-w: 280px; } .cat-snap.size-small { --lc-w: 360px; } .cat-snap.size-large { --lc-w: 560px; }
.cat-snap-card { scroll-snap-align: center; flex: 0 0 auto; width: min(var(--lc-w), 92vw); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1), clip-path .6s ease; }
.cat-snap-card .cat-cf-thumb { box-shadow: 0 24px 60px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.14); }
.cat-snap.rv-fade .cat-snap-card { opacity: .25; }
.cat-snap.rv-fade .cat-snap-card.in { opacity: 1; }
.cat-snap.rv-scale .cat-snap-card { opacity: .3; transform: scale(.9); }
.cat-snap.rv-scale .cat-snap-card.in { opacity: 1; transform: scale(1); }
.cat-snap.rv-clip .cat-snap-card { opacity: .5; clip-path: circle(38% at 50% 50%); }
.cat-snap.rv-clip .cat-snap-card.in { opacity: 1; clip-path: circle(75% at 50% 50%); }
@media (prefers-reduced-motion: reduce) { .cat-snap-card, .cat-slideshow-slide { transition: opacity .2s ease; } }

/* ── Portfolio (Portfolio-Grid port): image cards, caption slides up on hover ── */
.cat-fx-portfolio .cat-card { position: relative; overflow: hidden; border-radius: 14px; }
.cat-fx-portfolio .cat-card .cat-card-thumb { transition: transform .6s cubic-bezier(.25,.46,.45,.94); }
.cat-fx-portfolio .cat-card:hover .cat-card-thumb { transform: scale(1.06); }
.cat-fx-portfolio .cat-card-meta { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 26px 16px 14px; text-align: left; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0)); opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .4s ease; pointer-events: none; }
.cat-fx-portfolio .cat-card:hover .cat-card-meta, .cat-fx-portfolio.cap-always .cat-card-meta { opacity: 1; transform: translateY(0); }
.cat-fx-portfolio .cat-card-label { color: #fff; }
.cat-fx-portfolio .cat-card-sub { color: rgba(255,255,255,.75); }

/* ── Showcase / glass (Case-Study port): browser-chrome dots + frosted title bar ── */
.cat-fx-glass .cat-card { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); }
.cat-fx-glass .cat-card .cat-card-thumb { position: relative; }
.cat-fx-glass .cat-card .cat-card-thumb::before { content: ''; position: absolute; top: 12px; left: 14px; width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; box-shadow: 15px 0 0 #febc2e, 30px 0 0 #28c840; z-index: 3; }
.cat-fx-glass .cat-card-meta { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; padding: 12px 14px; text-align: left; border-radius: 12px; background: rgba(20,20,22,.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12); transition: transform .4s ease; }
.cat-fx-glass .cat-card:hover .cat-card-meta { transform: translateY(-4px); }
.cat-fx-glass .cat-card-label { color: #fff; }
.cat-fx-glass .cat-card-sub { color: rgba(255,255,255,.7); }

/* ── Split preview (Split-Hero port): preview pane + clickable list ── */
.cat-split { display: flex; gap: clamp(20px, 3vw, 40px); width: 100%; margin-top: clamp(16px, 3vh, 28px); align-items: stretch; min-height: clamp(320px, 56vh, 560px); }
.cat-split.side-right { flex-direction: row-reverse; }
.cat-split-preview { flex: 1 1 55%; position: relative; border-radius: 16px; overflow: hidden; min-height: inherit; }
.cat-split-preview-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity .4s ease, transform 6s ease; }
.cat-split-preview-img .cat-card-letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; opacity: .5; }
.cat-split-preview-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 24px; font-size: clamp(20px, 2.4vw, 34px); font-weight: 700; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); pointer-events: none; }
.cat-split-list { flex: 1 1 45%; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; max-height: clamp(320px, 56vh, 560px); scrollbar-width: none; -ms-overflow-style: none; }
.cat-split-list::-webkit-scrollbar { display: none; }
.cat-split-row { display: flex; align-items: center; gap: 14px; padding: 16px 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); background: transparent; color: inherit; cursor: pointer; font-family: inherit; text-align: left; transition: padding .25s ease, background .25s ease; }
.cat-split-row-num { opacity: .5; font-size: .85em; min-width: 26px; font-variant-numeric: tabular-nums; }
.cat-split-row-label { flex: 1; font-size: 1.15em; font-weight: 600; }
.cat-split-row-arrow { opacity: 0; transition: opacity .25s ease, transform .25s ease; display: inline-flex; }
.cat-split-row-arrow svg { width: 18px; height: 18px; }
.cat-split-row.active, .cat-split-row:hover { padding-left: 22px; background: rgba(255,255,255,.06); }
.cat-split-row.active .cat-split-row-arrow, .cat-split-row:hover .cat-split-row-arrow { opacity: 1; transform: translateX(4px); }
@media (max-width: 720px) { .cat-split, .cat-split.side-right { flex-direction: column; } .cat-split-preview { min-height: 220px; flex-basis: auto; } .cat-split-list { max-height: none; } }

/* ── Index (Services-List port): numbered title rows ── */
.cat-index { width: 100%; max-width: 920px; margin: clamp(12px, 2vh, 24px) auto 0; display: grid; grid-template-columns: repeat(var(--idx-cols, 1), minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 60px); align-content: start; }
.cat-index.cols-2, .cat-index.cols-3 { max-width: 1220px; }
.cat-index-row { display: flex; align-items: baseline; gap: 18px; width: 100%; padding: clamp(14px, 2.2vh, 24px) 8px; border: 0; border-top: 1px solid rgba(255,255,255,.12); background: transparent; color: inherit; cursor: pointer; font-family: inherit; text-align: left; transition: padding .25s ease; }
.cat-index-row:last-child { border-bottom: 1px solid rgba(255,255,255,.12); }
.cat-index-row:hover { padding-left: 22px; }
.cat-index-num { opacity: .45; font-size: .95em; min-width: 34px; font-variant-numeric: tabular-nums; }
.cat-index-label { flex: 1; font-size: clamp(18px, 2.4vw, 30px); font-weight: 600; }
.cat-index-sub { opacity: .6; font-size: .95em; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-index-arrow { opacity: .4; transition: transform .25s ease, opacity .25s ease; display: inline-flex; }
.cat-index-row:hover .cat-index-arrow { opacity: 1; transform: translateX(5px); }
.cat-index-arrow svg { width: 20px; height: 20px; }

/* ── Marquee ── */
.cat-marquee { margin-top: clamp(28px, 5vh, 52px); overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cat-marquee-track { display: flex; gap: clamp(14px, 1.8vw, 24px); width: max-content; animation: catMarquee var(--mq-dur, 30s) linear infinite; }
.cat-marquee:hover .cat-marquee-track { animation-play-state: paused; }
.cat-marquee.rev .cat-marquee-track { animation-direction: reverse; }
@keyframes catMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cat-marquee-card { flex: 0 0 auto; width: var(--lc-w, 220px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; transition: transform .25s ease; }
.cat-marquee-card .cat-cf-thumb { box-shadow: 0 18px 44px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); }
.cat-marquee-card:hover { transform: translateY(-10px) scale(1.04); z-index: 5; }
@media (prefers-reduced-motion: reduce) { .cat-marquee-track { animation: none; } }

/* ── Spin Carousel (CND spin-carousel port): far-pivot sweeping arc of cards ── */
.cat-spin { --lc-w: 200px; margin-top: clamp(20px, 4vh, 44px); width: 100%; display: flex; justify-content: center; touch-action: pan-y; }
.cat-spin.size-xsmall { --lc-w: 120px; } .cat-spin.size-small { --lc-w: 160px; } .cat-spin.size-large { --lc-w: 260px; }
.cat-spin-stage { position: relative; width: min(960px, 96vw); height: clamp(320px, 56vh, 560px); cursor: grab; }
.cat-spin-stage:active { cursor: grabbing; }
.cat-spin-card { position: absolute; left: 50%; bottom: 20%; width: var(--lc-w, 200px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; will-change: transform, opacity; }
.cat-spin-card .cat-cf-thumb { box-shadow: 0 26px 64px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.16); }

/* ── Image Expand (CND image-expand port): vertical reel — image grows to full-bleed ── */
.cat-expand { margin: clamp(16px, 3vh, 28px) 0 0; width: 100%; }
.cat-expand-sec { height: 150vh; position: relative; }
.cat-expand-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-expand-img { position: relative; border: 0; padding: 0; cursor: pointer; overflow: hidden; display: block; --p: 0;
  width: calc(42% + 58% * var(--p)); height: calc(46vh + 44vh * var(--p)); border-radius: calc(var(--r0, 26vmin) * (1 - var(--p)));
  box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.cat-expand-ov { position: absolute; inset: auto 0 0 0; padding: clamp(18px, 4vw, 48px); pointer-events: none; text-align: center; background: linear-gradient(to top, rgba(0,0,0,.72), transparent); }
.cat-expand-label { font-family: var(--font-serif); font-size: clamp(22px, 4vw, 44px); color: #fff; }
.cat-expand-sub { color: rgba(255,255,255,.82); margin-top: 6px; font-size: clamp(13px, 1.6vw, 18px); }
.cat-expand.no-motion .cat-expand-sec { height: auto; }
.cat-expand.no-motion .cat-expand-sticky { position: relative; height: auto; padding: 10px 0; }
.cat-expand.no-motion .cat-expand-img { --p: 1; }

/* ── 3D Cube Hero (CND cube-hero port, ≤6 faces) ── */
.cat-cube { margin-top: clamp(24px, 5vh, 56px); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cat-cube-scene { perspective: 1300px; cursor: grab; touch-action: none; }
.cat-cube-scene:active { cursor: grabbing; }
.cat-cube-box { position: relative; transform-style: preserve-3d; will-change: transform; }
.cat-cube-face { position: absolute; top: 0; left: 0; border: 0; padding: 0; overflow: hidden; cursor: pointer; backface-visibility: hidden; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); background: #14110d; }
.cat-cube-thumb { position: absolute; inset: 0; background-size: cover !important; background-position: center !important; }
.cat-cube-label { position: absolute; inset: auto 0 0 0; padding: 10px 12px; font-family: var(--font-sans); font-size: 14px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.78), transparent); }
.cat-cube-note { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.55); }

/* ── Logo Bar (CND logo-bar port): covers scroll across a bar pinned to the bottom.
      Cover size comes from the collection card size (--lc-w) + aspect; the bar
      height follows the covers. Hover pauses the scroll. ── */
.cat-logobar { --lc-w: 230px; position: fixed; left: 0; right: 0; bottom: 0; overflow: hidden; display: flex; align-items: flex-end; z-index: 6;
  background: linear-gradient(to top, rgba(0,0,0,.64), rgba(0,0,0,.16) 72%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.cat-logobar.size-xsmall { --lc-w: 140px; } .cat-logobar.size-small { --lc-w: 185px; } .cat-logobar.size-large { --lc-w: 320px; }
.cat-logobar-track { display: flex; align-items: flex-end; gap: clamp(14px, 1.8vw, 30px); width: max-content; padding: 0 26px 16px; animation: catLogoBar var(--lb-dur, 30s) linear infinite; }
.cat-logobar:hover .cat-logobar-track { animation-play-state: paused; }
.cat-logobar.rev .cat-logobar-track { animation-direction: reverse; }
@keyframes catLogoBar { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cat-logobar-card { flex: 0 0 auto; width: var(--lc-w, 230px); border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .25s ease; }
.cat-logobar-card .cat-cf-thumb { width: 100%; aspect-ratio: var(--cat-card-aspect, 3 / 4); max-height: 62vh; border-radius: 12px; box-shadow: 0 16px 38px rgba(0,0,0,.52); border: 1px solid rgba(255,255,255,.16); background-size: cover; background-position: center; }
.cat-logobar-card .cat-cf-label { font-size: 13px; color: rgba(255,255,255,.88); white-space: nowrap; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; }
.cat-logobar-card:hover { transform: translateY(-10px); }
.cat-logobar.gray .cat-cf-thumb { filter: grayscale(1); transition: filter .3s ease; }
.cat-logobar.gray .cat-logobar-card:hover .cat-cf-thumb { filter: grayscale(0); }
@media (prefers-reduced-motion: reduce) { .cat-logobar-track { animation: none; } }

/* ── Media Mosaic (CND media-mosaic port): bento grid sized from the Button size,
      clip shapes, entrance modes, hover zoom, gap ── */
.cat-mmosaic { --lc-w: 200px; --mm-w: calc(var(--lc-w) * var(--mm-scale, 1)); display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--mm-w), 1fr)); grid-auto-rows: calc(var(--mm-w) * var(--mm-rh, .62)); grid-auto-flow: dense; gap: var(--mm-gap, 12px); margin-top: clamp(20px, 4vh, 44px); justify-content: center; }
.cat-mmosaic.size-xsmall { --lc-w: 130px; } .cat-mmosaic.size-small { --lc-w: 165px; } .cat-mmosaic.size-large { --lc-w: 280px; }
.cat-mmosaic-cell { position: relative; border: 0; padding: 0; cursor: pointer; overflow: hidden; background: #14110d; animation-duration: .6s; animation-timing-function: cubic-bezier(.2,.8,.2,1); animation-fill-mode: both; animation-delay: calc(var(--i, 0) * var(--mm-stg, .045s)); }
.cat-mmosaic.clip-rounded .cat-mmosaic-cell { border-radius: 12px; }
.cat-mmosaic.clip-arch .cat-mmosaic-cell { border-radius: 48% 48% 14px 14px / 36% 36% 14px 14px; }
/* Shaped tiles must be SQUARE (no row-stretch), or the circle becomes an oval and
   the hexagon/diamond angles distort. Force a 1:1 cell and let rows size to it. */
.cat-mmosaic.clip-circle, .cat-mmosaic.clip-hexagon, .cat-mmosaic.clip-diamond { grid-auto-rows: auto; }
.cat-mmosaic.clip-circle .cat-mmosaic-cell, .cat-mmosaic.clip-hexagon .cat-mmosaic-cell, .cat-mmosaic.clip-diamond .cat-mmosaic-cell { aspect-ratio: 1; }
.cat-mmosaic.clip-circle .cat-mmosaic-cell { border-radius: 50%; }
.cat-mmosaic.clip-hexagon .cat-mmosaic-cell { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.cat-mmosaic.clip-diamond .cat-mmosaic-cell { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.cat-mmosaic.anim-none .cat-mmosaic-cell { animation-name: none; }
.cat-mmosaic.anim-rise .cat-mmosaic-cell { animation-name: mmRise; }
.cat-mmosaic.anim-scale .cat-mmosaic-cell { animation-name: mmScale; }
.cat-mmosaic.anim-wave .cat-mmosaic-cell { animation-name: mmWave; }
.cat-mmosaic.anim-rotate .cat-mmosaic-cell { animation-name: mmRotate; }
.cat-mmosaic.anim-zoomcascade .cat-mmosaic-cell { animation-name: mmZoom; }
.cat-mmosaic-thumb { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.cat-mmosaic.hov-zoom .cat-mmosaic-cell:hover .cat-mmosaic-thumb { transform: scale(1.08); }
/* 3D tilt: perspective on the grid so the JS-driven rotateX/Y reads as depth; smooth the reset. */
.cat-mmosaic.hov-tilt { perspective: 900px; }
.cat-mmosaic.hov-tilt .cat-mmosaic-cell { transform-style: preserve-3d; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.cat-mmosaic-label { position: absolute; inset: auto 0 0 0; padding: 16px 12px 11px; text-align: left; font-size: 13px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
.cat-mmosaic.clip-rounded .cat-mmosaic-cell:hover .cat-mmosaic-label, .cat-mmosaic.clip-none .cat-mmosaic-cell:hover .cat-mmosaic-label, .cat-mmosaic.clip-arch .cat-mmosaic-cell:hover .cat-mmosaic-label { opacity: 1; transform: none; }
.cat-mmosaic.clip-circle .cat-mmosaic-label, .cat-mmosaic.clip-hexagon .cat-mmosaic-label, .cat-mmosaic.clip-diamond .cat-mmosaic-label { display: none; }
@keyframes mmRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes mmScale { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes mmWave { 0% { opacity: 0; transform: translateY(28px); } 60% { opacity: 1; transform: translateY(-6px); } 100% { transform: none; } }
@keyframes mmRotate { from { opacity: 0; transform: rotate(-6deg) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes mmZoom { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
/* Grid Layout arrangements. full_3x3/full_4x4 set their column count inline (JS); they keep square-ish tiles. */
.cat-mmosaic.arr-full_3x3, .cat-mmosaic.arr-full_4x4 { grid-auto-rows: calc(var(--mm-w) * var(--mm-rh, .62)); justify-content: stretch; }
/* Diamond: rotate the whole grid 45° and counter-rotate each tile so images stay upright on a diagonal lattice. */
.cat-mmosaic.arr-diamond { grid-auto-rows: auto; transform: rotate(45deg); width: 70%; margin-left: auto; margin-right: auto; gap: calc(var(--mm-gap, 12px) + 6px); }
.cat-mmosaic.arr-diamond .cat-mmosaic-cell { aspect-ratio: 1; transform: rotate(-45deg); }
.cat-mmosaic.arr-diamond .cat-mmosaic-cell:hover { transform: rotate(-45deg) scale(1.04); }
/* Circular: container becomes a relative block; JS lays cells out on a ring (cells are translate-centered). */
.cat-mmosaic.arr-circular { display: block; position: relative; height: min(78vw, 620px); max-width: 760px; margin-left: auto; margin-right: auto; }
.cat-mmosaic.arr-circular .cat-mmosaic-cell { position: absolute; width: calc(var(--mm-w) * .62); aspect-ratio: 1; transform: translate(-50%, -50%); }
.cat-mmosaic.arr-circular .cat-mmosaic-cell:hover { transform: translate(-50%, -50%) scale(1.08); z-index: 2; }

/* ── Portfolio Grid (CND portfolio-grid port): size-aware grid, selectable hover ── */
.cat-pgrid { --lc-w: 240px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--lc-w), 1fr)); gap: var(--pg-gap, 18px); margin-top: clamp(20px, 4vh, 44px); }
.cat-pgrid.size-xsmall { --lc-w: 160px; } .cat-pgrid.size-small { --lc-w: 200px; } .cat-pgrid.size-large { --lc-w: 320px; }
.cat-pgrid-card { position: relative; border: 0; padding: 0; cursor: pointer; overflow: hidden; border-radius: var(--pg-radius, 14px); aspect-ratio: var(--cat-card-aspect, 3 / 4); background: #14110d; animation: pgIn .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * .055s); transition: transform .35s ease, box-shadow .35s ease; }
.cat-pgrid.no-motion .cat-pgrid-card { animation: none; }
.cat-pgrid-thumb { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .4s ease; }
.cat-pgrid.fit-contain .cat-pgrid-thumb { background-size: contain !important; background-repeat: no-repeat !important; background-color: #0d0b09; }
.cat-pgrid.hov-overlay .cat-pgrid-card:hover .cat-pgrid-thumb { transform: scale(1.06); filter: brightness(.55); }
.cat-pgrid.hov-zoom .cat-pgrid-card:hover .cat-pgrid-thumb { transform: scale(1.12); }
.cat-pgrid.hov-lift .cat-pgrid-card:hover { transform: translateY(-9px); box-shadow: 0 26px 54px rgba(0,0,0,.5); }
.cat-pgrid.hov-grayscale .cat-pgrid-thumb { filter: grayscale(1); }
.cat-pgrid.hov-grayscale .cat-pgrid-card:hover .cat-pgrid-thumb { filter: grayscale(0) brightness(.62); transform: scale(1.05); }
.cat-pgrid-ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(14px, 1.6vw, 24px); text-align: left; opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .4s ease; background: linear-gradient(to top, rgba(0,0,0,.5), transparent 62%); }
.cat-pgrid-card:hover .cat-pgrid-ov { opacity: 1; transform: none; }
.cat-pgrid-cat { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent, #e8b07a); margin-bottom: 6px; }
.cat-pgrid-title { font-family: var(--font-serif); font-size: clamp(17px, 1.7vw, 24px); color: #fff; line-height: 1.15; }
.cat-pgrid-view { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #fff; }
.cat-pgrid-arrow { display: inline-flex; } .cat-pgrid-arrow svg { width: 16px; height: 16px; }
@keyframes pgIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── Award Highlight (CND award-highlight port): one item featured + thumbnail strip ── */
.cat-award { --lc-w: 280px; position: relative; margin-top: clamp(18px, 3.5vh, 40px); display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 3vh, 28px); }
.cat-award.size-xsmall { --lc-w: 180px; } .cat-award.size-small { --lc-w: 224px; } .cat-award.size-large { --lc-w: 360px; }
.cat-award-stage { width: 100%; display: flex; justify-content: center; }
.cat-award-feature { border: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 92vw; }
.cat-award-thumb { width: var(--lc-w, 280px); aspect-ratio: var(--cat-card-aspect, 3 / 4); max-height: 54vh; border-radius: 16px; background-size: cover; background-position: center; box-shadow: 0 24px 64px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.16); }
.cat-award-meta { text-align: center; }
.cat-award-title { font-family: var(--font-serif); font-size: clamp(22px, 3.4vw, 40px); color: #fff; line-height: 1.1; }
.cat-award-sub { color: rgba(255,255,255,.66); margin-top: 7px; font-size: clamp(13px, 1.6vw, 17px); }
.cat-award.trans-zoom .cat-award-feature.in .cat-award-thumb { animation: awIn .55s cubic-bezier(.2,.8,.2,1) both; }
.cat-award.trans-fade .cat-award-feature.in .cat-award-thumb { animation: awFade .5s ease both; }
.cat-award.trans-slide .cat-award-feature.in .cat-award-thumb { animation: awSlide .5s cubic-bezier(.2,.8,.2,1) both; }
.cat-award-feature.in .cat-award-meta { animation: awUp .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: .08s; }
@keyframes awIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes awFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes awSlide { from { opacity: 0; transform: translateX(38px); } to { opacity: 1; transform: none; } }
@keyframes awUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* Navigation: small dots instead of the thumbnail strip. */
.cat-award.nav-dots .cat-award-strip { gap: 9px; padding: 8px 6px; }
.cat-award.nav-dots .cat-award-dot-thumb { width: 11px !important; height: 11px !important; border-radius: 50% !important; background: rgba(255,255,255,.32) !important; border: 0 !important; }
.cat-award.nav-dots .cat-award-dot:hover .cat-award-dot-thumb { background: rgba(255,255,255,.6) !important; transform: none; }
.cat-award.nav-dots .cat-award-dot.on .cat-award-dot-thumb { background: var(--accent, #c4663f) !important; transform: scale(1.25); }
.cat-award-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: min(820px, 94vw); padding: 4px 6px 8px; }
.cat-award-dot { flex: 0 0 auto; border: 0; padding: 0; background: transparent; cursor: pointer; }
.cat-award-dot-thumb { width: 56px; height: 56px; border-radius: 10px; background-size: cover; background-position: center; opacity: .5; border: 2px solid transparent; transition: opacity .2s ease, border-color .2s ease, transform .2s ease; }
.cat-award-dot:hover .cat-award-dot-thumb { opacity: .85; transform: translateY(-2px); }
.cat-award-dot.on .cat-award-dot-thumb { opacity: 1; border-color: var(--accent, #c4663f); }
.cat-award-nav { position: absolute; top: 26%; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(20,17,13,.5); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; z-index: 4; }
.cat-award-nav:hover { background: rgba(20,17,13,.78); }
.cat-award-nav svg { width: 20px; height: 20px; }
.cat-award-nav.prev { left: max(10px, 6vw); } .cat-award-nav.next { right: max(10px, 6vw); }
@media (prefers-reduced-motion: reduce) { .cat-award-feature.in .cat-award-thumb, .cat-award-feature.in .cat-award-meta { animation: none; } }

/* ── Marquee title / subtitle header (CND marquee-text port) — opt-in, per element ── */
.cat-mq { overflow: hidden; white-space: nowrap; display: block; max-width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.cat-mq-track { display: inline-flex; will-change: transform; animation: catMqHead 20s linear infinite; }
.cat-mq.dir-right .cat-mq-track { animation-direction: reverse; }
.cat-mq:hover .cat-mq-track { animation-play-state: paused; }
.cat-mq.no-pause:hover .cat-mq-track { animation-play-state: running; }
.cat-mq-item { display: inline-block; white-space: pre; padding-right: var(--mq-gap, 0px); }
/* Outlined text — keep the brand colour as the stroke, transparent fill. */
.cat-mq.mq-stroke { -webkit-text-fill-color: transparent; -webkit-text-stroke: var(--mq-stroke-w, 1px) currentColor; }
@keyframes catMqHead { to { transform: translateX(-25%); } }
.cat-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Text Reveal (CND text-reveal port): split-text entrance on the title/subtitle ── */
.cat-rv { white-space: normal; overflow: visible; }
.cat-title.cat-rv { line-height: 1.16; }       /* a touch more room so rotated/translated glyphs aren't clipped */
.cat-rv-w { display: inline-block; white-space: nowrap; }   /* keep each word intact; wrap only at spaces */
.cat-rv .cat-rv-u { display: inline-block; white-space: pre; animation-duration: var(--rv-dur, .8s); animation-timing-function: cubic-bezier(.2,.75,.25,1); animation-fill-mode: both; animation-delay: calc(var(--i, 0) * var(--rv-stg, .04s)); }
.cat-rv.rv-flip, .cat-rv.rv-rise-rotate { perspective: 700px; }
.cat-rv.rv-flip .cat-rv-u { animation-name: rvFlip; transform-origin: 50% 100%; }
.cat-rv.rv-fade-up .cat-rv-u { animation-name: rvFadeUp; }
.cat-rv.rv-blur-reveal .cat-rv-u { animation-name: rvBlur; }
.cat-rv.rv-rise-rotate .cat-rv-u { animation-name: rvRiseRotate; }
.cat-rv.rv-pop .cat-rv-u { animation-name: rvPop; }
.cat-rv.rv-slide-in-left .cat-rv-u { animation-name: rvSlideL; }
.cat-rv.rv-slide-in-right .cat-rv-u { animation-name: rvSlideR; }
.cat-rv.rv-wave .cat-rv-u { animation-name: rvWave; }
.cat-rv.rv-skew-in .cat-rv-u { animation-name: rvSkew; }
.cat-rv.rv-drop-in .cat-rv-u { animation-name: rvDrop; }
.cat-rv.rv-scale-up .cat-rv-u { animation-name: rvScaleUp; }
.cat-rv.rv-bounce-up .cat-rv-u { animation-name: rvBounceUp; }
.cat-rv.rv-glitch .cat-rv-u { animation-name: rvGlitch; }
.cat-rv.rv-typewriter .cat-rv-u { animation-name: rvType; animation-duration: .01s; animation-timing-function: steps(1, end); }
@keyframes rvFadeUp { from { opacity: 0; transform: translateY(.55em); } to { opacity: 1; transform: none; } }
@keyframes rvBlur { from { opacity: 0; filter: blur(.28em); } to { opacity: 1; filter: blur(0); } }
@keyframes rvFlip { from { opacity: 0; transform: rotateX(-92deg); } to { opacity: 1; transform: none; } }
@keyframes rvRiseRotate { from { opacity: 0; transform: translateY(.6em) rotate(9deg); } to { opacity: 1; transform: none; } }
@keyframes rvPop { 0% { opacity: 0; transform: scale(.3); } 70% { opacity: 1; transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes rvSlideL { from { opacity: 0; transform: translateX(-.85em); } to { opacity: 1; transform: none; } }
@keyframes rvSlideR { from { opacity: 0; transform: translateX(.85em); } to { opacity: 1; transform: none; } }
@keyframes rvWave { 0% { opacity: 0; transform: translateY(.75em); } 60% { opacity: 1; transform: translateY(-.12em); } 100% { transform: none; } }
@keyframes rvSkew { from { opacity: 0; transform: skewX(24deg) translateX(.45em); } to { opacity: 1; transform: none; } }
@keyframes rvDrop { 0% { opacity: 0; transform: translateY(-.75em); } 62% { opacity: 1; transform: translateY(.12em); } 100% { transform: none; } }
@keyframes rvScaleUp { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
@keyframes rvBounceUp { 0% { opacity: 0; transform: translateY(.85em); } 58% { opacity: 1; transform: translateY(-.16em); } 100% { transform: none; } }
@keyframes rvGlitch { 0% { opacity: 0; transform: translate(-.12em,.06em); } 30% { opacity: 1; transform: translate(.09em,-.05em); } 55% { transform: translate(-.05em,.03em); } 100% { transform: none; } }
@keyframes rvType { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cat-rv .cat-rv-u { animation: none; } }

@media (prefers-reduced-motion: reduce) {
  .cat-mq-track, .cat-cube-box { animation: none; }
  .cat-expand-img { --p: 1 !important; }
}

/* ── Spotlight ── */
.cat-spotlight { margin-top: clamp(28px, 5vh, 52px); display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(18px, 2.4vw, 34px); align-items: start; }
.cat-spot-hero.cat-card .cat-card-thumb { aspect-ratio: 16 / 11; }
.cat-spot-hero.cat-card .cat-card-label { font-size: clamp(20px, 2.4vw, 30px); }
.cat-spot-rest { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
@media (max-width: 720px) { .cat-spotlight { grid-template-columns: 1fr; } }

/* ── Wave + Parallax effects (grid family) ── */
.cat-fx-wave .cat-card { transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s ease; transform-style: preserve-3d; }
.cat-fx-parallax .cat-card { transition: transform .3s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; will-change: transform; }

/* ── Mosaic clip shapes (grid family) ── */
.cat-fx-mosaic .cat-card { border: 0; background: transparent; transition: transform .3s ease; }
.cat-fx-mosaic .cat-card:hover { transform: scale(1.06); z-index: 4; }
.cat-fx-mosaic .cat-card-meta { padding-top: 8px; text-align: center; }
.cat-fx-mosaic.shape-rounded .cat-card-thumb { border-radius: 18px; }
.cat-fx-mosaic.shape-circle .cat-card-thumb { clip-path: circle(50%); }
.cat-fx-mosaic.shape-hexagon .cat-card-thumb { clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }
.cat-fx-mosaic.shape-diamond .cat-card-thumb { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.cat-fx-mosaic.shape-arch .cat-card-thumb { border-radius: 50% 50% 12px 12px / 40% 40% 12px 12px; }
