/* II Graphic — vibrant gradient studio. Theme colours live in CSS vars and are
   re-written every frame by app.js, so the whole page recolours as you scroll. */

:root {
  /* defaults = act 0 (home); JS overwrites live */
  --c1: #ff2d9b; --c2: #7b2ff7; --c3: #12c2e9;
  --accent: #ff48b0; --accent2: #22d3ee; --glow: #ff48b0;
  --ink: #ffffff; --muted: rgba(255, 255, 255, 0.92);
  --maxw: 1320px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(58vw 58vw at 12% 16%, var(--c1), transparent 60%),
    radial-gradient(54vw 54vw at 88% 22%, var(--c2), transparent 60%),
    radial-gradient(74vw 74vw at 50% 104%, var(--c3), transparent 62%),
    #07070e;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: #fff; color: #0a0a12; padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- background field + 3D canvas ---------- */
.stagefx {
  position: fixed; inset: -25%; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg at 50% 50%, var(--accent), var(--c2), var(--accent2), var(--c1), var(--accent));
  filter: blur(54px); opacity: .3; mix-blend-mode: screen;
  will-change: transform; transform: translateZ(0); /* own layer: blur rasterizes once, rotation is cheap */
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

#webgl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; }

.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 20px clamp(18px, 4vw, 42px);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .5);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { display: inline-flex; gap: 4px; }
.brand__mark i {
  width: 7px; height: 26px; border-radius: 4px; display: block;
  background: var(--accent);
}
.brand__mark i:last-child { background: var(--accent2); }
.brand__name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }

.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__link {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: rgba(255, 255, 255, 0.95); font: inherit; font-size: .9rem; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.nav__link.is-active { color: var(--ink); background: rgba(255, 255, 255, .14); }

.nav__cta {
  text-decoration: none; color: #0a0a12; background: #fff; text-shadow: none;
  font-weight: 600; font-size: .9rem; padding: 10px 18px; border-radius: 999px;
  transition: transform .2s, box-shadow .2s; box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.nav__cta:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.nav__bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left;
  transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* ---------- progress rail ---------- */
.rail {
  position: fixed; right: clamp(14px, 2vw, 28px); top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; gap: 16px; align-items: flex-end;
}
.rail__dot {
  appearance: none; cursor: pointer; position: relative;
  width: 12px; height: 12px; padding: 0; border-radius: 50%;
  background: transparent; border: 2px solid rgba(255, 255, 255, .45);
  transition: border-color .25s, background .25s, transform .25s;
}
.rail__dot:hover { border-color: #fff; }
.rail__dot.is-active { background: var(--accent); border-color: #fff; transform: scale(1.35); }
.rail__label {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(6px);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  color: var(--ink); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
.rail__dot:hover .rail__label, .rail__dot.is-active .rail__label { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------- HUD ---------- */
.hud {
  position: fixed; right: clamp(18px, 4vw, 42px); bottom: 26px; z-index: 30; pointer-events: none;
  text-align: right; text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}
.hud__count { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; }
.hud__name { font-size: 1.4rem; font-weight: 700; margin-top: 2px; }
.hud__tag { font-size: .78rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; }

/* ---------- stage / acts ---------- */
.stage { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(82% 94% at 26% 50%, rgba(5, 4, 14, .64), transparent 72%);
}
.act {
  position: absolute; left: clamp(18px, 6vw, 92px); top: 48%; transform: translateY(-50%);
  width: min(520px, 84vw); max-width: 520px;
  display: flex; flex-direction: column; align-items: flex-start;
  will-change: opacity, transform;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6), 0 2px 32px rgba(0, 0, 0, .55);
}
.act__kicker {
  margin: 0 0 18px; font-size: .82rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent2); text-shadow: 0 1px 10px rgba(0, 0, 0, .8), 0 0 2px rgba(0, 0, 0, .5);
}
.act__title {
  margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; line-height: 1.04;
  font-size: clamp(2.3rem, 5vw, 3.65rem); letter-spacing: -.01em;
}
.act__title em { font-style: normal; color: var(--accent); }
.act__desc {
  margin: 22px 0 0; font-size: clamp(1rem, 1.4vw, 1.16rem); line-height: 1.6; color: var(--muted); max-width: 30em;
}
.act__desc strong { color: var(--ink); font-weight: 700; }
.act__chips { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.chip {
  position: relative; z-index: 0;
  font-size: .82rem; font-weight: 600; letter-spacing: .015em; padding: 9px 20px; color: var(--ink);
}
.chip::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 3px; transform: skewX(-11deg);
}
.act__cta {
  margin-top: 30px; pointer-events: auto; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .98rem; color: var(--ink);
  padding: 13px 24px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.act__cta:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.act__cta--solid {
  color: #0a0a12; background: #fff; border-color: #fff; text-shadow: none;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .3);
}
.act__cta--solid:hover { background: #fff; box-shadow: 0 14px 44px rgba(0, 0, 0, .42); }
/* the final contact CTA is the page's primary action — make it larger */
.act--contact .act__cta--solid { font-size: 1.22rem; padding: 19px 40px; margin-top: 26px; border-radius: 999px; box-shadow: none; }

/* contact act extras */
.contact-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.contact-list li { display: flex; flex-direction: column; gap: 3px; }
.contact-list__k { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent2); }
.contact-list a, .contact-list li > span:last-child { color: var(--ink); font-weight: 600; font-size: 1rem; text-decoration: none; }
.contact-list a { transition: color .2s; cursor: pointer; }
.contact-list a:hover { color: var(--accent2); }
.socials { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.social { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; transition: color .2s; cursor: pointer; }
.social:hover { color: var(--ink); }

/* --- button interactivity: tactile press + click "light up" --- */
.nav__cta, .act__cta, .nav__link, .rail__dot, .social, .contact-list a { position: relative; }
.nav__link, .social, .contact-list a { transition: color .2s, background .2s, transform .12s, text-shadow .2s; }
.nav__cta, .act__cta { transition: background .25s, border-color .25s, transform .12s, box-shadow .25s, color .25s; }
.nav__cta:active, .act__cta:active, .nav__link:active, .social:active, .contact-list a:active { transform: scale(.95); }
.rail__dot:active { filter: brightness(1.4); }
.is-lit::after {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 26px 7px var(--accent), 0 0 12px 3px var(--accent2);
  animation: lit-flash .6s ease-out forwards;
}
@keyframes lit-flash {
  0% { opacity: 1; transform: scale(.82); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* ---------- scroll hint ---------- */
.scrollhint {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}
.scrollhint i { width: 1px; height: 34px; background: linear-gradient(var(--accent2), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0%, 100% { transform: scaleY(.4); opacity: .4; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; transform-origin: top; } }

/* ---------- scroll spacer + boot ---------- */
.scroller { width: 1px; pointer-events: none; }
.boot {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background:
    radial-gradient(60vw 60vw at 28% 26%, rgba(255, 45, 155, .28), transparent 60%),
    radial-gradient(54vw 54vw at 76% 74%, rgba(34, 211, 238, .24), transparent 60%),
    #07070e;
  perspective: 1100px;
  transition: opacity .8s ease, transform .8s cubic-bezier(.7, 0, .25, 1), filter .8s ease;
}
.boot__stage {
  transform-style: preserve-3d;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  animation: boot-in .9s cubic-bezier(.2, .8, .2, 1) both;
}
.boot__mark { display: flex; gap: 11px; transform-style: preserve-3d; animation: boot-spin 3s ease-in-out infinite; }
.boot__mark i {
  display: block; width: 20px; height: 76px; border-radius: 7px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 5px 0 0 rgba(0, 0, 0, .32), 0 0 30px rgba(255, 72, 176, .5);
}
.boot__mark i:last-child {
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  box-shadow: 5px 0 0 rgba(0, 0, 0, .28), 0 0 30px rgba(34, 211, 238, .5);
}
.boot__name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.7rem; letter-spacing: .42em; text-indent: .42em; color: #fff; }
.boot__tag { font-size: .82rem; letter-spacing: .08em; color: rgba(255, 255, 255, .58); }
.boot__bar { width: 210px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 4px; }
.boot__bar span { display: block; width: 42%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); animation: boot-load 1.15s ease-in-out infinite; }
@keyframes boot-spin { 0%, 100% { transform: rotateY(-26deg) rotateX(7deg); } 50% { transform: rotateY(26deg) rotateX(-7deg); } }
@keyframes boot-in { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes boot-load { 0% { transform: translateX(-130%); } 100% { transform: translateX(340%); } }
.boot.is-done {
  opacity: 0; pointer-events: none; filter: blur(7px);
  transform: perspective(1100px) rotateX(-22deg) scale(1.14); transform-origin: center 25%;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}
/* Portrait / squarish: the 3D device sits up top (see scene.js aspect<1.05), so copy drops to the bottom */
@media (max-aspect-ratio: 21/20) {
  .act { top: auto; bottom: 10vh; transform: none; }
  .stage::before { background: radial-gradient(120% 58% at 50% 100%, rgba(7, 6, 16, .68), transparent 72%); }
}
@media (max-width: 700px) {
  .stage::before { background: radial-gradient(120% 60% at 50% 100%, rgba(7, 6, 16, .72), transparent 72%); }
  .act { bottom: 84px; left: 22px; right: 22px; width: auto; }
  .act__kicker { margin-bottom: 12px; }
  .act__title { font-size: clamp(2rem, 8.5vw, 2.7rem); }
  .act__desc { max-width: none; font-size: 1rem; margin-top: 16px; }
  .act__chips { margin-top: 18px; }
  .act__cta { margin-top: 20px; }
  .contact-list { grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 16px; }
  .contact-list a, .contact-list li > span:last-child { font-size: .9rem; }
  .socials { gap: 14px; margin-top: 14px; }
  .rail { display: none; }
  .hud { display: none; }
  .nav__cta { font-size: .82rem; padding: 9px 14px; }
}
@media (max-width: 380px) {
  .hud__name { font-size: 1.15rem; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .stagefx { animation: none; }
  .scrollhint i { animation: none; }
  .boot__stage, .boot__mark, .boot__bar span { animation: none; }
  .boot.is-done { transform: none; filter: none; }
  .is-lit::after { animation: none; opacity: 0; }
  body { transition: none; }
}
