/* ═══════════════════════════════════════════════════════════════════════
   CAPITOL — home.css                (#4  Home hero + the 12 cast cards)
   One CSS file + skeleton (skeletons/home-hero.html).
   Backdrop: dusk sky, twinkling stars, drifting clouds, sweeping searchlights, the
   Capitol dome with flickering windows, a rippling flag. All transform/opacity.
   ═══════════════════════════════════════════════════════════════════════ */

.home-hero {
  --h-gold: #ffd479; --h-red: #ff5a5f;
  position: relative; margin: 0 -16px; height: min(116vw, 500px); overflow: hidden; isolation: isolate;
  border-radius: 0 0 30px 30px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  text-align: center;
}
.hero-sky { position: absolute; inset: 0; z-index: -3;
  background: linear-gradient(180deg, #0f0a33 0%, #2a1158 26%, #7b2569 50%, #d2476b 70%, #ff9a58 87%, #ffd37c 100%); }
.hero-sun { position: absolute; z-index: -3; left: 50%; bottom: -8%; width: 130%; aspect-ratio: 1; margin-left: -65%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 150, .75) 0%, rgba(255, 160, 90, .35) 30%, transparent 62%); animation: sun-breathe 7s ease-in-out infinite alternate; }
@keyframes sun-breathe { from { transform: scale(.94); opacity: .75; } to { transform: scale(1.04); opacity: 1; } }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-vig { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(5, 3, 20, .55) 100%), linear-gradient(180deg, rgba(8, 5, 30, .45), transparent 30%, transparent 78%, rgba(11, 14, 20, .9)); }

/* svg animation hooks */
.star { animation: twinkle 3s ease-in-out infinite; }
.star.b { animation-duration: 4.3s; animation-delay: -1.3s; } .star.c { animation-duration: 2.4s; animation-delay: -.6s; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.cloud { animation: drift 46s linear infinite; }
.cloud.b { animation-duration: 64s; animation-delay: -22s; } .cloud.c { animation-duration: 38s; animation-delay: -9s; }
@keyframes drift { from { transform: translateX(-120px); } to { transform: translateX(520px); } }
.beam { transform-box: view-box; transform-origin: 0 0; mix-blend-mode: screen; }
.beam.l { animation: sweep-l 7s ease-in-out infinite alternate; }
.beam.r { animation: sweep-r 9s ease-in-out infinite alternate; }
@keyframes sweep-l { from { transform: translate(64px, 392px) rotate(-30deg); } to { transform: translate(64px, 392px) rotate(8deg); } }
@keyframes sweep-r { from { transform: translate(330px, 392px) rotate(-8deg); } to { transform: translate(330px, 392px) rotate(32deg); } }
.win { animation: winflick 5s steps(1) infinite; }
.win.b { animation-duration: 7s; animation-delay: -2s; } .win.c { animation-duration: 9s; animation-delay: -5s; }
@keyframes winflick { 0%, 100% { opacity: 1; } 40% { opacity: .35; } 46% { opacity: 1; } 78% { opacity: .55; } 82% { opacity: 1; } }
.flag-s { animation: ripple 1.9s ease-in-out infinite alternate; }
@keyframes ripple { from { transform: translateY(-1.5px) skewX(-2deg); } to { transform: translateY(1.5px) skewX(2deg); } }
.flag-wrap { transform-box: fill-box; transform-origin: 0 50%; animation: flag-sway 4.4s ease-in-out infinite alternate; }
@keyframes flag-sway { from { transform: rotate(-1.5deg) scaleX(1); } to { transform: rotate(1.5deg) scaleX(.96); } }

/* title */
.hero-text { position: absolute; z-index: 2; left: 0; right: 0; top: 7%; padding: 0 18px; }
.hero-kicker { font: 700 10.5px/1.3 -apple-system, 'Segoe UI', sans-serif; letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 236, 200, .85); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); animation: rise .8s .1s both; }
.hero-title { margin: 8px 0 0; font-family: Georgia, 'Times New Roman', serif; line-height: .9; text-transform: uppercase; }
.hero-title .ht-the { display: block; font-size: 21px; letter-spacing: .6em; padding-left: .6em; color: #ffe8b0; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); animation: rise .8s .2s both; }
.hero-title .ht-hill { display: flex; justify-content: center; margin-top: 4px; font: 900 clamp(66px, 22vw, 104px)/.92 Georgia, serif; letter-spacing: .02em;
  filter: drop-shadow(0 4px 0 #7a1d2c) drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
/* the long city: WASHINGTON is ten letters — same treatment, tighter print */
.hero-title .ht-hill.long { font: 900 clamp(28px, 9.6vw, 46px)/1.1 Georgia, serif; letter-spacing: .04em; }
.hero-title .ht-hill span { display: inline-block; background: linear-gradient(180deg, #fff6cf 0%, #ffd479 46%, #f0a03a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: letter-in .7s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(.35s + var(--i) * .09s); }
.hero-title .hero-sub { position: relative; display: inline-block; margin-top: 10px; font: italic 700 22px/1 Georgia, serif; letter-spacing: .06em; text-transform: none; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); animation: rise .8s .95s both; }
.hero-title .hero-sub::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: -5px; height: 4px; border-radius: 2px; background: var(--h-red); transform-origin: 0 50%; animation: underline .6s 1.4s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { opacity: 1; } }
@keyframes letter-in { from { transform: translateY(-34px) scale(1.25) rotate(-6deg); opacity: 0; } to { opacity: 1; } }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* copy + seal under the hero */
.home-hero + .hero-copy { margin: 18px auto 0; max-width: 40ch; font: 14px/1.6 Georgia, serif; color: #cfc7b3; text-align: center; padding: 0 6px; }
.hero-seal {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px 0 4px;
  font: 700 12px/1 -apple-system, 'Segoe UI', sans-serif; letter-spacing: .32em; text-transform: uppercase; color: #ffd479;
}
.hero-seal::before, .hero-seal::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 212, 121, .6)); }
.hero-seal::after { transform: scaleX(-1); }

/* ═════════ cast cards ═════════ */
.cast-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.cast-card {
  --tone: #7e879a; --tone2: #3d4658;
  position: relative; overflow: hidden; isolation: isolate; cursor: pointer; text-align: center; padding: 22px 10px 14px;
  background: linear-gradient(165deg, #1b2140 0%, #10142a 60%, #0c0f20 100%);
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.3), border-color .18s;
  animation: card-in .55s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: calc(var(--i, 0) * 55ms);
}
.cast-card[data-party=D] { --tone: #4d86e6; --tone2: #1f3f8a; }
.cast-card[data-party=R] { --tone: #ef5659; --tone2: #8a1f26; }
.cast-card[data-party=n] { --tone: #e0b040; --tone2: #7a5a14; }
.cast-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: linear-gradient(90deg, var(--tone2), var(--tone), var(--tone2)); z-index: 1; }
.cast-card::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 46%; z-index: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent); transform: translateX(-120%) skewX(-14deg); }
.cast-card:hover, .cast-card:focus-visible { transform: translateY(-4px) rotate(-.6deg); border-color: var(--tone); outline: none; }
.cast-card:hover::after { opacity: 1; animation: sheen .9s ease both; }
.cast-card:active { transform: scale(.96); }
@keyframes sheen { to { transform: translateX(300%) skewX(-14deg); } }
@keyframes card-in { from { transform: translateY(22px) scale(.94); opacity: 0; } to { opacity: 1; } }
.cast-card svg.portrait { display: block; margin: 0 auto; width: 96px; height: 96px; border-radius: 22px;
  box-shadow: 0 0 0 3px #0c0f20, 0 0 0 5px var(--tone), 0 10px 18px rgba(0, 0, 0, .5); }
.cast-card .cc-name { margin-top: 14px; font: 700 16px/1.15 Georgia, serif; color: #f3ebd6; }
.cast-card .cc-role { margin-top: 5px; font: 600 9.5px/1.35 -apple-system, 'Segoe UI', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #98a1b8; }
.cast-card .cc-party { display: inline-block; margin-top: 9px; padding: 3px 10px; font: 700 9px/1.3 -apple-system, sans-serif; letter-spacing: .22em; border-radius: 99px;
  background: color-mix(in srgb, var(--tone) 22%, transparent); color: color-mix(in srgb, var(--tone) 75%, #fff); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); }
/* dossier badge when you've played them */
.cast-card[data-played=true] .cc-name::after { content: "DOSSIER ✓"; display: block; margin: 5px auto 0; width: fit-content; padding: 2px 7px; border: 1px solid rgba(255, 212, 121, .55); border-radius: 4px; transform: rotate(-3deg);
  font: 700 8px/1.2 -apple-system, sans-serif; letter-spacing: .2em; color: #ffd479; }

/* the president: a gold-foil wide card */
.cast-card[data-role=president] { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; text-align: left; padding: 22px 20px 18px;
  background: linear-gradient(135deg, #2a2210 0%, #1a1608 45%, #2a2210 100%); border-color: rgba(255, 212, 121, .5); box-shadow: 0 12px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 212, 121, .2), inset 0 0 40px rgba(255, 212, 121, .08); }
.cast-card[data-role=president]::before { background: linear-gradient(90deg, #8a6a1c, #ffe08a, #8a6a1c); height: 8px; }
.cast-card[data-role=president] svg.portrait { width: 104px; height: 104px; box-shadow: 0 0 0 3px #1a1608, 0 0 0 5px #ffd479, 0 10px 20px rgba(0, 0, 0, .55); }
.cast-card[data-role=president] .cc-name { margin-top: 0; font-size: 21px; }
.cast-card[data-role=president] .cc-role { color: #e8c97a; }
.cast-card[data-role=president]::after { opacity: 1; animation: sheen-loop 6s ease-in-out 1.5s infinite; }
@keyframes sheen-loop { 0%, 70% { transform: translateX(-120%) skewX(-14deg); } 100% { transform: translateX(320%) skewX(-14deg); } }
.cast-card[data-role=president] .cc-name::before { content: "★ ★ ★"; display: block; margin-bottom: 5px; font: 700 10px/1 sans-serif; letter-spacing: .5em; color: #ffd479; }

.home-foot { margin-top: 26px; text-align: center; }
.played-note { margin-bottom: 14px; font: italic 12.5px/1.5 Georgia, serif; color: #8d94a8; }

@media (min-width: 560px) { .home-hero { border-radius: 0 0 36px 36px; } }
@media (prefers-reduced-motion: reduce) {
  .star, .cloud, .beam, .win, .flag-s, .flag-wrap, .hero-sun, .cast-card::after { animation: none !important; }
  .hero-kicker, .hero-title .ht-the, .hero-title .ht-hill span, .hero-title .hero-sub, .hero-title .hero-sub::after, .cast-card { animation: none !important; opacity: 1; }
  .beam.l { transform: translate(64px, 392px) rotate(-12deg); } .beam.r { transform: translate(330px, 392px) rotate(14deg); }
}
