:root {
  --bg: #07070c;
  --bg-2: #0e0e17;
  --line: #22222f;
  --text: #ecebf3;
  --muted: #9a98ad;
  --ember: #ff8a3d;
  --rose: #ff4f8b;
  --violet: #9b6bff;
  --glow: linear-gradient(90deg, var(--ember), var(--rose) 55%, var(--violet));
  --radius: 16px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; }
code { font-size: .9em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px var(--display); }
.nav nav { display: flex; gap: clamp(10px, 2.5vw, 28px); align-items: center; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--text); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
@media (max-width: 560px) { .nav nav a:not(.nav-cta) { display: none; } }

/* Hero */
.hero { position: relative; min-height: min(88vh, 820px); display: grid; align-items: end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Slideshow: slow crossfade + Ken Burns drift. */
.hero-media img { opacity: 0; transform: scale(1.08); transition: opacity 1.6s ease, transform 7s ease-out; }
.hero-media img.is-on { opacity: 1; transform: scale(1); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  /* Dark enough behind the headline that bright VFX frames never wash out the text. */
  background: linear-gradient(180deg, rgba(7,7,12,.1) 0%, rgba(7,7,12,.7) 45%, rgba(7,7,12,.85) 70%, var(--bg) 100%);
}
.hero-copy { position: relative; padding: 0 clamp(16px, 6vw, 72px) clamp(32px, 7vh, 72px); max-width: 860px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 13px; color: var(--ember); margin: 0 0 12px; }
.hero h1 { font-size: clamp(40px, 7.5vw, 88px); letter-spacing: -.02em; }
.glow { background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 2vw, 20px); color: #cfcde0; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.btn { display: inline-block; text-decoration: none; padding: 12px 22px; border-radius: 999px; font-weight: 600; }
.btn-primary { background: var(--glow); color: #120a10; box-shadow: 0 8px 32px -8px var(--rose); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 14px; }
.facts strong { color: var(--text); }

/* Sections */
.section { padding: clamp(56px, 9vw, 110px) clamp(16px, 6vw, 72px); max-width: 1280px; margin: 0 auto; }
.section h2 { font-size: clamp(30px, 4.5vw, 48px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.filters { display: flex; gap: 8px; }
.chip { font: 500 14px var(--body); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip.is-on { color: var(--text); border-color: var(--ember); }

/* Gallery */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.tile {
  all: unset; cursor: pointer; display: block;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tile:hover, .tile:focus-visible { transform: translateY(-4px); border-color: #3a3a4f; box-shadow: 0 18px 50px -20px rgba(255,79,139,.45); }
.tile:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.tile[hidden] { display: none; }
.tile-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.tile-alt { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.tile:hover .tile-alt, .tile:focus-visible .tile-alt { opacity: 1; }
/* Absolutely filled so the crop is always centred, whatever height the grid row gives the tile. */
.tile-media img, .tile-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .6s ease; }
.tile:hover .tile-media img { transform: scale(1.05); }
.tile-body { padding: 16px 18px 18px; }
.tile-body h3 { font-size: 21px; margin: 6px 0 12px; }
.tag { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ember); }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); }

/* Services */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 20px; }
.card p { color: var(--muted); margin: 0; }
.deliver { margin-top: 28px; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,138,61,.10), transparent 60%), var(--bg-2); }
.deliver ul { margin: 0; padding-left: 20px; color: #cfcde0; }
.deliver li { margin: 6px 0; }

/* Process */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.steps li { border-top: 1px solid var(--line); padding-top: 16px; }
.steps span { font: 700 14px var(--display); color: var(--ember); }
.steps h3 { font-size: 20px; margin: 8px 0; }
.steps p { color: var(--muted); margin: 0; }

/* Contact */
.contact { text-align: center; }
.contact .hero-actions { justify-content: center; }
.contact p { color: var(--muted); }
.fine { font-size: 14px; }
.handle { color: var(--text); }

.footer { border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px; }

/* Viewer */
dialog#viewer {
  width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); color: var(--text); overflow: auto;
}
dialog#viewer::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.viewer-media { display: grid; gap: 4px; background: #000; }
.viewer-media img, .viewer-media video { width: 100%; }
.viewer-body { padding: 22px clamp(16px, 4vw, 36px) 30px; }
.viewer-body h2 { font-size: clamp(26px, 4vw, 38px); margin-top: 6px; }
.viewer-body h4 { font-family: var(--display); margin: 20px 0 6px; }
.viewer-body p, .viewer-body li { color: #cfcde0; }
.tech { font-size: 14px; color: var(--muted) !important; }
.close {
  position: sticky; top: 10px; float: right; margin: 10px 10px -46px 0; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(7,7,12,.8); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .tile-media img { transition: none; }
}

/* ---- Motion layer ---------------------------------------------------------------------------- */

/* Embers over the hero image, under the copy. */
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Animated gradient sweep across the headline accent. */
.shimmer { background-size: 220% 100%; animation: shimmer 6s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.glow { text-shadow: 0 0 40px rgba(255, 79, 139, .35); }

/* Scroll hint. */
.scroll-hint { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,.35); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--ember); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 560px) { .scroll-hint { display: none; } }

/* Short decorated tagline between hero and work. */
.divider { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 26px 16px 0; }
.divider span { height: 1px; width: min(18vw, 180px); background: linear-gradient(90deg, transparent, var(--rose)); }
.divider span:last-child { transform: scaleX(-1); }
.divider p { margin: 0; font: 600 clamp(15px, 1.8vw, 18px) var(--display); letter-spacing: .12em; text-transform: uppercase;
  background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }

/* Featured tiles: two wide cards so 7 effects fill three rows on desktop. */
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
  .tile-feature { grid-column: span 2; }
  /* Every tile is media-over-text; media stretches to fill rows that a wide tile makes taller. */
  .tile { display: grid; grid-template-rows: 1fr auto; }
  .tile .tile-media { height: 100%; }
  .tile-feature .tile-media { aspect-ratio: auto; min-height: 300px; }
  .feature-left { grid-column: 1 / span 2; }
  .feature-right { grid-column: 2 / span 2; }
}
.tile-feature h3 { font-size: 26px; }

/* Cursor glow on tiles and cards. */
.tile, .card { position: relative; }
.tile::after, .card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 138, 61, .16), transparent 45%);
  transition: opacity .3s ease;
}
.tile:hover::after, .card:hover::after { opacity: 1; }

/* Reveal on scroll. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease var(--delay, 0ms), transform .7s cubic-bezier(.2,.7,.2,1) var(--delay, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.tile.reveal.in:hover { transform: translateY(-4px); }

/* Section titles get a small glowing underline. */
.section > h2::after, .section-head h2::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 12px;
  border-radius: 2px; background: var(--glow); box-shadow: 0 0 18px rgba(255, 79, 139, .6); }

@media (prefers-reduced-motion: reduce) {
  .shimmer, .scroll-hint span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { transition: none; }
}


/* Discord: handle on the hero button, and a big copyable card in the contact section. */
.dc-icon { width: 20px; height: 20px; flex: none; }
.btn-discord { display: inline-flex; align-items: center; gap: 8px; }
.btn-discord strong { color: #fff; }
.discord-card {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 16px; margin-top: 10px;
  padding: 18px 26px; border-radius: 20px; border: 1px solid rgba(255, 79, 139, .5);
  background: radial-gradient(120% 160% at 0% 0%, rgba(255,138,61,.22), transparent 55%), rgba(255,255,255,.04);
  box-shadow: 0 0 0 1px rgba(155,107,255,.15), 0 18px 60px -18px rgba(255, 79, 139, .7);
  transition: transform .2s ease, box-shadow .2s ease;
}
.discord-card:hover, .discord-card:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(155,107,255,.35), 0 22px 70px -16px rgba(255, 79, 139, .9); }
.discord-card:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.discord-card .dc-icon { width: 40px; height: 40px; color: var(--rose); }
.dc-text { display: grid; text-align: left; line-height: 1.15; }
.dc-text small { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; }
.dc-text strong { font: 700 clamp(26px, 4.5vw, 38px) var(--display); background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.copy-label { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 16px; }
@media (max-width: 480px) { .copy-label { display: none; } .discord-card { padding: 16px 20px; } }

/* Three-step process. */
.steps-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps-3 h3 { font-size: 24px; }
.steps-3 strong { color: var(--text); }

/* Viewer: one big looping video plus the call to action. */
.viewer-body .btn { margin-top: 8px; }

/* Centred heading in the contact section gets a centred underline. */
.contact > h2::after { margin-left: auto; margin-right: auto; }
