/* ==========================================================================
   styles/theme.css — PlanCAD (plancad.co.uk — Factory Ready Data)
   Obsidian #0A0A0C • Champagne Gold #C9A96E • Architectural CAD Grid
   ========================================================================== */

:root {
  --bg-obsidian: #0A0A0C;
  --bg-elevated: #111116;
  --bg-panel: #15151C;
  --gold: #C9A96E;
  --gold-light: #E5CC98;
  --gold-dark: #A58348;
  --gold-subtle: rgba(201, 169, 110, 0.08);
  --cyan-xray: #63C5F2;
  --text-primary: #F4F1EA;
  --text-secondary: #A6A095;
  --text-muted: #6E6A63;
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(201, 169, 110, 0.30);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--bg-obsidian);
  background-image:
    linear-gradient(to right, rgba(201, 169, 110, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 169, 110, 0.032) 1px, transparent 1px),
    radial-gradient(ellipse 80% 42% at 50% 0%, rgba(201, 169, 110, 0.075), transparent 68%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; }

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.3), transparent);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.95rem);
  font-weight: 500;
  line-height: 1.08;
  color: var(--text-primary);
}

.section-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.section-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 680px;
  margin-top: 8px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
  background: var(--gold-subtle);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.24), rgba(201, 169, 110, 0.09));
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  transition: all 0.22s ease;
}

.btn-gold:hover {
  background: var(--gold);
  color: #0A0A0C;
  box-shadow: 0 0 24px rgba(201, 169, 110, 0.34);
}

.btn-gold-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-light);
  background: linear-gradient(135deg, #D8BA82 0%, #C9A96E 55%, #A58348 100%);
  color: #0A0A0C;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: all 0.22s ease;
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.24);
}

.btn-gold-solid:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 30px rgba(229, 204, 152, 0.4);
}

/* ==================== 01. HERO, NAV & TOP MARQUEE ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 12, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-gold);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border-gold);
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.16), rgba(10, 10, 12, 0.92));
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--gold-light); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hero-section {
  padding: 40px 0 32px;
}

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 28px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: rgba(201, 169, 110, 0.06);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4.6vw, 3.85rem);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.hero-sub {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 720px;
  font-weight: 300;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-gold);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.trust-cell {
  background: linear-gradient(180deg, #121218 0%, #0D0D11 100%);
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trust-label {
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.trust-value {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.38;
}

.trust-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Infinite Right-to-Left Top Marquee */
.marquee-wrap {
  margin-top: 28px;
  position: relative;
  overflow: hidden;
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: plancadMarquee 36s linear infinite;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes plancadMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-card {
  position: relative;
  width: 310px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(201, 169, 110, 0.28);
  background: var(--bg-elevated);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.marquee-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

.marquee-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marquee-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 12, 0.92));
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.marquee-card-cat {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.marquee-card-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 02. 4-STAGE HORIZONTAL SLIDER ==================== */
.workflow-section {
  padding: 48px 0 56px;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}

.stage-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-btn {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.stage-btn:hover {
  border-color: var(--border-gold);
  color: var(--text-primary);
}

.stage-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.24), rgba(201, 169, 110, 0.08));
  color: var(--gold-light);
}

.frame-shell {
  border-radius: var(--radius-lg);
  padding: 9px;
  background: linear-gradient(145deg, rgba(201, 169, 110, 0.26), rgba(255, 255, 255, 0.04) 45%, rgba(201, 169, 110, 0.16));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
}

.slider-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 290px;
  border-radius: 9px;
  overflow: hidden;
  background: #08080A;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.slider-stage.is-animating .stage-layer {
  transition: clip-path 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.slider-stage.is-animating .split-handle {
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  will-change: clip-path;
}

.stage-layer img,
.stage-layer svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.stage-label-bar {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 25;
  pointer-events: none;
  height: 32px;
}

.stage-pill {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 4px;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 169, 110, 0.42);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.stage-pill .pill-num { color: var(--gold-light); font-weight: 600; }
.stage-pill.hidden-pill { opacity: 0; }

.split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38px;
  transform: translateX(-50%);
  z-index: 30;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  outline: none;
}

.split-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.45), #E5CC98 40%, #C9A96E 65%, rgba(201, 169, 110, 0.45));
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.7);
}

.handle-knob {
  position: relative;
  width: 32px;
  height: 50px;
  border-radius: 999px;
  background: rgba(12, 12, 16, 0.92);
  border: 1.5px solid var(--gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gold-light);
}

.handle-tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-secondary);
}

.slider-telemetry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 12px 3px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--text-secondary);
}

.telemetry-ratios {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
}

.telemetry-ratios span { color: var(--gold-light); }

/* ==================== 03. GESTURE 2D HOVER MORPH STUDIO ==================== */
.studio-section {
  padding: 52px 0 56px;
}

.room-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.room-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.room-tab:hover { border-color: var(--border-gold); color: var(--text-primary); }

.room-tab.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.24), rgba(201, 169, 110, 0.08));
  color: var(--gold-light);
}

.studio-perspective-wrap {
  perspective: 1800px;
  padding: 4px 0;
}

.studio-card-3d {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 290px;
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
  will-change: transform;
  padding: 9px;
  background: linear-gradient(145deg, rgba(201, 169, 110, 0.26), rgba(255, 255, 255, 0.04) 45%, rgba(201, 169, 110, 0.16));
  box-shadow: 0 30px 82px rgba(0, 0, 0, 0.75);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.studio-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  overflow: hidden;
  background: #08080B;
}

.morph-group {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: opacity;
}

.morph-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  will-change: opacity;
}

.morph-img.default-walnut-off { filter: brightness(0.46) sepia(0.32) hue-rotate(-14deg) saturate(1.16) contrast(1.14); }
.morph-img.default-walnut-on  { filter: brightness(0.84) sepia(0.28) hue-rotate(-14deg) saturate(1.24) contrast(1.06); }
.morph-img.default-oak-off    { filter: brightness(0.56) saturate(0.86) contrast(1.08); }
.morph-img.default-oak-on     { filter: brightness(1.06) saturate(1.08) contrast(1.02); }

.morph-led-bloom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 68% 58% at 50% 48%, rgba(255, 206, 132, 0.16), transparent 74%);
  mix-blend-mode: screen;
  z-index: 6;
  will-change: opacity;
}

.studio-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
  background: radial-gradient(circle 460px at var(--mx, 50%) var(--my, 50%), rgba(229, 204, 152, 0.16), rgba(255, 255, 255, 0.03) 40%, transparent 72%);
  mix-blend-mode: screen;
  z-index: 10;
}

.studio-card-3d.is-active .studio-sheen { opacity: 1; }

.morph-room-tag {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 15;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.65);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.morph-live-readout {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 15;
  pointer-events: none;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.74);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 169, 110, 0.36);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.studio-card-3d.is-active .morph-live-readout { opacity: 1; transform: translateY(0); }

.edge-hint-bottom {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 14;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.48);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.edge-hint-right {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
  z-index: 14;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.48);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

/* ==================== 04. X-RAY SCANNER & 3D VIEWER ==================== */
.xray-section {
  padding: 52px 0 56px;
}

.seg-control {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(8, 8, 11, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 2px;
}

.seg-btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.seg-btn.active {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.34), rgba(201, 169, 110, 0.16));
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 110, 0.65);
}

.xray-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 290px;
  border-radius: 9px;
  overflow: hidden;
  background: #060B12;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.xray-stage.mode-hover { cursor: ew-resize; }

.xray-under-layer,
.xray-top-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.xray-under-layer img,
.xray-under-layer svg,
.xray-top-layer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.xray-top-layer { will-change: clip-path; pointer-events: none; }

.xray-scanner-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  touch-action: none;
  outline: none;
}

.xray-scanner-line::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.5), #F3DBA8 45%, #C9A96E 65%, rgba(99, 197, 242, 0.7));
  box-shadow: 0 0 18px rgba(201, 169, 110, 0.9), 0 0 28px rgba(99, 197, 242, 0.55);
}

.xray-scanner-line::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 52px;
  background: linear-gradient(90deg, rgba(99, 197, 242, 0.22), transparent);
  pointer-events: none;
}

.xray-handle-knob {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 56px;
  border-radius: 999px;
  background: rgba(8, 11, 16, 0.92);
  border: 1.5px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gold-light);
}

.xray-handle-tag { font-family: var(--font-mono); font-size: 0.48rem; color: var(--cyan-xray); }

.xray-corner-label {
  position: absolute;
  top: 14px;
  z-index: 20;
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(9, 11, 16, 0.8);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.xray-corner-label.left { left: 14px; border: 1px solid rgba(201, 169, 110, 0.45); color: var(--gold-light); }
.xray-corner-label.right { right: 14px; border: 1px solid rgba(99, 197, 242, 0.45); color: var(--cyan-xray); }

/* Interactive 3D Model Viewer Frame */
.viewer3d-block {
  margin-top: 34px;
}

.viewer3d-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.viewer3d-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--text-primary);
}

.viewer3d-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  border-radius: 10px;
  border: 1.5px solid var(--gold);
  overflow: hidden;
  background: #060608;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.72);
}

.viewer3d-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Flush Solid White Cover Patch Masking Coohom's Share & Enter Tool Buttons */
.toolbar-white-mask {
  position: absolute;
  left: 50%;
  transform: translateX(40px);
  bottom: 28px;
  width: 268px;
  height: 64px;
  z-index: 25;
  background: #F3F2F0;
  border-radius: 0 8px 8px 0;
  pointer-events: auto;
  cursor: default;
  user-select: none;
}

/* Strictly Hidden Shift+M Mask Calibrator (invisible to normal visitors) */
.secret-mask-cal {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 160;
  width: 310px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  background: rgba(10, 10, 14, 0.96);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  gap: 10px;
}

.secret-mask-cal.open { display: flex; }

.secret-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.secret-cal-close { color: var(--text-secondary); font-size: 1rem; padding: 0 4px; }

.secret-cal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.secret-cal-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-secondary);
}

.secret-cal-grid span { color: var(--gold-light); }
.secret-cal-grid input[type="range"] { width: 100%; accent-color: #C9A96E; }

.secret-cal-code {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--gold-light);
  background: #060609;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid var(--border-hairline);
  word-break: break-word;
}

/* Client Portal Login Modal */
.portal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.portal-backdrop.open { display: flex; }

.portal-modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  background: linear-gradient(180deg, #15151C 0%, #0D0D12 100%);
  padding: 28px 26px 26px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85);
}

.portal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.portal-close:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.portal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portal-field label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.portal-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: #09090D;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.portal-input:focus {
  border-color: var(--gold);
}

.portal-feedback {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--gold-light);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201, 169, 110, 0.32);
  background: rgba(201, 169, 110, 0.08);
  display: none;
}

.portal-feedback.visible { display: block; }

/* ==================== 05. LIVE PORTFOLIO GALLERY & LIGHTBOX ==================== */
.gallery-section {
  padding: 52px 0 64px;
}

.gallery-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.filter-tab {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.filter-tab:hover { border-color: var(--border-gold); color: var(--text-primary); }

.filter-tab.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.25), rgba(201, 169, 110, 0.08));
  color: var(--gold-light);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background: linear-gradient(180deg, #13131A 0%, #0E0E13 100%);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #08080B;
  cursor: zoom-in;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.project-card:hover .project-media img { transform: scale(1.04); }

.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #D8BA82, #B69253);
  color: #0A0A0C;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.project-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.project-cat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
  flex: 1;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.gallery-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Full-Screen Lightbox Modal */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-backdrop.open { display: flex; }

.lightbox-dialog {
  width: 100%;
  max-width: 1060px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  background: #0F0F14;
  overflow: hidden;
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.85);
}

.lightbox-img-wrap {
  position: relative;
  background: #060608;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-height: 70vh;
  width: 100%;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-info {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--border-hairline);
}

/* ==================== 06. CONTACT FOOTER & SCOPE ESTIMATOR ==================== */
.contact-section {
  border-top: 1px solid var(--border-gold);
  background: linear-gradient(180deg, rgba(14, 14, 19, 0.94), #070709);
  padding: 56px 0 36px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.estimator-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gold);
  background: rgba(15, 15, 21, 0.85);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.estimator-group-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-chip {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: rgba(10, 10, 14, 0.8);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.scope-chip:hover { border-color: var(--border-gold); color: var(--text-primary); }

.scope-chip.active {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.18);
  color: var(--gold-light);
}

.scope-preview {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: #09090C;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.direct-contact-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background: rgba(14, 14, 19, 0.75);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
  background: rgba(10, 10, 14, 0.85);
}

.email-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold);
  background: rgba(10, 10, 14, 0.96);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1180px) { .nav-links { display: none; } }
@media (max-width: 1024px) {
  .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .trust-strip { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.15rem; letter-spacing: 0.16em; }
  .btn-ghost.hide-sm { display: none; }
  .slider-stage, .studio-card-3d, .xray-stage, .viewer3d-frame { min-height: 230px; }
  .marquee-card { width: 250px; }
  .toolbar-white-mask { transform: translateX(calc(-50% + 140px)); width: 150px; height: 38px; bottom: 12px; }
}

/* ==================== PRODUCTION NAV GROUPING & MOBILE DRAWER ==================== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-login-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
  background: var(--gold-subtle);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(201, 169, 110, 0.28);
  flex-shrink: 0;
}

.nav-email-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-email-link:hover { color: var(--gold-light); }

.nav-wa-cta {
  padding: 8px 14px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
  background: rgba(201, 169, 110, 0.07);
  color: var(--gold-light);
  align-items: center;
  justify-content: center;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border-hairline);
  background: rgba(10, 10, 14, 0.98);
}

.mobile-drawer.open { display: block; }

.mobile-drawer-inner {
  padding: 18px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-link {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-hairline);
}

.mobile-nav-link:hover { color: var(--gold-light); }

.mobile-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 1120px) {
  .nav-links,
  .nav-login-btn,
  .nav-divider,
  .nav-email-link {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .nav-wa-cta { display: none; }
}

/* ==================== 04B. INTERACTIVE 3D DATABASE PIPELINE ==================== */
.pipeline-section {
  padding: 56px 0 64px;
}

.pipeline-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 290px;
  border-radius: 9px;
  overflow: hidden;
  background: #08090D;
}

.pipeline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes isoFloat {
  0%, 100% { transform: translate(410px, 445px); }
  50% { transform: translate(410px, 433px); }
}

@keyframes isoDoorBreathe {
  0%, 100% { transform: translate(0px, 0px); }
  50% { transform: translate(14px, 7px); }
}

@keyframes pipeStreamFlow {
  from { stroke-dashoffset: 72; }
  to { stroke-dashoffset: 0; }
}

@keyframes pipeProgressFill {
  from { width: 0; }
  to { width: 576px; }
}

.iso-cabinet-float {
  animation: isoFloat 5.2s ease-in-out infinite;
}

.iso-door-breathe {
  animation: isoDoorBreathe 5.2s ease-in-out infinite;
}

.pipe-flow {
  opacity: 0.16;
  transition: opacity 0.35s ease;
}

.pipe-flow.active {
  opacity: 1;
  animation: pipeStreamFlow 1.3s linear infinite;
}

.pipe-node .pipe-node-bg {
  transition: stroke-opacity 0.3s ease, fill 0.3s ease;
}

.pipe-node:hover .pipe-node-bg {
  stroke-opacity: 0.7;
  fill: #161822;
}

.pipe-node.active .pipe-node-bg {
  stroke: #E5CC98;
  stroke-opacity: 0.92;
  fill: #171822;
}

.pipe-node.active .pipe-node-progress {
  animation: pipeProgressFill 4.2s linear forwards;
}

.pipeline-console {
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.console-telemetry-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201, 169, 110, 0.34);
  background: #08090D;
  overflow-x: auto;
}

.console-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #63C5F2;
  box-shadow: 0 0 10px #63C5F2;
  flex-shrink: 0;
}

.console-telemetry-bar code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  white-space: nowrap;
}

.console-detail-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 20px;
  align-items: center;
}

.console-stage-kicker {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.console-stage-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.console-stage-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.console-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.console-metric-box {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: rgba(10, 10, 14, 0.85);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-k {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.metric-v {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-light);
}

.console-step-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 960px) {
  .console-detail-grid { grid-template-columns: 1fr; }
  .console-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .console-metrics { grid-template-columns: 1fr; }
}
