/* F4NTASTIC components — redesign 2026.
   Shared enhancement layer for public pages. Loaded after style.css + page CSS + tokens.css.
   Restyles visuals only; layout of existing components (esp. mobile nav) is left intact. */

/* ---------- Atmosphere ---------- */
body { background: var(--bg); }
body::after {
  opacity: .9;
  background:
    radial-gradient(ellipse 60% 45% at 10% 0%, rgba(217, 180, 91, .10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 95% 30%, rgba(246, 221, 147, .06), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(154, 116, 32, .10), transparent 70%);
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(180deg, rgba(7, 7, 7, .86), rgba(7, 7, 7, .62));
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(217, 180, 91, .45) 30%, rgba(255, 255, 255, .12) 60%, transparent) 1;
  transition: height .45s var(--ease-out-expo), background .45s, box-shadow .45s;
}
/* Mobile: no backdrop-filter on the header — it would become the containing block of the position:fixed
   menu panel (#mainNav) and collapse it to the header's height. Use a solid tint instead. */
@media (max-width: 780px) {
  .site-header, .site-header.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 7, 7, .95); }
}
.site-header.is-scrolled {
  background: rgba(7, 7, 7, .9);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .9);
}
@media (min-width: 781px) {
  .site-header.is-scrolled { height: 66px; }
}
.brand-mark span, .brand-mark { transition: color .3s; }
.brand:hover .brand-mark { color: var(--gold-bright); }
.main-nav .nav-cta {
  background: padding-box linear-gradient(#0b0b0b, #0b0b0b), border-box var(--grad-border);
  border: 1px solid transparent !important;
  transition: box-shadow .3s, color .3s;
}
.main-nav .nav-cta:hover { box-shadow: var(--glow-gold); }

/* ---------- Typography ---------- */
.gold-text {
  color: var(--gold);
  background: var(--grad-gold);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  animation: fx-shimmer 7s var(--ease-in-out) infinite;
}
@keyframes fx-shimmer { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.eyebrow { letter-spacing: .32em; }
.eyebrow-line { background: var(--grad-gold); width: 36px; }

/* ---------- Buttons ---------- */
.button {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 0 !important;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  padding: 15px 22px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: transform .5s var(--ease-out-expo), box-shadow .4s, color .3s, background-position .8s var(--ease-out-expo);
}
.button-primary {
  color: #0d0b06;
  background: var(--grad-gold);
  background-size: 220% 100%;
  background-position: 0% 0;
}
.button-primary:hover { background: var(--grad-gold); background-size: 220% 100%; background-position: 100% 0; }
.button-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%);
}
.button-primary:hover::after { transform: translateX(120%); transition: transform .9s var(--ease-out-expo); }
.button-quiet {
  color: var(--silver);
  background: padding-box linear-gradient(rgba(10, 10, 10, .6), rgba(10, 10, 10, .6)), border-box var(--grad-border);
  border: 1px solid transparent;
}
.button-quiet:hover { color: var(--gold-bright); }
.button:focus-visible { clip-path: none; }
.button:disabled { filter: grayscale(.7) brightness(.7); cursor: not-allowed; }

/* ---------- Reveal (upgraded: blur + rise + stagger) ----------
   Uses individual `translate`/`scale` so `transform` stays free for tilt effects. */
.reveal {
  opacity: 0; transform: none; translate: 0 42px; scale: .985; filter: blur(8px);
  transition: opacity 1s var(--ease-out-expo), translate 1.1s var(--ease-out-expo), scale 1.1s var(--ease-out-expo), filter 1s var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 85ms);
}
.reveal.is-visible { opacity: 1; transform: none; translate: 0 0; scale: 1; filter: none; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--grad-gold);
  background-size: 200% 100%;
  animation: fx-shimmer 9s linear infinite;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(217, 180, 91, .5), transparent) 1;
  background: radial-gradient(ellipse 60% 120% at 50% 100%, rgba(217, 180, 91, .08), transparent 70%), #060606;
}

/* ---------- Social cards ---------- */
.official-social-card {
  background: padding-box var(--glass-bg), border-box var(--grad-border);
  border: 1px solid transparent;
}

/* ---------- Language switcher (i18n.js) ---------- */
.f4-language-switcher {
  border-radius: 99px; border-color: rgba(217, 180, 91, .35) !important;
  background: rgba(8, 8, 8, .92) !important;
}
.f4-language-option { border-radius: 99px; }

@media (prefers-reduced-motion: reduce) {
  .gold-text, .ticker { animation: none; }
  .reveal { translate: none; scale: none; filter: none; opacity: 1; }
}

/* ---------- Navbar FX (js/fx/nav.js) ---------- */
/* Desktop: a springy gold pill follows the active / hovered link. */
@media (min-width: 781px) {
  .main-nav { position: relative; isolation: isolate; }
  .main-nav > a:not(.nav-cta):not(.nav-login) { position: relative; padding: 9px 2px; transition: color .3s; }
  .main-nav a:not(.nav-cta).is-active::after,
  .main-nav a:not(.nav-cta).active::after { display: none; }
  .main-nav > a.is-active, .main-nav > a.active, .main-nav > a[aria-current="page"] { color: var(--gold-bright); }
  .nav-indicator {
    position: absolute; left: 0; top: 50%; z-index: -1; height: 36px; width: var(--w, 0px);
    transform: translate3d(var(--x, 0px), -50%, 0);
    border-radius: 99px; border: 1px solid transparent; opacity: 0; pointer-events: none;
    background:
      padding-box linear-gradient(180deg, rgba(246, 221, 147, .15), rgba(217, 180, 91, .04)),
      border-box linear-gradient(135deg, rgba(246, 221, 147, .75), rgba(217, 180, 91, .1) 45%, rgba(246, 221, 147, .5));
    box-shadow: 0 0 24px -6px rgba(217, 180, 91, .55), inset 0 1px 0 rgba(255, 255, 255, .1);
    transition: transform .6s cubic-bezier(.34, 1.45, .5, 1), width .6s cubic-bezier(.34, 1.45, .5, 1), opacity .35s;
  }
  .nav-indicator::after {
    content: ""; position: absolute; left: 32%; right: 32%; bottom: -2px; height: 2px; border-radius: 2px;
    background: var(--gold-bright); box-shadow: 0 0 10px 2px rgba(246, 221, 147, .65);
  }
  .nav-indicator.is-on { opacity: 1; }
  .nav-indicator.is-instant { transition: none; }
}
.nav-ripple {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(246, 221, 147, .7), rgba(217, 180, 91, 0) 70%);
  animation: nav-ripple .7s var(--ease-out-expo) forwards;
}
@keyframes nav-ripple { to { transform: scale(10); opacity: 0; } }
.main-nav a.is-pressed { animation: nav-press .45s var(--ease-out-expo); }
@keyframes nav-press { 30% { transform: scale(.9); } 100% { transform: none; } }

/* Account chip: avatar wrapped in a slowly turning gold ring. */
.nav-avatar { position: relative; isolation: isolate; }
.nav-avatar::before {
  content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold-bright), transparent 30%, var(--gold) 55%, transparent 80%, var(--gold-bright));
  animation: nav-ring 4s linear infinite;
}
@keyframes nav-ring { to { transform: rotate(360deg); } }

/* Mobile: full-screen menu that bursts open from the hamburger, big numbered links staggering in. */
.menu-toggle span { transition: transform .45s var(--ease-out-expo), opacity .3s; transform-origin: center; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 780px) {
  .nav-indicator { display: none; }
  .site-header .main-nav.is-open {
    counter-reset: navi;
    background:
      radial-gradient(ellipse 80% 45% at 100% 0%, rgba(217, 180, 91, .16), transparent 70%),
      radial-gradient(ellipse 70% 40% at 0% 100%, rgba(154, 116, 32, .14), transparent 70%),
      rgba(6, 6, 6, .985) !important;
    animation: nav-open .7s var(--ease-out-expo) both;
  }
  .site-header .main-nav.is-open > * { animation: nav-item .7s var(--ease-out-expo) both; animation-delay: calc(var(--i, 0) * 45ms + 140ms); }
  .site-header .main-nav.is-open > a:not(.nav-cta):not(.nav-login) {
    display: flex; align-items: baseline; gap: 14px;
    font: 800 clamp(28px, 8.5vw, 38px)/1.05 var(--font-display) !important; letter-spacing: .01em; text-transform: uppercase;
    color: #ece8de; padding: 14px 0 !important;
  }
  .site-header .main-nav.is-open > a:not(.nav-cta):not(.nav-login)::before {
    counter-increment: navi; content: counter(navi, decimal-leading-zero);
    font: 800 11px/1 var(--font-body); letter-spacing: .2em; color: var(--gold); transform: translateY(-4px);
  }
  .site-header .main-nav.is-open > a:not(.nav-cta):not(.nav-login):is(.is-active, .active) { color: var(--gold-bright); }
  .site-header .main-nav.is-open > a:not(.nav-cta).is-active::after,
  .site-header .main-nav.is-open > a:not(.nav-cta).active::after {
    content: ""; display: block; width: 8px; height: 8px; margin: 0 0 0 auto; align-self: center; border-radius: 50%;
    background: var(--gold-bright); box-shadow: 0 0 12px var(--gold-bright); animation: none;
  }
}
@keyframes nav-open { from { clip-path: circle(0 at calc(100% - 36px) 0); } to { clip-path: circle(150% at calc(100% - 36px) 0); } }
@keyframes nav-item { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .nav-indicator, .menu-toggle span { transition: none; }
  .nav-avatar::before, .site-header .main-nav.is-open, .site-header .main-nav.is-open > * { animation: none; }
}
