/* LUMA site - 3D glass layer (preview). Loaded after styles.css; overrides only.
   Product language: recessed blocks, gradient rgb(22,23,27) -> rgb(38,40,46),
   hairline rgba(255,255,255,.08), radius 14, titles #f4f1ea, labels rgb(138,135,127). */

:root {
  --g-top: rgb(22, 23, 27);
  --g-bot: rgb(38, 40, 46);
  --hair: rgba(255, 255, 255, 0.08);
  --hair-hi: rgba(255, 255, 255, 0.14);
  --title: #f4f1ea;
  --label: rgb(138, 135, 127);
  --edge-grey: #8a8f9c;
  --glass:
    linear-gradient(180deg, var(--g-top) 0%, var(--g-bot) 100%);
  --recess:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 48px -28px rgba(0, 0, 0, 0.85);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Hero backdrop: a faint gold light from the top right, grey from the left */
.hero {
  background:
    radial-gradient(1100px 640px at 80% 0%, rgba(217, 173, 98, 0.07), transparent 62%),
    radial-gradient(800px 560px at 0% 70%, rgba(138, 143, 156, 0.05), transparent 62%);
}

/* Top bar: frosted glass. The blur sits on a pseudo-element so the mobile menu,
   which hangs below the bar, keeps its own solid background. */
.topbar {
  background: transparent;
  border-block-end-color: var(--hair);
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(16, 16, 18, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
@media (max-width: 960px) {
  .nav { background: #101012; }
}

/* Section dividers: a hairline that fades at both ends instead of a hard rule */
.section {
  position: relative;
  border-block-start-color: transparent;
}
.section::before {
  content: "";
  position: absolute;
  inset-block-start: -1px;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09) 20%, rgba(255, 255, 255, 0.09) 80%, transparent);
  pointer-events: none;
}
.grid-bg {
  background-image:
    radial-gradient(800px 420px at 70% 40%, rgba(217, 173, 98, 0.05), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

/* Headings: same weight and size, product title colour */
h1, h2, h3 { color: var(--title); }
.eyebrow { color: var(--label); }
.eyebrow.gold { color: var(--gold); }

/* Buttons */
.btn { transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease-out), box-shadow .2s; }
.btn-gold {
  background: linear-gradient(180deg, #e6c07f, var(--gold));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px -10px rgba(217, 173, 98, 0.55);
}
.btn-gold:hover { background: linear-gradient(180deg, #ecca8f, var(--gold-hover)); transform: translateY(-1px); }
.btn-outline {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.0));
  border-color: var(--hair-hi);
}
.btn:active { transform: translateY(0) scale(0.98); }

/* Glass blocks */
.card,
.layer-item,
.screen,
.contact-card,
.stack,
.fan {
  background: var(--glass);
  border-color: var(--hair);
  box-shadow: var(--recess);
}
.card { position: relative; overflow: hidden; }
.card h3 { color: var(--title); }

/* Leading edge: thin state line on the start side (gold for LUMA IS, grey elsewhere) */
.cards-3 > .card::before,
.cards-4 > .card::before,
.position-card::before,
.side-card::before {
  content: "";
  position: absolute;
  inset-block: 18px;
  inset-inline-start: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--edge-grey);
  opacity: 0.55;
  transition: background-color .3s, opacity .3s;
}
.position-card.is-yes::before,
.side-card::before { background: var(--gold); opacity: 0.9; }
.position-card.is-yes { border-color: rgba(217, 173, 98, 0.45); }

/* Pointer light and tilt (set by luma-3d.js) */
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s var(--ease-out), border-color .3s, box-shadow .3s;
}
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.06), transparent 45%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.tilt:hover { border-color: rgba(217, 173, 98, 0.4); }
.tilt:hover::after { opacity: 1; }
.tilt:hover::before { background: var(--gold); opacity: 1; }

/* How it works: layer rows and the plane stack */
.layer-item:hover, .layer-item.is-lit {
  background: linear-gradient(180deg, rgba(217, 173, 98, 0.10), rgba(217, 173, 98, 0.04)), var(--glass);
  border-color: rgba(217, 173, 98, 0.55);
}
.stack { background: radial-gradient(70% 60% at 50% 60%, rgba(217, 173, 98, 0.06), transparent 70%), var(--glass); }
.plane {
  background: linear-gradient(160deg, rgba(48, 50, 57, 0.92), rgba(24, 25, 29, 0.92));
  border-color: var(--hair-hi);
  color: #b9b6ad;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px -8px rgba(0, 0, 0, 0.6);
}
.plane:hover, .plane.is-lit {
  background: linear-gradient(160deg, rgba(217, 173, 98, 0.22), rgba(40, 38, 32, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 30px rgba(217, 173, 98, 0.25);
}

/* Product screen mock */
.screen { box-shadow: var(--recess), 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.screen-side { background: rgba(0, 0, 0, 0.18); border-color: var(--hair); }
.screen-bar { border-color: var(--hair); }
.screen-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  border-color: var(--hair);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35);
}
.finding-row { border-color: var(--hair); }

/* Custody */
.fan { background: radial-gradient(60% 55% at 50% 55%, rgba(217, 173, 98, 0.07), transparent 70%), var(--glass); }
.sheet { border-color: var(--hair-hi); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.8); }
.sheet-1, .sheet-2 { background: linear-gradient(180deg, #24252a, #1c1d21); }
.sheet-3 { background: linear-gradient(180deg, #2c2d33, #222328); }
.timeline { border-inline-start-color: var(--hair-hi); }
.timeline li::before { box-shadow: 0 0 0 4px rgba(217, 173, 98, 0.14), 0 0 14px rgba(217, 173, 98, 0.5); }

/* Tags */
.tag { border-color: var(--hair-hi); background: rgba(255, 255, 255, 0.02); }
.tag-gold { background: var(--gold-soft); border-color: transparent; }

/* Position */
.position-list li { border-color: var(--hair); }
.position-quote {
  background: linear-gradient(90deg, rgba(217, 173, 98, 0.06), transparent 70%);
}

/* Contact */
.contact-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 300px at 85% 120%, rgba(217, 173, 98, 0.14), transparent 70%),
    var(--glass);
}

/* Hero */
.hero { position: relative; }
.hero-visual { position: relative; }
.phone-stage { z-index: 1; }
.hero-copy { position: relative; z-index: 2; }
.reveal, .hero-verdict {
  background: rgba(22, 23, 27, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-verdict { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 0 24px rgba(217, 173, 98, 0.18); }

.hero-gl {
  position: absolute;
  inset: -18% -40%;
  width: 180%;
  height: 136%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  opacity: 0;
  transition: opacity .9s var(--ease-out);
}
/* After the first WebGL frame: the 3D phone replaces the SVG one. The img stays in the
   DOM at its size, so nothing moves. */
html[data-webgl] .hero-gl { opacity: 1; }
html[data-webgl] .phone-img { opacity: 0; transition: opacity .6s; }
html[data-webgl] .phone-body { box-shadow: none; }
html[data-webgl] .lens { display: none; }

/* Static fallback (no WebGL, or reduced motion): the original SVG phone in a glass glow */
html:not([data-webgl]) .phone-body {
  box-shadow: 0 0 0 1px var(--hair), 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 90px rgba(217, 173, 98, 0.16);
}

/* Scroll reveals (set by luma-3d.js only when motion is allowed) */
html.fx [data-rv] {
  opacity: 0;
  translate: 0 22px;
  transition-property: opacity, translate, transform, border-color, box-shadow, background-color;
  transition-duration: .8s, .8s, .35s, .3s, .3s, .25s;
  transition-timing-function: var(--ease-out);
  transition-delay: var(--rv-d, 0ms), var(--rv-d, 0ms), 0s, 0s, 0s, 0s;
}
html.fx [data-rv].is-in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .hero-gl { display: none; }
  .tilt { transform: none; }
}

/* Product palette states: CLEAN = green, EVIDENCE stays gold, "is not" markers grey */
:root { --clean: #3fb27f; }
.hero-verdict { border-color: rgba(63, 178, 127, 0.75); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 0 24px rgba(63, 178, 127, 0.18); }
.hero-verdict .verdict-word,
.screen-verdict .verdict-word { color: var(--clean); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-verdict .verdict-word,
  .screen-verdict .verdict-word { background: linear-gradient(180deg, #5cc896, #2f9466); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.screen-verdict { box-shadow: inset 2px 0 0 var(--clean), inset 0 2px 5px rgba(0, 0, 0, 0.35); }
.is-no .position-list li::before { border-color: var(--edge-grey); }

/* Block titles at the product weight (Archivo 600 is in the self-hosted variable file) */
.card h3, .layer-title, .sheet-title { font-weight: 600; letter-spacing: -0.01em; }
