/* ============================================================
   STONIE STUDIO — styles.css
   Theme: black / grey / white + lime green pops
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  -webkit-text-size-adjust: 100%;
  /* NOTE: do NOT set overflow-x here — any clip/hidden on <html> turns it into a
     scroll container and breaks position:sticky + ScrollTrigger (hero pin, circle
     reveal). Horizontal overflow is contained on <body> instead. */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Font system:
   --font-display : bold expressive headings (Bricolage Grotesque)
   --font-body    : clean readable body (Instrument Sans)
   --font-mono    : technical grey labels (Space Mono) */
:root {
  --font-display: 'Anton', sans-serif;                 /* headings */
  --font-body:    'Inter', sans-serif;                 /* body */
  --font-mono:    'Space Mono', monospace;             /* technical labels */
  --font-brand:   'Bricolage Grotesque', sans-serif;   /* the StonieStudio wordmark only */
}

/* Only hide the native cursor once the custom cursor is actually running.
   If main.js fails to load, the normal pointer stays visible. */
body.cursor-ready,
body.cursor-ready * { cursor: none; }

/* The custom cursor element is hidden until JS shows it */
.cursor { opacity: 0; transition: opacity 0.2s ease; }
body.cursor-ready .cursor { opacity: 1; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; font: inherit; }
ul { list-style: none; }

/* Lime selection highlight (Dulcedo-style) */
::selection { background: var(--accent); color: var(--accent-ink); }
::-moz-selection { background: var(--accent); color: var(--accent-ink); }

/* ===== THEME TOKENS ===== */
:root {
  /* Dark (default) — black / grey / white + lime pop */
  --bg:        #0A0A0A;
  --bg-2:      #141414;
  --bg-3:      #1F1F1F;
  --fg:        #F4F4F2;
  --fg-2:      #9A9A98;
  --fg-3:      #565654;
  --accent:    #C6F135;   /* lime green */
  --rfeather:  #FFFFFF;   /* rooster feathers (white on the lime body) */
  --accent-2:  #B2DE22;
  --accent-ink:#0A0A0A;   /* text on lime */
  --border:    rgba(244,244,242,0.10);
  --invert-bg: #F4F4F2;
  --invert-fg: #0A0A0A;
  --invert-fg2:#454545;
  --shadow:    0 10px 50px rgba(0,0,0,0.6);
  --code-dot:  198,241,53;   /* particle-logo resting colour (lime on black) */
}

/* Light — "Sunbaked": warm bone/sand paper, warm ink, a blood-orange pop.
   (Dark mode stays black / grey / lime.) */
[data-theme="light"] {
  --bg:        #ECE5D6;   /* warm sand paper */
  --bg-2:      #E3DBC9;
  --bg-3:      #D7CDB7;
  --fg:        #1B1813;   /* warm near-black ink */
  --fg-2:      #6A6353;
  --fg-3:      #A89E8A;
  --accent:    #E8430F;   /* blood orange */
  --rfeather:  #FBF1DC;   /* rooster feathers (light cream on the orange body) */
  --accent-2:  #C9370B;
  --accent-ink:#FBF3E7;   /* cream text on the orange */
  --border:    rgba(27,24,19,0.14);
  --invert-bg: #211B14;   /* dark warm panel (Studio reveal) */
  --invert-fg: #F2EAD9;
  --invert-fg2:#A89E8A;
  --shadow:    0 12px 50px rgba(40,28,8,0.20);
  --code-dot:  232,67,15;     /* particle-logo resting colour (vibrant orange) */
}

/* ===== TYPOGRAPHY HELPERS ===== */
.font-syne   { font-family: var(--font-display); }
.font-mono   { font-family: var(--font-mono); }

/* The "Stonie Studio" wordmark keeps its Bricolage Grotesque italic in both the
   hero and the footer (see .hero__name / .footer__name span, which use
   var(--font-brand)); everything else uses the global Anton / Inter. */

/* ===== LOADER (green outline → green fill → implode) ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);            /* follows the active theme (set pre-paint) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader__logo {
  width: clamp(180px, 28vw, 300px);
  height: clamp(180px, 28vw, 300px);
  overflow: visible;
  transform-origin: center;
  /* The implode: scale up a touch, then snap inward to nothing */
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease;
}

/* Drawn outline in lime; JS animates stroke-dashoffset */
.loader__path {
  fill: var(--accent);
  fill-opacity: 0;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill-opacity 0.5s ease;
}

/* Fill the lime in once drawn */
.loader.is-filled .loader__path { fill-opacity: 1; }

/* Brief swell before the implode */
.loader.is-swell .loader__logo { transform: scale(1.12); }

/* Implode inward fast — like a black hole */
.loader.is-implode .loader__logo {
  transform: scale(0.001);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.7,0,0.84,0), opacity 0.45s ease 0.15s;
}

.loader__count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  transition: opacity 0.3s ease;
}

.loader.is-swell .loader__count,
.loader.is-implode .loader__count { opacity: 0; }

/* ===== GRAIN ===== */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grainShift 0.4s steps(1) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0,0); }
  10%  { transform: translate(-2%,-3%); }
  20%  { transform: translate(3%,1%); }
  30%  { transform: translate(-1%,4%); }
  40%  { transform: translate(4%,-2%); }
  50%  { transform: translate(-3%,2%); }
  60%  { transform: translate(2%,-4%); }
  70%  { transform: translate(-4%,1%); }
  80%  { transform: translate(1%,3%); }
  90%  { transform: translate(3%,-1%); }
  100% { transform: translate(-2%,4%); }
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 900;
  background: transparent;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  display: grid;                          /* 3 cols → nav sits dead-centre */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 72px;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
}

[data-theme="light"] .header.is-scrolled {
  background: rgba(237, 237, 235, 0.88);
}

.header__brand {
  display: flex;
  align-items: center;
  justify-self: start;
}

/* Green Stonie icon mark — explicit size (square viewBox) */
.brand-icon {
  height: 40px;
  width: 40px;
  fill: var(--accent);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease;
}

.header__brand:hover .brand-icon { transform: rotate(160deg); opacity: 0.9; }

.header__nav {
  display: flex;
  gap: 0.25rem;
  justify-self: center;
}

.navlink {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.navlink span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.navlink:hover { color: var(--fg); }
.navlink:hover span { transform: translateY(-2px); }

.header__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-self: end;
}

.header__id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  white-space: nowrap;
}

/* Theme picker */
.theme-pick {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.theme-pick__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.theme-pick__dot[data-set-theme="light"] {
  background: #F4F4F2;
  border-color: rgba(244,244,242,0.3);
}

.theme-pick__dot[data-set-theme="dark"] {
  background: #141414;
  border-color: rgba(244,244,242,0.2);
}

.theme-pick__dot[aria-pressed="true"] {
  border-color: var(--accent);
  transform: scale(1.2);
}

.theme-pick__dot:hover { transform: scale(1.15); }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.burger span {
  display: block;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease, width 0.3s ease;
  transform-origin: left center;
}

.burger[aria-expanded="true"] span:first-child { transform: rotate(40deg) translateY(-1px); }
.burger[aria-expanded="true"] span:last-child  { transform: rotate(-40deg) translateY(1px); }

/* ===== MOBILE MENU ===== */
.menu {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2rem 3rem;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  visibility: hidden;
}

.menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

.menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.menu__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.menu__idx {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-3);
  letter-spacing: 0.1em;
}

.menu__txt {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  font-weight: 700;
  line-height: 1.06;
  transition: color 0.2s ease;
}

.menu__link:hover .menu__txt { color: var(--accent); }

.menu__foot {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.menu__foot a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  transition: color 0.2s ease;
}

.menu__foot a:hover { color: var(--fg); }

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  white-space: nowrap;
}

.tag--muted { color: var(--fg-3); }
.tag--dot { color: var(--fg); }

.tag--dot::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ===== SECTION HEADS ===== */
.section-head { margin-bottom: 3rem; }

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Index number — no box, bigger, sits just above the heading.
   (Overrides the .tag border/padding it also carries in the markup.) */
.section-head__idx {
  display: block;
  border: 0;
  padding: 0;
  background: none;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  letter-spacing: 0.12em;
  color: var(--accent);
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 8rem);   /* matches the Studio Ethos heading */
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: normal;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.section-head__title--sm {
  font-size: clamp(2.6rem, 8vw, 8rem);   /* same size as the rest now */
  margin-bottom: 0;
}

.section-head__note {
  font-size: 0.9rem;
  color: var(--fg-2);
  max-width: 46ch;
  line-height: 1.6;
}

/* Centred section heading variant */
.section-head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-head--center .section-head__idx { display: inline-flex; }
.section-head--center .section-head__note { max-width: 46ch; }

/* ===== HERO (split-wordmark scroll reveal) ===== */
.hero {
  position: relative;
  height: 250vh;               /* scroll distance for the split reveal */
  background: var(--bg);
}

.hero__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Big Stonie logo "in code" — a cursor-reactive particle canvas behind the
   wordmark. Uses the shared .code-logo base (absolute, inset:0, z-index:0,
   pointer-events:none); the logo is scaled (data-scale) to overflow the pin
   internally so it crops top + bottom, the way the old glitch mark did. */
.code-logo--hero { z-index: 0; }

/* Centred wordmark + tagline */
.hero__brand {
  position: absolute;
  z-index: 2;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  padding: 0 1.5rem;
}

.hero__name {
  font-size: 0;                        /* kill inline-block whitespace between halves */
  line-height: 0;
  white-space: nowrap;
}
/* The wordmark is the StonieStudio logo (CSS masks, tinted var(--fg) so it flips
   with the theme). Two halves — "Stonie" + "Studio" — sit together and slide
   apart as --hp rises, revealing the image growing from the seam. */
.hero__name-l, .hero__name-r {
  display: inline-block;
  vertical-align: bottom;
  height: clamp(2.7rem, 12.5vw, 9rem);
  background: var(--fg);
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  will-change: transform;
}
.hero__name-l {
  aspect-ratio: 429.7 / 126.01;
  -webkit-mask-image: url(../images/stonie-word.svg);
  mask-image: url(../images/stonie-word.svg);
  transform: translateX(calc(var(--hp, 0) * -52vw));
}
.hero__name-r {
  aspect-ratio: 433.1 / 126.01;
  -webkit-mask-image: url(../images/studio-word.svg);
  mask-image: url(../images/studio-word.svg);
  transform: translateX(calc(var(--hp, 0) *  52vw));
}

.hero__tagline {
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.2vw, 0.98rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  /* fades out as the split begins */
  opacity: calc(1 - var(--hp, 0) * 2.5);
}

/* Image grows from the centre seam to full-bleed, sitting ABOVE the outline
   logo (z1) but BELOW the wordmark (z2). Reaches full opacity early (×3) so
   it solidly hides the logo behind it while the type splits over the top. */
.hero__reveal {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: calc(8vw + var(--hp, 0) * 120vw);
  height: calc(10vh + var(--hp, 0) * 130vh);
  max-width: 100vw;
  overflow: hidden;
  border-radius: calc(8px * (1 - var(--hp, 0)));
  /* dead-zone at the very start so a tiny initial --hp (e.g. mobile address-bar
     resize on load) can't flash the image faintly — stays fully hidden till scroll */
  opacity: clamp(0, calc(var(--hp, 0) * 5 - 0.18), 1);
  z-index: 1;
  will-change: width, height, opacity;
}
.hero__reveal img,
.hero__reveal video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Kill WebKit/Safari's built-in video chrome — the big central "start playback"
   button it shows when it blocks autoplay, plus any media controls. Unscoped
   (Safari is unreliable about these pseudo-elements behind a descendant combinator,
   and the hero video is the only <video> on the site). The clip keeps playing
   (or starts on first tap via the inline script); we never want the browser's
   play UI over the hero. */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-enclosure,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Local time + scroll cue */
.hero__time {
  position: absolute;
  z-index: 2;
  top: clamp(6rem, 16vh, 11rem);
  right: clamp(1.5rem, 5vw, 4rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  opacity: calc(1 - var(--hp, 0) * 2.5);
}
.hero__time i { font-style: normal; color: var(--fg); }

.hero__cue {
  position: absolute;
  z-index: 2;
  bottom: clamp(1.5rem, 5vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  opacity: calc(1 - var(--hp, 0) * 3);
  animation: scrollNudge 1.8s ease-in-out infinite;
}
@keyframes scrollNudge {
  0%,100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50%     { transform: translateX(-50%) translateY(5px); opacity: 1; }
}

/* Reduced motion / no-JS: collapse the tall section, show a static hero */
@media (prefers-reduced-motion: reduce) {
  .hero { height: 100svh; }
  .hero__reveal { display: none; }
}

/* Shared line reveal */
.line {
  display: block;
  overflow: hidden;
  line-height: 0.85;
}

.line__inner {
  display: block;
  transform: translateY(102%);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.is-ready .line__inner {
  transform: translateY(0);
  opacity: 1;
}

.line:nth-child(2) .line__inner { transition-delay: 0.1s; }
.line:nth-child(3) .line__inner { transition-delay: 0.2s; }

/* ===== LOGO MARQUEE (transparent — no box) ===== */
.marquee {
  overflow: hidden;
  background: transparent;       /* transparent so it reads as part of the page */
  border: 0;
  padding: 2.5rem 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 38s linear infinite;
}

/* Banner flows continuously — no pause on hover */

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee__set {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Real client logos — the source files are raster-in-SVG in assorted colours,
   so we collapse each to a clean monochrome silhouette in the theme colour
   (white on dark, black on light) for a cohesive wall. The source logos have
   very different framing (pure wordmarks vs icon-over-text-over-tagline), so
   each gets a tuned height that equalises the actual wordmark size. */
.logo {
  height: 30px;
  width: auto;
  flex-shrink: 0;
  padding: 0 clamp(1.75rem, 3.5vw, 3rem);
  object-fit: contain;
  filter: brightness(0) invert(1);   /* → white on the dark (default) theme */
  opacity: 0.62;
  transition: opacity 0.3s ease;
}
.logo:hover { opacity: 1; }
[data-theme="light"] .logo { filter: brightness(0); }   /* → black on Sunbaked */

/* Per-logo height tuning so every wordmark reads at a similar cap-height */
.marquee .logo[alt="Footasylum"],
.marquee .logo[alt="Cernucci"]            { height: 22px; }
.marquee .logo[alt="LSKD"]                { height: 26px; }
.marquee .logo[alt="Hoodrich"],
.marquee .logo[alt="AYBL"]                { height: 28px; }
.marquee .logo[alt="Alessandro Zavetti"]  { height: 34px; }
.marquee .logo[alt="Alpyrex"]             { height: 46px; }
.marquee .logo[alt="Good"]                { height: 46px; }
.marquee .logo[alt="Silverback"]          { height: 50px; }
.marquee .logo[alt="Monterrain"]          { height: 54px; }

/* ===== STATEMENT (INVERTED) ===== */
.statement {
  padding: 6rem 2rem;
  text-align: center;
}

.invert {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

.invert .tag {
  color: var(--invert-fg2);
  border-color: rgba(10,10,10,0.12);
}

[data-theme="light"] .invert .tag {
  color: rgba(244,244,242,0.6);
  border-color: rgba(244,244,242,0.15);
}

.statement__small {
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--invert-fg2);
}

.statement__text {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 8rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: normal;
  text-transform: uppercase;
  max-width: 24ch;
  margin: 0 auto 2rem;
  color: var(--invert-fg);
}

.statement__lead {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.65;
  max-width: 56ch;
  margin: 1.5rem auto 2.25rem;
  color: var(--invert-fg);
}

.statement__row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== SELECTED WORK — compact asymmetric montage ===== */
.work { padding: 6rem 2rem; }

/* Overlapping tile montage on a centred canvas (Dulcedo-style).
   Tiles are absolutely placed within a fixed-aspect stage on desktop. */
.montage {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 1rem auto 0;
  aspect-ratio: 16 / 10;
}

.tile {
  position: absolute;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 3px;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), z-index 0s;
}

/* Staggered, overlapping placements — larger tiles that fill the canvas
   edge to edge so there's no dead space on the sides. */
.tile--1 { top: 4%;  left: 0;    width: 30%; aspect-ratio: 3/4;  z-index: 3; }
.tile--2 { top: 0;   left: 27%;  width: 30%; aspect-ratio: 4/3;  z-index: 4; }
.tile--3 { top: 30%; left: 22%;  width: 24%; aspect-ratio: 1/1;  z-index: 6; }
.tile--4 { top: 8%;  left: 54%;  width: 26%; aspect-ratio: 4/5;  z-index: 3; }
.tile--5 { top: 2%;  left: 77%;  width: 23%; aspect-ratio: 3/4;  z-index: 4; }
.tile--6 { top: 56%; left: 60%;  width: 30%; aspect-ratio: 16/10; z-index: 5; }

.tile:hover { transform: scale(1.05); z-index: 9; }

.tile__media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-2);
  box-shadow: var(--shadow);
}

.tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Base image sits on top; alt is revealed with a left → right clip wipe */
.tile__img--alt {
  z-index: 2;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s cubic-bezier(0.76,0,0.24,1);
}

.tile:hover .tile__img--alt { clip-path: inset(0 0 0 0); }

/* Subtle zoom on the base image during hover */
.tile__img--base { transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.tile:hover .tile__img--base { transform: scale(1.06); }

.tile__cap {
  position: absolute;
  left: 0;
  bottom: -2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tile:hover .tile__cap { opacity: 1; transform: translateY(0); }

.tile__cap b {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--fg);
}
.tile__cap i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--accent);     /* lime so it reads over any image */
}

.work__all {
  text-align: center;
  margin-top: 3.5rem;
}

.work__all-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.work__all-link:hover { color: var(--accent); border-color: var(--accent); }

/* Stack the montage on small screens */
@media (max-width: 760px) {
  .montage {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .tile { position: relative; top: auto; left: auto; width: auto; }
  .tile--1, .tile--2, .tile--3, .tile--4, .tile--5, .tile--6 { aspect-ratio: 3/4; }
  .tile__cap {
    position: relative;
    bottom: auto;
    opacity: 1;
    transform: none;
    margin-top: 0.5rem;
  }
}


.strip {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 -2rem;
  padding: 1rem 2rem 2rem;
}

.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; }

.strip__track {
  display: flex;
  gap: clamp(0.5rem, 1vw, 0.85rem);   /* tighter spacing between cards */
  width: max-content;
  padding: 2rem 0;            /* room for the scale-up so it never clips */
  align-items: center;
}

.card {
  /* Fixed slot — the card never changes layout size, so the track never
     reflows (that was the glitch). Hover scales via transform only (GPU). */
  flex: 0 0 clamp(240px, 26vw, 340px);
  position: relative;
  z-index: 1;
  border-radius: 6px;
  background: transparent;
  transition: opacity 0.6s ease;
}

/* Lift the hovered card ABOVE every sibling so the scaled image never gets
   overlapped by a neighbour's box (that caused the odd opacity seam). */
.card:hover { z-index: 10; }

.card__link { display: block; text-decoration: none; color: inherit; }

/* While one card is hovered, the rest soften slightly */
.strip__track:hover .card:not(:hover) { opacity: 0.78; }

.card__art {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-2);
  transform-origin: center;
  transition: transform 0.8s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.8s cubic-bezier(0.22,1,0.36,1);
  will-change: transform;
}

/* Soft, flowy expand — transform scale, no reflow, long gentle ease */
.card:hover .card__art {
  transform: scale(1.12);
  box-shadow: var(--shadow);
}

.card__art-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
}

/* Photo cards: image fills the frame, no padding */
.card__art-inner--img { padding: 0; }

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.22,1,0.36,1);
}
/* gentle counter-drift inside the frame for depth */
.card:hover .card__img { transform: scale(1.06); }



.card__big,
.card__poster-line {
  transition: color 0.3s ease;
}

.card:hover .card__big { color: var(--accent); }

.card__big {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--fg);
  opacity: 0.7;
  line-height: 1;
}

.card__mono {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fg);
  opacity: 0.8;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
}

.card__shape {
  position: absolute;
  opacity: 0.12;
}

.card__shape--circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px solid var(--fg);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.card__shape--star {
  width: 120px;
  height: 120px;
  border: 2px solid var(--fg);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.card__poster-line {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--fg);
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
}

.card__poster-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.card__meta {
  padding: 0.85rem 0.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.card__meta span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
}

.card__meta i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.65rem;
  color: var(--accent);     /* lime label — matches Selected Work captions */
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== SERVICES — "What I Do" (hover-swap: title → description) ===== */
.services {
  padding: 6rem 0;            /* no side padding so the rule lines reach the edges */
  border-top: 1px solid var(--border);
}
.services .section-head { padding: 0 clamp(1.25rem, 4vw, 3rem); }

/* Centred accordion. Each title is a button; tapping it expands the detail
   below via a grid-rows 0fr→1fr reveal. Hover/open turns the title accent. */
.svc {
  border-top: 1px solid var(--border);
  max-width: 920px;
  margin: 0 auto;
}

.svc__item {
  border-bottom: 1px solid var(--border);
}

.svc__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2.6rem) clamp(2.5rem, 8vw, 4rem);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: center;
  color: inherit;
  font: inherit;
}

.svc__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.svc__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: normal;
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--fg);
  transition: color 0.3s ease;
}

.svc__head:hover .svc__title,
.svc__item.is-open .svc__title { color: var(--accent); }

/* + / − toggle icon, pinned to the right of the centred title */
.svc__icon {
  position: absolute;
  right: clamp(1rem, 4vw, 2rem);
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
}
.svc__icon::before,
.svc__icon::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  background: var(--fg-3);
  transition: transform 0.35s ease, background 0.3s ease;
}
.svc__icon::after { transform: rotate(90deg); }
.svc__item.is-open .svc__icon::after { transform: rotate(0deg); }   /* + → − */
.svc__head:hover .svc__icon::before,
.svc__head:hover .svc__icon::after,
.svc__item.is-open .svc__icon::before,
.svc__item.is-open .svc__icon::after { background: var(--accent); }

/* Collapsible detail — grid-rows trick animates height with no JS measuring */
.svc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.svc__item.is-open .svc__panel { grid-template-rows: 1fr; }

.svc__panel-clip {
  overflow: hidden;
  min-height: 0;
}

.svc__panel-content {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 6vw, 3rem) clamp(1.75rem, 4vw, 2.6rem);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.08s, transform 0.4s ease 0.08s;
}
.svc__item.is-open .svc__panel-content { opacity: 1; transform: none; }

.svc__for {
  font-family: var(--font-sans);      /* same family as the grey body copy */
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  font-weight: 700;                    /* bold */
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.5;
  color: var(--accent);               /* highlighted green */
  margin-bottom: 0.85rem;
}

.svc__desc {
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  line-height: 1.6;
  font-weight: 400;
  color: var(--fg-2);
}

@media (max-width: 600px) {
  .svc__head { padding: 1.4rem 2.5rem; }
  .svc__title { font-size: clamp(1.85rem, 8vw, 2.6rem); }
  .svc__desc  { font-size: 0.98rem; }
}
/* ===== ABOUT ===== */
.about { padding: 6rem 2rem; }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about__portrait {
  position: relative;
  max-width: min(380px, 33vw);   /* cap so the tall polaroid doesn't blow up the grid */
  margin: 0 auto;
  /* The polaroid PNG carries its own frame + transparent margins, so the
     container floats it cleanly — no clip/box behind the transparency. */
}
.about__photo {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,0.32));   /* lift the floating polaroid off the panel */
}

.about__mark {
  width: 50%;
  height: auto;
  fill: var(--invert-fg);
  opacity: 0.1;
}

.about__portrait-tag {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(244,244,242,0.4);
  border-color: rgba(244,244,242,0.1);
  white-space: nowrap;
}

[data-theme="light"] .about__portrait-tag {
  color: rgba(10,10,10,0.4);
  border-color: rgba(10,10,10,0.1);
}

.about__body .section-head__idx {
  display: block;
  margin-bottom: 1.5rem;
  color: rgba(244,244,242,0.4);
  border-color: rgba(244,244,242,0.12);
}

[data-theme="light"] .about__body .section-head__idx {
  color: rgba(10,10,10,0.4);
  border-color: rgba(10,10,10,0.1);
}

.about__lead {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 8rem);   /* matches the Studio Ethos heading */
  font-weight: 800;
  line-height: 1;
  letter-spacing: normal;
  text-transform: uppercase;
  color: var(--invert-fg);
  margin-bottom: 1.25rem;
}

.about__text {
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  color: var(--invert-fg2);
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: 0.8rem;
}
/* a touch more breathing room before the stats row */
.about__text:last-of-type { margin-bottom: 1.5rem; }

.about__stats {
  display: flex;
  gap: 3rem;
  border-top: 1px solid rgba(244,244,242,0.1);
  padding-top: 1.75rem;
}

[data-theme="light"] .about__stats {
  border-color: rgba(10,10,10,0.1);
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  color: var(--accent);   /* green pop on the stat numbers */
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat__lbl {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--invert-fg2);
}

/* ===== ABOUT REVEAL — a circle blooms out of the tail of "What I Do" into the Studio panel ===== */
/* ===== GALLERY (stacked-poster scroll) ======================================
   One horizontal row the user drags / scrolls. Each poster is position:sticky at
   its own EVEN left offset (--i * --sliver), so as you scroll they pile up into
   evenly-spaced slivers on the left and the newest poster slides over the top
   (z-index ascends with DOM order). Bounded by native overflow scroll. Gap-free
   so slivers + posters read uniformly. 14 posters desktop / 12 mobile (mobile.css
   hides the last 2). --sliver = the even spacing between stacked poster edges. */
.gallery-strip {
  --sliver: clamp(34px, 3vw, 44px);
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 7vh, 5rem) 0 clamp(2rem, 5vh, 3.5rem);
}
.gallery-strip__head {
  margin-bottom: clamp(1.4rem, 3vh, 2.4rem);
  padding-inline: clamp(1rem, 4vw, 3rem);
}
.gstrip {
  display: flex;
  gap: 0;                        /* gap-free → even, uniform stack */
  width: 100%;
  padding-inline: clamp(1rem, 4vw, 3rem);
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x pan-y;     /* horizontal pans scroll the row, vertical pans
                                    still scroll the page (no hard axis-lock) */
  overscroll-behavior-x: contain;
  scrollbar-width: none;         /* Firefox */
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.gstrip::-webkit-scrollbar { display: none; }
.gstrip.is-dragging { cursor: grabbing; }
.gstrip__item {
  position: sticky;
  left: calc(var(--i, 0) * var(--sliver));
  z-index: calc(var(--i, 0) + 1);
  flex: 0 0 clamp(220px, 19vw, 300px);
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
  box-shadow: -10px 0 24px rgba(0, 0, 0, 0.42);   /* depth so stacked slivers read */
}
.gstrip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;          /* drags land on the row, never the image ghost */
}
.gstrip__cap {
  position: absolute;
  left: clamp(0.7rem, 1.4vw, 1.4rem);
  right: clamp(0.7rem, 1.4vw, 1.4rem);
  bottom: clamp(0.7rem, 1.4vw, 1.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  pointer-events: none;
}
.gstrip__cap b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.8vw, 1.9rem);
  line-height: 1;
  color: rgba(244, 244, 242, 0.92);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.gstrip__cap i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: clamp(0.68rem, 0.95vw, 0.85rem);
  letter-spacing: 0.06em;
  color: var(--accent);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.reveal-stage {
  position: relative;
  z-index: 5;                    /* the panel layers ABOVE Services during the overlap */
  height: 230vh;                 /* overlap lead-in + circle reveal + assemble */
  margin-top: -76vh;             /* pull up so the circle starts just below Production-Ready Files */
  background: transparent;        /* Services (then the dark page) shows OUTSIDE the circle */
  /* The whole stage is non-interactive — it overlaps the Services rows, and the
     Studio panel has nothing clickable — so Services keeps its hover states. */
  pointer-events: none;
}

.reveal-stage__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

/* The light Studio panel — clipped to a circle that grows from the bottom edge.
   pointer-events:none so it never blocks the Services rows it overlaps. */
.reveal-stage__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 5vh, 5rem) clamp(1.25rem, 5vw, 4rem);
  pointer-events: none;
}

.reveal-stage__panel.invert { background: var(--invert-bg); color: var(--invert-fg); }
.reveal-stage .about__grid { width: 100%; }

/* Start hidden behind a zero-radius circle so the reveal reads cleanly.
   Gated on html.js — a no-JS visitor still sees the full panel. */
html.js .reveal-stage__panel {
  clip-path: circle(0% at 50% 100%);
  will-change: clip-path;
}

/* Reduced motion / no scroll choreography: show the panel as a normal band */
@media (prefers-reduced-motion: reduce) {
  .reveal-stage { height: auto; margin-top: 0; z-index: auto; background: var(--invert-bg); }
  .reveal-stage__pin { position: static; height: auto; overflow: visible; }
  html.js .reveal-stage__panel,
  .reveal-stage__panel {
    position: static;
    clip-path: none;
    min-height: 80svh;
    pointer-events: auto;
  }
}

/* ===== CONTACT ===== */
.contact {
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem;
  border-top: 1px solid var(--border);
}

/* The Stonie logo "in code" — a particle field that reacts to the cursor */
.code-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Contact content sits above the particle canvas */
.contact__top,
.contact__form { position: relative; z-index: 1; }

/* Centred contact — everything stacked and centre-aligned */
.contact__top {
  margin-bottom: 3rem;
  text-align: center;
}

.contact__top .section-head__idx { display: inline-flex; margin: 0 auto 1rem; }

.contact__head {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 14vw, 12.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: normal;
  text-transform: uppercase;
  color: var(--fg);
  margin: 1rem 0 2rem;
}

.contact__email {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.05em;
  color: var(--fg-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  display: inline-block;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact__email:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 640px;
  margin: 0 auto;            /* centre the form on the page */
}

/* Centre the submit button (full form width) + status note within the form */
.contact__form .btn { grid-column: 1 / -1; justify-self: center; }
.contact__note { text-align: center; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field--wide { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.field input,
.field textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--fg);
  outline: none;
  resize: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--fg-3); }

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--bg-3);
}

.field input.is-invalid,
.field textarea.is-invalid { border-color: #C45A4A; }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  /* No transform transition — the magnetic effect drives transform directly, and
     a transition here makes it lag/overshoot (the email link has none, so it
     feels smooth). */
  transition: background 0.2s ease, color 0.2s ease;
  align-self: start;
  white-space: nowrap;
}

.btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn__arrow { transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.contact__note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--fg-2);
  min-height: 1.2em;
}

.contact__note.is-success { color: var(--accent); }
.contact__note.is-error   { color: #C45A4A; }

/* ===== FOOTER (all links on one line, copyright beneath) ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: clamp(2rem, 5vh, 3rem) clamp(1.25rem, 4vw, 3rem);
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem clamp(2.25rem, 5vw, 4.5rem);
  margin-bottom: 1.25rem;
}

/* Links + copyright share the exact same type */
.footer__links a,
.footer__copy {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer__links a { color: var(--fg); transition: color 0.2s ease; }
.footer__links a:hover { color: var(--accent); }
.footer__copy { color: var(--fg-2); }

/* ===== CUSTOM CURSOR (default reticle + lime click burst) ===== */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
  /* keeps it visible over both dark and light sections */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}

/* Both SVG states stack on the same point */
.cursor__svg {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;             /* override global svg{max-width:100%} (parent is 0-wide) */
  color: #fff;                 /* currentColor drives the strokes/fill */
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(0.16,1,0.3,1),
              height 0.25s cubic-bezier(0.16,1,0.3,1),
              opacity 0.18s ease,
              color 0.18s ease;
}

/* Default reticle — follows the mouse */
.cursor__svg--default {
  width: 46px;                 /* default reticle, ~20% bigger */
  height: 46px;
  opacity: 1;
}

/* Click burst — hidden until mousedown (~20% smaller than before) */
.cursor__svg--click {
  width: 21px;
  height: 21px;
  opacity: 0;
  color: var(--accent);        /* website lime green */
  transform: translate(-50%, -50%) scale(0.4) rotate(-45deg);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), opacity 0.15s ease;
}

/* Hover targets — the reticle grows + turns lime */
.cursor.is-view .cursor__svg--default { width: 70px; height: 70px; color: var(--accent); }
.cursor.is-link .cursor__svg--default { width: 60px; height: 60px; color: var(--accent); }
.cursor.is-text .cursor__svg--default { width: 53px; height: 53px; color: var(--accent); }
.cursor.is-hide .cursor__svg--default { width: 34px; height: 34px; opacity: 0.7; }

/* On click — swap reticle out, burst in (lime), ~20% smaller */
.cursor.is-click .cursor__svg--default { opacity: 0; }
.cursor.is-click .cursor__svg--click {
  opacity: 1;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

/* ===== MAGNETIC ===== */
.magnetic { display: inline-block; }

/* ===== SPLIT TEXT ===== */
[data-split] .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

[data-split] .word__inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

[data-split].is-visible .word__inner {
  transform: translateY(0);
  opacity: 1;
}

/* Keyword "pop" — flagged words (data-hl) carry the theme accent
   (lime on dark / orange on the Sunbaked band) to make the point stand out. */
[data-split] .word--hl .word__inner { color: var(--accent); }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16,1,0.3,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SPACE INVADERS (drift across the hero; click to shoot) ===== */
.invaders {
  position: absolute;      /* lives inside .hero__pin — hero-only */
  inset: 0;
  z-index: 6;              /* above the hero logo + wordmark */
  pointer-events: none;    /* the layer never blocks the page… */
  overflow: hidden;
}
.invader {
  position: absolute;
  top: 0; left: 0;
  width: 34px;
  height: 28px;
  padding: 5px;            /* hit area around the sprite */
  color: var(--accent);
  pointer-events: auto;    /* …but each alien is clickable */
  opacity: 0.9;
  will-change: transform;
  transition: opacity 0.15s ease, color 0.1s ease, filter 0.15s ease;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
}
.invader svg { width: 100%; height: 100%; display: block; }
.invader:hover { opacity: 1; filter: drop-shadow(0 0 8px var(--accent)); }
.invader.is-hit { color: #ff5a3c; }   /* shot — flashes red, then drops away */

/* When faded out behind the expanding hero image, aliens can't be clicked */
.invaders.is-faded .invader { pointer-events: none; }

@media (pointer: coarse) {
  .invader { width: 40px; height: 32px; }   /* easier to tap */
}

/* ===== ROOSTER (runs across the bottom of Contact; click/tap to shoo) ===== */
.rooster-layer {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;                                  /* runs right along the footer line */
  height: 44px;
  z-index: 4;
  pointer-events: none;                       /* layer never blocks the form… */
}
.rooster {
  position: absolute;
  left: 0; bottom: 0;
  width: 46px; height: 46px;                   /* a little bigger on desktop */
  padding: 0; border: 0; background: none;
  cursor: pointer;
  pointer-events: auto;                       /* …but the bird itself is clickable */
  transform: translateX(-80px);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.rooster__hop {
  display: block; width: 100%; height: 100%;
  transform-origin: center bottom;
  animation: roosterHop 0.2s steps(2, end) infinite;
  background: var(--accent);                    /* lime (dark) / orange (light) */
  -webkit-mask: url(../images/rooster2.svg) center / contain no-repeat;
  mask: url(../images/rooster2.svg) center / contain no-repeat;
}
.rooster.is-dead .rooster__hop { animation: none; background: #ff5a3c; }  /* shot → red, like the aliens */
.rooster:hover { filter: drop-shadow(0 0 7px var(--accent)); }
@keyframes roosterHop { from { transform: translateY(0); } to { transform: translateY(-3px); } }

@media (pointer: coarse) {
  .rooster { width: 44px; height: 44px; }     /* keep the size you liked on mobile */
}

/* ===== UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header__nav { display: none; }
  .burger { display: flex; }
  .header__id { display: none; }
  .brand-word { height: 34px; width: 126px; }

  /* About mobile layout (photo on top, centred) + the clip-path bloom live in
     mobile.css, which loads after this file. */

  .contact__form { grid-template-columns: 1fr; }
  .field--wide { grid-column: 1; }

  .card { flex-basis: 240px; }
}

@media (max-width: 480px) {
  .hero { padding: 5rem 1.25rem 0; }
  .work, .beyond, .services, .about, .contact { padding: 4rem 1.25rem; }
  .statement { padding: 4rem 1.25rem; }
  .footer { padding: 2.5rem 1.25rem 0; }
  .header { padding: 0 1.25rem; }
  .about__stats { gap: 2rem; }
}

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

/* ===== PROJECT PAGE ===== */
.proj {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(7rem, 14vh, 10rem) clamp(1.25rem, 5vw, 4rem) 6rem;
}

.proj__back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: clamp(2rem, 6vh, 4rem);
  transition: color 0.2s ease;
}
.proj__back:hover { color: var(--accent); }

.proj__hero { margin-bottom: clamp(2rem, 5vh, 3.5rem); }

.proj__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.proj__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9.5vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: normal;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
  transition: letter-spacing 0.45s ease;
}
.proj__title:hover { letter-spacing: 0.035em; }

.proj__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.proj__meta-item { display: flex; flex-direction: column; gap: 0.35rem; }
.proj__meta-item span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.proj__meta-item i {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--fg);
}

.proj__cover {
  margin: clamp(2rem, 5vh, 3.5rem) 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 16 / 9;
}
.proj__cover img { width: 100%; height: 100%; object-fit: cover; }

.proj__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  max-width: 1000px;
  margin: 0 auto clamp(3rem, 8vh, 5rem);
}
.proj__lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.4;
  color: var(--fg);
}
.proj__body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fg-2);
}

.proj__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-bottom: clamp(3rem, 8vh, 5rem);
}
.proj__shot {
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 3 / 4;
}
.proj__shot--wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.proj__shot img { width: 100%; height: 100%; object-fit: cover; }

/* Prev / Next nav — last project on the left, next on the right */
.proj__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.proj__navlink {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  max-width: 48%;
}
.proj__navlink--next { text-align: right; }
.proj__navlink-text { display: flex; flex-direction: column; gap: 0.2rem; }
.proj__navlink--next .proj__navlink-text { align-items: flex-end; }

.proj__navlink-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.proj__navlink-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
  transition: color 0.25s ease;
}
.proj__navlink:hover .proj__navlink-title { color: var(--accent); }
.proj__navlink-arrow {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.proj__navlink--prev:hover .proj__navlink-arrow { transform: translateX(-8px); }
.proj__navlink--next:hover .proj__navlink-arrow { transform: translateX(8px); }

@media (max-width: 720px) {
  .proj__intro { grid-template-columns: 1fr; }
  /* Single column; each shot keeps its OWN aspect ratio so the full image
     shows — landscapes go full-width 16:9 (no side cropping), portraits 3:4. */
  .proj__gallery { grid-template-columns: 1fr; }
  .proj__shot { aspect-ratio: 3 / 4; }
  .proj__shot--wide { aspect-ratio: 16 / 9; }

  /* Keep prev (left) / next (right) side by side, just tighter + smaller */
  .proj__nav { gap: 1rem; padding-top: 1.5rem; }
  .proj__navlink { max-width: 48%; gap: 0.55rem; }
  .proj__navlink-title { font-size: 1.05rem; }
  .proj__navlink-arrow { font-size: 1.1rem; }
}

/* ===== WORK PAGE (columned gallery + up/down parallax) ===== */
.workpage {
  padding: clamp(7rem, 14vh, 10rem) clamp(1.25rem, 4vw, 3.5rem) clamp(4rem, 8vh, 6rem);
}

.workpage__head {
  max-width: 1500px;
  margin: 0 auto clamp(2.5rem, 6vh, 4.5rem);
}
.workpage__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.workpage__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9.5vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: normal;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 1.25rem;
  transition: letter-spacing 0.45s ease;
}
.workpage__title:hover { letter-spacing: 0.035em; }
.workpage__note {
  font-size: 0.95rem;
  color: var(--fg-2);
  max-width: 48ch;
  line-height: 1.6;
}

.work-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  max-width: 1600px;
  margin: 0 auto;
}

.work-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vh, 3rem);
  will-change: transform;
}
.work-col:nth-child(2) { margin-top: clamp(3rem, 12vh, 9rem); }   /* masonry stagger */

.work-tile { display: block; text-decoration: none; color: inherit; }
.work-tile__media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.work-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.work-tile:hover .work-tile__media img { transform: scale(1.05); }

/* Vary aspect ratios down each column for rhythm */
.work-col .work-tile:nth-child(3n+1) .work-tile__media { aspect-ratio: 3 / 4; }
.work-col .work-tile:nth-child(3n+2) .work-tile__media { aspect-ratio: 4 / 5; }
.work-col .work-tile:nth-child(3n+3) .work-tile__media { aspect-ratio: 1 / 1; }

.work-tile__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0.15rem 0;
}
.work-tile__cap b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  letter-spacing: 0.01em;
  color: var(--fg);
  transition: color 0.25s ease;
}
.work-tile:hover .work-tile__cap b { color: var(--accent); }
.work-tile__cap i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  text-align: right;
  white-space: nowrap;
}

/* Extra projects hidden until "View more" */
.work-tile.is-more { display: none; }
.work-grid.show-more .work-tile.is-more { display: block; }

.work-more__wrap { text-align: center; margin-top: clamp(3rem, 7vh, 5rem); }
.work-more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 0.9rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.work-more:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.work-more__plus { font-size: 1.1rem; line-height: 1; }
.work-more.is-hidden { display: none; }

@media (max-width: 700px) {
  .work-col:nth-child(2) { margin-top: 0; }
}
