/* =========================================================
   $PUTIN — Putin's Last Term
   Simpsons-inspired palette: cobalt sky, marge-blue, donut-pink,
   bart-orange, homer-cream, with a brooding Russian red accent.
   ========================================================= */

:root {
  --sky:        #5dade2;       /* simpsons sky cobalt */
  --sky-deep:   #2c79b8;
  --homer:      #ffd99b;       /* skin yellow */
  --marge:      #009ddc;       /* marge blue */
  --bart:       #ff8a1e;       /* bart orange */
  --donut:      #ff6fa3;       /* donut pink */
  --grass:      #74b34a;       /* lawn green */
  --ink:        #0e0f1a;       /* outline near-black */
  --paper:      #fff6dc;       /* off-cream */
  --kremlin:    #c41e3a;       /* Russian red */
  --gold:       #f2c84b;
  --shadow:     0 6px 0 var(--ink), 0 10px 24px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------- Sky / clouds backdrop ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, var(--sky) 0%, #87cdf2 70%, #c8e7f7 100%);
  pointer-events: none;
}

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.08));
  opacity: .95;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 999px;
}
.cloud-1 { width: 180px; height: 50px; top: 8%;  left: -10%; animation: drift 60s linear infinite; }
.cloud-1::before { width: 80px; height: 80px; top: -35px; left: 30px; }
.cloud-1::after  { width: 60px; height: 60px; top: -22px; left: 100px; }

.cloud-2 { width: 240px; height: 60px; top: 22%; left: -20%; animation: drift 90s linear infinite; animation-delay: -20s; }
.cloud-2::before { width: 110px; height: 110px; top: -55px; left: 40px; }
.cloud-2::after  { width: 75px; height: 75px; top: -30px; left: 140px; }

.cloud-3 { width: 160px; height: 45px; top: 55%; left: -15%; animation: drift 75s linear infinite; animation-delay: -50s; }
.cloud-3::before { width: 70px; height: 70px; top: -32px; left: 25px; }
.cloud-3::after  { width: 50px; height: 50px; top: -20px; left: 90px; }

.cloud-4 { width: 200px; height: 55px; top: 75%; left: -25%; animation: drift 100s linear infinite; animation-delay: -35s; }
.cloud-4::before { width: 90px; height: 90px; top: -45px; left: 35px; }
.cloud-4::after  { width: 65px; height: 65px; top: -25px; left: 120px; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(140vw); }
}

/* ---------- Marquee ticker ---------- */

.marquee {
  position: relative;
  z-index: 5;
  width: 100%;
  background: var(--bart);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
  padding: 8px 0;
  font-family: 'Bungee', sans-serif;
}
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee-scroll 40s linear infinite;
  will-change: transform;
}
.marquee-item {
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 2px;
  padding: 0 18px;
}
.marquee-sep {
  color: var(--kremlin);
  font-size: 14px;
  padding: 0 4px;
  align-self: center;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Nav ---------- */

.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  font-family: 'Bungee', 'Russo One', sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.logo-dollar {
  color: var(--bart);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 3px 3px 0 var(--ink);
}
.logo-text {
  color: var(--paper);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 3px 3px 0 var(--ink);
}

.nav-links {
  display: flex;
  gap: 26px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
  transition: border-color .15s;
}
.nav-links a:hover { border-bottom-color: var(--kremlin); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 36px 80px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.ticker-chip {
  display: inline-block;
  background: var(--ink);
  color: var(--bart);
  font-family: 'Russo One', sans-serif;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  letter-spacing: 2px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.hero-title {
  font-family: 'Bungee', 'Russo One', sans-serif;
  font-size: clamp(56px, 9vw, 132px);
  line-height: .88;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-title span {
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 6px 6px 0 var(--ink);
  display: inline-block;
}
.line-1 { color: var(--bart); }
.line-2 { color: var(--donut); transform: translateX(20px); }
.line-3 { color: var(--kremlin); transform: translateX(60px); }

.hero-tag {
  font-size: 18px;
  line-height: 1.5;
  max-width: 480px;
  background: rgba(255, 246, 220, .9);
  padding: 16px 20px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-weight: 500;
}

/* ---------- Era counter ---------- */

.era-counter {
  margin-top: 22px;
  background: var(--ink);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  max-width: 480px;
}
.era-label {
  font-family: 'Russo One', sans-serif;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--bart);
  margin-bottom: 8px;
}
.era-clock {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}
.era-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.era-num {
  font-family: 'Bungee', sans-serif;
  font-size: 26px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
}
.era-tag {
  font-family: 'Russo One', sans-serif;
  font-size: 12px;
  color: var(--paper);
  opacity: .75;
  letter-spacing: 1px;
}

/* ---------- Stats ticker chips ---------- */

.stats-ticker {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 540px;
}
.stat-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 4px 4px 0 var(--ink);
  min-width: 95px;
}
.stat-label {
  font-family: 'Russo One', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--ink);
  opacity: .7;
  text-transform: uppercase;
}
.stat-value {
  font-family: 'Bungee', sans-serif;
  font-size: 18px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-eternal {
  background: var(--kremlin);
}
.stat-eternal .stat-label { color: var(--gold); opacity: 1; }
.stat-eternal .stat-value {
  color: var(--gold);
  animation: eternal-pulse 2.4s ease-in-out infinite;
}
@keyframes eternal-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

/* ---------- Precious watermark ---------- */

.hero > .hero-text,
.hero > .putin-stage { position: relative; z-index: 2; }

.precious-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.precious-watermark span {
  position: absolute;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(40px, 7vw, 90px);
  color: var(--kremlin);
  opacity: 0;
  letter-spacing: 4px;
  text-transform: lowercase;
  white-space: nowrap;
  animation: precious-fade 9s ease-in-out infinite;
}
.precious-watermark span:nth-child(1) {
  top: 8%;
  right: 4%;
  transform: rotate(-6deg);
  animation-delay: 0s;
}
.precious-watermark span:nth-child(2) {
  bottom: 18%;
  left: 6%;
  transform: rotate(3deg);
  animation-delay: 3s;
}
.precious-watermark span:nth-child(3) {
  top: 48%;
  right: 28%;
  transform: rotate(-2deg);
  font-size: clamp(28px, 4vw, 56px);
  animation-delay: 6s;
}
@keyframes precious-fade {
  0%, 100% { opacity: 0; }
  20%, 35% { opacity: .18; }
  50%      { opacity: 0; }
}

.cta-row {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: 'Russo One', sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  padding: 16px 28px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-primary   { background: var(--bart);    color: var(--ink); }
.btn-secondary { background: var(--paper);   color: var(--ink); }

/* ---------- TV-frame morph of the three Zhgun thumbnails ---------- */

.putin-stage {
  position: relative;
  width: 100%;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bob 3.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.tv-frame {
  position: relative;
  width: min(100%, 520px);
  background: var(--bart);
  border: 5px solid var(--ink);
  border-radius: 24px;
  padding: 18px 18px 6px;
  box-shadow:
    10px 10px 0 var(--ink),
    inset 0 0 0 4px var(--paper);
}

.tv-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
}

.morph-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: morph 15s infinite;
}
.frame-1 { animation-delay: 0s; }
.frame-2 { animation-delay: 5s; }
.frame-3 { animation-delay: 10s; }

@keyframes morph {
  0%   { opacity: 0; transform: scale(1.04); }
  3%   { opacity: 1; transform: scale(1); }
  30%  { opacity: 1; transform: scale(1); }
  35%  { opacity: 0; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1.04); }
}

.tv-scanlines {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0) 0px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,.12) 3px,
      rgba(0,0,0,0) 4px
    );
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* CRT flicker: triggered each time the TV swaps frames */
.tv-screen.crt-flick { animation: crt-flick .7s steps(8, end); }
@keyframes crt-flick {
  0%   { filter: brightness(1) contrast(1); transform: translateX(0); }
  8%   { filter: brightness(2.6) contrast(.7); transform: translateX(-2px); }
  14%  { filter: brightness(.4) contrast(1.4); transform: translateX(3px); }
  22%  { filter: brightness(1.8) contrast(.9); transform: translateX(-1px); }
  35%  { filter: brightness(.7) contrast(1.2); transform: translateX(2px); }
  55%  { filter: brightness(1.3) contrast(1); transform: translateX(0); }
  100% { filter: brightness(1) contrast(1); transform: translateX(0); }
}

.tv-bezel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 12px 6px 6px;
}
.tv-knob {
  width: 22px;
  height: 22px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.2);
}
.tv-label {
  margin-left: auto;
  font-family: 'Bungee', sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 4px 12px;
  border-radius: 8px;
  letter-spacing: 2px;
}
.tv-counter {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  color: var(--kremlin);
}

/* ---------- Sections ---------- */

section {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 36px;
}

.section-title {
  font-family: 'Bungee', 'Russo One', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  text-align: center;
  margin: 0 0 50px;
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 5px 5px 0 var(--ink);
}
.section-title .hl { color: var(--bart); }

/* ---------- Story ---------- */

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.story-card {
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 8px 8px 0 var(--ink);
  position: relative;
  transition: transform .15s;
}
.story-card:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.story-card h3 { font-family: 'Russo One', sans-serif; margin: 4px 0 12px; font-size: 22px; }
.story-card p { line-height: 1.55; margin: 0; font-size: 15px; }
.story-year {
  display: inline-block;
  background: var(--kremlin);
  color: var(--gold);
  font-family: 'Bungee', sans-serif;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 1.5px;
  border: 2px solid var(--ink);
}

.meduza-link-wrap {
  text-align: center;
  margin: 50px auto 0;
  max-width: 700px;
  font-size: 17px;
  background: rgba(14, 15, 26, .9);
  color: var(--paper);
  padding: 22px 26px;
  border-radius: 16px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}
.meduza-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--bart);
  font-family: 'Russo One', sans-serif;
  font-size: 18px;
  text-decoration: none;
  border-bottom: 3px solid var(--bart);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.meduza-link:hover { color: var(--donut); border-bottom-color: var(--donut); }

/* ---------- Trilogy ---------- */

.video-card {
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 10px 10px 0 var(--ink);
  margin-bottom: 40px;
}
.video-meta {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.video-num {
  font-family: 'Bungee', sans-serif;
  background: var(--kremlin);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 8px;
  letter-spacing: 2px;
  font-size: 14px;
  border: 2px solid var(--ink);
}
.video-year {
  font-family: 'Russo One', sans-serif;
  font-size: 14px;
  color: var(--ink);
  opacity: .6;
}
.video-title {
  font-family: 'Russo One', sans-serif;
  font-size: 22px;
  flex: 1 1 auto;
}
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--ink);
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--ink);
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Lite-YT click-to-play card */
.video-lite {
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}
.video-lite .video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease, filter .25s ease;
}
.video-lite:hover .video-thumb,
.video-lite:focus-visible .video-thumb {
  transform: scale(1.03);
  filter: brightness(.85);
}
.video-lite .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(4px 4px 0 var(--ink));
  transition: transform .15s ease;
}
.video-lite:hover .play-button,
.video-lite:focus-visible .play-button {
  transform: translate(-50%, -50%) scale(1.08);
}
.video-lite .play-button svg {
  width: 100%;
  height: 100%;
  display: block;
}
.video-lite:focus-visible {
  outline: 3px solid var(--bart);
  outline-offset: 3px;
}

.video-external-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--ink);
  color: var(--gold);
  font-family: 'Russo One', sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  border: 2px solid var(--gold);
}

.video-yt-link {
  margin-left: auto;
  font-family: 'Russo One', sans-serif;
  font-size: 13px;
  text-decoration: none;
  background: var(--kremlin);
  color: var(--gold);
  padding: 8px 14px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: transform .12s;
}
.video-yt-link:hover { transform: translateY(-2px); }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--paper);
  padding: 40px 36px;
  margin-top: 60px;
}
.footer-row {
  max-width: 1280px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  font-family: 'Bungee', sans-serif;
  font-size: 28px;
}
.footer-logo .logo-dollar { color: var(--bart); }
.footer-links {
  display: flex;
  gap: 24px;
  font-family: 'Russo One', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
}
.footer-links a {
  text-decoration: none;
  color: var(--paper);
  border-bottom: 2px solid var(--bart);
  padding-bottom: 2px;
  transition: color .15s;
}
.footer-links a:hover { color: var(--bart); }

.disclaimer {
  max-width: 900px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.6;
  opacity: .7;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding: 20px 24px 60px; }
  .putin-stage { min-height: 420px; }
  .story-grid { grid-template-columns: 1fr; }
  .video-meta { gap: 10px; }
  .video-yt-link { margin-left: 0; }
  .nav { padding: 18px 24px; }
  .nav-links { display: none; }
  section { padding: 60px 24px; }
  .line-2 { transform: none; }
  .line-3 { transform: none; }
}
