/* ==========================================================================
   Python Animation Learning — Base Stylesheet
   Design tokens + layout for Hero and Roadmap sections
   ========================================================================== */

:root {
  /* Colors — "Night Interpreter" palette: deep ink background, a coolant
     cyan signal, an ember amber for warmth, and a violet used sparingly
     for depth in blobs/glows only. */
  --ink-950: #080B12;
  --ink-900: #0E141F;
  --ink-800: #121A28;
  --ink-700: #17202F;
  --ink-600: #212C40;
  --ink-500: #2a3650;

  --signal: #2BE7C0;
  --signal-dim: #1FA98C;
  --ember: #FF9B4D;
  --ember-dim: #D97F2F;
  --violet: #9F7BFF;

  --text-hi: #EEF2F9;
  --text-mid: #AAB6CA;
  --text-low: #71809A;

  --glass-bg: rgba(140, 160, 255, 0.045);
  --glass-bg-strong: rgba(150, 170, 255, 0.09);
  --glass-border: rgba(160, 180, 255, 0.12);
  --glass-border-strong: rgba(170, 195, 255, 0.22);

  --shadow-signal: 0 0 40px rgba(43, 231, 192, 0.25);
  --shadow-ember: 0 0 40px rgba(255, 155, 77, 0.2);

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Layout */
  --container: 1240px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink-900);
  color: var(--text-hi);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--signal);
  color: var(--ink-950);
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(43, 231, 192, 0.14), transparent 60%),
    linear-gradient(180deg, var(--ink-950) 0%, var(--ink-900) 55%, var(--ink-800) 100%);
}

/* Layered backdrop pieces (grid, blobs, particles) all sit absolute-fill */
.hero__layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 10%, transparent 75%);
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.blob--signal {
  width: 480px;
  height: 480px;
  left: -120px;
  top: 8%;
  background: radial-gradient(circle at 30% 30%, var(--signal), transparent 70%);
  animation: floatBlobA 16s ease-in-out infinite;
}

.blob--ember {
  width: 420px;
  height: 420px;
  right: -100px;
  top: 30%;
  background: radial-gradient(circle at 60% 40%, var(--ember), transparent 70%);
  animation: floatBlobB 20s ease-in-out infinite;
}

.blob--violet {
  width: 360px;
  height: 360px;
  left: 38%;
  bottom: -140px;
  background: radial-gradient(circle at 50% 50%, var(--violet), transparent 70%);
  animation: floatBlobC 18s ease-in-out infinite;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__shape {
  position: absolute;
  border: 1px solid var(--glass-border-strong);
  opacity: 0.5;
}

.shape--tri {
  top: 18%;
  right: 12%;
  width: 60px;
  height: 60px;
  border: none;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  background: linear-gradient(160deg, rgba(43, 231, 192, 0.14), transparent);
  animation: floatY 9s ease-in-out infinite;
}

.shape--ring {
  bottom: 16%;
  left: 8%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  animation: floatY 11s ease-in-out infinite reverse, spin 30s linear infinite;
}

.shape--square {
  top: 62%;
  right: 22%;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transform: rotate(20deg);
  animation: floatY 8s ease-in-out infinite;
}

/* Floating python glyphs */
.py-glyph {
  position: absolute;
  font-family: var(--font-mono);
  color: var(--signal);
  opacity: 0.35;
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(43, 231, 192, 0.5));
  animation: floatY 10s ease-in-out infinite;
}

.py-glyph--1 { top: 14%; left: 10%; animation-duration: 12s; }
.py-glyph--2 { top: 66%; left: 16%; animation-duration: 9s; color: var(--ember); filter: drop-shadow(0 0 10px rgba(255,155,77,.5)); }
.py-glyph--3 { top: 24%; right: 8%; animation-duration: 13s; }
.py-glyph--4 { bottom: 12%; right: 16%; animation-duration: 10s; color: var(--violet); filter: drop-shadow(0 0 10px rgba(159,123,255,.5)); }

/* Floating animated code snippet cards */
.code-float {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-mid);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  line-height: 1.5;
  animation: floatY 14s ease-in-out infinite;
}

.code-float span { color: var(--signal); }
.code-float b { color: var(--ember); font-weight: 500; }

.code-float--a { top: 12%; left: 5%; animation-duration: 15s; }
.code-float--b { bottom: 10%; right: 6%; animation-duration: 17s; animation-delay: -4s; }
.code-float--c { top: 58%; left: 2%; display: none; }

/* Hero content */
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
  padding: 0 24px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  font-size: 13px;
  color: var(--text-mid);
  letter-spacing: 0.03em;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.hero__badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.08;
  margin-top: 24px;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.15s forwards;
}

.hero__title .grad {
  background: linear-gradient(96deg, var(--signal) 0%, var(--ember) 55%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
}

.hero__subtitle {
  margin-top: 22px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-mid);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.3s forwards;
}

.hero__actions {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.45s forwards;
}

.btn-cta {
  position: relative;
  overflow: hidden;
  padding: 16px 34px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.01em;
  color: var(--ink-950);
  background: linear-gradient(100deg, var(--signal), #7CF4DA);
  box-shadow: var(--shadow-signal);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease;
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 60px rgba(43, 231, 192, 0.45);
}

.btn-cta:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-cta .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transform: scale(0);
  animation: rippleAnim 0.65s ease-out forwards;
  pointer-events: none;
}

.btn-ghost {
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-hi);
  border: 1px solid var(--glass-border-strong);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.btn-ghost:hover {
  border-color: var(--signal);
  background: var(--glass-bg-strong);
  transform: translateY(-3px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-low);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.7s forwards;
}

.scroll-indicator__mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--glass-border-strong);
  border-radius: 14px;
  position: relative;
}

.scroll-indicator__mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--signal);
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}

/* ==========================================================================
   SECTION HEAD (used above the app-shell — see css/app-shell.css)
   ========================================================================== */

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 68px;
  position: relative;
  z-index: 1;
}

.section-head__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 14px;
}

.section-head__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.01em;
}

.section-head__subtitle {
  margin-top: 14px;
  color: var(--text-mid);
  font-size: 1.05rem;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
