/* ═══════════════════════════════════════
   ECHO — base.css
   Reset, variables, typography, utilities
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #ede9f4;
  --surface:    #f5f3fa;
  --surface-2:  #e8e3f2;
  --border:     #d4cce8;
  --text:       #1e1040;
  --text-muted: #4e4470;
  --accent:     #5b2be0;
  --accent-dim: #4820c0;
  --font-body:  'DM Sans', sans-serif;
  --font-head:  'Cormorant Garamond', serif;
  --radius:     12px;
  --transition: 0.3s ease;
  --max-w:      1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}
.dot { color: var(--accent); }
.section { padding: clamp(5rem, 10vw, 9rem) 0; }

/* ── SVG noise grain ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  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: 180px 180px;
  background-repeat: repeat;
}

/* ── Global echo rings ── */
body::after {
  content: '';
  position: fixed;
  bottom: -20vh;
  right:  -15vw;
  width:  130vw;
  height: 130vw;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 0 1px  rgba(91, 43, 224, 0.045),
    0 0 0 calc(1px + 7vw)  rgba(91, 43, 224, 0.038),
    0 0 0 calc(1px + 14vw) rgba(91, 43, 224, 0.030),
    0 0 0 calc(1px + 21vw) rgba(91, 43, 224, 0.022),
    0 0 0 calc(1px + 28vw) rgba(91, 43, 224, 0.015),
    0 0 0 calc(1px + 35vw) rgba(91, 43, 224, 0.008),
    0 0 0 calc(1px + 45vw) rgba(91, 43, 224, 0.004);
  animation: globalEchoPulse 12s ease-in-out infinite;
}
@keyframes globalEchoPulse {
  0%, 100% { transform: scale(1);     opacity: 1; }
  50%       { transform: scale(1.035); opacity: 0.7; }
}

/* ── Section shimmer dividers ── */
.section { position: relative; }
.section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(91, 43, 224, 0.10) 25%,
    rgba(91, 43, 224, 0.22) 50%,
    rgba(91, 43, 224, 0.10) 75%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.8s ease;
}
.section.visible::before { opacity: 1; }

/* ── Section headers ── */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  animation: revealFailsafe 0s ease 4s forwards;
}
.reveal.visible { opacity: 1; transform: none; animation: none; }
@keyframes revealFailsafe {
  to { opacity: 1; transform: none; }
}

/* ── Responsive base ── */
@media (max-width: 480px) {
  body::after { display: none; }
}

/* ── Ambient background canvas ── */
#echo-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
}