/* ============================================================
   VESPERA — Base Styles, Typography, Global Elements
   ============================================================ */

/* ── Body ── */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  color: var(--cream);
  background-color: var(--abyss);
  overflow-x: hidden;
  cursor: none;
}

/* ── Canvas background (fixed, full viewport) ── */
#canvasBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-bg);
  pointer-events: none;
}

/* ── Noise texture overlay ── */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Custom Cursor ── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  border-radius: var(--r-full);
  transform: translate(-50%, -50%);
  transition: opacity var(--t-fast);
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--gold-light);
  box-shadow: 0 0 10px var(--gold-glow), 0 0 20px var(--gold-subtle);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gold-border-h);
  background: transparent;
  transition: width var(--t-fast), height var(--t-fast), border-color var(--t-fast);
}

.cursor-ring.is-hovering {
  width: 54px;
  height: 54px;
  border-color: var(--gold);
  background: var(--gold-subtle);
}

@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}

/* ── Section wrapper ── */
.section {
  position: relative;
  padding: var(--sp-40) var(--sp-8);
  z-index: var(--z-base);
}

.section__inner {
  max-width: var(--section-max);
  margin: 0 auto;
}

/* ── Section header ── */
.section__header {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-4);
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.section__heading em {
  font-style: italic;
  color: var(--gold);
  font-family: var(--font-accent);
  font-weight: 500;
}

.section__sub {
  font-size: var(--text-lg);
  color: var(--cream-mid);
  max-width: var(--text-max);
  margin: var(--sp-6) auto 0;
  line-height: 1.7;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  border: 1.5px solid transparent;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t-fast);
  border-radius: inherit;
}

.btn:hover::before { opacity: 1; }

/* Sizes */
.btn--sm  { padding: var(--sp-2) var(--sp-5); font-size: var(--text-sm); border-radius: var(--r-sm); }
.btn--md  { padding: var(--sp-4) var(--sp-8); font-size: var(--text-base); }
.btn--lg  { padding: var(--sp-5) var(--sp-10); font-size: var(--text-lg); }
.btn--xl  { padding: var(--sp-6) var(--sp-12); font-size: var(--text-xl); }

/* Ghost (App Store style) */
.btn--ghost {
  background: var(--glass-bg);
  border-color: var(--glass-border-h);
  color: var(--cream);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn--ghost:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold-sm);
  color: var(--gold-light);
}

/* Primary (Google Play style) */
.btn--primary {
  background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-500) 100%);
  border-color: var(--crimson-border);
  color: var(--cream);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--crimson-500) 0%, var(--crimson-400) 100%);
  box-shadow: var(--shadow-crimson);
  border-color: var(--crimson-400);
}

/* Gold variant */
.btn--gold {
  background: linear-gradient(135deg, var(--gold-muted) 0%, var(--gold) 100%);
  border-color: var(--gold);
  color: var(--void);
}
.btn--gold:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  box-shadow: var(--shadow-gold-md);
}

/* Store button label layout */
.btn__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.btn__sup {
  font-size: var(--text-xs);
  opacity: 0.75;
  letter-spacing: 0.04em;
}
.btn__main {
  font-size: 1.05em;
  font-weight: 600;
}

.btn svg {
  flex-shrink: 0;
}

/* ── Divider ornament ── */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  justify-content: center;
  color: var(--gold-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
}

.ornament::before,
.ornament::after {
  content: '';
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

/* ── Data-reveal: initial hidden state is set by GSAP in animations.js
      Keeping this empty ensures sections stay visible if GSAP doesn't load ── */

/* ── Typography helpers ── */
.text-gold   { color: var(--gold); }
.text-crimson{ color: var(--crimson-400); }
.text-cream  { color: var(--cream); }
.text-dim    { color: var(--cream-dim); }

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Gold line separator ── */
.gold-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: var(--sp-6) auto;
}

/* ── Glow orb utility ── */
.glow-orb {
  position: absolute;
  border-radius: var(--r-full);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
  .section {
    padding: var(--sp-24) var(--sp-6);
  }
}
