:root {
  --primary: #0d0221;
  --secondary: #1a0a3e;
  --pink: #ff2d95;
  --cyan: #00f5d4;
  --yellow: #f5e642;
  --chrome: #c0c0d8;
  --chrome-low: #a0a0a0;
  --chrome-high: #e0e0e0;
  --pure-white: #ffffff;
  --marble: #f0eaff;
  --purple: #6a0dad;
  --body-light: #f0e6ff;
  --ink: #1a0a2e;
  --scroll-progress: 0px;
}

/* Compliance language: Intersection Observer each element (threshold: `0.4` when enters `threshold: 0.5`. Each plays holds. placeholder SVGs fallbacks browsers without (Google layout designer. reveals another chromatic excess applied sober timelines */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #0d0221;
  color: #f0e6ff;
  font-family: "Source Sans 3", Inter, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mix-blend-mode: screen;
}

.journey { position: relative; }

.era-section {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem);
  background: linear-gradient(180deg, #0d0221, #1a0a3e);
}

.era-section:nth-of-type(4n+1) { --accent: #ff2d95; }
.era-section:nth-of-type(4n+3) { --accent: #00f5d4; }
.era-section:nth-of-type(4n+5) { --accent: #f5e642; }
.era-section:nth-of-type(4n+7) { --accent: #6a0dad; }

.marble-bg {
  position: absolute;
  inset: -18% -10%;
  transform: translateY(calc(var(--scroll-progress) * -0.3));
  background:
    radial-gradient(ellipse at 20% 50%, rgba(240,234,255,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(106,13,173,0.1) 0%, transparent 40%),
    conic-gradient(from 135deg at 40% 40%, rgba(255,45,149,0.22), transparent, rgba(0,245,212,0.18), transparent, rgba(245,230,66,0.14)),
    linear-gradient(135deg, #1a0a3e 0%, #0d0221 100%);
  filter: saturate(1.35);
}

.marble-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(112deg, transparent 0 26px, rgba(240,234,255,0.055) 27px, transparent 29px), repeating-linear-gradient(41deg, transparent 0 52px, rgba(255,45,149,0.05) 53px, transparent 57px);
}

.float-layer {
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--scroll-progress) * -0.15));
  pointer-events: none;
}

.content-shell {
  width: min(760px, 100%);
  margin-left: clamp(0rem, 44vw, 55%);
  transform: translateX(-50%);
  position: relative;
  z-index: 2;
  padding: clamp(1.6rem, 4vw, 3rem);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #666680, #f0eaff, #666680, #f0eaff, #666680) 1;
  background: rgba(13, 2, 33, 0.58);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 36px rgba(255,45,149,0.18), inset 0 0 28px rgba(240,234,255,0.08);
}

.lesson-tag {
  font-family: "DM Mono", monospace;
  color: #00f5d4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 0.7rem;
}

.era-title {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1.4rem;
  position: relative;
  background: linear-gradient(135deg, #ff2d95, #00f5d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.15);
}

.era-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #ff2d95, #00f5d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(12px);
  opacity: 0.5;
}

.timeline-strip {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding: 0.8rem;
  border-top: 1px solid rgba(192,192,216,0.55);
  border-bottom: 1px solid rgba(192,192,216,0.45);
  background: linear-gradient(90deg, rgba(255,45,149,0.14), rgba(0,245,212,0.12));
}

.timeline-strip span {
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #00f5d4;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #c0c0d8;
  box-shadow: inset 0 0 10px rgba(0,245,212,0.15);
}

.timeline-strip b { color: #f5e642; font-weight: 400; }

.tutorial-copy {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.72;
  margin: 0 0 1.45rem;
  color: #f0e6ff;
}

.artifact-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.artifact-card {
  padding: 1rem;
  backdrop-filter: blur(8px);
  background:
    radial-gradient(ellipse at 20% 50%, rgba(240,234,255,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(106,13,173,0.1) 0%, transparent 40%),
    linear-gradient(135deg, rgba(26,10,62,0.88), rgba(13,2,33,0.72));
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #666680, #f0eaff, #666680) 1;
  box-shadow: 0 16px 30px rgba(0,0,0,0.28), 0 0 18px rgba(255,45,149,0.16);
  transform: rotate(-2deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.artifact-card.alt { transform: rotate(1.5deg); }
.artifact-card:hover { transform: rotate(0) scale(1.03); }
.artifact-card span { display: block; font-family: "DM Mono", monospace; color: #00f5d4; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.45rem; }
.artifact-card strong { color: #f0eaff; font-weight: 600; line-height: 1.35; }

.divider-zone {
  height: 80px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #6a0dad;
}

.divider-marble {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(240,234,255,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(106,13,173,0.28) 0%, transparent 40%),
    linear-gradient(135deg, #1a0a3e 0%, #0d0221 100%);
  border-top: 2px solid #c0c0d8;
  border-bottom: 2px solid #c0c0d8;
}

.lottie-break, .fallback-lottie { position: relative; z-index: 1; width: 78px; height: 78px; }
.fallback-lottie { display: grid; place-items: center; color: #ff2d95; font-size: 2.2rem; animation: sparkle-pulse 3s ease-in-out infinite; }
.lottie-break + .fallback-lottie { margin-top: -78px; }

.pip-strip {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pip {
  width: 14px;
  height: 14px;
  border: 0;
  padding: 0;
  cursor: pointer;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: #c0c0d8;
}

.pip.active {
  background: linear-gradient(135deg, #ff2d95, #00f5d4);
  animation: pip-pulse 1.5s ease-in-out infinite;
}

.gem {
  position: absolute;
  width: clamp(34px, 5vw, 78px);
  aspect-ratio: 1;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: linear-gradient(135deg, #ff2d95, #00f5d4);
  box-shadow: 0 0 28px rgba(255,45,149,0.5), inset 0 0 12px rgba(255,255,255,0.65);
  animation: gem-drift 28s ease-in-out infinite;
  will-change: transform;
}

.gem-a { left: 7%; top: 18%; --x: 34px; --r: 24deg; }
.gem-b { right: 13%; top: 18%; --x: -28px; --r: -38deg; animation-duration: 34s; }
.gem-c { left: 12%; bottom: 16%; --x: 48px; --r: 58deg; animation-duration: 39s; }
.gem-d { right: 9%; bottom: 20%; --x: -36px; --r: -62deg; animation-duration: 25s; }

.sparkle {
  position: absolute;
  color: #ff2d95;
  font-size: clamp(1.6rem, 4vw, 3.4rem);
  text-shadow: 0 0 18px #ff2d95, 0 0 30px rgba(0,245,212,0.35);
  animation: sparkle-pulse 3s ease-in-out infinite, sparkle-float 17s ease-in-out infinite;
}

.s1 { left: 20%; top: 66%; animation-delay: 0s; }
.s2 { right: 22%; top: 60%; animation-delay: 1.8s; color: #00f5d4; }
.s3 { left: 28%; top: 22%; animation-delay: 3.5s; color: #f5e642; }
.s4 { right: 30%; bottom: 18%; animation-delay: 5.2s; }

@keyframes pip-pulse {
  0%, 100% { box-shadow: 0 0 8px #ff2d95; }
  50% { box-shadow: 0 0 24px #ff2d95, 0 0 48px rgba(255,45,149,0.3); }
}

@keyframes gem-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(var(--x), -42px, 0) rotate(var(--r)); }
}

@keyframes sparkle-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes sparkle-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -28px; }
}

@media (max-width: 760px) {
  .era-section { padding: 4.5rem 1.15rem; }
  .content-shell { margin-left: 0; transform: none; }
  .artifact-row { grid-template-columns: 1fr; }
  .pip-strip { right: 10px; gap: 12px; }
}
