/* ============================================================
   APEX STUDIOS — style.css
   Vanilla CSS · noir, precise, cinematographic
   ============================================================ */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg-0: #0B0B0D;
  --bg-1: #131317;
  --bg-2: #1B1B21;
  --border: rgba(255, 255, 255, 0.08);
  --text-1: #F2F2F4;
  --text-2: #9C9CA6;
  --text-3: #5E5E68;
  --accent: #8B85F0;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --max-w: 1100px;
  --pad-x: 24px;
  --section-gap: clamp(96px, 14vh, 160px);

  --r-card: 16px;
  --r-btn: 12px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.scroll-locked { overflow: hidden; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-1);
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection { background: rgba(139, 133, 240, 0.28); color: var(--text-1); }

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

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

@media (min-width: 720px) {
  :root { --pad-x: 48px; }
}

/* ---------- Type helpers ---------- */
.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.12;
}

/* ---------- Film grain overlay ---------- */
.grain {
  position: fixed;
  inset: -60px;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.04;
  background-repeat: repeat;
  /* background-image set by JS (canvas-generated noise tile) */
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms ease;
}

.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 18px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark .mark {
  height: 22px;
  width: auto;
  color: var(--text-1);
  margin-right: 12px;
  position: relative;
  top: -1px; /* optical centring against the cap height */
  transition: color 260ms var(--ease-out), filter 260ms var(--ease-out);
}

.wordmark span {
  color: var(--text-1);
  transition: color 260ms var(--ease-out), text-shadow 260ms var(--ease-out);
}

.wordmark:hover .mark {
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(139, 133, 240, 0.4));
}

.wordmark:hover span {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(139, 133, 240, 0.45);
}

.nav-links {
  display: none;
  gap: 32px;
}

.nav-links a {
  position: relative;
  font-size: 0.9375rem;
  color: var(--text-2);
  transition: color 280ms var(--ease-out);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right; /* leave: collapse toward the right — exit, not rewind */
  transition: transform 280ms var(--ease-out);
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left; /* hover: grow from the left */
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  position: relative;
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
}

/* Sliding pill — a real segmented control */
.lang-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 40px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  transition: transform 320ms var(--ease-out);
}

.lang-toggle[data-active="it"]::before { transform: translateX(42px); }

.lang-btn {
  position: relative;
  width: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 4px 0;
  border-radius: var(--r-pill);
  transition: color 320ms var(--ease-out);
}

.lang-btn:hover { color: var(--text-2); }

.lang-btn[aria-pressed="true"] { color: var(--text-1); }

.menu-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
}

.menu-icon {
  position: relative;
  width: 18px;
  height: 10px;
  display: block;
}

.menu-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--text-1);
  transition: transform 300ms var(--ease-out), top 300ms var(--ease-out);
}

.menu-icon span:first-child { top: 0; }
.menu-icon span:last-child { top: 8.5px; }

.menu-btn[aria-expanded="true"] .menu-icon span:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon span:last-child { top: 4.25px; transform: rotate(-45deg); }

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(11, 11, 13, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad-x);
}

.mobile-menu[hidden] { display: none; }

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-links a {
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.3;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(14px);
}

.mobile-menu.open .mobile-menu-links a {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.mobile-menu.open .mobile-menu-links a:nth-child(2) { transition-delay: 70ms; }
.mobile-menu.open .mobile-menu-links a:nth-child(3) { transition-delay: 140ms; }
.mobile-menu.open .mobile-menu-links a:nth-child(4) { transition-delay: 210ms; }

.mobile-menu-links a:hover { color: var(--accent); }

.mobile-menu-meta {
  color: var(--text-3);
  margin-top: 48px;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(96px, 18vh, 200px);
  padding-bottom: var(--section-gap);
}

.hero h1 { max-width: 15ch; }

.hero .eyebrow { color: var(--text-3); }

.hero-sub {
  color: var(--text-2);
  max-width: 58ch;
  margin-top: 28px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  margin-top: 56px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.011em;
  padding: 13px 26px;
  border-radius: var(--r-btn);
  transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out),
              color 220ms var(--ease-out), transform 220ms var(--ease-out),
              box-shadow 220ms var(--ease-out);
}

.btn-arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 220ms var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
  will-change: transform;
}

.btn-primary {
  background: var(--text-1);
  color: var(--bg-0);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg-0);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 133, 240, 0.18);
}

.btn-primary:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 80ms;
}

.btn-ghost {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--border);
  color: var(--text-2);
}

.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--bg-1);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 260ms var(--ease-out);
}

.btn-ghost:hover {
  border-color: rgba(139, 133, 240, 0.55);
  color: var(--text-1);
}

.btn-ghost:hover::before { transform: scaleY(1); }

.btn-lg {
  font-size: 1.0625rem;
  padding: 16px 32px;
}

/* Contact email button — underline sweep, no lift (§3.8) */
.btn-contact::after {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 11px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease-out);
}

.btn-contact {
  position: relative;
}

.btn-contact:hover,
.btn-contact:active {
  background: var(--text-1);
  transform: none;
  box-shadow: 0 0 0 1px rgba(139, 133, 240, 0.55);
}

.btn-contact:hover::after { transform: scaleX(1); }

/* ---------- Sections ---------- */
.section { padding-block: calc(var(--section-gap) / 2); }

.section + .section { padding-top: calc(var(--section-gap) / 2); }

main > .section:last-of-type { padding-bottom: var(--section-gap); }

.section h2 { margin-bottom: 8px; }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: min(100%, 240px);
  justify-content: start; /* packs left under the eyebrow/heading */
  gap: 48px;
  margin-top: 40px;
  margin-bottom: clamp(16px, 4vh, 48px); /* let the pair breathe before Services */
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, 260px);
    gap: 64px;
  }

  /* A third project keeps packing from the left on the same row */
  .work-grid:has(> :nth-child(3)) {
    grid-template-columns: repeat(3, 260px);
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform 320ms var(--ease-out);
}

.work-card.clickable:hover,
.work-card.clickable:has(.frame:focus-visible) {
  transform: translateY(-6px);
}

.frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 44px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 8px;
  transition: border-color 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
  overflow: hidden;
}

.frame-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 37px;
  overflow: hidden;
  background: var(--bg-0);
  border: 1px solid rgba(255, 255, 255, 0.05); /* inner bezel */
}

.frame video,
.frame .frame-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

/* Contained push-in — frame-screen clips it */
.work-card.clickable:hover .frame video,
.work-card.clickable:hover .frame .frame-poster,
.work-card.clickable:has(.frame:focus-visible) .frame video,
.work-card.clickable:has(.frame:focus-visible) .frame .frame-poster {
  transform: scale(1.045);
}

/* Circular play affordance */
.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(11, 11, 13, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
  pointer-events: none;
}

.play-badge svg { margin-left: 2px; }

.work-card.clickable:hover .play-badge,
.work-card.clickable:has(.frame:focus-visible) .play-badge {
  opacity: 1;
  transform: scale(1);
}

/* Touch devices: the card must read as tappable */
@media (hover: none) {
  .play-badge {
    opacity: 0.9;
    transform: scale(1);
  }
}

.frame-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg-1);
}

.frame-placeholder span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  padding-inline: 16px;
}

.work-card.clickable { cursor: pointer; }

.work-card.clickable:hover .frame,
.work-card.clickable:has(.frame:focus-visible) .frame {
  border-color: rgba(139, 133, 240, 0.45);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(139, 133, 240, 0.15);
}

.work-info { margin-top: 22px; }

.work-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: letter-spacing 320ms var(--ease-out);
}

.work-card.clickable:hover .work-name,
.work-card.clickable:has(.frame:focus-visible) .work-name {
  letter-spacing: -0.025em; /* very subtle tightening */
}

.work-desc {
  color: var(--text-2);
  font-size: 0.9375rem;
  margin-top: 6px;
  max-width: 40ch;
}

.work-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 14px;
}

.work-meta::before {
  content: "";
  width: 2px;
  height: 12px;
  background: var(--accent);
  flex: none;
  transition: width 280ms var(--ease-out);
}

.work-card.clickable:hover .work-meta::before,
.work-card.clickable:has(.frame:focus-visible) .work-meta::before {
  width: 10px;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 48px;
}

@media (min-width: 720px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: clamp(28px, 4vw, 40px);
  transition: transform 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

/* Pointer-tracked highlight — reads as material, not gimmick */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
              rgba(139, 133, 240, 0.07), transparent 70%);
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.14);
}

@media (hover: hover) {
  .card:hover::before { opacity: 1; }
}

.card h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.card p {
  color: var(--text-2);
  font-size: 0.9995rem;
  margin-top: 14px;
  max-width: 52ch;
}

.card-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.card-list li {
  color: var(--text-2);
  font-size: 0.9375rem;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}

.services-closing {
  color: var(--text-2);
  margin-top: 40px;
  max-width: 62ch;
}

/* ---------- About ---------- */
.about-body {
  color: var(--text-2);
  max-width: 62ch;
  margin-top: 28px;
}

/* ---------- Contact ---------- */
.contact-sub {
  color: var(--text-2);
  max-width: 58ch;
  margin-top: 20px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
}

.btn-lg {
  word-break: break-all;
}

.contact-ig {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-2);
  font-size: 0.9995rem;
  transition: color 200ms ease;
}

.contact-ig:hover { color: var(--accent); }

.contact-location {
  color: var(--text-3);
  margin-top: 56px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-mark {
  height: 18px;
  width: auto;
  color: var(--text-3);
}

.footer-legal {
  color: var(--text-3);
  text-transform: none;
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 200ms ease;
}

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

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 13, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}

.lightbox.open .lightbox-backdrop {
  opacity: 1;
  transition-duration: 260ms;
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  width: min(92vw, calc(88vh * 9 / 16));
  max-width: 480px;
  opacity: 0;
  transform: scale(0.97) translateY(12px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.lightbox.open .lightbox-stage {
  opacity: 1;
  transform: none;
  transition-duration: 340ms;
}

.lightbox-media video {
  width: 100%;
  max-height: 88vh;
  border-radius: 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.lightbox-fallback {
  display: grid;
  place-items: center;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.lightbox-fallback span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lightbox-close {
  position: absolute;
  top: -52px;
  right: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  transition: border-color 250ms ease, background-color 250ms ease;
}

.lightbox-close:hover { border-color: rgba(255, 255, 255, 0.24); }

/* ---------- Privacy page ---------- */
.page {
  padding-top: clamp(72px, 12vh, 140px);
  padding-bottom: var(--section-gap);
}

.page h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.12;
}

.page-body { max-width: 62ch; }

.page-body p {
  color: var(--text-2);
  margin-top: 24px;
}

.page-updated {
  color: var(--text-3);
  margin-top: 40px;
}

.back-link {
  display: inline-block;
  color: var(--text-2);
  font-size: 0.9375rem;
  margin-top: 48px;
  transition: color 200ms ease;
}

.back-link:hover { color: var(--accent); }

/* ---------- Scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 760ms var(--ease-out), transform 760ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

/* Section eyebrows wipe in — edit-bay register */
.eyebrow.reveal { clip-path: inset(0 100% 0 0); }

.eyebrow.reveal.in {
  clip-path: inset(0 0 0 0);
  transition: opacity 760ms var(--ease-out), transform 760ms var(--ease-out),
              clip-path 600ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

/* ---------- Hero entrance (on load) ---------- */
.hero .reveal { transform: translateY(18px); }

.hero .reveal.in {
  transition-duration: 700ms;
  transition-delay: var(--reveal-delay, 0ms);
}

.hero h1.reveal { filter: blur(6px); }

.hero h1.reveal.in {
  filter: blur(0);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out),
              filter 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

/* No-JS / pre-JS safety: only hide when JS has confirmed it will reveal */
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Custom cursor ---------- */
/* cursor: none only when JS has activated the layer on a fine-pointer
   device — touch and no-JS keep native behaviour untouched */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor,
  body.has-cursor * {
    cursor: none;
  }

  /* caret behaviour stays intact if a text field is ever added */
  body.has-cursor input,
  body.has-cursor textarea {
    cursor: auto;
  }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000; /* above grain (2000) and lightbox (1000) */
  pointer-events: none;
  border-radius: 50%;
  /* parked offscreen until the first mousemove */
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  will-change: transform;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(139, 133, 240, 0.55);
  transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1),
              height 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(139, 133, 240, 0.5);
  transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1),
              height 220ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.cursor-hover .cursor-dot {
  width: 5px;
  height: 5px;
}

body.cursor-hover .cursor-ring {
  width: 48px;
  height: 48px;
  border-color: rgba(139, 133, 240, 0.9);
}

/* press feedback wins over hover growth */
body.cursor-down .cursor-ring {
  width: 26px;
  height: 26px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .grain { display: none; }

  .reveal,
  .hero .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
  }

  .status-dot { animation: none; opacity: 0.8; }

  .card::before { display: none; }

  .play-badge {
    opacity: 0.9;
    transform: scale(1);
  }
}
