/* =========================================================================
   fx — futuristic layer on top of style.css. Static look works without JS;
   motion is gated by prefers-reduced-motion and the .fx-* classes that
   fx.js sets on <html> (.fx-gl = WebGL field running, .fx-pointer = fine pointer).
   ========================================================================= */

:root{
  --cyan:#5ef2ff;
  --cyan-soft:rgba(94,242,255,.14);
  --hud:rgba(94,242,255,.72);
  --glow-red:0 0 22px rgba(214,82,58,.6);
  --ease-out:cubic-bezier(.16,1,.3,1);
}

:focus-visible{ box-shadow:0 0 0 5px var(--cyan-soft); }
::selection{ background:var(--cyan); color:var(--bg); }

/* ---------- WebGL field ---------- */
.fx-field{ position:fixed; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; }
.fx-gl .hero{ background:transparent; }
.fx-gl .hero-tint{
  background:linear-gradient(to bottom, rgba(10,11,13,.6) 0%, rgba(10,11,13,0) 28%, rgba(10,11,13,0) 70%, rgba(10,11,13,.55) 100%);
}
.fx-gl main > .section{ background:rgba(10,11,13,.58); }
/* factual content (pricing) stays calm: the field is almost fully dimmed behind it */
.fx-gl main > .section--calm{ background:rgba(10,11,13,.9); }
.fx-gl .page-hero::after{ background:linear-gradient(to bottom, transparent, rgba(10,11,13,.58)); }
.fx-gl .cta-band{ background:linear-gradient(180deg, rgba(16,19,23,.45), rgba(16,19,23,.9)); }
.fx-gl .site-footer{ background:rgba(10,11,13,.9); }

/* ---------- HUD ---------- */
.fx-hud{
  position:fixed; inset:0; z-index:110; pointer-events:none;
  font:500 .68rem/1 var(--mono); letter-spacing:.16em; color:var(--hud);
}
.fx-bar{
  position:absolute; left:0; top:0; width:100%; height:2px;
  transform-origin:0 50%; transform:scaleX(var(--fx-progress, 0));
  background:linear-gradient(90deg, var(--red), var(--amber), var(--cyan));
  box-shadow:0 0 12px rgba(94,242,255,.6);
}
.fx-corner, .fx-read{ display:none; }
@media (min-width:881px){
  .fx-corner{ display:block; position:absolute; width:18px; height:18px; border:0 solid rgba(94,242,255,.45); }
  .fx-corner.tl{ left:14px; top:calc(var(--hdr) + 14px); border-width:1px 0 0 1px; }
  .fx-corner.tr{ right:14px; top:calc(var(--hdr) + 14px); border-width:1px 1px 0 0; }
  .fx-corner.bl{ left:14px; bottom:14px; border-width:0 0 1px 1px; }
  .fx-corner.br{ right:14px; bottom:14px; border-width:0 1px 1px 0; }
  .fx-read{ display:block; position:absolute; white-space:nowrap; text-shadow:0 0 8px rgba(94,242,255,.35); }
  .fx-sec{ left:18px; top:50%; writing-mode:vertical-rl; transform:translateY(-50%) rotate(180deg); }
  .fx-geo{ right:44px; bottom:18px; }
  .fx-geo b{ font-weight:500; color:var(--ink); }
}

/* ---------- HUD cursor (fine pointers) ---------- */
.fx-cursor{
  position:fixed; left:0; top:0; z-index:120; pointer-events:none;
  width:34px; height:34px; margin:-17px 0 0 -17px;
  border:1px solid rgba(94,242,255,.7); border-radius:50%;
  box-shadow:0 0 14px rgba(94,242,255,.25), inset 0 0 10px rgba(94,242,255,.15);
  transition:width .25s var(--ease-out), height .25s var(--ease-out), margin .25s var(--ease-out), border-color .25s;
}
.fx-cursor::before, .fx-cursor::after{
  content:''; position:absolute; left:50%; width:1px; height:6px; margin-left:-.5px; background:var(--cyan);
}
.fx-cursor::before{ top:-7px; }
.fx-cursor::after{ bottom:-7px; }
.fx-cursor-dot{
  position:fixed; left:0; top:0; z-index:121; pointer-events:none;
  width:6px; height:6px; margin:-3px 0 0 -3px; border-radius:50%;
  background:var(--red); box-shadow:var(--glow-red), 0 0 0 1px rgba(10,11,13,.6);
}
.fx-cursor.is-link{ width:58px; height:58px; margin:-29px 0 0 -29px; border-color:var(--red); }
.fx-cursor.is-down{ width:24px; height:24px; margin:-12px 0 0 -12px; }
.fx-cursor-off .fx-cursor, .fx-cursor-off .fx-cursor-dot{ opacity:0; }
/* the custom cursor is the only pointer where it runs (fine pointer + motion allowed) */
.fx-pointer, .fx-pointer *{ cursor:none !important; }

/* ---------- header ---------- */
.logo .dot{ box-shadow:0 0 10px var(--red); }
.site-nav a::after{ box-shadow:0 0 8px var(--red); }
.site-nav a.nav-cta{ box-shadow:inset 0 0 12px rgba(214,82,58,.25), 0 0 14px -4px rgba(214,82,58,.6); }

/* ---------- type: neon accents ---------- */
.accent{ text-shadow:var(--glow-red); }
.s-label, .eyebrow, .axis-kicker{ color:var(--red-hover); text-shadow:0 0 10px rgba(214,82,58,.45); }
.ph-eyebrow, .h-eyebrow{ font-family:var(--mono); font-weight:500; letter-spacing:.24em; line-height:1.6; color:var(--cyan); text-shadow:0 0 12px rgba(94,242,255,.45); }
.ph-eyebrow{ font-size:.8rem; }
.stat .num{ text-shadow:0 0 22px rgba(247,245,239,.12); }
.stat .num span{ text-shadow:var(--glow-red); }
.principle .pmono{ color:var(--cyan); text-shadow:0 0 10px rgba(94,242,255,.45); }

/* ---------- hero ---------- */
.grain::after{
  content:''; position:absolute; inset:0;
  background:repeating-linear-gradient(0deg, rgba(255,255,255,.6) 0 1px, transparent 1px 3px);
}
.court .draw{ filter:drop-shadow(0 0 6px rgba(94,242,255,.35)); }
.hero-photo{
  filter:contrast(1.06) saturate(.9) drop-shadow(0 18px 36px rgba(0,0,0,.55)) drop-shadow(0 0 20px rgba(94,242,255,.22));
}
@media (min-width:610px) and (min-aspect-ratio:1001/1000) and (min-height:521px){
  .hero-stage::after{
    content:''; position:absolute; pointer-events:none;
    left:calc(470 * var(--u)); top:calc(770 * var(--u)); width:calc(340 * var(--u)); height:calc(56 * var(--u));
    border:1px solid rgba(94,242,255,.55); border-radius:50%;
    box-shadow:0 0 24px rgba(94,242,255,.35), inset 0 0 24px rgba(94,242,255,.25);
  }
}

/* ---------- cards: HUD brackets, glass, spotlight ---------- */
.service, .note{
  background:
    linear-gradient(var(--cyan), var(--cyan)) top left / 16px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top left / 1px 16px no-repeat,
    linear-gradient(var(--red), var(--red)) bottom right / 16px 1px no-repeat,
    linear-gradient(var(--red), var(--red)) bottom right / 1px 16px no-repeat,
    linear-gradient(180deg, rgba(94,242,255,.04), rgba(10,11,13,.72) 60%);
}
.terminal, .shot{ box-shadow:0 30px 60px -24px rgba(0,0,0,.7), 0 0 0 1px rgba(94,242,255,.08), 0 0 40px -10px rgba(94,242,255,.18); }
.terminal-body{ text-shadow:0 0 6px rgba(212,216,222,.18); }
.stat-band{ border-image:linear-gradient(90deg, transparent, rgba(94,242,255,.4), transparent) 1; }

.service, .principle, .terminal, .stat, .offer-row, .ref-figure, .note{ position:relative; }
.fx-pointer :is(.service, .principle, .terminal, .stat, .offer-row, .note)::after{
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(94,242,255,.13), transparent 70%);
  opacity:0; transition:opacity .3s;
}
.fx-pointer :is(.service, .principle, .terminal, .stat, .offer-row, .note):hover::after{ opacity:1; }
.fx-pointer :is(.service, .principle, .terminal, .ref-figure){
  transform:perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:transform .35s var(--ease-out), border-color .25s;
}
.fx-pointer .service:hover{
  transform:perspective(900px) translateY(-3px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color:rgba(94,242,255,.35);
}

/* ---------- buttons ---------- */
.btn{ position:relative; overflow:hidden; }
.btn-primary{ box-shadow:0 0 0 1px rgba(214,82,58,.6), 0 0 26px -6px rgba(214,82,58,.8); }
.btn-primary:hover{ box-shadow:0 0 0 1px var(--red-hover), 0 0 36px -4px rgba(214,82,58,.95); }
.btn-primary::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform:translateX(-120%); transition:transform .6s var(--ease-out);
}
.btn-primary:hover::after{ transform:translateX(120%); }
.btn-ghost:hover{ border-color:var(--cyan); box-shadow:0 0 18px -4px rgba(94,242,255,.6); }
.fx-pointer :is(.btn, .nav-cta, .lang-toggle){ translate:var(--tx, 0) var(--ty, 0); }
.fx-pointer .btn{ transition:background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s, translate .3s var(--ease-out); }
.fx-pointer .nav-cta{ transition:background .2s, color .2s, translate .3s var(--ease-out); }
.fx-pointer .lang-toggle{ transition:color .2s, border-color .2s, translate .3s var(--ease-out); }

/* ---------- forms ---------- */
.field input:focus, .field textarea:focus{ border-color:var(--cyan); box-shadow:0 0 0 3px var(--cyan-soft), 0 0 22px -6px rgba(94,242,255,.6); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion:no-preference){
  @keyframes fxGlitch{
    0%, 100%{ text-shadow:0 14px 34px rgba(0,0,0,.5); transform:none; }
    91%{ text-shadow:-3px 0 rgba(94,242,255,.8), 3px 0 rgba(214,82,58,.8), 0 14px 34px rgba(0,0,0,.5); transform:translateX(2px) skewX(-4deg); }
    92%{ text-shadow:3px 0 rgba(94,242,255,.8), -3px 0 rgba(214,82,58,.8), 0 14px 34px rgba(0,0,0,.5); transform:translateX(-3px); }
    93%{ text-shadow:0 14px 34px rgba(0,0,0,.5); transform:none; }
    95%{ text-shadow:-2px 0 rgba(94,242,255,.7), 2px 0 rgba(214,82,58,.7), 0 14px 34px rgba(0,0,0,.5); transform:translateX(1px); }
  }
  .h-headline, .ph-title, .cta-title{ animation:fxGlitch 7s steps(1) 2.4s infinite; }

  @keyframes fxPing{ 0%{ box-shadow:0 0 0 0 rgba(214,82,58,.7), 0 0 10px var(--red); } 70%, 100%{ box-shadow:0 0 0 9px rgba(214,82,58,0), 0 0 10px var(--red); } }
  .logo .dot{ animation:fxPing 2.4s ease-out infinite; }

  @keyframes fxScan{ from{ background-position:0 0; } to{ background-position:0 -300px; } }
  .grain::after{ animation:fxScan 12s linear infinite; }

  @keyframes fxRing{ 0%, 100%{ opacity:.55; transform:scale(1); } 50%{ opacity:1; transform:scale(1.05); } }
  .hero-stage::after{ animation:fxRing 3.2s ease-in-out infinite; }

  /* wipe + focus pull as a finite animation, so no filter/clip-path stays on the element afterwards */
  @keyframes fxWipe{ from{ clip-path:inset(0 0 100% 0); filter:blur(10px); } to{ clip-path:inset(-50%); filter:blur(0); } }
  .js .reveal.in{ animation:fxWipe 1.1s var(--ease-out) backwards; }

  ::view-transition-old(root){ animation:fxVtOut .3s cubic-bezier(.4,0,1,1) both; }
  ::view-transition-new(root){ animation:fxVtIn .6s var(--ease-out) both; }
  @keyframes fxVtOut{ to{ opacity:0; transform:scale(.985); filter:blur(6px); } }
  @keyframes fxVtIn{ from{ clip-path:inset(0 0 100% 0); filter:brightness(1.8) hue-rotate(-20deg); } to{ clip-path:inset(0); filter:none; } }

  @supports (animation-timeline: view()){
    @keyframes fxHeroOut{ to{ transform:translateY(-10vh) scale(.94); opacity:.15; } }
    .hero-stage{ animation:fxHeroOut linear both; animation-timeline:scroll(root); animation-range:0 100vh; }

    @keyframes fxShotIn{ from{ transform:perspective(1200px) rotateX(26deg) scale(.9); opacity:.35; } to{ transform:none; opacity:1; } }
    .shot{ animation:fxShotIn linear both; animation-timeline:view(); animation-range:entry 0% cover 40%; transform-origin:50% 100%; }

    @keyframes fxGrow{ from{ transform:scaleY(0); } to{ transform:scaleY(1); } }
    .axis-list::before{ transform-origin:top; animation:fxGrow linear both; animation-timeline:view(); animation-range:entry 10% cover 70%; }
  }
}
