/* ============================================================================
   styles.css — GENERATED. Do not edit.

   Built from, in cascade order:  tokens.css -> base.css -> layout.css

   Edit those files, then rebuild:
       cd Portfolio && python ../Portfolio-dev/build-css.py

   One request instead of three: each <link rel="stylesheet"> is
   render-blocking, so three sheets meant three serial round trips before
   first paint.
   ========================================================================= */


/* ==== tokens.css ========================================================== */

/* ============================================================================
   tokens.css — design tokens, mirrored 1:1 from the Figma variables
   File:  RRUZs7hdvBuHZoPsO7XEsO
   Frames: 40-3 "Landing / Desktop" · 204-431 "Landing / Mobile"

   Every value below is the resolved Figma variable value, not a guess.
   The single exception is --accent-violet (see note in the Color block).
   ========================================================================= */

:root {

  /* ── Color · Dark (the only mode the landing ships in) ─────────────────
     Figma collection: Color/Dark. Hex values verbatim; 8-digit hex is
     kept as rgba() so it composites predictably over the mesh layer.     */
  --bg-base:            #060608;   /* Color/Dark → bg-base            */
  --bg-raised:          #0b0b12;   /* Color/Dark → bg-raised          */
  --bg-inset:           #12121a;   /* Color/Dark → bg-inset           */

  --text-primary:       #f4f4f6;   /* Color/Dark → text-primary       */
  --text-secondary:     #c7c7d0;   /* Color/Dark → text-secondary     */
  --text-muted:         #8b8b96;   /* Color/Dark → text-muted         */
  --text-inverse:       #060608;   /* Color/Dark → text-inverse       */

  --accent-cyan:        #2de2e6;   /* Color/Dark → accent-cyan        */

  /* NOTE: no `accent-violet` variable is bound in either frame — the violet
     in the design reads from a raster mesh gradient, not a token. This hex
     is taken from the two reference HTML files and matches the Figma render.
     If you later publish a violet variable, this is the one line to update. */
  --accent-violet:      #8b5cf6;

  --surface-glass-shell: rgba(255,255,255,0.04);  /* #ffffff0a */
  --surface-glass-core:  rgba(255,255,255,0.08);  /* #ffffff14 */
  --border-hairline:     rgba(255,255,255,0.08);  /* #ffffff14 */
  --border-strong:       rgba(255,255,255,0.14);  /* #ffffff24 */

  /* Ambient mesh glows — derived from the two accents. */
  --glow-violet: rgba(139, 92, 246, 0.50);
  --glow-cyan:   rgba( 45,226,230, 0.45);

  /* ── Spacing · Figma collection: Spacing ─────────────────────────────── */
  --space-3xs:  4px;
  --space-2xs:  8px;
  --space-xs:  12px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  32px;
  --space-xl:  48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 120px;

  /* ── Radius · Figma collection: Radius ───────────────────────────────── */
  --radius-lg:   22px;
  --radius-xl:   28px;
  --radius-2xl:  34px;
  --radius-full: 999px;

  /* ── Typography · Figma collection: Typography ────────────────────────
     Figma's Heading/Title styles name Space Grotesk; the brief specifies
     Clash Display for display type. Clash Display is used here and the
     Figma size / line-height / letter-spacing scale is preserved exactly. */
  --font-display: 'Clash Display', 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Mono/Eyebrow — 11/16, +2.4px tracking */
  --fs-eyebrow: 11px;  --lh-eyebrow: 16px;  --ls-eyebrow: 0.218em;
  /* Mono/Tag — 11/16, +0.6px tracking, weight 500 */
  --fs-tag: 11px;      --lh-tag: 16px;      --ls-tag: 0.055em;
  /* Mono/Nav — 13/18, +0.5px tracking */
  --fs-nav: 13px;      --lh-nav: 18px;      --ls-nav: 0.038em;

  /* Body/Small · Body/Base · Body/Lead */
  --fs-body-sm: 14px;  --lh-body-sm: 20px;
  --fs-body:    16px;  --lh-body:    25px;
  --fs-lead:    22px;  --lh-lead:    31px;
  /* Label/Strong — 15/20, weight 600 */
  --fs-label:   15px;  --lh-label:   20px;

  /* Title/Card — 22/26, −0.2px · Heading/H3 — 28/32, −0.4px
     Heading/H2 — 40/44, −0.8px                                            */
  --fs-title:  22px;   --lh-title:  26px;   --ls-title: -0.009em;
  --fs-h3:     28px;   --lh-h3:     32px;   --ls-h3:    -0.014em;
  --fs-h2:     40px;   --lh-h2:     44px;   --ls-h2:    -0.02em;

  /* Display sizes measured off the frames (no bound variable for these):
     hero H1 ≈ 150px @1440 / 56px @390 · contact H2 ≈ 76px @1440.          */
  --fs-h1:      clamp(3.5rem, 10.4vw, 9.375rem);
  --fs-display: clamp(2rem, 5.3vw, 4.75rem);

  /* ── Effects · Figma collection: Effects ─────────────────────────────── */
  /* Inset/Top-hairline — INNER_SHADOW #FFFFFF17 0 1px 1px */
  --inset-top-hairline: inset 0 1px 1px rgba(255,255,255,0.09);
  --shadow-pill:  0 8px 40px rgba(0,0,0,0.45);
  --shadow-lift:  0 24px 60px -24px rgba(0,0,0,0.75);
  --shadow-reel:  0 40px 120px -30px rgba(139,92,246,0.45),
                  0 20px 60px -20px rgba(0,0,0,0.80);
  --glow-cta:     0 0 0 1px rgba(45,226,230,0.35),
                  0 8px 30px -6px rgba(45,226,230,0.45);

  /* ── Layout ───────────────────────────────────────────────────────────
     Figma desktop content runs x=120…1320 on a 1440 frame → 1200px column. */
  --container: 1200px;
  --gutter:    var(--space-md);
  --nav-h:     84px;   /* pill height + top offset, used for scroll-padding */

  /* ── Motion ───────────────────────────────────────────────────────────── */
  --ease:      cubic-bezier(0.32, 0.72, 0, 1);
  --dur-fast:  0.3s;
  --dur-base:  0.45s;
  --dur-slow:  0.9s;

  /* Showreel timing — tune these two to re-pace the hero slider. */
  --slide-seconds: 3.4s;
  --fade-seconds:  0.7s;
}


/* ==== base.css ============================================================ */

/* ============================================================================
   base.css — reset, typography primitives, ambient background, a11y.
   Depends on tokens.css.
   ========================================================================= */

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

html {
  scroll-behavior: smooth;
  /* keep anchor targets clear of the fixed nav pill */
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: calc(var(--lh-body) / var(--fs-body));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: inherit; }

/* Visible focus ring on keyboard nav only. */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-full);
}

/* Screen-reader-only, still focusable (used by the skip link). */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: var(--space-sm); left: var(--space-sm);
  z-index: 100; width: auto; height: auto; margin: 0;
  clip-path: none; white-space: normal;
  padding: var(--space-xs) var(--space-md);
  background: var(--text-primary); color: var(--text-inverse);
  border-radius: var(--radius-full); font-weight: 600;
}

/* ── type primitives ──────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow--cyan { color: var(--accent-cyan); }

.lead {
  font-size: var(--fs-lead);
  line-height: calc(var(--lh-lead) / var(--fs-lead));
  color: var(--text-secondary);
}
.lead b { color: var(--text-primary); font-weight: 600; }

/* Mono/Tag pill — used for skills, categories and case meta. */
.tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
  line-height: var(--lh-tag);
  letter-spacing: var(--ls-tag);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: var(--space-3xs) var(--space-xs);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.02);
  white-space: nowrap;
}
.tag-row { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2xs); }

/* Hero eyebrow: each word glows cyan in turn, echoing the live dot.
   js/main.js wraps the words and sets --wi (word index) for the stagger. */
.eyebrow__word {
  color: var(--text-muted);
  animation: eyebrow-glow 6s var(--ease) infinite;
  animation-delay: calc(var(--wi, 0) * 0.3s);
}
@keyframes eyebrow-glow {
  0%, 6%    { color: var(--accent-cyan); text-shadow: 0 0 12px rgba(45,226,230,0.55); }
  20%, 100% { color: var(--text-muted); text-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow__word { animation: none; color: var(--text-muted); }
}

/* Pulsing "live" dot, shared by the eyebrow and the showreel header. */
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 2.4s var(--ease) infinite;
  flex: none;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.35 } }

/* ── ambient mesh + grain (decorative, behind everything) ─────────────── */

.mesh { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.55; will-change: transform;
}
.orb--violet {
  width: 46vw; height: 46vw; top: -8vw; left: -6vw;
  background: radial-gradient(circle at center, var(--glow-violet), transparent 68%);
  animation: drift-a 22s var(--ease) infinite alternate;
}
.orb--cyan {
  width: 40vw; height: 40vw; bottom: -10vw; right: -4vw;
  background: radial-gradient(circle at center, var(--glow-cyan), transparent 68%);
  animation: drift-b 26s var(--ease) infinite alternate;
}
.orb--white {
  width: 30vw; height: 30vw; top: 34%; left: 44%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.10), transparent 70%);
  animation: drift-c 30s var(--ease) infinite alternate;
}
@keyframes drift-a { to { transform: translate3d( 8vw,  6vh, 0) scale(1.12) } }
@keyframes drift-b { to { transform: translate3d(-7vw, -5vh, 0) scale(1.08) } }
@keyframes drift-c { to { transform: translate3d(-5vw,  4vh, 0) scale(1.15) } }

/* Inline SVG noise — no extra request, no layout cost. */
.grain {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── reveal animations ────────────────────────────────────────────────── */

/* Hero entrance: staggered fade + rise, fired on load (no observer needed —
   it is above the fold by definition). --i sets the stagger index. */
.hero-reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}
@keyframes rise { to { opacity: 1; transform: none } }

/* Scroll reveal: .is-visible is added by main.js via IntersectionObserver. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity   var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease),
    filter    var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

/* ── reduced motion: everything static, nothing hidden ────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-reveal { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; filter: none; }
}


/* ==== layout.css ========================================================== */

/* ============================================================================
   layout.css — sections, components and responsive rules.
   Desktop matches Figma frame 40-3 (1440). At <=768px the mobile block takes
   over and matches frame 204-431 (390).
   ========================================================================= */

.wrap {
  position: relative; z-index: 2;
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-4xl); }

.section__head { max-width: 52ch; }
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: calc(var(--lh-h2) / var(--fs-h2));
  letter-spacing: var(--ls-h2);
  margin-top: var(--space-sm);
}
.section__sub {
  color: var(--text-muted);
  margin-top: var(--space-sm);
  max-width: 56ch;
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  line-height: calc(var(--lh-label) / var(--fs-label));
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  padding: 11px 11px 11px var(--space-md);
  transition:
    transform    var(--dur-base) var(--ease),
    background   var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    box-shadow   var(--dur-base) var(--ease);
}
.btn:active { transform: scale(0.98); }

/* Circular arrow chip inside a button. */
.btn__dot {
  width: 32px; height: 32px; flex: none;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  font-size: 15px; line-height: 1;
  transition: transform var(--dur-base) var(--ease);
}
.btn:hover .btn__dot { transform: translateX(3px); }

.btn--primary { background: var(--text-primary); color: var(--text-inverse); }
.btn--primary:hover { background: #fff; box-shadow: var(--glow-cta); }
.btn--primary .btn__dot { background: var(--text-inverse); color: var(--text-primary); }

.btn--ghost {
  background: var(--surface-glass-shell);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(45,226,230,0.45);
  box-shadow: var(--glow-cta);            /* cyan glow on hover, per brief */
}
.btn--ghost .btn__dot { background: var(--surface-glass-core); color: var(--text-primary); }

/* ── fixed frosted-glass nav ──────────────────────────────────────────── */

.nav {
  position: fixed; inset: 22px 0 auto; z-index: 40;
  display: flex; justify-content: center;
  pointer-events: none;                    /* only the pill is clickable */
}
.nav__pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--space-md);
  padding: 9px 9px 9px var(--space-md);
  border-radius: var(--radius-full);
  background: rgba(12,12,18,0.55);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
          backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--inset-top-hairline), var(--shadow-pill);
}
.nav__brand {
  font-family: var(--font-mono);
  font-size: var(--fs-nav);
  letter-spacing: var(--ls-nav);
  color: var(--text-primary);
  text-decoration: none;
}
.nav__brand b { color: var(--accent-cyan); }

.nav__links { display: flex; gap: var(--space-md); }
.nav__links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-body-sm);
  font-weight: 500;
  padding-block: 2px;
  transition: color var(--dur-fast) var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="true"] { color: var(--text-primary); }
/* underline grows from the left on hover / when the section is in view */
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 1px; width: 100%;
  background: var(--accent-cyan);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-fast) var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }

.nav__cta {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  padding: 8px 8px 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-strong);
  color: var(--text-primary); text-decoration: none;
  font-size: var(--fs-body-sm); font-weight: 600;
  transition: background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              transform  var(--dur-base) var(--ease);
}
.nav__cta:hover { background: rgba(255,255,255,0.10); box-shadow: var(--glow-cta); }
.nav__cta:active { transform: scale(0.97); }
.nav__cta .btn__dot {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  color: var(--text-inverse);
}
.nav__cta:hover .btn__dot { transform: translateX(2px); }

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 445px;   /* Figma: reel is 445px wide */
  align-items: center;
  gap: var(--space-2xl);
  padding-top: 140px;
  padding-bottom: var(--space-2xl);
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  width: fit-content;
  padding: 7px var(--space-sm);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hairline);
  background: var(--surface-glass-shell);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-top: var(--space-md);
  /* brushed-chrome fill, drifting slowly */
  background: linear-gradient(180deg, #fff 0%, #c8c8d4 32%, #6f6f7e 55%, #f2f2f7 72%, #9a9aa8 100%);
  background-size: 100% 220%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 30px rgba(139,92,246,0.18));
  /* Both animations must be declared together. .hero-reveal (base.css) uses
     the `animation` shorthand for the entrance, and so does this rule — the
     later one would otherwise replace it outright, dropping `rise` and
     stranding the title at its opacity:0 start state. They animate disjoint
     properties (rise: opacity/transform, chrome: background-position), so
     running both is safe; the delay mirrors .hero-reveal's stagger. */
  animation:
    rise 0.9s var(--ease) calc(var(--i, 0) * 90ms + 120ms) forwards,
    chrome 7s var(--ease) infinite alternate;
}
@keyframes chrome { to { background-position: 0 100% } }

.hero__lead { max-width: 40ch; margin-top: var(--space-lg); }

.hero__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.hero__proof {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: var(--space-xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-hairline);
}
.proof__k {
  display: block;
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-h3); line-height: 1.1;
  letter-spacing: var(--ls-h3);
}
.proof__l { display: block; margin-top: var(--space-3xs); }

/* ── hero showreel ────────────────────────────────────────────────────
   One markup, two behaviours. Desktop: absolutely-stacked crossfade with
   Ken Burns. Mobile (.is-mobile): the track becomes a flex row that slides
   horizontally and loops. showreel.js flips the class on a media query.  */

.reel {
  position: relative;
  width: 100%; aspect-ratio: 4 / 5;
  border-radius: var(--radius-2xl);
  background: var(--bg-raised);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-reel);
}
/* violet-to-cyan gradient hairline border */
.reel::after {
  content: ""; position: absolute; inset: 0; z-index: 5;
  border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(140deg, var(--accent-violet), var(--accent-cyan) 55%, var(--border-hairline));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* Label sits left; counter + pause button group to the right. */
.reel__top {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: 18px var(--space-md) var(--space-xs);
  z-index: 4;
}
.reel__top .reel__label { margin-right: auto; }
.reel__label {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em; color: var(--text-secondary);
}
.reel__counter {
  font-family: var(--font-mono); font-size: var(--fs-eyebrow);
  letter-spacing: 0.1em; color: var(--text-muted);
}
/* WCAG 2.2.2 pause/play control — injected by showreel.js */
.reel__pause {
  margin-left: var(--space-2xs);
  width: 22px; height: 22px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  font-size: 8px; line-height: 1; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.reel__pause:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.reel__slot {
  position: relative; flex: 1;
  margin-inline: 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-inset);
}

.reel__track { position: absolute; inset: 0; }

.reel__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity var(--fade-seconds) var(--ease);
  will-change: opacity;
  /* gradient stand-in shows through wherever a real screenshot is missing */
  background: linear-gradient(140deg, #2a1f4d, #0b2b30);
}
.reel__slide:nth-child(2n) { background: linear-gradient(140deg, #102a2e, #241844); }
.reel__slide:nth-child(3n) { background: linear-gradient(140deg, #2b1d46, #0e2a2f); }
.reel__slide.is-active { opacity: 1; }

.reel__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}
/* Ken Burns runs only on the visible desktop slide */
.reel__slide.is-active .reel__img { animation: ken var(--slide-seconds) linear forwards; }
@keyframes ken {
  from { transform: scale(1.06) translate(0, 0) }
  to   { transform: scale(1.15) translate(-2%, -2%) }
}

.reel__scrim {
  position: absolute; inset: auto 0 0; height: 52%;
  background: linear-gradient(transparent, var(--bg-base));
  z-index: 2; pointer-events: none;
}
.reel__caption { position: absolute; inset: auto 0 0; z-index: 3; padding: var(--space-md); }
.reel__type {
  font-family: var(--font-mono); font-size: var(--fs-tag);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-cyan); margin-bottom: var(--space-3xs);
}
.reel__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-title); line-height: calc(var(--lh-title) / var(--fs-title));
  letter-spacing: var(--ls-title); color: var(--text-primary);
}
.reel__meta {
  font-family: var(--font-mono); font-size: var(--fs-tag);
  color: var(--text-muted); margin-top: 5px;
}
.reel__type, .reel__name, .reel__meta { transition: opacity var(--dur-base) var(--ease); }
.reel__caption.is-swapping .reel__type,
.reel__caption.is-swapping .reel__name,
.reel__caption.is-swapping .reel__meta { opacity: 0; }

.reel__bars { display: flex; gap: 6px; padding: 14px var(--space-md) var(--space-md); z-index: 4; }
.reel__bar {
  flex: 1; height: 3px; padding: 0;
  border: 0; border-radius: 2px;
  background: var(--border-strong);
  overflow: hidden; cursor: pointer;
}
.reel__fill {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
}
.reel__bar.is-done .reel__fill { width: 100%; }
.reel__bar.is-active .reel__fill { animation: fill var(--slide-seconds) linear forwards; }
@keyframes fill { from { width: 0 } to { width: 100% } }

/* hover / focus pause freezes Ken Burns, the progress fill and advancement */
.reel.is-paused .reel__slide.is-active .reel__img,
.reel.is-paused .reel__bar.is-active .reel__fill { animation-play-state: paused; }

/* — mobile mode: horizontal looping track — */
.reel.is-mobile .reel__track {
  display: flex;
  width: 100%; height: 100%;
  transition: transform var(--dur-base) var(--ease);
  will-change: transform;
}
.reel.is-mobile .reel__slide {
  position: relative; inset: auto;
  flex: 0 0 100%;
  opacity: 1;
}
.reel.is-mobile .reel__img { transform: none; animation: none; }

/* reduced motion: first frame only, no autoplay, no Ken Burns */
@media (prefers-reduced-motion: reduce) {
  .reel__slide.is-active .reel__img { animation: none; transform: scale(1.02); }
  .reel__bar.is-active .reel__fill { animation: none; width: 100%; }
}

/* ── services ─────────────────────────────────────────────────────────── */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: var(--space-xl);
}
.svc-grid > :nth-child(-n + 2) { grid-column: span 6; }   /* 01, 02 */
.svc-grid > :nth-child(n + 3)  { grid-column: span 4; }   /* 03, 04, 05 */

/* double-bezel card: outer glass shell + inner core */
.card {
  background: var(--surface-glass-shell);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 7px; height: 100%;
}
.card__core {
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-lg);
  padding: 30px 30px 34px;
  height: 100%;
  position: relative; overflow: hidden;
  box-shadow: var(--inset-top-hairline);
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.card:hover .card__core,
.card:focus-within .card__core {
  transform: translateY(-4px);
  box-shadow: var(--inset-top-hairline), var(--shadow-lift);
}

.svc__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--text-muted); }
.svc__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-h3); line-height: calc(var(--lh-h3) / var(--fs-h3));
  letter-spacing: var(--ls-h3);
  margin: var(--space-sm) 0 var(--space-2xs);
}
.svc__text { color: var(--text-muted); }
.svc .tag-row { margin-top: var(--space-md); }

/* signature accent on the SEO / AI-Search card */
.svc--seo { border-color: rgba(45,226,230,0.45); }
.svc--seo .card__core {
  background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(45,226,230,0.08));
}
.svc--seo .svc__title {
  background: linear-gradient(90deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.badge {
  position: absolute; top: 22px; right: 22px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-inverse); background: var(--accent-cyan);
  padding: 4px 9px; border-radius: var(--radius-full);
}

/* ── selected work ────────────────────────────────────────────────────── */

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
  align-items: start;
}
.work-grid__side { display: grid; gap: var(--space-md); }

/* shared media block for every case / tile */
.media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
}
.media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* Letter watermark stands in until a real screenshot lands in /assets.
   main.js removes .media--empty as soon as an image actually loads. */
.media--empty::before {
  content: attr(data-letter);
  position: absolute; right: 6%; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 700; font-size: 8rem; line-height: 1;
  color: rgba(255,255,255,0.85); mix-blend-mode: overlay; pointer-events: none;
}
.media__chip {
  position: absolute; top: var(--space-sm); left: var(--space-sm); z-index: 2;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-color: var(--border-strong); color: var(--text-primary);
}

/* featured case */
.case {
  background: var(--surface-glass-shell);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-2xl);
  padding: 9px;
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.case:hover, .case:focus-within { transform: translateY(-4px); border-color: var(--border-strong); }
.case__core {
  background: linear-gradient(180deg, rgba(12,12,18,0.6), rgba(6,6,8,0.4));
  border-radius: var(--radius-xl);
  box-shadow: var(--inset-top-hairline);
  overflow: hidden;
}
.case__body { padding: var(--space-lg); }
.case__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.75rem, 2.4vw, 2.125rem);
  line-height: 1.1; letter-spacing: var(--ls-h2);
}
.case__text { color: var(--text-secondary); margin-top: var(--space-2xs); max-width: 60ch; }

/* Task / Insight / Solution / Result */
.case__steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.step__k {
  font-family: var(--font-mono); font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-cyan); margin-bottom: var(--space-2xs);
}
.step__t { font-size: var(--fs-body-sm); line-height: 1.5; color: var(--text-secondary); }

.case__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-sm); margin-top: var(--space-lg);
}

/* work tile */
.tile {
  display: block; text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
}
.tile .media { aspect-ratio: 16 / 9; }
.tile__body { padding: var(--space-md); }
.tile__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-title); line-height: calc(var(--lh-title) / var(--fs-title));
  letter-spacing: var(--ls-title);
}
.tile__text { color: var(--text-muted); font-size: var(--fs-body-sm); margin-top: var(--space-3xs); }
.tile .tag-row { margin-top: var(--space-xs); }

.more-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md); margin-top: var(--space-sm);
}
.work__more-label { margin-top: var(--space-xl); }
.work__cta { display: flex; justify-content: center; margin-top: var(--space-xl); }

/* ── contact ──────────────────────────────────────────────────────────── */

.contact { text-align: center; padding: var(--space-4xl) 0 var(--space-3xl); }
.contact__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-display); line-height: 1.02; letter-spacing: var(--ls-h2);
}
.contact__text { color: var(--text-muted); margin: var(--space-md) auto 0; max-width: 46ch; }
/* The closing nudge, on its own line: one step brighter and heavier than the
   line above it, so it reads as the prompt to act rather than more detail. */
.contact__scope {
  margin-top: var(--space-2xs);
  color: var(--text-secondary);
  font-weight: 600;
}
.contact__actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--space-sm); margin-top: var(--space-xl);
}

/* ── footer ───────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-hairline);
  padding-block: var(--space-lg);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-sm);
}
.footer__copy {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.05em; color: var(--text-muted);
}
.footer__social { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.footer__social a {
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.footer__social a:hover {
  color: var(--text-primary);
  border-color: rgba(45,226,230,0.45);
  background: rgba(45,226,230,0.08);
}

/* ============================================================================
   RESPONSIVE
   ========================================================================= */

/* tablet — hero to one column, work to one column, tiles to two */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; }
  .hero__reel { max-width: 445px; }
  .work-grid { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case__steps { grid-template-columns: repeat(2, 1fr); }
}

/* ── <=768px — Figma frame 204-431 "Landing / Mobile" (390) ──────────── */
@media (max-width: 768px) {
  :root { --nav-h: 76px; }

  .section { padding-block: var(--space-3xl); }

  /* compact nav: brand + CTA only */
  .nav { inset: var(--space-sm) 0 auto; }
  .nav__pill { width: calc(100% - var(--space-lg)); justify-content: space-between; gap: var(--space-sm); }
  .nav__links { display: none; }

  .hero { min-height: auto; padding-top: 108px; gap: var(--space-xl); }
  /* Figma mobile drops the eyebrow to the three disciplines only… */
  .hero__eyebrow-tail { display: none; }
  /* …and steps the lead down from Body/Lead (22) to Body/Base (16). */
  .hero__lead {
    max-width: none;
    font-size: var(--fs-body);
    line-height: calc(var(--lh-body) / var(--fs-body));
  }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .hero__proof { gap: var(--space-lg) var(--space-xl); }

  /* full-bleed showreel: escape the .wrap gutter, edge to edge */
  .hero__reel {
    max-width: none;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
  }
  .reel { border-radius: 0; }
  .reel::after { display: none; }
  .reel__slot { margin-inline: 0; border-radius: 0; }

  .svc-grid { grid-template-columns: 1fr; }
  .svc-grid > * { grid-column: 1 / -1; }
  .card__core { padding: var(--space-md) var(--space-md) var(--space-lg); }

  .more-grid { grid-template-columns: 1fr; }
  .case__body { padding: var(--space-md); }
  .case__steps { grid-template-columns: 1fr; gap: var(--space-md); }
  .case__foot { flex-direction: column; align-items: stretch; }
  .case__foot .btn { justify-content: center; }
  .media--empty::before { font-size: 6rem; }

  .contact { padding: var(--space-3xl) 0 var(--space-2xl); }
  .contact__actions { flex-direction: column; align-items: stretch; }
  .contact__actions .btn { justify-content: center; }

  /* Figma mobile stacks the social pills above the copyright */
  .footer { flex-direction: column-reverse; align-items: flex-start; gap: var(--space-md); }
}
