/* ==========================================================================
   APEX — The Science of Your Peak
   Brand stylesheet (obsidian + champagne gold, dark luxury)
   ========================================================================== */

:root {
  --obsidian:   #0C0D11;
  --obsidian-2: #101218;
  --graphite:   #2A2D34;
  --platinum:   #C9CDD3;
  --ivory:      #F5F2EA;

  --gold-light: #E7D29B;
  --gold:       #C6A664;
  --gold-dark:  #9A7B43;
  --gold-grad:  linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);

  --hairline:   rgba(198, 166, 100, 0.22);
  --hairline-2: rgba(198, 166, 100, 0.12);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--obsidian);
  color: var(--platinum);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Ambient background: soft gold glows + fine grain */
.apex-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% -8%, rgba(198,166,100,0.14), transparent 70%),
    radial-gradient(45% 45% at 88% 12%, rgba(231,210,155,0.06), transparent 70%),
    radial-gradient(50% 50% at 8% 92%, rgba(154,123,67,0.07), transparent 70%),
    var(--obsidian);
}
.apex-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography helpers ---------- */
.display {
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.30em;
}
.display-tight { letter-spacing: 0.18em; }

.serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-platinum { color: var(--platinum); }
.text-ivory    { color: var(--ivory); }
.text-muted    { color: rgba(201, 205, 211, 0.55); }

/* ---------- Holographic shimmer (for the symbol / accents) ---------- */
.holo {
  background: linear-gradient(115deg,
    #9A7B43 0%, #E7D29B 18%, #fff7e2 30%, #C6A664 44%,
    #9A7B43 58%, #E7D29B 74%, #C6A664 100%);
  background-size: 280% 280%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo-shift 8s var(--ease) infinite;
}
@keyframes holo-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.holo-symbol svg { filter: drop-shadow(0 0 10px rgba(198,166,100,0.35)); display: block; width: 100%; height: 100%; }

/* 3 mL vial mockup */
.vial { height: 94%; max-height: 440px; width: auto; filter: drop-shadow(0 28px 42px rgba(0,0,0,0.6)); }

/* ---------- Dividers ---------- */
.gold-rule {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
.gold-rule-short {
  height: 1px;
  width: 64px;
  margin: 0 auto;
  background: var(--gold-grad);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.95rem 2rem;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  background: transparent;
  transition: all 0.4s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  color: var(--obsidian);
  background: var(--gold-grad);
  box-shadow: 0 10px 40px -12px rgba(198,166,100,0.55);
}
.btn-solid {
  background: var(--gold-grad);
  color: var(--obsidian);
  border-color: transparent;
}
.btn-solid:hover { box-shadow: 0 14px 44px -12px rgba(198,166,100,0.6); transform: translateY(-1px); }
.btn-ghost { border-color: var(--hairline); color: var(--platinum); }
.btn-ghost:hover { color: var(--obsidian); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.004));
  border: 1px solid var(--hairline-2);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--hairline);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.9), 0 0 0 1px var(--hairline-2);
}
.card:hover::before { opacity: 1; }

.tag {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid var(--hairline);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}

/* ---------- Nav ---------- */
.nav-link {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(201,205,211,0.7);
  transition: color 0.3s var(--ease);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--gold-grad);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.link-gold { color: var(--gold-light); transition: color 0.3s var(--ease); }
.link-gold:hover { color: var(--ivory); }

::selection { background: rgba(198,166,100,0.3); color: var(--ivory); }

/* Thin scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb { background: var(--graphite); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

@media (prefers-reduced-motion: reduce) {
  .holo { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
