/* ============================================================
   COMPOUND LAB OS — shared inner-page system
   page hero, buttons, chips, slabs, CTA band, footer,
   mobile menu overlay, page transitions
   (requires css/styles.css tokens first)
   ============================================================ */

/* ---------- page enter / exit transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
  body { animation: pageIn 0.6s cubic-bezier(.2,.7,.2,1) both; }
  .no-anim body { animation: none; }
  body.page-exit { animation: pageOut 0.3s ease both; }
}
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pageOut { from { opacity: 1; } to { opacity: 0; } }

/* ---------- active nav link ---------- */
.nav-links a.active { color: var(--gold-bright); }
.nav-links a.active::after { width: 100%; }

/* ---------- page hero ---------- */
.page-hero {
  position: relative;
  z-index: 4;
  padding: clamp(28px, 6vh, 72px) 0 clamp(26px, 4vh, 48px);
  max-width: 720px;
}
.crumb {
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.crumb .sep { color: var(--text-faint); }
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(42px, 5.4vw, 78px);
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.page-hero h1 .accent {
  background: linear-gradient(115deg, var(--gold-bright) 10%, var(--gold) 45%, var(--gold-deep) 75%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 calc(22px * var(--glow)) oklch(0.78 0.11 var(--gold-h) / 0.35));
}
.page-hero .rule {
  width: 86px; height: 3px;
  margin: 26px 0 22px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
  border-radius: 2px;
  box-shadow: 0 0 calc(16px * var(--glow)) oklch(0.8 0.1 var(--gold-h) / 0.5);
}
.page-hero .lede {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 460px;
}

/* ---------- section heading ---------- */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: clamp(40px, 7vh, 76px) 0 22px;
}
.sec-head .eyebrow { margin-bottom: 0; }
.sec-head .count { font-size: 13px; color: var(--text-faint); letter-spacing: 0.1em; white-space: nowrap; }
.sec-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  color: var(--text);
  margin: 10px 0 8px;
  text-wrap: balance;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 22px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform 0.3s ease; }
.btn:hover svg { transform: translateX(4px); }
.btn-gold {
  color: oklch(0.18 0.03 var(--gold-h));
  background:
    linear-gradient(170deg, var(--gold-bright), var(--gold) 50%, var(--gold-soft)) padding-box,
    var(--metal-edge) border-box;
  box-shadow:
    0 16px 32px -14px rgba(0, 0, 0, 0.9),
    0 0 calc(28px * var(--glow)) oklch(0.78 0.1 var(--gold-h) / 0.22),
    inset 0 1px 0 oklch(0.97 0.04 var(--gold-h) / 0.7);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 38px -14px rgba(0, 0, 0, 0.9),
    0 0 calc(42px * var(--glow)) oklch(0.78 0.1 var(--gold-h) / 0.35),
    inset 0 1px 0 oklch(0.97 0.04 var(--gold-h) / 0.7);
}
.btn-ghost {
  color: var(--text-soft);
  background:
    linear-gradient(160deg, oklch(0.24 0.022 var(--gold-h) / 0.7), oklch(0.13 0.013 var(--gold-h) / 0.6) 60%) padding-box,
    linear-gradient(155deg, oklch(0.85 0.09 var(--gold-h) / 0.55), oklch(0.4 0.04 var(--gold-h) / 0.18) 40%, oklch(0.75 0.08 var(--gold-h) / 0.45)) border-box;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.85), inset 0 1px 0 oklch(0.9 0.05 var(--gold-h) / 0.18);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  color: var(--gold-bright);
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.85), 0 0 calc(26px * var(--glow)) oklch(0.75 0.09 var(--gold-h) / 0.25), inset 0 1px 0 oklch(0.9 0.05 var(--gold-h) / 0.24);
}

/* ---------- filter chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  appearance: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid oklch(0.7 0.06 var(--gold-h) / 0.22);
  background: oklch(0.85 0.05 var(--gold-h) / 0.04);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.chip:hover { color: var(--gold-bright); border-color: oklch(0.8 0.08 var(--gold-h) / 0.45); }
.chip.active {
  color: var(--gold-bright);
  border-color: oklch(0.82 0.09 var(--gold-h) / 0.7);
  background: oklch(0.78 0.09 var(--gold-h) / 0.10);
  box-shadow: 0 0 calc(18px * var(--glow)) oklch(0.78 0.09 var(--gold-h) / 0.25), inset 0 1px 0 oklch(0.9 0.06 var(--gold-h) / 0.2);
}

/* ---------- case link (shared arrow link) ---------- */
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-decoration: none;
}
.case-link svg { width: 17px; height: 17px; flex: none; transition: transform 0.3s ease; }
.case-link:hover svg { transform: translateX(5px); }

/* ---------- tag chips (static, small) ---------- */.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid oklch(0.7 0.06 var(--gold-h) / 0.25);
  background: oklch(0.85 0.05 var(--gold-h) / 0.05);
}

/* ---------- glass panel + metal slab blocks ---------- */
.glass-panel {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, oklch(0.28 0.024 var(--gold-h) / 0.5), oklch(0.15 0.014 var(--gold-h) / 0.45) 55%) padding-box,
    linear-gradient(155deg, oklch(0.88 0.08 var(--gold-h) / 0.5), oklch(0.45 0.05 var(--gold-h) / 0.15) 35%, oklch(0.3 0.03 var(--gold-h) / 0.12) 65%, oklch(0.75 0.08 var(--gold-h) / 0.38) 100%) border-box;
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 oklch(0.92 0.05 var(--gold-h) / 0.2),
    inset 0 -22px 36px -26px rgba(0, 0, 0, 0.7);
}
.slab {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  background:
    var(--metal-face) padding-box,
    var(--metal-edge) border-box;
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 oklch(0.92 0.06 var(--gold-h) / 0.2),
    inset 0 -28px 48px -30px rgba(0, 0, 0, 0.8);
}

/* ---------- big slab numerals ---------- */
.big-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 4.4vw, 64px);
  line-height: 1;
  background: linear-gradient(170deg, var(--gold-bright) 5%, var(--gold) 50%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 calc(16px * var(--glow)) oklch(0.78 0.1 var(--gold-h) / 0.3));
}
.big-num small {
  font-size: 0.38em;
  color: var(--text-faint);
  -webkit-text-fill-color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ---------- status pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid oklch(0.8 0.08 var(--gold-h) / 0.4);
  background: oklch(0.78 0.09 var(--gold-h) / 0.07);
}
.status-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 calc(10px * var(--glow)) var(--gold-bright);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  z-index: 5;
  margin: clamp(50px, 9vh, 96px) 0 56px;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, oklch(0.12 0.012 var(--gold-h) / 0.55), oklch(0.09 0.01 var(--gold-h) / 0.82)),
    url("../assets/bg-cta.jpg") center / cover no-repeat padding-box;
  background-blend-mode: normal, normal;
  box-shadow: var(--shadow-card), inset 0 1px 0 oklch(0.9 0.06 var(--gold-h) / 0.16);
  overflow: hidden;
  padding: clamp(34px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--metal-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 1.1;
  color: var(--text);
  max-width: 480px;
  text-wrap: balance;
}
.cta-band .cta-sub { margin-top: 12px; font-size: 15px; color: var(--text-dim); max-width: 420px; }
.cta-band .cta-actions { display: flex; flex-direction: column; gap: 14px; min-width: 300px; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 5;
  border-top: 1px solid oklch(0.7 0.06 var(--gold-h) / 0.14);
  margin-top: 10px;
  padding: 34px 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.site-footer .f-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--text-soft);
}
.site-footer .f-brand svg { width: 26px; height: 26px; }
.site-footer .f-links { display: flex; gap: 26px; flex-wrap: wrap; }
.site-footer .f-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.3s ease;
}
.site-footer .f-links a:hover { color: var(--gold-bright); }
.site-footer .f-note { font-size: 12.5px; color: var(--text-faint); letter-spacing: 0.06em; }

/* ---------- mobile full-screen menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background:
    radial-gradient(110% 80% at 50% 20%, oklch(0.2 0.04 var(--gold-h) / 0.5), transparent 65%),
    oklch(0.08 0.008 var(--gold-h) / 0.86);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
html.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
html.menu-open { overflow: hidden; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.3;
  color: var(--text-soft);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 16px;
  justify-content: center;
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.5s cubic-bezier(.2,.7,.2,1), translate 0.5s cubic-bezier(.2,.7,.2,1), color 0.3s ease;
}
html.menu-open .mobile-menu a { opacity: 1; translate: 0 0; }
.mobile-menu a:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu a:nth-child(2) { transition-delay: 0.12s; }
.mobile-menu a:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu a:nth-child(4) { transition-delay: 0.24s; }
.mobile-menu a:nth-child(5) { transition-delay: 0.30s; }
.mobile-menu a:nth-child(6) { transition-delay: 0.36s; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--gold-bright); }
.mobile-menu a .mnum {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
}
.mobile-menu .m-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 50px; height: 50px;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  background: oklch(0.85 0.05 var(--gold-h) / 0.05);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.mobile-menu .m-close svg { width: 20px; height: 20px; }

/* ---------- shared responsive ---------- */
@media (max-width: 1024px) {
  .cta-band { flex-direction: column; align-items: flex-start; }
  .cta-band .cta-actions { width: 100%; min-width: 0; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex: none; }
}
