/* =============================================
   DESIGN SYSTEM — andrewpower.org
   Brand: Cadbury Purple + Gold
   Archetypes: Magician + Outlaw
   ============================================= */

:root {
  /* ─── Brand Colors ─── */
  --purple:         #4B0082;
  --purple-mid:     #6B2A9F;
  --purple-dark:    #2D004E;
  --purple-deepest: #1A002E;
  --gold:           #C9A84C;
  --gold-light:     #E4C878;
  --gold-dark:      #9A7B2E;
  --cream:          #F4EFE6;
  --cream-dark:     #E8E0D0;
  --charcoal:       #1A1A1A;
  --charcoal-mid:   #2C2C2C;
  --white:          #FFFFFF;

  /* ─── Semantic Background Zones ─── */
  --bg-dark:        var(--purple-deepest);
  --bg-purple:      var(--purple);
  --bg-mid:         var(--purple-dark);
  --bg-light:       var(--cream);
  --bg-charcoal:    var(--charcoal);

  /* ─── Text ─── */
  --text-on-dark:   var(--cream);
  --text-on-light:  var(--charcoal);
  --text-muted:     rgba(244, 239, 230, 0.5);
  --text-muted-dark: rgba(26, 26, 26, 0.45);
  --text-gold:      var(--gold);

  /* ─── Typography ─── */
  --font-display:   'Cormorant', Georgia, serif;
  --font-heading:   'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body:      'DM Mono', 'Courier New', monospace;

  /* ─── Type Scale ─── */
  --text-hero:      clamp(4rem, 10vw, 10rem);
  --text-headline:  clamp(2.5rem, 5vw, 5rem);
  --text-subhead:   clamp(1.5rem, 3vw, 3rem);
  --text-lg:        clamp(1.1rem, 1.5vw, 1.4rem);
  --text-base:      0.95rem;
  --text-sm:        0.8rem;
  --text-xs:        0.7rem;
  --text-marquee:   clamp(5rem, 12vw, 14rem);

  /* ─── Spacing ─── */
  --space-xs:       0.5rem;
  --space-sm:       1rem;
  --space-md:       2rem;
  --space-lg:       4rem;
  --space-xl:       8rem;
  --space-2xl:      14rem;

  /* ─── Transitions ─── */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.87, 0, 0.13, 1);
  --ease-magnetic:  cubic-bezier(0.23, 1, 0.32, 1);
  --duration-fast:  0.2s;
  --duration-med:   0.5s;
  --duration-slow:  0.9s;

  /* ─── Layout ─── */
  --max-width:      1400px;
  --nav-height:     80px;
  --gutter:         clamp(1.5rem, 5vw, 6rem);

  /* ─── Borders ─── */
  --border-gold:    1px solid rgba(201, 168, 76, 0.3);
  --border-cream:   1px solid rgba(244, 239, 230, 0.15);

  /* ─── Shadows ─── */
  --shadow-gold:    0 0 60px rgba(201, 168, 76, 0.12);
  --shadow-purple:  0 0 80px rgba(75, 0, 130, 0.4);
}

/* ─── Base Typography ─── */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  background-color: var(--purple-deepest);
  color: var(--cream);
  cursor: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

h4, h5, h6,
.label,
.eyebrow {
  font-family: var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Section Label ─── */
.section-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1.1rem 2.4rem;
  position: relative;
  overflow: hidden;
  transition: color var(--duration-fast) var(--ease-out);
  cursor: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--purple-deepest);
  border: 2px solid var(--gold);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--purple-deepest);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-out);
}
.btn-primary:hover {
  color: var(--gold);
}
.btn-primary:hover::after {
  transform: translateY(0);
}
.btn-primary span {
  position: relative;
  z-index: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(244, 239, 230, 0.4);
  transition: border-color var(--duration-fast), color var(--duration-fast);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Layout Container ─── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Gold accent line ─── */
.gold-rule {
  width: 60px;
  height: 2px;
  background: var(--gold);
  display: block;
}

/* ─── Utilities ─── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-gold     { color: var(--gold); }
.text-muted    { color: var(--text-muted); }
.text-cream    { color: var(--cream); }
.bg-dark       { background: var(--bg-dark); }
.bg-purple     { background: var(--bg-purple); }
.bg-light      { background: var(--bg-light); color: var(--text-on-light); }
.bg-charcoal   { background: var(--bg-charcoal); }

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

/* ─── Mobile cursor hide ─── */
@media (hover: none) {
  .cursor { display: none !important; }
  body { cursor: auto; }
  a, button, .btn { cursor: pointer; }
}

/* ─── Accessibility: reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
