/* ============================================
   LAYER X — Shared Design System
   Dark / Glow / Glass / Editorial Luxe
   ============================================ */

/* ============================================
   SELF-HOSTED FONTS (D-01 to D-05, SEO-08)
   Fraunces variable (wght axis, Latin)
   JetBrains Mono (Latin)
   Inter remains on Google Fonts CDN per D-01 scope
   ============================================ */

/* Fraunces variable — weight 100–900, Latin subset, normal */
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fraunces variable — weight 100–900, Latin subset, italic */
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-variable-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono — weight 400, Latin subset */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono — weight 500, Latin subset */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Color */
  --bg-0: #060403;
  --bg-1: #0c0807;
  --bg-2: #14100e;
  --ink-0: #fdf6ee;
  --ink-1: #d6cdc3;
  --ink-2: #9e958c;
  --ink-3: #5a504a;
  --line: rgba(253, 246, 238, 0.08);
  --line-2: rgba(253, 246, 238, 0.14);

  --accent: #FF6803;
  --accent-2: #AE3A02;
  --accent-glow: rgba(255, 104, 3, 0.55);
  --accent-glow-2: rgba(255, 104, 3, 0.18);

  /* Type */
  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --pad-page: clamp(24px, 5vw, 72px);
  --rad: 18px;
  --rad-lg: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Focus ring — keyboard navigation (UI-03, D-21) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
*:focus:not(:focus-visible) {
  outline: none;
}

/* Ambient background — subtle radial glow + grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 75% 0%, rgba(255, 104, 3, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 60% at 0% 100%, rgba(174, 58, 2, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.6  0 0 0 0 0  0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}

/* ============ Header ============ */
.footer-social .soc-ico {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2);
  display: inline-grid; place-items: center;
  color: var(--ink-1);
  background: rgba(255,255,255,0.02);
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}
.footer-social .soc-ico:hover {
  color: var(--accent);
  border-color: rgba(255, 104, 3, 0.6);
  background: rgba(255, 104, 3, 0.08);
  transform: translateY(-2px);
}
.lx-header {
  position: fixed; top: 16px; left: var(--pad-page); right: var(--pad-page);
  z-index: 100;
  padding: 8px 8px 8px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  background: rgba(14, 10, 8, 0.5);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 -1px 0 rgba(255, 104, 3, 0.10) inset,
    0 30px 60px -30px rgba(0,0,0,0.85),
    0 0 40px -10px var(--accent-glow-2);
}
.lx-header::before {
  content: ""; position: absolute;
  top: 0; left: 30%; right: 30%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.lx-header .glass-shell {
  display: flex; align-items: center; gap: 4px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.lx-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 6px 8px;
}
.lx-logo-img { padding: 0; display: flex; align-items: center; }
.lx-logo-img img { height: 40px; width: auto; display: block; filter: drop-shadow(0 0 18px rgba(255, 104, 3, 0.25)); }
.lx-logo .mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  position: relative;
}
.lx-logo .mark svg { width: 100%; height: 100%; }
.lx-logo em {
  font-style: italic;
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-glow);
}
.lx-nav { display: flex; gap: 4px; }
.lx-nav a {
  padding: 8px 16px;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink-1);
  border-radius: 999px;
  transition: all 0.25s;
  position: relative;
}
.lx-nav a:hover { color: var(--ink-0); background: rgba(255,255,255,0.06); }
.lx-nav a.active {
  color: var(--ink-0);
  background: rgba(255, 104, 3, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 104, 3, 0.5) inset, 0 0 25px rgba(255, 104, 3, 0.4);
}
.lx-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  background: var(--accent);
  color: #1a0a02;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: all 0.3s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 30px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.lx-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 60px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.6);
}
.lx-cta.ghost {
  background: transparent;
  color: var(--ink-0);
  box-shadow: 0 0 0 1px var(--line-2) inset;
}
.lx-cta.ghost:hover { background: rgba(255,255,255,0.06); box-shadow: 0 0 0 1px var(--line-2) inset; }

/* ============ Common building blocks ============ */
.section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) var(--pad-page);
  z-index: 1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.h-display {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.032em;
  line-height: 0.96;
  font-size: clamp(52px, 6.5vw, 96px);
}
.h-display em { font-style: italic; font-weight: 400; color: var(--accent); }
.h-section {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.026em;
  line-height: 1.04;
  font-size: clamp(36px, 4.6vw, 66px);
}
.h-section em { font-style: italic; color: var(--accent); }
.lede { font-size: clamp(16px, 1.3vw, 20px); line-height: 1.65; color: var(--ink-1); max-width: 60ch; }

/* Glass card — premium refined glassmorphism */
.glass {
  background: linear-gradient(135deg,
    rgba(255,255,255,0.072) 0%,
    rgba(255,255,255,0.022) 55%,
    rgba(255,104,3,0.014)  100%
  );
  border: 1px solid rgba(255,255,255,0.09);
  border-top-color: rgba(255,255,255,0.22);
  border-radius: var(--rad);
  backdrop-filter: blur(32px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.04);
  box-shadow:
    0 1px 0  rgba(255,255,255,0.12) inset,
    0 -1px 0 rgba(255,104,3,0.06)   inset,
    0 24px 48px -20px rgba(0,0,0,0.60),
    0 6px  18px -6px  rgba(0,0,0,0.38);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Top-edge shimmer line */
.glass::before {
  content: "";
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
  pointer-events: none; z-index: 1;
}
.glass.glow {
  border-color: rgba(255,104,3,0.22);
  border-top-color: rgba(255,104,3,0.42);
  box-shadow:
    0 1px 0  rgba(255,255,255,0.08) inset,
    0 -1px 0 rgba(255,104,3,0.12)   inset,
    0 24px 48px -20px rgba(0,0,0,0.60),
    0 0 80px -20px rgba(255,104,3,0.30),
    0 0 0 1px rgba(255,104,3,0.10);
}

/* ============ Footer ============ */
.lx-footer {
  position: relative;
  margin-top: 120px;
  padding: 80px var(--pad-page) 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(255, 104, 3, 0.04));
  overflow: hidden;
}
.lx-footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}
.footer-mega {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(80px, 16vw, 280px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, rgba(255, 104, 3, 0.85) 0%, rgba(174, 58, 2, 0.4) 60%, transparent 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 40px;
  text-align: center;
  user-select: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--ink-1); font-size: 14px; transition: color 0.2s; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.05em;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .lx-nav { display: none; }
}

/* ============ Mobile hamburger ============ */
.lx-menu-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.03);
  color: var(--ink-0);
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .25s, background .25s;
}
.lx-menu-btn:hover { border-color: rgba(255,104,3,.5); background: rgba(255,104,3,.08); }
@media (max-width: 800px) {
  .lx-menu-btn { display: flex; }
  .lx-nav-wrap { display: none !important; }
  .lx-header .lx-cta { display: none; }
}

/* Drawer overlay */
.lx-drawer {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
}
.lx-drawer-bg {
  position: absolute; inset: 0;
  background: rgba(6,4,3,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .4s;
}
.lx-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(300px, 88vw);
  background: #100c0a;
  border-left: 1px solid var(--line-2);
  padding: 72px 30px 48px;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  box-shadow: -40px 0 80px rgba(0,0,0,.6);
}
.lx-drawer.open { pointer-events: all; }
.lx-drawer.open .lx-drawer-bg { opacity: 1; }
.lx-drawer.open .lx-drawer-panel { transform: none; }
.lx-drawer-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line-2); background: transparent;
  color: var(--ink-1); display: grid; place-items: center;
  cursor: pointer; font-size: 18px;
  transition: border-color .25s, color .25s;
}
.lx-drawer-close:hover { border-color: var(--accent); color: var(--accent); }
.lx-drawer-nav {
  display: flex; flex-direction: column; gap: 0;
  margin-top: 8px;
}
.lx-drawer-nav a {
  font-family: var(--serif); font-weight: 300;
  font-size: 34px; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--ink-1);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: color .2s;
}
.lx-drawer-nav a:hover, .lx-drawer-nav a.active { color: var(--accent); }
.lx-drawer-cta { margin-top: 32px; }
.lx-drawer-contact {
  margin-top: auto;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1);
}
.reveal.visible { opacity: 1; transform: none; }

/* Marquee */
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Helper */
.row { display: flex; align-items: center; gap: 12px; }
.muted { color: var(--ink-2); }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.sr-only { position: absolute; left: -9999px; }

/* ============ Account avatar (authed) ============ */
.lx-avatar {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  color: var(--ink-0);
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.lx-avatar:hover {
  border-color: rgba(255, 104, 3, 0.55);
  background: linear-gradient(180deg, rgba(255,104,3,0.10), rgba(255,104,3,0.02));
  box-shadow: 0 6px 24px -10px rgba(255, 104, 3, 0.45);
}
.lx-avatar .av-init {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: #1a0904; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 4px 14px -4px rgba(255, 104, 3, 0.6);
}
.lx-avatar .av-init.big { width: 44px; height: 44px; font-size: 14px; }
.lx-avatar .av-meta { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.lx-avatar .av-name { font-size: 13px; font-weight: 500; }
.lx-avatar .av-tier {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-2); margin-top: 3px;
}
.lx-avatar .av-caret { color: var(--ink-2); transition: transform .25s ease, color .25s ease; }
.lx-account.open .av-caret { transform: rotate(180deg); color: var(--accent); }
@media (max-width: 900px) { .lx-avatar .av-meta { display: none; } }

.lx-account { position: relative; }
.lx-account-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 280px;
  background: rgba(14, 10, 8, 0.92);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 80px -30px rgba(0,0,0,0.85),
    0 0 60px -20px rgba(255, 104, 3, 0.4);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 200;
}
.lx-account.open .lx-account-menu {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.lx-account-menu .acct-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.lx-account-menu .acct-name { font-family: var(--serif); font-size: 17px; letter-spacing: -0.01em; }
.lx-account-menu .acct-mail { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.lx-account-menu a, .lx-account-menu button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px; color: var(--ink-1);
  text-align: left;
  transition: background .15s ease, color .15s ease;
}
.lx-account-menu a:hover, .lx-account-menu button:hover {
  background: rgba(255, 104, 3, 0.10);
  color: var(--ink-0);
}
.lx-account-menu .kbd { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.lx-account-menu .menu-sep { height: 1px; background: var(--line); margin: 6px 6px; }
.lx-account-menu .acct-signout { color: #ff8a33; }
.lx-account-menu .acct-signout:hover { background: rgba(255, 104, 3, 0.14); color: #FFE4B0; }

/* ============ Keycard sign-in (unauthed) ============ */
.lx-keycard {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    rgba(0,0,0,0.45);
  border: 1px solid var(--line-2);
  color: var(--ink-0);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .35s ease, transform .35s ease, box-shadow .35s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 8px 24px -10px rgba(0,0,0,0.6);
}
.lx-keycard::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 200deg, transparent 0deg, var(--accent) 60deg, transparent 120deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.5;
  animation: kcRing 6s linear infinite;
  pointer-events: none;
}
@keyframes kcRing { to { transform: rotate(360deg); } }
.lx-keycard:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 104, 3, 0.5);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 0 0 1px rgba(255, 104, 3, 0.35),
    0 18px 40px -16px var(--accent-glow);
}
.lx-keycard .kc-chip {
  position: relative;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(0,0,0,0.5));
  box-shadow:
    0 0 0 1px rgba(255, 104, 3, 0.4) inset,
    0 0 14px var(--accent-glow-2),
    0 0 0 4px rgba(255, 104, 3, 0.05);
  flex-shrink: 0;
}
.lx-keycard .kc-chip svg { display: block; filter: drop-shadow(0 2px 6px rgba(255,104,3,0.5)); }
.lx-keycard .kc-pulse {
  position: absolute; right: -2px; top: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent), 0 0 0 3px rgba(255,104,3,0.18);
  animation: kcPulse 1.8s ease-in-out infinite;
}
@keyframes kcPulse { 50% { transform: scale(1.2); opacity: 0.7; } }
.lx-keycard .kc-stack {
  display: inline-flex; flex-direction: column; line-height: 1.05; gap: 2px;
}
.lx-keycard .kc-l1 {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}
.lx-keycard .kc-l2 {
  font-family: var(--serif); font-size: 14px; letter-spacing: -0.01em;
  color: var(--ink-0);
}
.lx-keycard .kc-l2 b { font-weight: 500; font-style: italic; }
.lx-keycard .kc-arrow {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #1a0a02;
  margin-left: 4px;
  box-shadow: 0 0 14px var(--accent-glow);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.lx-keycard:hover .kc-arrow { transform: translateX(3px) rotate(-12deg); }
.lx-keycard .kc-shine {
  position: absolute; top: 0; bottom: 0; width: 40%;
  left: -50%;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.12) 50%, transparent 80%);
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left .9s ease;
}
.lx-keycard:hover .kc-shine { left: 110%; }
@media (max-width: 900px) {
  .lx-keycard { padding: 5px 12px 5px 5px; gap: 8px; }
  .lx-keycard .kc-stack { display: none; }
}

/* ══════════════════════════════════════════════════
   LAYER X — GLOBAL ANIMATION SYSTEM
══════════════════════════════════════════════════ */

/* ── Page Loader ── */
#lx-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-0);
  display: grid; place-items: center;
  transition: opacity .7s ease, transform .7s cubic-bezier(.7,0,.3,1);
}
#lx-loader.out { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.ld-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.ld-wordmark {
  font-family: var(--serif); font-size: clamp(40px, 8vw, 80px);
  font-weight: 300; letter-spacing: -0.04em; color: var(--ink-0);
  animation: ldPulse 1.6s ease-in-out infinite;
}
.ld-wordmark span { color: var(--accent); font-style: italic; text-shadow: 0 0 40px var(--accent-glow); }
@keyframes ldPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.ld-bar {
  width: 240px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden;
}
.ld-fill {
  height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #FFE4B0);
  box-shadow: 0 0 12px var(--accent);
  transition: width .2s ease;
}
.ld-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-2);
  animation: ldPulse 1.6s ease-in-out infinite;
}

/* ── Custom Cursor ── */
.lx-cursor-dot, .lx-cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9000;
  will-change: transform;
}
.lx-cursor-dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}
.lx-cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(255,104,3,0.55);
  border-radius: 50%;
  transition: border-color .25s, opacity .25s;
}
@media (max-width: 800px) { .lx-cursor-dot, .lx-cursor-ring { display: none; } }
body { cursor: none; }
a, button, [data-cursor], input, select, textarea, label { cursor: none; }

/* ── Ambient Mouse Glow ── */
.lx-mouse-glow {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 0;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,104,3,0.06), transparent 70%);
  will-change: transform;
}

/* ── Scroll Progress Bar ── */
.lx-scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 9001;
  background: linear-gradient(90deg, var(--accent), #FFE4B0);
  box-shadow: 0 0 10px var(--accent);
  width: 0; pointer-events: none;
  transition: width .1s linear;
}

/* ── Film Grain Canvas ── */
.lx-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  width: 100%; height: 100%;
  opacity: 0.025;
  image-rendering: pixelated;
  mix-blend-mode: overlay;
}

/* ── Particle Canvas ── */
.lx-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* ── Tilt Glare overlay ── */
.tilt-glare {
  position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; z-index: 2;
  transition: background .12s ease;
}

/* ── Split text word wrapper ── */
.sw { display: inline-block; overflow: hidden; vertical-align: bottom; }
.si { display: inline-block; }

/* ── Eyebrow draw-in ── */
.eyebrow { will-change: transform, opacity; }

/* ── Header hide/show on scroll ── */
.lx-header {
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s ease,
              background .3s ease, box-shadow .3s ease;
}
.lx-header--hidden  { transform: translateY(calc(-100% - 24px)); }
.lx-header--solid   {
  background: rgba(8, 5, 3, 0.85) !important;
  box-shadow: 0 2px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--line-2);
}

/* CLS-01: Reserve header height before layerx.js LayerX.mount() fills it.
   Prevents layout shift on every page load.
   72px = 8px padding-top + 40px logo-img height + 12px logo internal padding
          + 8px padding-bottom + 2px border + 2px buffer.
   No mobile override needed — logo height is unchanged at ≤800px breakpoint.
   Source: Phase 7 UI-SPEC */
.lx-header { min-height: 72px; }

/* ── Parallax containers ── */
.hero, .ab-hero, .svc-hero, .auth-bg, .final-cta {
  will-change: transform;
}
.hero::after, .ab-hero::after, .svc-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--bg-0);
  opacity: 0;
  transform: translateY(var(--parallax-y, 0));
}

/* ── Ambient hero glow (animated position) ── */
@keyframes ambientDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(3%, 2%) scale(1.05); }
  66%       { transform: translate(-2%, 3%) scale(0.97); }
}
body::before { animation: ambientDrift 18s ease-in-out infinite; }

/* ── Stagger delay helpers ── */
.stagger-1 { animation-delay: .08s !important; }
.stagger-2 { animation-delay: .16s !important; }
.stagger-3 { animation-delay: .24s !important; }
.stagger-4 { animation-delay: .32s !important; }
.stagger-5 { animation-delay: .40s !important; }
.stagger-6 { animation-delay: .48s !important; }

/* ── Enhanced hover glow on lx-cta ── */
.lx-cta { will-change: transform; position: relative; overflow: hidden; }
.lx-cta::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.18), transparent 65%);
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.lx-cta:hover::after { opacity: 1; }

/* ── Ripple on click ── */
.ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255,255,255,0.2); pointer-events: none;
  animation: rippleAnim .55s linear;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* ── Floating orbit rings (hero enhancement) ── */
@keyframes heroOrbit {
  from { transform: rotate(0deg) translateX(var(--orbit-r, 140px)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--orbit-r, 140px)) rotate(-360deg); }
}

/* ── Section divider line draw ── */
@keyframes lineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── Scroll-snap for mobile pages ── */
@media (max-width: 800px) {
  body { cursor: auto; }
  .lx-cursor-dot, .lx-cursor-ring, .lx-mouse-glow { display: none; }
}

/* ── Glass card hover — lift + border corona + depth ── */
.glass {
  transition:
    border-color .4s ease, border-top-color .4s ease,
    box-shadow .4s ease, transform .4s cubic-bezier(.2,.8,.2,1);
}
.glass:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255,104,3,0.32);
  border-top-color: rgba(255,104,3,0.54);
  box-shadow:
    0 1px 0  rgba(255,255,255,0.16) inset,
    0 -1px 0 rgba(255,104,3,0.14)   inset,
    0 40px 80px -20px rgba(0,0,0,0.65),
    0 0 60px -14px rgba(255,104,3,0.30),
    0 0 0 1px rgba(255,104,3,0.14);
}
.glass.glow:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow:
    0 1px 0  rgba(255,255,255,0.10) inset,
    0 -1px 0 rgba(255,104,3,0.20)   inset,
    0 40px 80px -20px rgba(0,0,0,0.70),
    0 0 100px -14px rgba(255,104,3,0.58),
    0 0 0 1px rgba(255,104,3,0.28);
}

/* ── Active link underline draw ── */
.lx-nav a { position: relative; overflow: hidden; }
.lx-nav a::after {
  content: ""; position: absolute; bottom: 4px; left: 14px; right: 14px; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.lx-nav a:hover::after, .lx-nav a.active::after { transform: scaleX(1); }

/* ── Footer mega wordmark animate ── */
.footer-mega {
  animation: megaDrift 20s ease-in-out infinite;
}
@keyframes megaDrift {
  0%,100% { transform: scaleX(1); }
  50%      { transform: scaleX(1.015); }
}

/* ══════════════════════════════════════════════════
   CARD FAMILY — unified glass enhancements
   Applied site-wide via shared stylesheet
══════════════════════════════════════════════════ */

/* Process steps */
.step {
  position: relative; overflow: hidden; isolation: isolate;
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  background: linear-gradient(135deg,
    rgba(255,255,255,0.044) 0%,
    rgba(255,255,255,0.01)  55%,
    rgba(255,104,3,0.012)   100%
  ) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-top-color: rgba(255,255,255,0.18) !important;
  transition: border-color .38s ease, border-top-color .38s ease,
              box-shadow .38s ease, transform .38s cubic-bezier(.2,.8,.2,1);
}
.step::before {
  content: "";
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  pointer-events: none; z-index: 1;
}
.step:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255,104,3,0.28) !important;
  border-top-color: rgba(255,104,3,0.46) !important;
  box-shadow: 0 0 44px -16px rgba(255,104,3,0.28), 0 24px 48px -20px rgba(0,0,0,0.65);
}

/* Service cells */
.svc-cell {
  position: relative; overflow: hidden; isolation: isolate;
  backdrop-filter: blur(26px) saturate(162%);
  -webkit-backdrop-filter: blur(26px) saturate(162%);
  background: linear-gradient(135deg,
    rgba(255,255,255,0.048) 0%,
    rgba(255,255,255,0.008) 45%,
    transparent 100%
  ) !important;
  border-top: 1px solid rgba(255,255,255,0.14) !important;
}
.svc-cell::before {
  content: "";
  position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events: none; z-index: 1;
}

/* Case study tiles */
.case {
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: box-shadow .4s, transform .4s cubic-bezier(.2,.8,.2,1);
}
.case::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  pointer-events: none; z-index: 4;
}
.case:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 0 55px -14px rgba(255,104,3,0.36),
    0 30px 60px -20px rgba(0,0,0,0.80) !important;
}

/* Case overlay interaction */
.case-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 11, 9, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 10;
}
.case:hover .case-overlay {
  opacity: 1;
  pointer-events: auto;
}
.case-overlay .tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.case-overlay .tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent);
  padding: 6px 12px; border: 1px solid rgba(255,104,3,0.25); border-radius: 999px;
  background: rgba(255,104,3,0.05);
}
.case-overlay .desc {
  font-size: 15px; line-height: 1.6; color: var(--ink-1);
  margin-bottom: 28px;
}
.case-overlay .specs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px;
}
.case-overlay .spec-lbl {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-2);
  margin-bottom: 6px;
}
.case-overlay .spec-val {
  font-size: 14px; color: var(--ink-0); font-family: var(--sans);
}


/* Team person cards */
.person {
  position: relative; overflow: hidden; isolation: isolate;
  backdrop-filter: blur(22px) saturate(152%);
  -webkit-backdrop-filter: blur(22px) saturate(152%);
  background: linear-gradient(180deg,
    rgba(255,255,255,0.042) 0%,
    rgba(255,255,255,0.008) 100%
  ) !important;
  border-top: 1px solid rgba(255,255,255,0.16) !important;
  transition: border-color .38s ease, border-top-color .38s ease,
              box-shadow .38s ease, transform .38s cubic-bezier(.2,.8,.2,1) !important;
}
.person:hover {
  border-color: rgba(255,104,3,0.40) !important;
  border-top-color: rgba(255,104,3,0.55) !important;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.80),
    0 0 50px -14px rgba(255,104,3,0.34) !important;
}

/* Timeline cards */
.tl-card {
  backdrop-filter: blur(30px) saturate(172%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(172%) !important;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.062) 0%,
    rgba(255,255,255,0.018) 50%,
    rgba(255,104,3,0.010) 100%
  ) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-top-color: rgba(255,255,255,0.22) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 24px 48px -20px rgba(0,0,0,0.55) !important;
  position: relative; overflow: hidden; isolation: isolate;
}
.tl-card::before {
  content: "";
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.30), transparent);
  pointer-events: none; z-index: 1;
}

/* Product cards */
.product {
  backdrop-filter: blur(18px) saturate(148%);
  -webkit-backdrop-filter: blur(18px) saturate(148%);
  background: linear-gradient(180deg,
    rgba(255,255,255,0.04) 0%,
    var(--bg-1) 100%
  ) !important;
  border-top: 1px solid rgba(255,255,255,0.12) !important;
  transition: border-color .4s, border-top-color .4s,
              transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s !important;
}
.product:hover {
  border-top-color: rgba(255,104,3,0.46) !important;
}

/* Certification cells */
.cert {
  position: relative;
  transition: background .32s ease, color .32s ease, border-color .32s ease;
}
.cert:hover {
  background: rgba(255,104,3,0.06);
  color: var(--accent);
  border-color: transparent;
}

/* Value grid cells */
.value {
  position: relative; overflow: hidden; isolation: isolate;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  background: linear-gradient(135deg,
    rgba(255,255,255,0.038) 0%,
    rgba(255,255,255,0.006) 50%,
    transparent 100%
  ) !important;
  border-top: 1px solid rgba(255,255,255,0.12) !important;
  transition: border-top-color .38s ease, box-shadow .38s ease;
}
.value:hover {
  border-top-color: rgba(255,104,3,0.42) !important;
  box-shadow: inset 0 -1px 0 rgba(255,104,3,0.10);
}

/* FAQ details */
.faq details {
  position: relative;
  transition: background .32s ease;
}
.faq details[open] {
  background: rgba(255,104,3,0.03);
}

/* Stat band cells */
.stat-band {
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid rgba(255,255,255,0.10);
}

/* ── Shine sweep utility — added by JS to cards ── */
.lx-shine {
  position: absolute; top: 0; left: -70%; bottom: 0; width: 50%;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,0.065) 50%, transparent 75%);
  transform: skewX(-14deg);
  pointer-events: none; z-index: 4;
  opacity: 0;
}

/* ── Eq-card glass upgrade ── */
.eq-card {
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  background: linear-gradient(180deg,
    rgba(255,255,255,0.035) 0%,
    var(--bg-1) 60%
  ) !important;
  border-top: 1px solid rgba(255,255,255,0.14) !important;
}
.eq-card:hover {
  border-top-color: rgba(255,104,3,0.50) !important;
}

/* ═══════════════════════════════════════════════════
   GLOBAL FIELD — floating label glass inputs (UI-05)
   D-12: base rules | D-13: error/success | D-14: field-msg
   ═══════════════════════════════════════════════════ */
.field { position: relative; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 24px 16px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink-0);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.field label {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  pointer-events: none;
  transition: top 0.2s, font-size 0.2s, color 0.2s, transform 0.2s;
}

/* Float label when focused or has content (input and textarea only — not select) */
.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label,
.field textarea:not(:placeholder-shown) ~ label {
  top: 8px;
  transform: translateY(0);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Hide placeholder text until focused or filled to prevent overlap */
.field input::placeholder,
.field textarea::placeholder {
  color: transparent;
  transition: color 0.2s;
}
.field input:focus::placeholder,
.field textarea:focus::placeholder {
  color: var(--ink-3);
}

/* Focus glow — applies to input, textarea, and select */
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-2), inset 0 0 12px rgba(255,104,3,0.05);
  background: rgba(255,255,255,0.07);
}

/* Fix WebKit autofill styling for dark mode */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #1a1512 inset !important;
  -webkit-text-fill-color: var(--ink-0) !important;
  transition: background-color 5000s ease-in-out 0s;
}
input:-webkit-autofill-previewed,
input:-internal-autofill-previewed {
  -webkit-box-shadow: 0 0 0 1000px #1a1512 inset !important;
  -webkit-text-fill-color: var(--ink-0) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Textarea — static label above (no float); reduced top padding */
.field textarea { resize: vertical; min-height: 120px; padding-top: 16px; }

/* Error state */
.field--error input,
.field--error textarea { border-color: rgba(255,68,68,0.8); }
.field--error input:focus,
.field--error textarea:focus { box-shadow: 0 0 0 3px rgba(255,68,68,0.18); }
.field--error .field-msg { color: rgba(255,100,100,0.9); display: block; }

/* Success state */
.field--success input,
.field--success textarea { border-color: rgba(0,255,136,0.6); }
.field--success .field-msg { color: rgba(0,255,136,0.8); display: block; }

/* Field message (hidden by default; shown via .field--error / .field--success) */
.field-msg {
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 8px;
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════════════
   SKELETON LOADERS — shimmer placeholders (UI-06, D-17)
   Reduced-motion kill-switch (styles.css:1070) stops
   the shimmer animation automatically — no extra rule needed.
   ═══════════════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel {
  background: linear-gradient(
    90deg,
    var(--bg-2) 25%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
}
.skel-sm   { height: 12px; }
.skel-md   { height: 16px; }
.skel-lg   { height: 24px; }
.skel-card { height: 280px; border-radius: var(--rad-lg); }

/* ── Auth loading guard (Phase 4 D-10, D-11) ── */
body.auth-loading [data-auth-required] {
  visibility: hidden;
}

.lx-auth-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.75); }
}

/* ══════════════════════════════════════════════════
   REDUCED MOTION — WCAG 2.1 AA compliance (UI-02, D-08)
   ══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Hide loader and scroll-progress bar — they are animation-only UI */
  #lx-loader { display: none !important; }
  .lx-scroll-progress { display: none !important; }
}

/* ══════════════════════════════════════════════════
   PHASE 5 — Catalog, Cart + Quote
   All surfaces below compose existing :root tokens (see styles.css:61-87).
   No new design tokens introduced. Reduced-motion is inherited from the
   global reset above; no Phase 5-specific reduced-motion rule needed.
   ══════════════════════════════════════════════════ */

/* === Phase 5: Cart drawer (slide-in panel, shop.html only) === */
.lx-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.lx-cart-drawer-bg {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 3, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .4s;
}
.lx-cart-drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: #100c0a;
  border-left: 1px solid var(--line-2);
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  box-shadow: -40px 0 80px rgba(0, 0, 0, 0.6);
}
.lx-cart-drawer.open { pointer-events: all; }
.lx-cart-drawer.open .lx-cart-drawer-bg { opacity: 1; }
.lx-cart-drawer.open .lx-cart-drawer-panel { transform: none; }

/* Cart drawer header */
.cdw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

/* Cart drawer item list */
.cdw-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cdw-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cdw-item:last-child { border-bottom: 0; }
.cdw-item-thumb img {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.cdw-item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.cdw-item .name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdw-item .spec {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.10em;
}
.cdw-item .total {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-0);
  text-align: right;
}

/* Cart drawer footer */
.cdw-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.cdw-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.cdw-subtotal .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.10em;
}
.cdw-subtotal .value {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-0);
}
.cdw-cta-link {
  display: block;
  padding: 16px;
  text-align: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  transition: opacity .2s;
}
.cdw-cta-link:hover { opacity: 0.8; }

/* === Phase 5: Cart icon button + badge (shop.html header injection) === */
.lx-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    rgba(0,0,0,0.45);
  border: 1px solid var(--line-2);
  color: var(--ink-0);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 8px 24px -10px rgba(0,0,0,0.6);
  transition: border-color .35s ease, transform .35s ease, box-shadow .35s ease, color .25s ease;
}
.lx-cart-btn:hover,
.lx-cart-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 104, 3, 0.5);
  color: var(--accent);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 0 0 1px rgba(255, 104, 3, 0.35),
    0 18px 40px -16px var(--accent-glow);
}
.lx-cart-btn .cart-ico { width: 20px; height: 20px; display: block; }

.cart-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0a02;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow:
    0 0 10px var(--accent-glow),
    0 0 0 2px rgba(0, 0, 0, 0.7);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.cart-badge[data-count]:not([data-count="0"]) { display: inline-flex; }
.cart-badge.pulse { transform: scale(1.25); }

/* === Phase 5: Product modal (native <dialog>) === */
dialog.lx-modal {
  background: var(--bg-1);
  color: var(--ink-0);
  border: 1px solid var(--line-2);
  border-radius: var(--rad-lg);
  padding: 32px;
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.85),
    0 0 60px -20px var(--accent-glow);
  width: min(720px, 92vw);
  max-height: min(86vh, 880px);
  overflow-y: auto;
}
dialog.lx-modal::backdrop {
  background: rgba(6, 4, 3, 0.78);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}
.lx-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-0);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color .2s, background .2s;
}
.lx-modal-close:hover { color: var(--accent); }

#pm-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--rad);
  width: 100%;
  height: auto;
  max-height: 480px;
  margin-bottom: 24px;
}
.pm-specs {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.pm-specs tr { border-bottom: 1px solid var(--line); }
.pm-specs tr:last-child { border-bottom: 0; }
.pm-specs td:first-child {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  width: 38%;
  padding: 12px 0;
}
.pm-specs td:last-child {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-0);
  padding: 12px 0;
}
.pm-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

/* === Phase 5: cart.html surfaces (cart-wrap, cart-line, order-summary) === */
.cart-wrap {
  padding: clamp(72px, 9vw, 120px) var(--pad-page) 80px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 980px) {
  .cart-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.cart-line {
  position: relative;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.cart-line-thumb img {
  width: 96px;
  height: 96px;
  border-radius: var(--rad);
  object-fit: cover;
  border: 1px solid var(--line-2);
}
.cart-line-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.cart-line-text .name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-0);
}
.cart-line-text .spec {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.10em;
}
.cart-line-text .unit {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-1);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px;
  width: fit-content;
  margin-top: 8px;
}
.qty-stepper button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--ink-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s;
  font-size: 16px;
}
.qty-stepper button:hover:not(:disabled) {
  color: var(--accent);
  background: rgba(255, 104, 3, 0.08);
}
.qty-stepper button:disabled {
  color: var(--ink-2);
  cursor: not-allowed;
  opacity: 0.5;
}
.qty-stepper .qty {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  min-width: 32px;
  text-align: center;
  color: var(--ink-0);
}

.cart-line-total {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink-0);
  text-align: right;
  min-width: 90px;
}
.cart-line-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 18px;
  transition: color .2s, background .2s;
}
.cart-line-remove:hover {
  color: rgba(255, 68, 68, 0.85);
  background: rgba(255, 68, 68, 0.06);
}

.order-summary {
  padding: 28px;
  position: sticky;
  top: 100px;
}
.order-summary h2 { margin-bottom: 18px; }
.order-summary .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.order-summary .row:last-of-type { border-bottom: 0; }
.order-summary .row .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.08em;
}
.order-summary .row .value {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink-0);
}
.order-summary .row.muted .value {
  color: var(--ink-2);
  font-size: 13px;
}
.order-summary .row.total .label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-0);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.order-summary .row.total .value {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent);
}

.cart-checkout-cta {
  width: 100%;
  margin-top: 20px;
  justify-content: center;
  padding: 18px 24px;
  font-size: 15px;
}
.cart-precheck-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 14px;
}

.cart-empty {
  padding: 80px 24px;
  text-align: center;
}

@media (max-width: 600px) {
  .cart-line { flex-wrap: wrap; }
  .cart-line-text .name { font-size: 18px; }
  .cart-line-thumb img { width: 72px; height: 72px; }
}

/* === Phase 5: Quote success state (shared by both quote forms) === */
.quote-success {
  padding: 36px;
  max-width: 540px;
  margin-inline: auto;
  text-align: left;
}
.quote-success .check-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 104, 3, 0.10);
  border: 1px solid rgba(255, 104, 3, 0.4);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* === Phase 5: Catalog empty state (filter/search returns zero) === */
.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

/* === Phase 5: Quote form segment buttons — mobile grid override === */
@media (max-width: 600px) {
  .seg.seg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  dialog.lx-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    padding: 24px;
  }
}

/* === Phase 5: Cart-drawer-scoped override for .lx-drawer-close (W-5) ===
   .lx-drawer-close is pre-existing (Phase 1 mobile drawer pattern, lines
   423-431). The cart drawer's .cdw-head uses flex space-between to position
   the title + close button in-flow; absolute positioning from the original
   rule would clash with the flex layout. Scoped to .lx-cart-drawer so the
   original mobile-drawer behavior is untouched. */
.lx-cart-drawer .lx-drawer-close { position: static; }

/* ============================================================ */
/* Phase 6 — Status badges (promoted from profile.html scoped <style>) */
/* ============================================================ */
/*  Base class + base dot. Modifier classes (.badge.{status}) below */
/*  cover order statuses (pending/paid/processing) and quote        */
/*  statuses (received/in-review/quoted). The existing legacy       */
/*  modifiers (.badge.printing / .badge.finishing / .badge.shipped) */
/*  remain in profile.html scoped <style> — Phase 6 does not touch  */
/*  them because they are only used by Phase 4 mock data which      */
/*  Plan 06-04 replaces entirely.                                   */
/*                                                                  */
/*  Name-collision resolution (PATTERNS §12 planner decision):      */
/*  The existing profile.html-scoped .badge.quoted is the muted-    */
/*  gray treatment for legacy quote mock data. Phase 6 introduces   */
/*  semantic class names matching the DB enum: status='received'    */
/*  → .badge.received (adopts the muted-gray); status='quoted'      */
/*  → .badge.quoted (NEW amber-yellow per UI-SPEC §Color). Plan     */
/*  06-04 removes the legacy scoped block from profile.html.        */
.badge { display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid var(--line-2); }
.badge .b { width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent); }

@keyframes blip { 50% { opacity: 0.3; } }

/* Order statuses (3) — pending/paid/processing */
.badge.pending    { background: rgba(255,180,0,0.10); color: #f5c842; border-color: rgba(255,180,0,0.40); }
.badge.pending .b { background: #f5c842; box-shadow: 0 0 8px rgba(245,200,66,0.6); animation: blip 1.4s infinite; }
.badge.paid       { background: rgba(106,207,143,0.08); color: #8de0aa; border-color: rgba(106,207,143,0.30); }
.badge.paid .b    { background: #8de0aa; box-shadow: 0 0 8px #8de0aa; }
.badge.processing { background: rgba(255,104,3,0.10); color: var(--accent); border-color: rgba(255,104,3,0.40); }
.badge.processing .b { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blip 1.4s infinite; }

/* Quote statuses (3) — received/in-review/quoted */
.badge.received    { background: rgba(200,200,200,0.05); color: var(--ink-1); border-color: var(--line-2); }
.badge.received .b { background: var(--ink-2); box-shadow: none; }
.badge.in-review   { background: rgba(110,180,255,0.08); color: #8fc1ff; border-color: rgba(110,180,255,0.30); }
.badge.in-review .b { background: #8fc1ff; box-shadow: 0 0 8px #8fc1ff; }
.badge.quoted      { background: rgba(255,220,80,0.08); color: #f5d96e; border-color: rgba(255,220,80,0.30); }
.badge.quoted .b   { background: #f5d96e; box-shadow: 0 0 8px rgba(245,217,110,0.5); }
