:root {
  --bg: #140d07;
  --bg-soft: #1e130a;
  --orange: #ff7a1a;
  --orange-bright: #ff9542;
  --amber: #ffb347;
  --cream: #f7ead9;
  --muted: #b89f8a;
  --line: rgba(255, 122, 26, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  line-height: 1.15;
}

/* ---------- ambient glow ---------- */

.glow-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 8%, rgba(255, 122, 26, 0.14), transparent 70%),
    radial-gradient(ellipse 45% 35% at 85% 85%, rgba(255, 122, 26, 0.06), transparent 70%);
  animation: backdrop-breathe 9s ease-in-out infinite;
}

@keyframes backdrop-breathe {
  0%, 100% { opacity: 0.8; }
  50%      { opacity: 1; }
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  animation: fade-down 0.9s ease both;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.mark-small { width: 28px; height: 28px; }

.header-pill {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 122, 26, 0.06);
}

/* ---------- hero ---------- */

.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.8rem 1.5rem 2.2rem;
  text-align: center;
}

.logo-stage {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 1.4rem;
  animation: logo-float 7s ease-in-out infinite;
}

.halo {
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent, rgba(255, 122, 26, 0.16), transparent 30%,
    transparent 50%, rgba(255, 179, 71, 0.12), transparent 80%);
  animation: halo-spin 24s linear infinite;
  filter: blur(6px);
}

@keyframes halo-spin { to { transform: rotate(360deg); } }

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.logo {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 22px rgba(255, 122, 26, 0.35));
  animation: logo-glow 5s ease-in-out infinite, pop-in 1s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(255, 122, 26, 0.28)); }
  50%      { filter: drop-shadow(0 0 34px rgba(255, 122, 26, 0.5)); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}

/* rod & snake inside the star */

.staff {
  stroke: var(--bg);
  stroke-width: 8;
  stroke-linecap: round;
}

.staff-knob { fill: var(--bg); }

.snake {
  fill: none;
  stroke-linecap: round;
}

.snake-gap {
  stroke: url(#barGrad);
  stroke-width: 14;
}

.snake-body {
  stroke: var(--bg);
  stroke-width: 6.5;
}

.snake-head { fill: var(--bg); }
.snake-eye  { fill: var(--orange-bright); }

/* staged draw-in: star pops (0-0.7s) -> staff draws down (0.55-1.05s)
   -> snake slithers up on top (1.05-2.6s) -> head appears (2.5s) */

.logo .staff {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: snake-draw 0.5s ease-out 0.55s forwards;
}

.logo .staff-knob {
  opacity: 0;
  animation: fade-in 0.35s ease 0.9s forwards;
}

.logo .snake {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: snake-draw 1.55s ease-in-out 1.05s forwards;
}

.logo .snake-head,
.logo .snake-eye {
  opacity: 0;
  animation: fade-in 0.4s ease 2.5s forwards;
}

@keyframes snake-draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in    { to { opacity: 1; } }

/* headline */

.title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.01em;
}

.title-line {
  display: block;
  animation: fade-up 0.9s ease both;
}

.title-line.accent {
  background: linear-gradient(100deg, var(--amber), var(--orange) 55%, #f05e0e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation-delay: 0.15s;
}

.tagline {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--cream);
  animation: fade-up 0.9s ease 0.3s both;
}

.subtag {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  animation: fade-up 0.9s ease 0.45s both;
}

.cta-row {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.7rem;
  animation: fade-up 0.9s ease 0.6s both;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--orange-bright), var(--orange));
  color: #1a0e04;
  box-shadow: 0 6px 24px rgba(255, 122, 26, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255, 122, 26, 0.5);
}

.btn-ghost {
  color: var(--amber);
  border: 1px solid var(--line);
  background: rgba(255, 122, 26, 0.05);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 122, 26, 0.12);
}

/* ---------- EKG divider ---------- */

.ekg-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ekg { width: 100%; height: auto; display: block; }

/* faint resting trace the snake travels over */
.ekg-ghost {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}

.ekg-trace {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* brightest segment just behind the head; script.js stacks graduated
   clones beneath it so the body tapers and fades smoothly */
.ekg-lead { stroke-width: 3; filter: drop-shadow(0 0 6px rgba(255, 122, 26, 0.6)); }

.ekg-head   { filter: drop-shadow(0 0 7px rgba(255, 122, 26, 0.7)); }
.ekg-head-c { fill: var(--orange-bright); }
.ekg-eye    { fill: var(--bg); }

.ekg-tongue {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1;
  stroke-linecap: round;
}

/* ---------- content sections ---------- */

.section {
  max-width: 640px;
  margin: 0 auto;
  padding: 3.2rem 1.5rem;
  text-align: center;
}

.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.1rem;
  color: var(--amber);
}

.section p { color: var(--cream); }
.section p + p { margin-top: 0.9rem; }
.muted { color: var(--muted); }

.topics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.topics li {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 122, 26, 0.06);
  font-size: 0.92rem;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.topics li:hover {
  background: rgba(255, 122, 26, 0.16);
  border-color: rgba(255, 122, 26, 0.45);
  transform: translateY(-2px);
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.4rem;
}

.platform {
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 122, 26, 0.35);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 3rem 1.5rem 2.5rem;
  border-top: 1px solid rgba(255, 122, 26, 0.12);
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- entrance / scroll animations ---------- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .logo .staff, .logo .snake { stroke-dashoffset: 0; }
  .logo .staff-knob, .logo .snake-head, .logo .snake-eye { opacity: 1; }
  /* show the full trace statically; script.js pauses the SMIL clock */
  .ekg-trace { stroke-dasharray: none; }
  .ekg-head { display: none; }
}
