/* ==========================================================================
   ABUND TERRA ACADEMY · CORE STYLES
   Colors come from the logo (sea-glass teal, mist, ink navy) and the
   aurora photograph it was born from.
   ========================================================================== */
:root {
  /* Abund Terra brand palette */
  --forest: #174F16;          /* Abund Forest: deep roots, premium backgrounds */
  --evergreen: #27651B;       /* Terra Evergreen: primary tree green */
  --growth: #4B7F1D;          /* Growth Green: leaves, accents */
  --newleaf: #6F9E22;         /* New Leaf: outer foliage */
  --deep-earth: #28301E;      /* Deep Earth: dark neutral */
  --opportunity: #91B52C;     /* Opportunity Green: fresh highlights */
  --sunlit: #B4CD4A;          /* Sunlit Leaf: brightest highlights */
  --ivory: #F7F3E8;           /* Warm Ivory: light neutral */
  --terra: #74351F;           /* Terra Brown: wordmark accent */
  --terra-glow: #c2683f;
  --void: #050804;
  --ink: #0d150b;
  --sea: #6F9E22;             /* (engine names kept so shared components inherit the brand) */
  --mist: #B4CD4A;
  --aurora: #91B52C;
  --spark: #d9ec8a;
  --gold: #e3c46a;
  --text: #F7F3E8;
  --text-dim: rgba(247, 243, 232, .74);
  --text-faint: rgba(247, 243, 232, .5);
  --font-display: 'Fira Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-soul: 'Great Vibes', 'Dancing Script', cursive;
  --font-script: 'Great Vibes', cursive;
  --font-hud: 'Fira Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-ancient: 'Fira Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--void); color: var(--text); -webkit-text-size-adjust: 100%; }
body { background: var(--void); font-family: var(--font-body); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--spark); outline-offset: 4px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the sky ---------- */
.dw-sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.dw-aurora--fallback {
  background:
    radial-gradient(ellipse 90% 30% at 50% 30%, rgba(145, 181, 44, .28), transparent 70%),
    radial-gradient(ellipse 70% 20% at 40% 40%, rgba(111, 158, 34, .22), transparent 70%),
    linear-gradient(180deg, #03141a, var(--void));
}
.dw-bolts { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; }
.dw-bolts.is-striking { animation: dwStrike .7s ease-out; }
.dw-bolt__glow { fill: none; stroke: rgba(134, 230, 220, .45); stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; filter: blur(4px); }
.dw-bolt__core { fill: none; stroke: #effffc; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
@keyframes dwStrike {
  0% { opacity: 0; } 6% { opacity: 1; } 14% { opacity: .15; } 22% { opacity: .9; } 60% { opacity: .35; } 100% { opacity: 0; }
}

/* ---------- wordmark (top-left, like the logo) ---------- */
.dw-mark { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.dw-mark__name { font-family: var(--font-soul); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--mist); text-shadow: 0 0 18px rgba(111, 158, 34, .45); }
.dw-mark__line { margin-top: 5px; font-family: var(--font-display); font-weight: 500; font-size: .56rem; letter-spacing: .36em; text-transform: uppercase; color: var(--text-faint); }

/* ---------- HUD switches (Sound / Calm mode) ---------- */
.dw-switch {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-hud); font-size: .74rem; letter-spacing: .06em; color: var(--text-dim);
  padding: 8px 4px; transition: color .3s ease;
}
.dw-switch:hover { color: var(--text); }
.dw-switch svg { width: 18px; height: 18px; flex: none; }
.dw-switch[aria-pressed="true"] .dw-switch__state { color: var(--aurora); }
.dw-switch .dw-wave { transform-origin: center; transition: opacity .3s; }
.dw-switch[aria-pressed="false"] .dw-wave { opacity: .2; }

/* ---------- tunnel + arrival light ---------- */
.dw-tunnel { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9999; background: #01060a; }
.dw-tunnel.is-calm { background: transparent; }
.dw-arrive-veil {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #e6faf7 45%, #9fe4ec 100%);
  opacity: 1; transition: opacity 1.6s cubic-bezier(.2, .7, .2, 1);
}
.dw-arrive-veil.is-gone { opacity: 0; }

/* ---------- glass panel shared by the lands ---------- */
.dw-glass {
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
}

@media (prefers-reduced-motion: reduce) {
  .dw-arrive-veil { transition-duration: .4s; }
}

/* ---------- tiny evil eye (nazar) for spiritual protection ---------- */
.dw-nazar { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 7;
  width: 22px; height: 22px; opacity: .55; pointer-events: none; filter: drop-shadow(0 0 6px rgba(87, 198, 242, .55)); }
.dw-nazar .ring { transform-origin: 12px 12px; animation: nazarSpin 24s linear infinite; }
@keyframes nazarSpin { to { transform: rotate(360deg); } }
.dw-calm .dw-nazar .ring { animation-duration: 90s; }
@media (max-width: 719px) { .dw-nazar { width: 18px; height: 18px; bottom: max(8px, env(safe-area-inset-bottom)); } }

/* ---------- social icons ---------- */
.dw-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.dw-social__link {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-hud); font-size: .7rem; letter-spacing: .08em; color: var(--text-dim);
  border: 1px solid rgba(111, 158, 34, .3); background: rgba(111, 158, 34, .05); transition: color .3s, border-color .3s, box-shadow .3s;
}
.dw-social__link:hover { color: var(--text); border-color: var(--sea); box-shadow: 0 0 20px rgba(111, 158, 34, .3); }
.dw-social__link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dw-social--icons .dw-social__link span { display: none; }
.dw-social--icons .dw-social__link { padding: 10px; }
