/* =====================================================================
   GAME FEEL - the whole site styled like a cinematic game UI.
   No gameplay: just HUD framing, lock-on targeting, sector title cards,
   hologram spawn-ins, glitch frames and a start-screen prompt.
   ===================================================================== */
:root { --gf-g: #FCD34D; --gf-g2: #d4af37; --gf-hdr: 72px; --gf-ab: 0px; --gf-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- HUD corner frame + vignette ---------- */
#gf-frame { position: fixed; left: 8px; right: 8px; bottom: 8px; top: calc(var(--gf-hdr) + 8px); z-index: 35; pointer-events: none; opacity: 0; transition: opacity 1.2s ease .2s; }
#gf-frame.on { opacity: 1; }
#gf-frame i { position: absolute; width: 20px; height: 20px; border: 0 solid rgba(212,175,55,.6); }
#gf-frame .tl { left: 0; top: 0; border-left-width: 2px; border-top-width: 2px; }
#gf-frame .tr { right: 0; top: 0; border-right-width: 2px; border-top-width: 2px; }
#gf-frame .bl { left: 0; bottom: 0; border-left-width: 2px; border-bottom-width: 2px; }
#gf-frame .br { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }
#gf-vig { position: fixed; inset: 0; z-index: 34; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 56%, rgba(0,0,0,.4) 100%); }

/* ---------- sector tracker (mini-map) ---------- */
#gf-sector { position: fixed; left: 26px; bottom: 26px; z-index: 44; pointer-events: none; font: 600 10px/1 var(--gf-mono); letter-spacing: .2em; text-transform: uppercase; color: #8a8f9c;
  text-shadow: 0 1px 8px #000, 0 0 3px #000; opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease; }
#gf-sector.on { opacity: 1; transform: none; }
#gf-sector .l1 { display: flex; align-items: center; gap: 10px; color: var(--gf-g); white-space: nowrap; }
#gf-sector .nm { color: #c9ccd6; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
#gf-sector .nm.tick { animation: gfTick .45s steps(3) 1; }
#gf-sector .tk { display: flex; gap: 4px; margin-top: 9px; }
#gf-sector .tk i { width: 14px; height: 3px; background: rgba(255,255,255,.16); transition: background .4s, box-shadow .4s; }
#gf-sector .tk i.d { background: rgba(212,175,55,.65); }
#gf-sector .tk i.c { background: var(--gf-g); box-shadow: 0 0 9px var(--gf-g); }
@keyframes gfTick { 0% { opacity: 0; transform: translateX(-8px); } 50% { opacity: .5; } 100% { opacity: 1; transform: none; } }

/* ---------- sector title card ---------- */
#gf-chapter { position: fixed; left: 0; top: calc(var(--gf-hdr) + 28px); z-index: 48; pointer-events: none; padding: 14px 64px 16px 30px; opacity: 0;
  background: linear-gradient(90deg, rgba(9,10,15,.94), rgba(9,10,15,.72) 62%, rgba(9,10,15,0)); }
#gf-chapter .n { display: block; font: 700 10px/1 var(--gf-mono); letter-spacing: .38em; color: var(--gf-g); }
#gf-chapter b { display: block; margin-top: 9px; font: 800 clamp(18px, 2.4vw, 28px)/1.12 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: .06em; color: #fff; text-transform: uppercase; max-width: min(78vw, 640px); }
#gf-chapter u { display: block; height: 2px; margin-top: 13px; width: 0; text-decoration: none; background: linear-gradient(90deg, var(--gf-g), rgba(252,211,77,0)); }
#gf-chapter.show { animation: gfChap 2.9s cubic-bezier(.2,.8,.2,1) forwards; }
#gf-chapter.show u { animation: gfLine 1.2s cubic-bezier(.2,.8,.2,1) .15s forwards; }
#gf-chapter.show b { animation: gfType 1s steps(24) .12s both; }
@keyframes gfChap { 0% { opacity: 0; transform: translateX(-34px); } 9% { opacity: 1; transform: none; } 84% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-22px); } }
@keyframes gfLine { to { width: min(340px, 62vw); } }
@keyframes gfType { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- target lock-on reticle ---------- */
#gf-lock { position: fixed; left: 0; top: 0; z-index: 60; width: 0; height: 0; pointer-events: none; opacity: 0;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2,.9,.2,1), width .22s cubic-bezier(.2,.9,.2,1), height .22s cubic-bezier(.2,.9,.2,1); }
#gf-lock.on { opacity: 1; }
#gf-lock.snap { transition: opacity .18s ease; }
#gf-lock i { position: absolute; width: 14px; height: 14px; border: 0 solid var(--gf-g); filter: drop-shadow(0 0 5px rgba(252,211,77,.75)); }
#gf-lock .tl { left: 0; top: 0; border-left-width: 2px; border-top-width: 2px; }
#gf-lock .tr { right: 0; top: 0; border-right-width: 2px; border-top-width: 2px; }
#gf-lock .bl { left: 0; bottom: 0; border-left-width: 2px; border-bottom-width: 2px; }
#gf-lock .br { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }
#gf-lock em { position: absolute; left: 0; top: -21px; font: 700 9px/1 var(--gf-mono); font-style: normal; letter-spacing: .26em; color: var(--gf-g); white-space: nowrap; text-shadow: 0 1px 6px #000, 0 0 3px #000; }
#gf-lock.in em { top: 8px; left: 10px; }
html.gf-lock #cs-cur-ring { opacity: 0 !important; }

/* ---------- hologram spawn scan on cards ---------- */
.gf-scan { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(180deg, transparent 0, transparent 42%, rgba(252,211,77,0) 44%, rgba(252,211,77,.42) 50%, rgba(252,211,77,0) 56%, transparent 58%, transparent 100%) 0 100% / 100% 260% no-repeat; }
.gf-go > .gf-scan { animation: gfScan 1.05s cubic-bezier(.45,0,.2,1) forwards; }
@keyframes gfScan { 0% { opacity: 1; background-position: 0 100%; } 100% { opacity: 1; background-position: 0 0; } }

/* ---------- menu-style nav brackets ---------- */
#site-header nav a { position: relative; }
#site-header nav a::before, #site-header nav a::after { position: absolute; top: 50%; opacity: 0; font-weight: 800; color: var(--gf-g); pointer-events: none;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.9,.2,1); }
#site-header nav a::before { content: '['; left: -13px; transform: translate(9px, -50%); }
#site-header nav a::after { content: ']'; right: -13px; transform: translate(-9px, -50%); }
#site-header nav a:hover::before, #site-header nav a:hover::after, #site-header nav a:focus-visible::before, #site-header nav a:focus-visible::after,
#site-header nav a[data-gf-on]::before, #site-header nav a[data-gf-on]::after { opacity: 1; transform: translate(0, -50%); }

/* ---------- speed glitch (scroll velocity) + hero glitch-in ---------- */
html.gf-fast :is(h1, h2) { filter: drop-shadow(var(--gf-ab) 0 0 rgba(255,40,80,.6)) drop-shadow(calc(var(--gf-ab) * -1) 0 0 rgba(0,220,255,.55)); }
.gf-glitch { animation: gfGlitch .75s steps(2, end) 1; }
@keyframes gfGlitch {
  0% { filter: drop-shadow(5px 0 0 rgba(255,40,80,.75)) drop-shadow(-5px 0 0 rgba(0,220,255,.7)); transform: translateX(-4px); }
  22% { filter: drop-shadow(-4px 0 0 rgba(255,40,80,.75)) drop-shadow(4px 0 0 rgba(0,220,255,.7)); transform: translateX(4px) skewX(-5deg); }
  44% { filter: drop-shadow(3px 0 0 rgba(255,40,80,.6)) drop-shadow(-3px 0 0 rgba(0,220,255,.6)); transform: translateX(-2px); }
  66% { filter: drop-shadow(-2px 0 0 rgba(255,40,80,.5)) drop-shadow(2px 0 0 rgba(0,220,255,.5)); transform: translateX(1px) skewX(2deg); }
  100% { filter: none; transform: none; }
}

/* ---------- cinematic letterbox ---------- */
#gf-bars { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
#gf-bars i { position: absolute; left: 0; right: 0; height: 13vh; background: #000; transition: transform 1.15s cubic-bezier(.7,0,.2,1); }
#gf-bars i:first-child { top: 0; } #gf-bars i:last-child { bottom: 0; }
#gf-bars.open i:first-child { transform: translateY(-101%); } #gf-bars.open i:last-child { transform: translateY(101%); }

/* ---------- "press to continue" start prompt ---------- */
#gf-press { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 44; pointer-events: none; text-align: center; opacity: 0; transition: opacity .6s ease;
  font: 600 10px/1 var(--gf-mono); letter-spacing: .36em; color: #c9ccd6; text-shadow: 0 1px 8px #000, 0 0 3px #000; white-space: nowrap; }
#gf-press.on { opacity: 1; }
#gf-press.on span { animation: gfBlink 1.3s steps(2) infinite; }
#gf-press i { display: block; width: 10px; height: 10px; margin: 11px auto 0; border-right: 2px solid var(--gf-g); border-bottom: 2px solid var(--gf-g); transform: rotate(45deg); animation: gfNudge 1.2s ease-in-out infinite; }
@keyframes gfBlink { 50% { opacity: .3; } }
@keyframes gfNudge { 50% { transform: translateY(5px) rotate(45deg); } }

/* ---------- press feedback ---------- */
button:not(:disabled):active, .btn-shine:active, a.glass-card:active { transform: scale(.97); }

@media (max-width: 767px) {
  #gf-frame { left: 5px; right: 5px; bottom: 5px; top: calc(var(--gf-hdr) + 5px); opacity: .6 !important; }
  #gf-frame i { width: 14px; height: 14px; }
  #gf-sector { left: 16px; bottom: 18px; }
  #gf-sector .nm { display: none; }
  #gf-sector .tk i { width: 8px; }
  #gf-chapter { padding-left: 18px; padding-right: 36px; }
  #gf-press { bottom: 22px; letter-spacing: .28em; }
}
@media (prefers-reduced-motion: reduce) {
  #gf-bars, #gf-lock { display: none; }
  .gf-scan, .gf-glitch, #gf-press i, #gf-press.on span { animation: none !important; }
  html.gf-fast :is(h1, h2) { filter: none; }
  #gf-chapter.show { animation-duration: 3s; } #gf-chapter.show b { animation: none; clip-path: none; } #gf-chapter.show u { animation: none; width: 200px; }
}

/* the bracket glyphs replace the old underline pseudo-element (they share ::after) */
#site-header nav a.nav-link::after { width: auto; height: auto; bottom: auto; background: none; box-shadow: none; transform-origin: 50% 50%; }
