/* ═══════════════════════════════════════════════
   JOSH BUTCHER — CINEMATIC PORTFOLIO
   Dark void · deep purple glow · Apple-rounded UI
   ═══════════════════════════════════════════════ */

:root {
  --void: #0A0A0F;
  --void-2: #101018;
  --purple: #8B5CF6;
  --purple-deep: #5B21B6;
  --violet-glow: #A78BFA;
  --magenta-edge: #C084FC;
  --white: #F5F3FF;
  --muted: #8E8CA3;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(139, 92, 246, 0.25);
  --grad: linear-gradient(135deg, #8B5CF6, #C084FC);
  --glow-shadow: 0 0 40px rgba(139, 92, 246, 0.25), 0 0 80px rgba(91, 33, 182, 0.15);
  --r-card: 24px;
  --r-thumb: 16px;
  --font-display: 'Clash Display', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html { scroll-behavior: auto; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--void);
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(139, 92, 246, 0.4); color: var(--white); }

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

em.grad, .grad {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─────────── PRELOADER ─────────── */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--void);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__mark {
  font-family: var(--font-display);
  font-weight: 700; font-size: 3rem;
  animation: pulse-glow 1.6s ease-in-out infinite;
}
.preloader__mark span { color: var(--purple); }
.preloader__count {
  font-family: var(--font-mono);
  font-size: 0.85rem; color: var(--muted); letter-spacing: 0.2em;
}
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
  50% { text-shadow: 0 0 50px rgba(139, 92, 246, 0.8); }
}

/* ─────────── FIXED LAYERS ─────────── */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 900;
  width: 100%; height: 2px;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(0);
}
.grain {
  position: fixed; inset: -50%; z-index: 800;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
  animation: grain-shift 0.8s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 950;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.cursor {
  width: 8px; height: 8px;
  background: var(--violet-glow);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.9);
  margin: -4px 0 0 -4px;
}
.cursor-ring {
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(167, 139, 250, 0.4);
  transition: width 0.25s, height 0.25s, margin 0.25s, background 0.25s, border-color 0.25s;
}
.cursor-ring.is-hover {
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(167, 139, 250, 0.8);
}
.cursor-ring.is-grab {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--violet-glow);
}
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none; }
}

/* ─────────── NAV ─────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 700;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(10, 10, 15, 0.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  transform: translateY(-110%);
  transition: transform 0.6s var(--ease-out);
}
.nav.is-visible { transform: translateY(0); }
.nav__logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.4rem; color: var(--white); text-decoration: none;
}
.nav__logo span { color: var(--purple); }

/* ─────────── BUTTONS ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: box-shadow 0.35s, background 0.35s, border-color 0.35s, transform 0.2s;
  will-change: transform;
}
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover { box-shadow: 0 0 45px rgba(139, 92, 246, 0.65), 0 0 90px rgba(91, 33, 182, 0.3); }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.btn--ghost:hover { border-color: var(--violet-glow); background: rgba(139, 92, 246, 0.08); }
.btn--sm { padding: 0.6rem 1.3rem; font-size: 0.85rem; }
.btn--lg { padding: 1.1rem 2.4rem; font-size: 1.05rem; }
.btn__arrow { transition: transform 0.3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.97); }

/* ─────────── SHARED ─────────── */
.eyebrow {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.25em;
  color: var(--violet-glow);
  margin-bottom: 1.5rem;
}
.eyebrow__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse { 50% { box-shadow: 0 0 18px var(--violet-glow); } }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.line-mask { display: block; overflow: hidden; }
.line { display: block; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.orb--hero {
  width: 55vw; height: 55vw; max-width: 750px; max-height: 750px;
  background: radial-gradient(circle, rgba(91, 33, 182, 0.35), transparent 65%);
  top: 15%; left: 50%; transform: translateX(-50%);
  animation: orb-drift 14s ease-in-out infinite alternate;
}
.orb--mission {
  width: 45vw; height: 45vw;
  background: radial-gradient(circle, rgba(91, 33, 182, 0.28), transparent 65%);
  bottom: -10%; right: -10%;
  animation: orb-drift 18s ease-in-out infinite alternate;
}
.orb--story {
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(91, 33, 182, 0.25), transparent 65%);
  top: 10%; left: -12%;
  animation: orb-drift 16s ease-in-out infinite alternate-reverse;
}
.orb--contact {
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.30), transparent 60%);
  top: -5%; left: 50%; transform: translateX(-50%);
  animation: orb-drift 12s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  from { translate: 0 0; scale: 1; }
  to { translate: 4% 6%; scale: 1.08; }
}

/* ─────────── SCENES (video scrub) ─────────── */
.scene { position: relative; }
.scene__sticky {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.scene__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.scene__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(10, 10, 15, 0.75) 100%),
    linear-gradient(to bottom, rgba(10, 10, 15, 0.5), transparent 18%, transparent 82%, rgba(10, 10, 15, 0.85));
  pointer-events: none;
}
.scene__caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  padding: 0 1.5rem;
}
.scene__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 40px rgba(10, 10, 15, 0.8);
}

/* ─────────── HERO ─────────── */
.hero {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  opacity: 0;
  z-index: 2;
}
.hero__eyebrow { justify-content: center; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  position: relative; z-index: 1;
}
.hero__sub {
  margin-top: 1.75rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  position: relative; z-index: 1;
}
.hero__cta {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  margin-top: 2.5rem;
  position: relative; z-index: 1;
}
.hero__scrollcue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: var(--muted);
}
.hero__scrollline {
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, transparent, var(--violet-glow));
  animation: scroll-pulse 1.8s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ─────────── STATS ─────────── */
.stats {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 4rem);
  background: var(--void-2);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px; margin: 0 auto;
}
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after {
  content: '';
  position: absolute; right: -1rem; top: 15%; height: 70%; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(139, 92, 246, 0.3), transparent);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__label { margin-top: 0.9rem; color: var(--muted); font-size: 0.72rem; }

/* ─────────── MISSION ─────────── */
.mission {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(6rem, 12vw, 10rem) clamp(1.25rem, 6vw, 4rem);
  overflow: hidden;
}
.mission__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.2vw, 3.6rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 60rem;
  position: relative; z-index: 1;
}
.mission__text .word { opacity: 0.15; }
.mission__horizon {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(91, 33, 182, 0.25), transparent 70%);
  opacity: 0;
  pointer-events: none;
}

/* ─────────── WORK PLAYGROUND ─────────── */
.work {
  position: relative;
  padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 1400px; margin: 0 auto;
  text-align: center;
}
.work__hint { color: var(--muted); margin-bottom: 2.5rem; }
.browser {
  border-radius: var(--r-card);
  border: 1px solid var(--glass-border);
  background: rgba(16, 16, 24, 0.7);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--glow-shadow);
  overflow: hidden;
  text-align: left;
}
.browser__chrome {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.3rem;
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}
.browser__dots { display: flex; gap: 0.45rem; }
.browser__dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(139, 92, 246, 0.35);
}
.browser__dots span:nth-child(1) { background: #C084FC; box-shadow: 0 0 8px rgba(192, 132, 252, 0.6); }
.browser__dots span:nth-child(2) { background: #8B5CF6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.6); }
.browser__dots span:nth-child(3) { background: #5B21B6; box-shadow: 0 0 8px rgba(91, 33, 182, 0.6); }
.browser__url {
  flex: 1; max-width: 420px;
  margin: 0 auto;
  padding: 0.45rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
  text-transform: lowercase;
  letter-spacing: 0.08em;
}
.browser__spacer { width: 60px; }
.browser__viewport {
  position: relative;
  height: clamp(420px, 62vh, 640px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, rgba(91, 33, 182, 0.15), transparent 60%),
    radial-gradient(rgba(139, 92, 246, 0.07) 1px, transparent 1px);
  background-size: auto, 28px 28px;
  touch-action: none;
}
.work-card {
  position: absolute;
  width: clamp(180px, 22vw, 280px);
  border-radius: var(--r-thumb);
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.work-card:hover, .work-card:focus-visible {
  border-color: var(--violet-glow);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.45), 0 14px 50px rgba(0, 0, 0, 0.6);
  outline: none;
}
.work-card.is-dragging {
  cursor: grabbing;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.7), 0 24px 70px rgba(0, 0, 0, 0.7);
}
.work-card img { width: 100%; height: auto; pointer-events: none; }
.work-card__chip {
  position: absolute; bottom: 0.7rem; left: 0.7rem;
  padding: 0.35rem 0.8rem;
  background: rgba(10, 10, 15, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 999px;
  font-size: 0.62rem;
  color: var(--white);
  pointer-events: none;
}

/* ─────────── MODAL ─────────── */
.modal { position: fixed; inset: 0; z-index: 980; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 10, 15, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.35s;
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__card {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: min(680px, 92vw);
  max-height: 88vh; max-height: 88svh;
  display: flex; flex-direction: column;
  background: rgba(16, 16, 24, 0.92);
  border-radius: 28px;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  box-shadow: var(--glow-shadow), 0 40px 100px rgba(0, 0, 0, 0.7);
}
.modal.is-open .modal__card { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(10, 10, 15, 0.7);
  color: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}
.modal__close:hover { background: rgba(139, 92, 246, 0.3); box-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0 0.3rem 1.2rem;
}
.modal__head h3 {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.5rem;
}
.modal__desc { color: var(--muted); font-size: 0.9rem; }
.modal__frame {
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  overflow: hidden;
  flex: 1; min-height: 0;
}
.modal__scroll {
  height: 100%;
  max-height: 62vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--purple) transparent;
}
.modal__scroll::-webkit-scrollbar { width: 6px; }
.modal__scroll::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }
.modal__scroll img { width: 100%; }

/* ─────────── CONTACT ─────────── */
.contact {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(6rem, 10vw, 9rem) clamp(1.25rem, 5vw, 4rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(139, 92, 246, 0.14), transparent 65%),
    var(--void);
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 7rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  position: relative; z-index: 1;
}
.contact__sub {
  margin-top: 1.5rem;
  color: var(--muted);
  max-width: 32rem;
  position: relative; z-index: 1;
}
.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  width: min(640px, 100%);
  margin-top: 3rem;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  position: relative; z-index: 1;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.65rem; color: var(--violet-glow); }
.field input, .field textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--violet-glow);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(142, 140, 163, 0.6); }
.contact__form .btn--lg { grid-column: 1 / -1; justify-content: center; margin-top: 0.4rem; }
.contact__direct { margin-top: 2rem; color: var(--muted); position: relative; z-index: 1; }
.contact__email {
  background: none; border: none;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--violet-glow);
  cursor: pointer;
  border-bottom: 1px dashed rgba(167, 139, 250, 0.5);
  padding-bottom: 2px;
  transition: color 0.3s, text-shadow 0.3s;
}
.contact__email:hover { color: var(--magenta-edge); text-shadow: 0 0 16px rgba(192, 132, 252, 0.6); }
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translate(-50%, 200%);
  padding: 0.8rem 1.6rem;
  background: rgba(16, 16, 24, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--violet-glow);
  z-index: 990;
  box-shadow: var(--glow-shadow);
  transition: transform 0.5s var(--ease-out);
}
.toast.is-visible { transform: translate(-50%, 0); }

/* ─────────── FOOTER ─────────── */
.footer {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 2.2rem clamp(1.25rem, 5vw, 4rem) 2.6rem;
  border-top: 1px solid rgba(139, 92, 246, 0.12);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer__left { font-size: 0.65rem; }
.footer__right { display: flex; align-items: center; gap: 1rem; font-size: 0.7rem; }
.footer__top {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: transparent;
  color: var(--violet-glow);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.footer__top:hover {
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  transform: translateY(-3px);
}
.footer__glowline {
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
  opacity: 0.7;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
}

/* ─────────── REVEAL DEFAULTS (JS animates in) ─────────── */
.reveal { opacity: 0; transform: translateY(40px); }
.no-js .reveal, .reduced-motion .reveal { opacity: 1; transform: none; }
.reduced-motion .hero, .reduced-motion .scene__caption { opacity: 1; }
.reduced-motion .mission__text .word { opacity: 1 !important; }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
  .pillars__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .story__inner { grid-template-columns: 1fr; }
  .story__portrait { position: relative; top: 0; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 1rem; }
  .stat:nth-child(even)::after { display: none; }
  .contact__form { grid-template-columns: 1fr; }
  .footer { flex-direction: column; text-align: center; gap: 1rem; }

  /* playground becomes horizontal snap carousel */
  .browser__viewport {
    display: flex; gap: 1rem;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding: 2rem 1.25rem;
    height: auto;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  .work-card {
    position: relative !important;
    transform: none !important;
    flex: 0 0 78%;
    scroll-snap-align: center;
    cursor: pointer;
  }
}

/* ─────────── REDUCED MOTION ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .grain { animation: none; }
}
