/* ============================================================
   ELEODES — design system
   Desert sand · beetle ink · iridescent sheen · desert sun
   ============================================================ */

:root {
  /* palette */
  --sand-50:  #FAF6EB;
  --sand-100: #F3EDDC;
  --sand-200: #E8DFC7;
  --sand-300: #D9CDAC;
  --ink-900:  #0D0D11;
  --ink-700:  #2B2B33;
  --ink-500:  #5A5A64;
  --ink-300:  #8B8B93;
  --iris-500: #5B54D6;   /* beetle sheen */
  --iris-300: #8B85F0;
  --amber-500:#E8703A;   /* desert sun */
  --amber-300:#F5A05C;

  /* type */
  --font-display: "Clash Display", "Arial Black", sans-serif;
  --font-body: "Satoshi", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  /* rhythm */
  --container: 1200px;
  --radius: 22px;
  --section-pad: clamp(90px, 12vw, 150px);

  --shadow-card: 0 1px 2px rgb(13 13 17 / 0.04), 0 12px 40px -12px rgb(13 13 17 / 0.12);
  --shadow-card-hover: 0 2px 4px rgb(13 13 17 / 0.05), 0 28px 70px -18px rgb(13 13 17 / 0.28);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
html.lenis { height: auto; scroll-behavior: auto; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--iris-500); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--sand-100); }
::-webkit-scrollbar-thumb { background: var(--sand-300); border-radius: 5px; }

.container { width: min(var(--container), 92vw); margin-inline: auto; }
.section { padding-block: var(--section-pad); position: relative; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 2000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.055;
  mix-blend-mode: multiply;
}

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--sand-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity 0.7s ease, visibility 0.7s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-mark { width: 64px; animation: loader-pulse 1.4s ease-in-out infinite; }
.loader-text {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-500);
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(1) rotate(-4deg); opacity: 0.7; }
  50% { transform: scale(1.12) rotate(4deg); opacity: 1; }
}

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--iris-500);
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; background: var(--amber-500);
  display: inline-block;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 26px; }
h3 { font-size: 1.45rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-700); max-width: 56ch; }
.mono-dim { font-family: var(--font-mono); font-size: 12px; color: var(--ink-300); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 15px 28px; border-radius: 999px;
  background: var(--ink-900); color: var(--sand-50);
  position: relative; overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--amber-500), var(--amber-300));
  transform: translateY(101%); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { box-shadow: 0 14px 30px -10px rgb(232 112 58 / 0.5); }
.btn > * { position: relative; z-index: 1; }
.btn-arrow { display: inline-block; transition: transform 0.3s; }
.btn:hover .btn-arrow { transform: translate(3px, 0); }
.btn-ghost {
  background: transparent; color: var(--ink-900);
  box-shadow: inset 0 0 0 1.5px rgb(13 13 17 / 0.25);
}
.btn-ghost::before { background: var(--ink-900); }
.btn-ghost:hover { color: var(--sand-50); box-shadow: inset 0 0 0 1.5px var(--ink-900); }
.btn-small { padding: 11px 20px; font-size: 13.5px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 18px; left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: center;
  padding-inline: 16px;
  transition: transform 0.4s;
}
.nav-pill {
  display: flex; align-items: center; gap: 34px;
  background: rgb(250 246 235 / 0.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgb(13 13 17 / 0.08);
  border-radius: 999px;
  padding: 10px 12px 10px 22px;
  box-shadow: 0 10px 40px -12px rgb(13 13 17 / 0.15);
  max-width: 100%;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.brand-word {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  letter-spacing: -0.02em; text-transform: none;
}
.brand-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-500);
  border-left: 1px solid rgb(13 13 17 / 0.15); padding-left: 10px;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-700);
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--amber-500); transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: var(--ink-900); font-weight: 700; }

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.burger span {
  width: 22px; height: 2px; background: var(--ink-900); display: block;
  transition: transform 0.3s, opacity 0.3s;
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 900;
  background: var(--sand-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
.mobile-menu a {
  font-family: var(--font-display); font-size: clamp(2.2rem, 9vw, 3.5rem);
  font-weight: 600; letter-spacing: -0.03em; padding: 8px;
}
.mobile-menu a:hover { color: var(--iris-500); }
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
body.menu-open .burger span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  background:
    linear-gradient(180deg, #F7F2E4 0%, var(--sand-50) 55%, var(--sand-100) 100%);
}
.sun {
  position: absolute; top: 8%; right: 6%;
  width: clamp(300px, 38vw, 560px); aspect-ratio: 1;
  background: radial-gradient(circle, var(--amber-300) 0%, rgb(245 160 92 / 0.35) 45%, transparent 70%);
  filter: blur(10px);
  border-radius: 50%;
  animation: sun-breathe 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 0; /* glow stays behind hero copy — positioned elements paint over text otherwise */
}
@keyframes sun-breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.07); opacity: 1; }
}
.hero-inner {
  position: relative; z-index: 1; /* above .sun */
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding-top: 130px;
  flex: 1;
}
.hero-copy { max-width: 760px; }
.hero-inner > *, .mascot-grid > * { min-width: 0; }  /* let grid columns shrink below content width */
.hero-title {
  font-size: clamp(3.4rem, 8.5vw, 7rem);
  margin: 0 0 28px;
}
.hero-title .char { display: inline-block; }
.hero-copy .lede { margin-bottom: 34px; }
.hero-copy .lede em { font-style: italic; color: var(--iris-500); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--ink-700);
  background: rgb(255 255 255 / 0.55);
  border: 1px solid rgb(13 13 17 / 0.1);
  padding: 9px 16px; border-radius: 999px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber-500);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(232 112 58 / 0.5); }
  50% { box-shadow: 0 0 0 7px rgb(232 112 58 / 0); }
}

.dunes { display: block; width: 100%; height: clamp(70px, 10vw, 140px); position: relative; z-index: 1; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--ink-900); color: var(--sand-100);
  transform: rotate(-1.2deg) scale(1.02);
  padding: 16px 0;
  overflow: hidden;
  position: relative; z-index: 3;
  margin-block: -20px 10px;
}
.marquee-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee-track span {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap;
}
.marquee-track i { font-style: normal; color: var(--amber-500); margin-inline: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section-head { margin-bottom: clamp(40px, 6vw, 64px); max-width: 640px; }

.card {
  background: #FFFDF6;
  border: 1px solid rgb(13 13 17 / 0.08);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s;
}
.card::after {  /* spotlight that follows the cursor */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgb(91 84 214 / 0.07), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-hover); }
.card:hover::after { opacity: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgb(13 13 17 / 0.12);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.chip-iris { color: var(--iris-500); } .chip-iris::before { background: var(--iris-500); }
.chip-amber { color: var(--amber-500); } .chip-amber::before { background: var(--amber-500); }
.chip-dim { color: var(--ink-300); } .chip-dim::before { background: var(--ink-300); }

/* this week */
.week { background: var(--sand-100); }
.week-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.unit-card { display: flex; flex-direction: column; min-height: 320px; }
.unit-card p { color: var(--ink-700); font-size: 15.5px; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.progress {
  height: 6px; border-radius: 3px; background: var(--sand-200);
  margin-top: auto; margin-bottom: 18px; overflow: hidden;
}
.progress-fill {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--iris-500), var(--amber-500));
  border-radius: 3px;
  transform: scaleX(0); transform-origin: left;
}
.card-foot { font-size: 13px; color: var(--ink-500); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* hub */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hub-card { display: block; min-height: 230px; }
.hub-card p { color: var(--ink-700); font-size: 15.5px; margin-bottom: 26px; }
.hub-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-300);
  display: block; margin-bottom: 34px;
  transition: color 0.3s;
}
.hub-card:hover .hub-num { color: var(--amber-500); }
.hub-link {
  font-weight: 700; font-size: 14.5px;
  display: inline-flex; align-items: center; gap: 8px;
  position: absolute; bottom: 26px;
}
.hub-card:hover .hub-link { color: var(--iris-500); }

/* featured hub card spans the whole row */
.hub-card-feature {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: clamp(20px, 3vw, 42px);
  min-height: 0;
}
.hub-card-feature .hub-num { margin-bottom: 0; color: var(--amber-500); }
.hub-card-feature .hub-feature-body { flex: 1; min-width: 0; }
.hub-card-feature .hub-link { position: static; flex-shrink: 0; }
@media (max-width: 640px) {
  .hub-card-feature { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* mascot */
.mascot { background: var(--ink-900); color: var(--sand-50); border-radius: clamp(24px, 4vw, 48px); margin-inline: clamp(10px, 2vw, 24px); }
.mascot .eyebrow { color: var(--iris-300); }
.mascot .lede { color: rgb(250 246 235 / 0.75); }
.mascot-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px); align-items: center;
}
.mascot-visual img {
  border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.8);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.mascot-visual:hover img { transform: rotate(-1.5deg) scale(1.02); }
.caption {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: rgb(250 246 235 / 0.45); margin-top: 16px;
}
.fact-list { margin-block: 34px; display: grid; gap: 0; }
.fact {
  display: grid; grid-template-columns: 110px 1fr; gap: 18px;
  padding: 16px 0; border-top: 1px solid rgb(250 246 235 / 0.12);
}
.fact dt {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-300);
  padding-top: 3px;
}
.fact dd { color: rgb(250 246 235 / 0.8); font-size: 15.5px; }
.why { color: rgb(250 246 235 / 0.85); font-size: 15.5px; }
.why strong { color: var(--amber-300); }

/* teacher */
.teacher { background: var(--sand-100); }
.teacher-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px); align-items: start;
}
.teacher-grid > * { min-width: 0; }
.teacher-roles {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--iris-500); margin: -10px 0 24px;
}
.teacher-motto {
  margin: 38px 0;
  padding-left: 22px; border-left: 3px solid var(--amber-500);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -0.02em;
}
.teacher-motto cite {
  display: block; margin-top: 12px;
  font-family: var(--font-mono); font-style: normal; font-size: 11.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-300);
}
.teacher-note { font-size: 14.5px; color: var(--ink-500); max-width: 46ch; margin-bottom: 34px; }
.teacher-note em { color: var(--iris-500); }
.craft-list { display: grid; }
.craft {
  display: grid; grid-template-columns: 140px 1fr; gap: 18px;
  padding: 22px 0; border-top: 1px solid rgb(13 13 17 / 0.1);
}
.craft dt {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-500);
  padding-top: 3px;
}
.craft dd { color: var(--ink-700); font-size: 15.5px; }
.craft-link { font-weight: 700; white-space: nowrap; }
.craft-link:hover { color: var(--iris-500); }

/* bench */
.bench-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bench-card { min-height: 210px; }
.bench-card p { color: var(--ink-700); font-size: 15.5px; }
.bench-card .chip { margin-bottom: 22px; }

/* ---------- footer ---------- */
.footer {
  background: var(--sand-100);
  padding: clamp(70px, 9vw, 120px) 0 40px;
  overflow: hidden;
}
.footer-cta {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em;
  margin-bottom: clamp(50px, 8vw, 90px);
}
.footer-word {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(4.5rem, 19vw, 17rem);
  line-height: 0.85; letter-spacing: -0.04em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.5px rgb(13 13 17 / 0.18);
  user-select: none;
  margin-bottom: clamp(40px, 6vw, 70px);
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  flex-wrap: wrap;
  font-size: 14px; color: var(--ink-500);
  border-top: 1px solid rgb(13 13 17 / 0.1); padding-top: 26px;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--iris-500); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-inner { padding-top: 120px; }
  .week-grid, .hub-grid, .bench-grid { grid-template-columns: repeat(2, 1fr); }
  .mascot-grid { grid-template-columns: 1fr; }
  .mascot-visual { max-width: 480px; }
  .teacher-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .brand-sub { display: none; }
  .burger { display: flex; }
}
@media (max-width: 640px) {
  .week-grid, .hub-grid, .bench-grid { grid-template-columns: 1fr; }
  .nav .btn { display: none; }
  .nav-pill { gap: 16px; width: 100%; justify-content: space-between; }
  .fact { grid-template-columns: 1fr; gap: 6px; }
  .craft { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.13em; flex-wrap: wrap; }
  .sun { opacity: 0.55; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}
