:root {
  --bg: #111;
  --fg: #f5f5ee;
  --muted: #8f8f87;
  --line: rgba(245, 245, 238, 0.16);
  --accent: #dae882;
  color-scheme: dark;
  --gutter: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--fg); color: #111; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 99px; z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: transparent;
  transition: transform 0.6s var(--ease);
}
.site-header.is-hidden { transform: translateY(-110%); }
.brand { display: block; color: var(--fg); transition: color 0.35s var(--ease); }
.brand:hover, .brand:focus-visible { color: var(--accent); }
.brand .oc-mark { display: block; height: clamp(34px, 3.4vw, 44px); width: auto; }
.header-actions { display: flex; align-items: center; gap: 18px; }


.pill {
  position: relative; overflow: hidden; display: inline-flex;
  padding: 10px 22px; border: 1px solid var(--fg); border-radius: 99px;
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  isolation: isolate;
}
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent); border-radius: inherit;
  transform: translateY(101%); transition: transform 0.55s var(--ease);
}
.pill span { transition: color 0.3s; }
.pill:hover::before, .pill:focus-visible::before { transform: translateY(0); }
.pill { transition: border-color 0.4s var(--ease); }
.pill:hover, .pill:focus-visible { border-color: var(--accent); }
.pill:hover span, .pill:focus-visible span { color: #111; }

/* ---------- Gallery ---------- */
.gallery {
  position: relative;
  padding: calc(84px + 2vh) var(--gutter) 0;
}
.stage {
  position: relative;
  width: min(100%, 1240px);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  max-height: 76vh;
}
.slide {
  position: absolute; margin: 0;
  display: grid; place-items: center;
  background: var(--slide);
  border-radius: 6px;
  overflow: hidden;
  opacity: 0; visibility: hidden;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide[data-layout="fill"] { inset: 0; }
.slide[data-layout="margin"] { top: 6%; bottom: 6%; left: 50%; width: 34%; translate: -50% 0; }
html:not(.js) .slide:not(:first-child) { display: none; }

.art { user-select: none; pointer-events: none; }
.art.oc-mark { height: 56%; width: auto; }
.slide[data-layout="margin"] .art.oc-mark { height: 50%; }

.stage-nav {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: none; border: 0; padding: 0; cursor: none; z-index: 5;
}
.stage-nav.prev { left: 0; }
.stage-nav.next { right: 0; }
.stage-nav:focus-visible { outline: 2px solid var(--fg); outline-offset: -6px; }
.stage-cursor {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  padding: 7px 14px; border-radius: 99px;
  background: var(--fg); color: var(--bg);
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  opacity: 0; scale: 0.6; transition: opacity 0.25s, scale 0.35s var(--ease);
}
.stage-cursor.is-visible { opacity: 1; scale: 1; }
@media (hover: none) { .stage-cursor { display: none; } .stage-nav { cursor: pointer; } }

.gallery-meta {
  width: min(100%, 1240px); margin: 14px auto 0;
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.progress { flex: 1; max-width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--fg); transform-origin: left; transform: scaleX(0); }

/* ---------- Hero headline ---------- */
.hero { padding: clamp(60px, 12vh, 140px) var(--gutter) clamp(40px, 8vh, 100px); }
.horse-hero { height: 100vh; height: 100svh; min-height: 420px; }

/* Pixel-horse cursor (horse.js), shown once you've scrolled past the opening screen */
.horse-cursor { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; display: none; will-change: transform; }
.cursor-horse .horse-cursor { display: block; }
.cursor-horse, .cursor-horse * { cursor: none !important; }

/* Site-wide background: streaks (horse.js) under a layer of paper grain, fixed behind everything */
.site-scene { position: fixed; left: 0; top: 0; z-index: -1; width: 100%; height: 100vh; height: 100lvh; pointer-events: none; }
.site-grain { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.site-grain::before {
  content: ""; position: absolute; inset: -100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07; animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-5%, 4%); } 40% { transform: translate(6%, -6%); } 60% { transform: translate(-3%, 7%); } 80% { transform: translate(7%, 2%); } }
@media (prefers-reduced-motion: reduce) { .site-grain::before { animation: none; } }
.headline {
  margin: 0;
  font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: clamp(34px, 10.4vw, 190px);
  line-height: 0.88; letter-spacing: -0.025em; text-transform: uppercase;
}
.headline .line { display: block; overflow: hidden; padding-bottom: 0.04em; white-space: nowrap; }
.headline .line > span { display: inline-block; will-change: transform; }

/* ---------- Intro ---------- */
.intro {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gutter);
  padding: clamp(60px, 12vh, 140px) var(--gutter) clamp(80px, 14vh, 180px);
}
.lede {
  grid-column: 1 / -1; margin: 0 0 clamp(48px, 10vh, 120px);
  font-family: "Helvetica Neue", var(--text); font-weight: 300;
  font-size: clamp(34px, 6.6vw, 104px); line-height: 1.02; letter-spacing: -0.03em;
}
.lede .word { display: inline-block; }
.intro-body { grid-column: 7 / span 6; display: grid; gap: 1.1em; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.35; }
.intro-body p { margin: 0; }

/* ---------- Capabilities ---------- */
.capabilities {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px var(--gutter);
  align-items: start;
  padding: clamp(60px, 12vh, 140px) var(--gutter) clamp(100px, 18vh, 220px);
}
.capabilities-title {
  grid-column: 1 / span 6; margin: 0;
  font-family: var(--text); font-weight: 600;
  font-size: clamp(36px, 4.8vw, 80px); line-height: 0.98; letter-spacing: -0.045em;
  text-wrap: balance;
}
.capabilities-list {
  grid-column: 8 / span 5;
  display: grid; grid-template-columns: auto 1fr; gap: 1.4em 18px;
  font-family: var(--text); font-weight: 600;
  font-size: clamp(19px, 1.6vw, 26px); line-height: 1.12; letter-spacing: -0.025em;
}
.capabilities-list h3 { margin: 0; font: inherit; }
.capabilities-list ul { list-style: none; margin: 0; padding: 0; }
.capabilities-list li { color: var(--muted); font-weight: 400; letter-spacing: -0.015em; transition: color 0.35s var(--ease); }
.capabilities-list li:hover { color: var(--accent); }

/* ---------- Clients ---------- */
.clients { padding: 0 var(--gutter) clamp(100px, 18vh, 220px); }
.section-title {
  margin: 0 0 clamp(28px, 5vh, 56px);
  font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 125;
  font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
}
.logo-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.logo-grid li {
  aspect-ratio: 3 / 2; display: grid; place-items: center;
  transition: opacity 0.5s var(--ease);
}
.logo-grid img {
  width: 46%; max-height: 34%; object-fit: contain;
  filter: invert(1);
  transition: transform 0.7s var(--ease);
}
.logo-grid img.is-square { width: 52%; max-height: 64%; }
.logo-grid img.is-tall { width: 32%; max-height: 48%; }
.logo-grid:hover li:not(:hover) { opacity: 0.32; }
.logo-grid li:hover img { transform: scale(1.06); }

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(60px, 12vh, 140px) var(--gutter) clamp(8px, 1.2vw, 18px);
  font-size: 14px;
}
.footer-cta { display: block; text-decoration: none; margin-bottom: clamp(140px, 28vh, 320px); }
.footer-cta-label { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; margin-bottom: 14px; }
.footer-cta-email {
  display: inline-block; position: relative;
  font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 112;
  font-size: clamp(22px, 5.6vw, 96px); line-height: 1; letter-spacing: -0.03em;
  white-space: nowrap;
}
.footer-cta-email::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 0.045em; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.8s var(--ease);
}
.footer-cta-email { transition: color 0.4s var(--ease); }
.footer-cta:hover .footer-cta-email, .footer-cta:focus-visible .footer-cta-email { color: var(--accent); }
.footer-cta:hover .footer-cta-email::after, .footer-cta:focus-visible .footer-cta-email::after { transform: scaleX(1); transform-origin: left; }

.footer-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.footer-cols h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; font-weight: 600; }
.footer-cols p { margin: 0 0 4px; }
.footer-cols a { text-decoration: none; opacity: 0.85; transition: opacity 0.2s, color 0.3s var(--ease); }
.footer-cols a:hover, .footer-cols a:focus-visible { opacity: 1; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: clamp(64px, 12vh, 120px);
  color: var(--muted); font-size: 14px;
}
.footer-bar p { margin: 0; }
.footer-bar a { color: inherit; text-underline-offset: 3px; transition: color 0.3s var(--ease); }
.footer-bar a:hover, .footer-bar a:focus-visible { color: var(--accent); }

/* Full-width name; fit.js sizes it to the exact width, the vw value is the fallback. */
.footer-wordmark {
  margin: clamp(12px, 2.4vh, 28px) 0 0; overflow: hidden;
  font-family: "pragmatica-extended", var(--display); font-variation-settings: "wdth" 125; font-weight: 400;
  font-size: 7.4vw; line-height: 0.86; letter-spacing: -0.03em; white-space: nowrap;
}
.footer-wordmark span { display: inline-block; }

/* ---------- Initial states (only when JS will animate) ---------- */
.js .headline .line > span { transform: translateY(105%); }
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js:not(.reduced) .slide--intro .art { clip-path: inset(100% 0% 0% 0%); }
.js .logo-grid li { opacity: 0; }
.js.reduced .headline .line > span,
.js.reduced [data-reveal],
.js.reduced .logo-grid li { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .slide[data-layout="margin"] { width: 52%; }
  .lede { grid-column: 1 / -1; }
  .intro-body { grid-column: 1 / -1; }
  .capabilities-title, .capabilities-list { grid-column: 1 / -1; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .stage { aspect-ratio: 4 / 5; }
  .slide[data-layout="margin"] { width: 70%; top: 10%; bottom: 10%; }
}
