:root {
  --blue-2:    #4a36c8;
  --blue-3:    #1d1564;
  --gold-2:    #c9941c;
  --gold-soft: rgba(245, 196, 73, 0.18);
  --yellow:    #ffce46;
  --hairline:  rgba(255, 255, 255, 0.08);
}

.lg-rain { color: var(--white); }
.lg-x {
  color: var(--gold);
  margin-left: 0.05em;
  text-shadow: 0 0 18px rgba(245, 196, 73, 0.35);
}

#pyrefly-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1500;
}

#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) clamp(20px, 5vw, 64px) 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 60%, rgba(40, 70, 220, 0.22) 0%, transparent 70%),
    linear-gradient(180deg, var(--black) 0%, var(--deep) 55%, var(--black) 100%);
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 75%);
}

.hero-content {
  position: relative;
  z-index: 20;
  text-align: center;
  max-width: 920px;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp .8s .15s forwards;
}

.hero-title {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(54px, 12vw, 132px);
  letter-spacing: clamp(4px, 1vw, 10px);
  line-height: 0.92;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: baseline;
  padding-bottom: 14px;
  opacity: 0;
  animation: fadeUp .9s .35s forwards;
}
.hero-title::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--cyan) 22%,
    #ffffff 50%,
    var(--gold) 78%,
    transparent 100%);
  box-shadow: 0 0 22px rgba(245, 196, 73, 0.35);
}
.hero-title .lg-rain { color: var(--white); text-shadow: 0 4px 24px rgba(255,255,255,0.18); }
.hero-title .lg-x {
  color: var(--gold);
  text-shadow: 0 0 32px rgba(245, 196, 73, 0.35);
  margin-left: 0.05em;
}

.hero-subtitle {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 28px);
  letter-spacing: 2px;
  color: var(--ice);
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp .8s .55s forwards;
}

.hero-desc {
  font-size: clamp(15px, 1.4vw, 17px);
  letter-spacing: 0.3px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 44px;
  opacity: 0;
  animation: fadeUp .8s .7s forwards;
}
.hero-desc strong { color: var(--gold); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .8s .9s forwards;
}

.section-title.gold {
  color: var(--gold);
  text-shadow: 0 0 28px rgba(245, 196, 73, 0.18);
}

.games-tagline {
  margin-top: 6px;
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(15px, 1.6vw, 19px);
  letter-spacing: 1px;
  color: var(--ice);
  opacity: .85;
}

#games {
  position: relative;
  background: linear-gradient(180deg, var(--black) 0%, var(--black-2) 100%);
  overflow: hidden;
}
#games::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(61, 47, 176, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.games-header {
  text-align: center;
  margin-bottom: 56px;
}

#FFX_card {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(16, 11, 52, 0.92), rgba(6, 5, 26, 0.96));
  border: 1px solid var(--border-hi);
  overflow: visible; 
  box-shadow: var(--shadow-card);
}
#FFX_card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(167, 139, 250, 0.6) 30%,
    rgba(245, 196, 73, 0.6) 50%,
    rgba(167, 139, 250, 0.6) 70%,
    transparent 100%);
}

.anniversary-plaque {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 6;
  padding: 14px 18px;
  background: rgba(6, 5, 26, 0.66);
  border: 1px solid rgba(245, 196, 73, 0.45);
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.anniv-num {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(245, 196, 73, 0.35);
}
.anniv-num sup {
  font-size: 0.42em;
  vertical-align: super;
  margin-left: 1px;
  font-weight: 500;
}
.anniv-line {
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 8px auto;
}
.anniv-text {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--gold);
}
.anniv-date {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--text-mute);
  text-transform: uppercase;
}

.ffx-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy);
}
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 24px 28px;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.slide.active { opacity: 1; }
.slide-1 {
  background:
    radial-gradient(ellipse 60% 80% at 30% 50%, rgba(60, 50, 200, 0.42) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 70% 30%, rgba(80, 90, 220, 0.26) 0%, transparent 50%),
    linear-gradient(135deg, #0b0828 0%, #181246 50%, #211968 100%);
}
.slide-2 {
  background:
    radial-gradient(ellipse 70% 50% at 50% 60%, rgba(90, 80, 220, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 80% 20%, rgba(245, 196, 73, 0.18) 0%, transparent 50%),
    linear-gradient(160deg, #0b0828 0%, #181246 60%, #0b0828 100%);
}
.slide-3 {
  background:
    radial-gradient(ellipse 50% 70% at 20% 50%, rgba(167, 139, 250, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(74, 54, 200, 0.34) 0%, transparent 60%),
    linear-gradient(200deg, #0b0828 0%, #110d34 50%, #18114a 100%);
}
.slide-caption {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ice);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.slide-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.dot {
  width: 28px;
  height: 3px;
  background: rgba(238, 244, 255, 0.22);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.2s;
  border-radius: 0 !important;
}
.dot.active {
  background: var(--gold);
  width: 40px;
  box-shadow: none;
}

.ffx-info {
  padding: clamp(30px, 4vw, 46px) clamp(28px, 4.2vw, 54px) clamp(32px, 4.2vw, 50px);
  position: relative;
  background:
    radial-gradient(ellipse 65% 72% at 22% 0%, rgba(167, 139, 250, .1), transparent 70%),
    linear-gradient(180deg, rgba(10, 7, 34, .46), rgba(6, 5, 26, .14));
}
.ffx-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}
.ffx-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 36px);
  letter-spacing: clamp(2px, 0.3vw, 4px);
  line-height: 1.06;
  text-transform: uppercase;
  color: var(--white);
}
.ffx-title .lg-x { color: var(--gold); }
.ffx-platform {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(216, 224, 238, .74);
  border: 1px solid rgba(167, 139, 250, .24);
  background: rgba(6, 5, 26, .34);
  padding: 8px 13px;
  white-space: nowrap;
  align-self: flex-start;
}

.ffx-desc {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(216, 224, 238, .74);
  max-width: 76ch;
  margin-bottom: 16px;
  border-left: 2px solid var(--gold);
  padding-left: 18px;
}

.ffx-credit-note {
  max-width: 76ch;
  margin: 0 0 26px;
  padding-left: 18px;
  color: rgba(216, 224, 238, .62);
  font-size: 12.5px;
  line-height: 1.65;
}

.ffx-credit-note::before {
  content: 'Credit';
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(245, 196, 73, .78);
}

.rainx-compare-caption {
  margin: 0 clamp(28px, 4.2vw, 54px) clamp(24px, 3vw, 34px);
  padding: 13px 0 0;
  border-top: 1px solid rgba(216, 200, 255, .14);
  color: rgba(216, 200, 255, .48);
  font-size: 9.5px;
  line-height: 1.5;
}
.rainx-compare-caption strong {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245, 196, 73, .86);
}
.rainx-compare-caption p {
  margin: 0;
}
.rainx-compare-caption p + p {
  margin-top: 7px;
}
.rainx-compare-caption-note {
  max-width: 88ch;
  color: rgba(216, 200, 255, .5);
}
.rainx-compare-caption a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 196, 73, .34);
}

.ffx-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}
.ffx-meta.ffx-meta-release-only {
  width: min(340px, 100%);
  grid-template-columns: 1fr;
  margin-bottom: 0;
}
.ffx-meta-item {
  background: var(--deep);
  padding: 16px 18px;
  text-align: center;
}

.ffx-meta-item .m-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ffx-meta-item .m-value {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2.5px;
  color: var(--gold);
  text-transform: uppercase;
}

.ffx-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

#pyrefly-spawn {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(167, 139, 250, 0.4),
    rgba(245, 196, 73, 0.4),
    rgba(167, 139, 250, 0.4),
    transparent);
  pointer-events: none;
}

#FFX_card   .corner-mark { width: 84px; height: 84px; }
.modal-card .corner-mark { width: 50px; height: 50px; }

.modal-card .corner-mark.tl { top: -6px;    left: -6px;  }
.modal-card .corner-mark.tr { top: -6px;    right: -6px; }
.modal-card .corner-mark.bl { bottom: -6px; left: -6px;  }
.modal-card .corner-mark.br { bottom: -6px; right: -6px; }

#FFX_card,
.modal-card { overflow: visible; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 26, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.modal.open .modal-backdrop { opacity: 1; }

.modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 40px clamp(28px, 5vw, 44px) 36px;
  background: linear-gradient(180deg, var(--deep), var(--black));
  border: 1px solid var(--gold);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(245, 196, 73, 0.18),
    inset 0 0 0 1px rgba(245, 196, 73, 0.12);
  text-align: center;
  transform: translateY(14px);
  opacity: 0;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
  color: var(--text-mute);
  transition: color .15s var(--ease);
}
.modal-close:hover { color: var(--gold); }

.modal-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 6px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 4px;
  color: var(--white);
  margin-bottom: 18px;
}
.modal-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.modal-body strong { color: var(--gold); }

.modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 26px;
}
.modal-meta.modal-meta-release-only {
  width: min(320px, 100%);
  grid-template-columns: 1fr;
  margin-left: auto;
  margin-right: auto;
}
.modal-meta > div {
  background: var(--deep);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-meta span {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.modal-meta strong {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold);
}

.scroll-cursor {
  position: absolute;
  bottom: clamp(20px, 3vw, 32px);
  right: clamp(20px, 3vw, 32px);
  z-index: 25;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 5, 26, 0.55);
  border: 1px solid rgba(245, 196, 73, 0.45);
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cursorBob 1.6s ease-in-out infinite;
  transition:
    background-color .2s var(--ease),
    border-color     .2s var(--ease),
    box-shadow       .25s var(--ease),
    color            .2s var(--ease);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(245, 196, 73, 0.16);
}
.scroll-cursor:hover {
  background: rgba(245, 196, 73, 0.18);
  border-color: var(--gold);
  animation-play-state: paused;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(245, 196, 73, 0.4);
}
.scroll-cursor:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.cursor-arrow {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cursor-stars {
  position: absolute;
  inset: -10px;
  pointer-events: none;
}
.cursor-stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--gold);
  transform: rotate(45deg) scale(0.5);
  box-shadow: 0 0 7px rgba(245, 196, 73, 0.7);
  opacity: 0;
  animation: cursorTwinkle 2.4s ease-in-out infinite;
}
.cursor-stars i:nth-child(2) {
  background: #d8e0ee;
  box-shadow: 0 0 7px rgba(216, 224, 238, 0.75);
}
.cursor-stars i:nth-child(1) { top: 6px;     left: -6px;  animation-delay: 0s;   }
.cursor-stars i:nth-child(2) { top: -4px;    right: 8px;  animation-delay: 0.7s; }
.cursor-stars i:nth-child(3) { bottom: -4px; left: 14px;  animation-delay: 1.4s; }

#hero, #games, #footer { scroll-margin-top: calc(var(--header-h) + 12px); }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  animation: none; 
}
.reveal.visible { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cursorBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}
@keyframes cursorTwinkle {
  0%, 100% { opacity: 0; transform: rotate(45deg) scale(0.5); }
  50%      { opacity: 1; transform: rotate(45deg) scale(1); }
}

@media (max-width: 720px) {
  .scroll-cursor { width: 44px; height: 44px; }
  .cursor-arrow  { width: 18px; height: 18px; }
  .cursor-stars  { inset: -8px; }

  .anniversary-plaque { top: 14px; left: 14px; padding: 10px 12px; }
  .anniv-num  { font-size: 28px; }
  .anniv-text { font-size: 9px; letter-spacing: 4px; }
  .anniv-date { font-size: 8px; letter-spacing: 2px; }

  .ffx-title-row { flex-direction: column; gap: 12px; }
  .ffx-meta      { grid-template-columns: 1fr; }
  .ffx-cta .btn-primary, .ffx-cta .btn-secondary { width: 100%; }
  .rainx-compare-caption { margin-inline: 18px; }

  .modal-meta { grid-template-columns: 1fr; }

  #FFX_card   .corner-mark { width: 56px; height: 56px; }
  .modal-card .corner-mark { width: 36px; height: 36px; }

  .hero-title    { letter-spacing: 4px; }
  .hero-subtitle { letter-spacing: 1.5px; }
  .hero-cta      { flex-direction: column; align-items: stretch; }
  .hero-cta .btn-primary, .hero-cta .btn-secondary { width: 100%; padding: 0 18px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  #hero {
    min-height: auto;
    padding: calc(var(--header-h) + 24px) 24px 36px;
  }
  .hero-title    { font-size: clamp(40px, 9vh, 64px); margin-bottom: 6px; }
  .hero-subtitle { font-size: 14px; margin-bottom: 18px; }
  .hero-desc     { margin-bottom: 22px; }
  .hero-eyebrow  { margin-bottom: 12px; }
  .anniversary-plaque { padding: 10px 12px; }
  .scroll-cursor { bottom: 14px; right: 14px; width: 40px; height: 40px; }
  .cursor-arrow  { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cursor  { animation: none; }
  .cursor-stars i { animation: none; opacity: .6; }
  .reveal,
  .hero-eyebrow, .hero-title, .hero-subtitle, .hero-desc, .hero-cta {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

@media(max-width:768px){
	.anniversary-plaque{
		top:18px!important;
		left:18px!important;
		padding:10px 13px!important;
		transform:scale(.75)!important;
		transform-origin:top left!important;
	}
	.anniv-num{font-size:38px!important;}
	.anniv-text{font-size:10px!important;letter-spacing:4px!important;}
	.anniv-date{font-size:10px!important;letter-spacing:3px!important;}
}
