/* ============================================================
   XDR Edits — design tokens
   ============================================================ */
:root {
  --bg: #04060f;
  --text: #eef2ff;
  --muted: #98a4c9;
  --blue: #3b82f6;
  --blue-deep: #2563eb;
  --cyan: #7dd3fc;
  --r-lg: 28px;
  --r-md: 20px;
  --nav-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(59, 130, 246, 0.4); }

/* ============================================================
   Ambient background — aurora orbs + grain
   ============================================================ */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.orb-a {
  width: 70vmax; height: 70vmax;
  top: -30vmax; left: -18vmax;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.34), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb-b {
  width: 56vmax; height: 56vmax;
  top: 18%; right: -24vmax;
  background: radial-gradient(closest-side, rgba(125, 211, 252, 0.16), transparent 70%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.orb-c {
  width: 64vmax; height: 64vmax;
  bottom: -34vmax; left: 16%;
  background: radial-gradient(closest-side, rgba(67, 56, 202, 0.26), transparent 70%);
  animation: drift-c 38s ease-in-out infinite alternate;
}

@keyframes drift-a { to { transform: translate(9vmax, 7vmax) scale(1.08); } }
@keyframes drift-b { to { transform: translate(-7vmax, -5vmax) scale(1.12); } }
@keyframes drift-c { to { transform: translate(-6vmax, -8vmax) scale(0.94); } }

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

/* ============================================================
   Glass + edge-light (the signature)
   ============================================================ */
.glass {
  position: relative;
  background: linear-gradient(165deg, rgba(21, 30, 62, 0.62), rgba(7, 11, 26, 0.55));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-lg);
}

.edge-lit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    150deg,
    rgba(125, 211, 252, 0.55),
    rgba(255, 255, 255, 0.10) 28%,
    rgba(59, 130, 246, 0.04) 55%,
    rgba(59, 130, 246, 0.5)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* pointer-tracked light on glass surfaces (set via JS --mx/--my).
   The light appears at the cursor's entry point and travels with it. */
.glow-track::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    var(--glow-size, 340px) circle at var(--mx, 50%) var(--my, 120%),
    rgba(125, 211, 252, var(--glow-alpha, 0.14)),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.glow-track:hover::after { opacity: 1; }

/* ============================================================
   Type
   ============================================================ */
.script {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  background: linear-gradient(120deg, #5ea2ff, #9ecbff 60%, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 0.08em 0.12em 0.02em;
  filter: drop-shadow(0 0 22px rgba(59, 130, 246, 0.45));
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.lede {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 46ch;
  margin-inline: auto;
}

.section-head {
  text-align: center;
  display: grid;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 5vw, 3.2rem);
}

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================================
   Buttons
   ============================================================ */
/* 3D cursor tilt (applied by main.js on fine pointers) */
[data-tilt] {
  will-change: transform;
  transform-style: preserve-3d;
}

.btn {
  position: relative;
  --glow-size: 150px;
  --glow-alpha: 0.22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 50px;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: box-shadow 0.25s ease, background-color 0.25s ease,
    filter 0.25s ease, transform 0.2s var(--ease-out);
}

.btn-primary {
  background: linear-gradient(180deg, #3f8bfc, var(--blue-deep));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 0 1px rgba(96, 165, 250, 0.4),
    0 10px 32px rgba(37, 99, 235, 0.42);
}

.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 0 1px rgba(147, 197, 253, 0.6),
    0 12px 44px rgba(59, 130, 246, 0.6);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.45), 0 8px 28px rgba(59, 130, 246, 0.18);
}

/* on the solid blue button the travelling light is white, not cyan */
.btn-primary.glow-track::after {
  background: radial-gradient(
    var(--glow-size, 150px) circle at var(--mx, 50%) var(--my, 120%),
    rgba(255, 255, 255, 0.3),
    transparent 65%
  );
}

.btn-sm { min-height: 42px; padding: 0.5rem 1.15rem; font-size: 0.88rem; }

.btn-icon svg { width: 18px; height: 18px; flex: none; }

/* ============================================================
   Nav
   ============================================================ */
.nav-wrap {
  position: fixed;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  justify-content: center;
}

.nav {
  --glow-size: 280px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: min(860px, 100%);
  min-height: var(--nav-h);
  padding: 0.5rem 0.6rem 0.5rem 1.4rem;
  border-radius: 999px;
}

.nav.edge { box-shadow: 0 14px 44px rgba(2, 6, 23, 0.55); }

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: linear-gradient(120deg, #5ea2ff, #9ecbff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand span { color: var(--text); -webkit-text-fill-color: var(--text); font-weight: 500; }

.nav-links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.15rem;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

/* ============================================================
   Layout
   ============================================================ */
main { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding-top: calc(var(--nav-h) + clamp(4rem, 12vh, 7.5rem));
  display: grid;
  justify-items: center;
  gap: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.4rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
  max-width: 20ch;
}

.hero .script { font-size: 0.95em; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.reel {
  width: min(920px, 100%);
  margin-top: clamp(1.6rem, 4vw, 2.8rem);
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: transparent;
}

/* under-glow light leak beneath the reel — like the reference hero card */
.reel::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -26px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(96, 165, 250, 0.5), transparent 75%);
  filter: blur(14px);
  pointer-events: none;
  z-index: -1;
}

/* ===== Video facades ===== */
.facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: calc(var(--r-lg) - 10px);
  overflow: hidden;
  cursor: pointer;
  background: #0a0f22;
  padding: 0;
}

.facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  opacity: 0.92;
}

.facade:hover img { opacity: 1; }

.facade .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.facade .play svg {
  position: relative;
  width: 42px;
  height: 42px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(2, 6, 23, 0.4));
}

/* clear liquid glass disc: heavy frost, faint neutral surface,
   specular light on the rim — like the reference */
.facade .play::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(
    130% 130% at 32% 22%,
    rgba(255, 255, 255, 0.13),
    rgba(255, 255, 255, 0.03) 62%
  );
  /* desaturate what shows through so the glass stays neutral and smoky */
  backdrop-filter: blur(18px) saturate(50%) brightness(0.96);
  -webkit-backdrop-filter: blur(18px) saturate(50%) brightness(0.96);
  box-shadow:
    inset 0 1.5px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 2.5px rgba(255, 255, 255, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 12px 34px rgba(2, 6, 23, 0.45);
  transition: box-shadow 0.25s ease;
}

.facade:hover .play::before {
  box-shadow:
    inset 0 1.5px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1.5px 2.5px rgba(255, 255, 255, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 12px 34px rgba(2, 6, 23, 0.45),
    0 0 44px rgba(96, 165, 250, 0.4);
}

.facade.playing { cursor: default; }

.facade iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ===== Clients ===== */
.clients {
  text-align: center;
  display: grid;
  gap: 2rem;
  padding-block: clamp(3rem, 7vw, 4.5rem);
}

.clients h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.client-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
}

.chip {
  --glow-size: 260px;
  --glow-alpha: 0.18;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.55rem 2rem 0.55rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.18rem;
  cursor: default;
  background: linear-gradient(150deg, rgba(30, 42, 80, 0.7), rgba(10, 15, 35, 0.65));
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(125, 211, 252, 0.13),
    0 8px 28px rgba(2, 6, 23, 0.4);
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease;
}

.chip:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 0 0 1px rgba(125, 211, 252, 0.5),
    0 14px 40px rgba(37, 99, 235, 0.38),
    0 0 28px rgba(59, 130, 246, 0.22);
}

.chip img {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12), 0 2px 10px rgba(2,6,23,0.5);
}

/* ===== Work grid ===== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
}

.card { padding: 10px; }

.card .facade { border-radius: calc(var(--r-lg) - 10px) calc(var(--r-lg) - 10px) 12px 12px; }

.card-meta {
  padding: 1rem 1rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-meta::before {
  content: "";
  display: block;
  width: 3px;
  min-width: 3px;
  height: 2rem;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  box-shadow: 0 0 10px rgba(125,211,252,0.6);
}

.creator {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, #fff 30%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}

.card-meta p { display: none; }

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
}

.step {
  padding: 2.3rem 1.9rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background-image:
    radial-gradient(130% 100% at 88% -12%, rgba(96, 165, 250, var(--bloom, 0.5)), transparent 58%),
    linear-gradient(165deg, rgba(21, 30, 62, 0.62), rgba(7, 11, 26, 0.55));
  background-color: transparent;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease;
}

.step:hover {
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.5), 0 0 30px rgba(59, 130, 246, 0.12);
}

.step-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  margin-bottom: 1.4rem;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 30px rgba(59, 130, 246, 0.35);
  color: var(--cyan);
}

.step-icon svg { width: 26px; height: 26px; }

.step h3 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; }

@media (min-width: 881px) {
  .step { min-height: 280px; }
}

.step h3 em {
  font-style: normal;
  background: linear-gradient(120deg, #5ea2ff, #9ecbff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step p { color: var(--muted); font-size: 1rem; }

/* ===== Contact ===== */
.contact-panel {
  --glow-size: 520px;
  text-align: center;
  padding: clamp(2.6rem, 7vw, 4.5rem) clamp(1.4rem, 5vw, 4rem);
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  background-image:
    radial-gradient(90% 120% at 50% 130%, rgba(37, 99, 235, 0.55), transparent 62%),
    linear-gradient(165deg, rgba(21, 30, 62, 0.62), rgba(7, 11, 26, 0.55));
}

.contact-panel h2 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.contact-panel .cta-row { margin-top: 0.5rem; gap: 0.9rem; }

.contact-panel .btn {
  min-height: 56px;
  padding: 0.9rem 2.2rem;
  font-size: 1.02rem;
}

/* ===== Footer ===== */
.footer {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
  padding: 1.8rem 0.4rem 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links { display: flex; gap: 1.2rem; }

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--text); }

/* ============================================================
   Custom cursor
   ============================================================ */
/* hide the native cursor everywhere while the custom one is active */
html.custom-cursor,
html.custom-cursor * { cursor: none !important; }

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.cursor.is-visible { opacity: 1; }

.cursor svg {
  display: block;
  width: 32px;
  height: 32px;
  /* tip of the arrow is the anchor point */
  transform-origin: 5px 3px;
  filter:
    drop-shadow(0 0 7px rgba(125, 211, 252, 0.9))
    drop-shadow(0 4px 18px rgba(37, 99, 235, 0.65));
  transition: transform 0.18s var(--ease-out), filter 0.25s ease;
}

/* over anything interactive: same size, just a brighter glow */
.cursor.is-active svg {
  filter:
    drop-shadow(0 0 9px rgba(125, 211, 252, 0.95))
    drop-shadow(0 4px 22px rgba(59, 130, 246, 0.75));
}

/* pressed: quick squeeze for tactile feel */
.cursor.is-pressed svg { transform: scale(0.9); }

@media (pointer: coarse) {
  .cursor { display: none; }
}

/* ============================================================
   Motion
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-in { animation: rise 0.9s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 120ms); }

.js .reveal { opacity: 0; transform: translateY(26px); }

.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb { animation: none; }
  .hero-in { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .facade img, .facade .play::before, .step, .chip { transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* Nav */
  .nav-wrap { top: 10px; left: 10px; right: 10px; }
  .nav { gap: 0.4rem; padding: 0.4rem 0.2rem 0.4rem 0.9rem; }
  .nav-links { display: flex; gap: 0.8rem; }
  .nav-links a { font-size: 0.78rem; }
  .brand { font-size: 1rem; }
  .nav .btn-sm { min-height: 34px; padding: 0.35rem 0.85rem; font-size: 0.78rem; white-space: nowrap; margin-right: 0.3rem; }

  /* Hero */
  main { width: min(100%, 100% - 1.8rem); }
  section { padding-block: clamp(2.5rem, 7vw, 4rem); }
  .hero { padding-top: calc(var(--nav-h) + clamp(2.5rem, 8vh, 4rem)); gap: 1rem; }
  .hero h1 { font-size: clamp(2rem, 8.5vw, 2.8rem); line-height: 1.18; }
  .lede { font-size: 0.97rem; }
  .cta-row { gap: 0.6rem; }
  .btn { min-height: 46px; padding: 0.65rem 1.4rem; font-size: 0.9rem; }
  .btn-sm { min-height: 38px; padding: 0.45rem 1rem; font-size: 0.82rem; }
  .reel { padding: 7px; margin-top: 1.2rem; }

  /* Clients */
  .clients h2 { font-size: clamp(1.35rem, 6vw, 1.8rem); }
  .client-row { gap: 0.7rem; flex-direction: column; align-items: center; }
  .chip { font-size: 1rem; padding: 0.4rem 1.6rem 0.4rem 0.4rem; gap: 0.8rem; width: min(340px, 100%); }
  .chip img { width: 52px; height: 52px; min-width: 52px; min-height: 52px; }

  /* Work */
  .section-head h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .work-grid { grid-template-columns: 1fr; gap: 1rem; }
  .card { padding: 7px; }
  .card-meta { padding: 0.7rem 0.6rem 0.5rem; }
  .card-meta p { font-size: 0.9rem; }

  /* Steps */
  .steps { gap: 0.9rem; }
  .step { padding: 1.6rem 1.4rem; }
  .step h3 { font-size: 1.2rem; }
  .step-icon { width: 46px; height: 46px; margin-bottom: 1rem; }

  /* Contact */
  .contact-panel { padding: 2rem 1.2rem; }
  .contact-panel h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .contact-panel .btn { min-height: 50px; padding: 0.8rem 1.6rem; font-size: 0.95rem; }
  .contact-panel .cta-row { flex-direction: column; align-items: center; width: 100%; }
  .contact-panel .cta-row .btn { width: 100%; max-width: 320px; }

  /* Footer */
  .footer { flex-direction: column; text-align: center; padding-bottom: 2rem; gap: 0.4rem; }
}
