/* ============================================================
   ECHOES OF HEAVEN — Design System
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --navy-950: #070b13;
  --navy-900: #0a1019;
  --navy-850: #0d1622;
  --navy-800: #111c2b;
  --navy-700: #16263a;
  --cream:    #f1ede5;
  --cream-2:  #ece7dd;
  --card:     #f7f4ee;

  /* Brand */
  --gold:        #c9a875;
  --gold-bright: #e3c891;
  --gold-deep:   #a8854f;

  /* Text */
  --text-light:  #eceae3;
  --text-mute:   #9aa4b2;
  --text-faint:  #6f7b8b;
  --text-dark:   #1d2531;
  --text-dark-2: #586474;

  /* Lines */
  --line-dark:  rgba(201, 168, 117, .22);
  --line-light: rgba(29, 37, 49, .12);

  /* Type */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --radius: 14px;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.55);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--navy-900);
  color: var(--text-light);
  line-height: 1.65;
  font-weight: 300;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 72px 0; }
.bg-navy   { background: var(--navy-900); }
.bg-navy-2 { background: var(--navy-850); }
.bg-cream  { background: var(--cream); color: var(--text-dark); }
.text-center { text-align: center; }
.gold { color: var(--gold); }

/* Display type */
.serif { font-family: var(--serif); }
.display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .01em;
}

/* Eyebrow label */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .74rem;
  font-weight: 500;
  color: var(--gold);
}

/* Sparkle divider */
.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 18px 0 30px;
}
.divider::before, .divider::after {
  content: ""; height: 1px; width: 64px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider svg { width: 16px; height: 16px; fill: var(--gold); opacity: .9; }
.divider--left { justify-content: flex-start; }
.divider--left::before { display: none; }
.divider--left::after { width: 120px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem;
  padding: 16px 32px; border-radius: 999px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s ease; }
.btn:hover svg { transform: translateX(5px); }
.btn--gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #2a1f0e;
  box-shadow: 0 14px 30px -12px rgba(201,168,117,.6);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -12px rgba(201,168,117,.7); }
.btn--ghost {
  border: 1px solid var(--gold); color: var(--gold); background: transparent;
}
.btn--ghost:hover { background: rgba(201,168,117,.12); transform: translateY(-2px); }
.btn--ghost-dark {
  border: 1px solid var(--gold-deep); color: var(--gold-deep); background: transparent;
}
.btn--ghost-dark:hover { background: rgba(168,133,79,.1); transform: translateY(-2px); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,12,20,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; }
.brand__logo-wrap { line-height: 0; }
.brand__logo {
  height: 52px; width: auto; display: block;
}
@media (max-width: 980px) {
  .brand__logo { height: 48px; }
}
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a {
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 400; position: relative;
  padding: 6px 0; transition: color .2s ease;
}
.nav__links a:hover { color: var(--text-light); }
.nav__links a.active { color: var(--gold); }
.nav__links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--gold);
}
.nav__right { display: flex; align-items: center; gap: 18px; }
.btn--login {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-dark); color: var(--text-light);
  padding: 11px 22px; border-radius: 999px;
  font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  transition: border-color .2s ease, background .2s ease;
}
.btn--login:hover { border-color: var(--gold); background: rgba(201,168,117,.08); }
.btn--login svg { width: 15px; height: 15px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text-light); transition: .3s; }

/* ---------- Hero (generic dark) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% -10%, #1a2c44 0%, var(--navy-900) 55%, var(--navy-950) 100%);
}
.hero__rays {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 60% at 50% 0%, rgba(227,200,145,.20), transparent 70%),
    conic-gradient(from 180deg at 50% -5%, transparent 42%, rgba(227,200,145,.10) 50%, transparent 58%);
  mix-blend-mode: screen;
}

/* ---------- Cards grid generic ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-5 { grid-template-columns: repeat(5,1fr); }

/* Icon medallion */
.medallion {
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto;
  border: 1px solid var(--line-dark);
}
.medallion svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.4; }
.medallion--solid { background: var(--navy-850); border-color: transparent; }
.medallion--solid svg { stroke: var(--gold); }
.medallion--gold-fill { background: var(--gold); }
.medallion--gold-fill svg { stroke: #1a1206; }

/* ---------- CTA soundwave band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--navy-850), var(--navy-900));
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 70px 0;
}
.cta-band__wave {
  position: absolute; top: 0; bottom: 0; width: 33%;
  opacity: .5; pointer-events: none;
  display: flex; align-items: center; gap: 3px;
}
.cta-band__wave--l { left: 2%; }
.cta-band__wave--r { right: 2%; justify-content: flex-end; }
.cta-band__wave i {
  display: block; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), transparent);
  align-self: center;
}
.cta-band .inner {
  position: relative; z-index: 2; text-align: center;
  max-width: 720px; margin: 0 auto;
}
.cta-band h2 { font-family: var(--serif); font-size: clamp(1.9rem,3.6vw,2.7rem); font-weight: 600; }
.cta-band p { color: var(--text-mute); margin: 12px 0 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); padding: 70px 0 30px; border-top: 1px solid var(--line-dark); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px;
}
.footer-brand .name { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .12em; }
.footer-brand .tag { font-size: .58rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin: 6px 0 16px; }
.footer-brand p { color: var(--text-faint); font-size: .9rem; max-width: 280px; }
.footer-col h4 {
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px; font-weight: 500;
}
.footer-col li { margin-bottom: 11px; }
.footer-col a, .footer-col p { color: var(--text-faint); font-size: .9rem; transition: color .2s; }
.footer-col a:hover { color: var(--gold); }
.socials { display: flex; gap: 12px; margin-top: 18px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-dark); color: var(--text-mute); transition: .2s;
}
.socials a:hover { border-color: var(--gold); color: var(--gold); }
.socials svg { width: 16px; height: 16px; }
.footer-bottom {
  text-align: center; margin-top: 50px; padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  color: var(--text-faint); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal--left { transform: translateX(-32px); }
.reveal--right { transform: translateX(32px); }
.reveal--zoom { transform: scale(.94); }

/* ============================================================
   TRANSITIONS & MOTION
   ============================================================ */

/* Page enter / exit fade */
body { animation: pageIn .6s ease both; }
html.is-leaving body { opacity: 0; transition: opacity .3s ease; }

/* Keyframes */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes glowpulse {
  0%,100% { filter: drop-shadow(0 0 8px rgba(227,200,145,.25)); }
  50%     { filter: drop-shadow(0 0 22px rgba(227,200,145,.6)); }
}
@keyframes raysdrift { 0%,100% { opacity: .85; transform: translateX(0); } 50% { opacity: 1; transform: translateX(2%); } }
@keyframes equalize { 0%,100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@keyframes shimmer { to { background-position: 200% center; } }

/* Animated light rays */
.hero__rays { animation: raysdrift 9s ease-in-out infinite; transform-origin: top center; }

/* Hero staggered entrance */
[data-enter] > * { opacity: 0; animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
[data-enter] > *:nth-child(1) { animation-delay: .05s; }
[data-enter] > *:nth-child(2) { animation-delay: .18s; }
[data-enter] > *:nth-child(3) { animation-delay: .31s; }
[data-enter] > *:nth-child(4) { animation-delay: .44s; }
[data-enter] > *:nth-child(5) { animation-delay: .57s; }
[data-enter] > *:nth-child(6) { animation-delay: .70s; }
[data-enter] > *:nth-child(7) { animation-delay: .83s; }

/* Floating, glowing home emblem */
.home-hero__emblem svg { animation: floaty 5.5s ease-in-out infinite, glowpulse 4s ease-in-out infinite; }

/* Button gold shine sweep */
.btn--gold { position: relative; overflow: hidden; }
.btn--gold::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg); transition: left .65s ease;
}
.btn--gold:hover::after { left: 130%; }

/* Nav underline sweep on hover */
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__links a.active::after { transform: scaleX(1); }

/* Card / medallion micro-interactions */
.medallion { transition: transform .35s ease, background .35s ease, border-color .35s ease, box-shadow .35s ease; }
.card:hover .medallion,
.why-card:hover .medallion,
.guide-card:hover .medallion,
.astep:hover .medallion { transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 24px -10px rgba(201,168,117,.6); }
.astep, .guide-card { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.astep:hover, .guide-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(0,0,0,.25); border-color: var(--gold); }


/* Living soundwave bars in CTA band */
.cta-band__wave i { animation: equalize 1.4s ease-in-out infinite; transform-origin: center; }

/* Shimmer on CTA heading */
.cta-band h2 {
  background: linear-gradient(90deg, var(--text-light) 30%, var(--gold-bright) 50%, var(--text-light) 70%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: shimmer 6s linear infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  /* Hamburger menu kicks in at tablet — 7 nav items are too wide below 980px */
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__links.open {
    display: flex; flex-direction: column; gap: 22px;
    position: absolute; top: 84px; left: 0; right: 0; z-index: 99;
    background: var(--navy-900); padding: 30px 24px;
    border-bottom: 1px solid var(--line-dark);
  }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band__wave { display: none; }
}

/* ── Floating audio badge ───────────────────────────────── */
#audio-badge {
  position: fixed; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); right: 28px; z-index: 500;
  display: flex; align-items: center; gap: 10px;
  background: rgba(8, 13, 21, 0.88);
  border: 1px solid rgba(201, 168, 117, .32);
  border-radius: 999px;
  padding: 10px 18px 10px 12px;
  cursor: pointer; font-family: var(--sans);
  backdrop-filter: blur(14px);
  color: var(--text-mute);
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease,
              border-color .25s ease, background .25s ease, color .25s ease;
}
#audio-badge.ab-show { opacity: 1; transform: none; }
#audio-badge:hover { border-color: var(--gold); color: var(--text-light); background: rgba(8,13,21,.96); }
#audio-badge:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* icon wrapper */
.ab-icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid rgba(201, 168, 117, .35);
  background: rgba(201, 168, 117, .08);
  color: var(--gold);
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.ab-icon svg { width: 16px; height: 16px; }

/* show idle icon by default, hide bars */
.ab-icon--play { display: none; }

/* playing state */
#audio-badge.ab-playing { border-color: rgba(201,168,117,.65); color: var(--gold); }
#audio-badge.ab-playing .ab-icon {
  background: rgba(201,168,117,.18); border-color: var(--gold);
  animation: badgePulse 2.5s ease-in-out infinite;
}
#audio-badge.ab-playing .ab-icon--idle { display: none; }
#audio-badge.ab-playing .ab-icon--play { display: grid; }

@keyframes badgePulse {
  0%,100% { box-shadow: 0 0 0 0   rgba(201,168,117,.35); }
  50%      { box-shadow: 0 0 0 9px rgba(201,168,117,0);   }
}

/* equaliser bars animation when playing */
.badge-eq rect {
  transform-origin: bottom center;
  animation: eqBar 1.1s ease-in-out infinite alternate;
}
.badge-eq rect:nth-child(1) { animation-delay: 0s;    animation-duration: 0.9s; }
.badge-eq rect:nth-child(2) { animation-delay: 0.2s;  animation-duration: 1.1s; }
.badge-eq rect:nth-child(3) { animation-delay: 0.15s; animation-duration: 0.8s; }
@keyframes eqBar {
  from { transform: scaleY(.3); }
  to   { transform: scaleY(1);  }
}

.ab-label {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 400;
  white-space: nowrap;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-enter] > * { opacity: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
