/* ==========================================================================
   ASPECT RATIO DIGITAL — "Find your frame"
   One idea runs through everything: a frame that reshapes between media
   ratios. The brand's own TL + BR crop brackets are the atom of the UI.
   Type: Archivo (variable width axis 62-125) + Martian Mono for readouts.
   ========================================================================== */

@font-face {
  font-family: "Archivo AR";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Martian Mono AR";
  src: url("/assets/fonts/martian-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- tokens ---- */
:root {
  --ink: #0c0b0a;
  --ink-2: #141311;
  --ink-3: #1d1b18;
  --paper: #ebe5d8;
  --paper-2: #ddd6c5;
  --bone: #efe9dd;
  --accent: #ff5a1f;
  --accent-deep: #c93b05;

  /* themed (dark by default, flipped by [data-theme="light"]) */
  --bg: var(--ink);
  --fg: var(--bone);
  --dim: rgba(239, 233, 221, 0.66);
  --faint: rgba(239, 233, 221, 0.4);
  --line: rgba(239, 233, 221, 0.14);
  --line-2: rgba(239, 233, 221, 0.32);
  --surface: var(--ink-2);

  --f-sans: "Archivo AR", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Martian Mono AR", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(18px, 3.6vw, 56px);
  --maxw: 1480px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --t-fast: 0.2s;
  --t-med: 0.5s;
  --t-slow: 0.9s;
  --hdr-h: 112px;
}

[data-theme="light"] {
  --bg: var(--paper);
  --fg: var(--ink);
  --dim: rgba(12, 11, 10, 0.68);
  --faint: rgba(12, 11, 10, 0.42);
  --line: rgba(12, 11, 10, 0.16);
  --line-2: rgba(12, 11, 10, 0.4);
  --surface: var(--paper-2);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped, html.is-loading { overflow: hidden; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
body {
  background: var(--ink);
  color: var(--bone);
  font: 400 1.0625rem/1.6 var(--f-sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 10001;
  background: var(--accent); color: var(--ink); padding: 12px 18px; font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; margin: -1px; padding: 0;
}

/* film grain over everything — tiny, static noise tile nudged in steps */
body::after {
  content: "";
  position: fixed; inset: -50%; z-index: 9990; pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(1) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---- type ---- */
h1, h2, h3, h4 {
  font-weight: 800;
  font-stretch: 100%;
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
}
.d-xl { font-size: clamp(2.7rem, 9vw, 9.6rem); }
.d-lg { font-size: clamp(2.3rem, 6.2vw, 6.4rem); }
.d-md { font-size: clamp(1.8rem, 4vw, 3.8rem); }
.d-sm { font-size: clamp(1.4rem, 2.4vw, 2.2rem); }
.stretch { font-stretch: 125%; }
.condensed { font-stretch: 70%; }
p { color: var(--dim); text-wrap: pretty; }
p.lead { font-size: clamp(1.1rem, 1.55vw, 1.4rem); line-height: 1.5; color: var(--fg); max-width: 46ch; }
.mono { font-family: var(--f-mono); font-size: 0.72rem; line-height: 1.5; letter-spacing: 0.02em; font-weight: 500; }
.accent { color: var(--accent); }
[data-theme="light"] .accent { color: var(--accent-deep); }
.dim { color: var(--dim); }

/* section label row: "(02) What we do ........ 21:9" over a tick ruler */
.sec-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--dim); padding-bottom: 14px; position: relative;
}
.sec-label b { color: var(--fg); font-weight: 600; }
.ruler {
  height: 12px; border-top: 1px solid var(--line-2);
  background:
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10px) top / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 50px) top / 100% 11px no-repeat;
}

/* ---- layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section, .site-footer { position: relative; z-index: 2; }
.sec { padding-block: clamp(72px, 11vw, 168px); background: var(--bg); color: var(--fg); }
.sec-tight { padding-block: clamp(32px, 5vw, 64px); background: var(--bg); color: var(--fg); }

/* ---- the frame: brand TL + BR brackets, floating just outside the edge ---- */
.frame { position: relative; --l: 22px; --o: 8px; }
.frame::before, .frame::after {
  content: ""; position: absolute; width: var(--l); height: var(--l);
  pointer-events: none; z-index: 6;
  transition: width 0.55s var(--ease), height 0.55s var(--ease), transform 0.55s var(--ease);
}
.frame::before { top: calc(var(--o) * -1); left: calc(var(--o) * -1); border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.frame::after { bottom: calc(var(--o) * -1); right: calc(var(--o) * -1); border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.frame:hover, .frame.is-hot { --l: 40px; }
[data-theme="light"] .frame::before, [data-theme="light"] .frame::after { border-color: var(--ink); }

/* ---- buttons: frames that stretch ---- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--fg); --btn-fill: var(--fg); --btn-fill-fg: var(--bg);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.7em;
  min-height: 48px; padding: 0.95em 1.4em;
  font: 700 0.84rem/1 var(--f-sans); font-stretch: 100%;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-fg);
  isolation: isolate; overflow: hidden;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--btn-fill);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform 0.55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:hover, .btn:focus-visible { color: var(--btn-fill-fg); border-color: var(--btn-fill); }
.btn-label { display: inline-grid; justify-items: center; }
.btn-label > * { grid-area: 1 / 1; }
.btn-label .bl-ghost { visibility: hidden; font-stretch: 122%; height: 0; overflow: hidden; }
.btn-label .bl-real { font-stretch: 100%; transition: font-stretch 0.6s var(--ease); white-space: nowrap; }
.btn:hover .bl-real, .btn:focus-visible .bl-real { font-stretch: 122%; }
.btn .arr { width: 12px; height: 12px; flex: none; transition: transform 0.5s var(--ease); }
.btn:hover .arr { transform: rotate(45deg); }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--ink); --btn-fill: var(--fg); --btn-fill-fg: var(--bg); border-color: var(--accent); }
.btn-primary:hover { border-color: var(--fg); }
.btn-sm { min-height: 44px; padding: 0.8em 1.1em; font-size: 0.76rem; }

/* ---- shutter: page loader + page transition (cinema letterbox bars) ---- */
#shutter { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
#shutter.is-active { pointer-events: auto; }
#shutter .sh-top, #shutter .sh-bot {
  position: absolute; left: 0; right: 0; height: 50.2%; background: var(--ink);
  will-change: transform;
}
#shutter .sh-top { top: 0; transform-origin: 50% 0; }
#shutter .sh-bot { bottom: 0; transform-origin: 50% 100%; }
#shutter .sh-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); transform-origin: 0 50%; }
#shutter .sh-mark {
  position: absolute; left: 50%; top: 50%; width: min(34vw, 190px); transform: translate(-50%, -50%);
}
#shutter .sh-mark img { width: 100%; height: auto; }
#shutter .sh-count {
  position: absolute; left: var(--gutter); bottom: 24px; color: var(--bone);
  font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500;
}
#shutter .sh-count b { color: var(--accent); font-weight: 600; }
html:not(.js) #shutter { display: none; }

/* ---- header: three independent fixed pieces so blend modes reach the page ---- */
.site-header { display: contents; }
.hdr-nav, .hdr-cta, .brand-logo { position: fixed; z-index: 100; }
.hdr-nav {
  left: var(--gutter); top: 0; height: var(--hdr-h);
  display: flex; align-items: center; gap: 22px;
  color: #fff; mix-blend-mode: difference;
  transition: height 0.45s var(--ease);
}
.hdr-cta { right: var(--gutter); top: 0; height: var(--hdr-h); display: flex; align-items: center; transition: height 0.45s var(--ease); }
.is-scrolled { --hdr-h: 68px; }
.main-nav ul { display: flex; gap: clamp(20px, 3vw, 44px); }
.main-nav a {
  position: relative; display: inline-block; padding: 8px 0;
  font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em;
  font-stretch: 100%; transition: font-stretch 0.5s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.5s var(--ease);
}
.main-nav a:hover, .main-nav a:focus-visible { font-stretch: 118%; }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }

.nav-toggle { display: none; }

.brand-logo {
  --logo-h: 127px;
  top: 6px; left: 50%; transform: translateX(-50%);
  height: var(--logo-h); width: calc(var(--logo-h) * 1.89);
  overflow: hidden; z-index: 101;
  mix-blend-mode: screen;
  transition: height 0.45s var(--ease), width 0.45s var(--ease), top 0.45s var(--ease), opacity 0.3s;
}
.is-scrolled .brand-logo { --logo-h: 63px; top: 3px; }
.brand-logo-video {
  position: absolute; max-width: none; pointer-events: none; display: block;
  height: calc(var(--logo-h) * 2.4658); width: calc(var(--logo-h) * 4.3836);
  top: calc(var(--logo-h) * -0.7123); left: calc(var(--logo-h) * -1.2398);
  transition: height 0.45s var(--ease), width 0.45s var(--ease), top 0.45s var(--ease), left 0.45s var(--ease);
}
/* on paper-coloured sections the (white-on-black) logo is inverted + multiplied */
html[data-tone="light"] .brand-logo { mix-blend-mode: multiply; }
html[data-tone="light"] .brand-logo-video { filter: invert(1); }
.brand-logo.is-swapping { opacity: 0; }

@media (max-width: 860px) {
  :root { --hdr-h: 84px; }
  .brand-logo { --logo-h: 82px; }
  .is-scrolled .brand-logo { --logo-h: 52px; }
  .hdr-cta { display: none; }
  .main-nav ul {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px;
    padding: 110px var(--gutter) 60px; background: var(--ink); mix-blend-mode: normal;
    clip-path: inset(0 0 100% 0); pointer-events: none;
    transition: clip-path 0.7s var(--ease-io);
  }
  .main-nav a { font-size: clamp(2.4rem, 12vw, 4.2rem); font-weight: 800; letter-spacing: -0.01em; color: var(--bone); padding: 4px 0; }
  .nav-open .main-nav ul { clip-path: inset(0 0 0 0); pointer-events: auto; }
  .hdr-nav { mix-blend-mode: normal; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 48px; height: 48px; padding: 0 13px; position: relative; z-index: 3;
    background: var(--ink); border: 1px solid rgba(239, 233, 221, 0.3);
  }
  .nav-toggle span { display: block; height: 2px; background: var(--bone); transition: transform 0.45s var(--ease), opacity 0.3s; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---- custom cursor: a camera autofocus bracket ---- */
.cursor { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; mix-blend-mode: difference; color: #fff; opacity: 0; transition: opacity 0.3s; }
.cursor.is-on { opacity: 1; }
.cursor-dot { position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; border-radius: 50%; }
.cursor-box { position: fixed; left: 0; top: 0; width: 34px; height: 34px; }
.cursor-box i { position: absolute; width: 9px; height: 9px; border: 0 solid #fff; transition: transform 0.4s var(--ease); }
.cursor-box i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.cursor-box i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.cursor-box i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.cursor-box i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.cursor-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.04em;
  opacity: 0; transition: opacity 0.25s;
}
.cursor.is-label .cursor-label { opacity: 1; }
.cursor.is-label .cursor-dot, .cursor.is-hidden { opacity: 0; }
.cursor.is-down .cursor-box i:nth-child(1) { transform: translate(2px, 2px); }
.cursor.is-down .cursor-box i:nth-child(2) { transform: translate(-2px, 2px); }
.cursor.is-down .cursor-box i:nth-child(3) { transform: translate(2px, -2px); }
.cursor.is-down .cursor-box i:nth-child(4) { transform: translate(-2px, -2px); }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor [data-cursor], html.has-cursor label { cursor: none; }
html.has-cursor input, html.has-cursor textarea { cursor: text; }

/* ---- marquees ---- */
.marquee { overflow: hidden; width: 100%; min-width: 0; max-width: 100%; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-track > * { flex: none; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: var(--bone); overflow: hidden; }
.foot-ticker { border-block: 1px solid var(--line); padding-block: 18px; }
.foot-ticker .marquee-track span {
  font-weight: 900; font-stretch: 125%; font-size: clamp(1.4rem, 3.4vw, 3rem); text-transform: uppercase;
  padding-right: 0.7em; color: transparent; -webkit-text-stroke: 1px var(--line-2);
}
.foot-ticker .marquee-track span:nth-child(3n) { color: var(--accent); -webkit-text-stroke: 0; }
.foot-cta { padding-block: clamp(64px, 9vw, 130px) clamp(40px, 5vw, 72px); }
.foot-cta h2 { max-width: 14ch; }
.foot-mail {
  display: inline-block; margin-top: clamp(24px, 3vw, 44px);
  font-weight: 800; font-size: clamp(1.35rem, 4.4vw, 4.2rem); line-height: 1; text-transform: lowercase;
  font-stretch: 100%; letter-spacing: -0.02em; word-break: break-all;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 3px no-repeat;
  padding-bottom: 8px; transition: font-stretch 0.7s var(--ease), color 0.3s, background-size 0.5s var(--ease);
}
.foot-mail:hover { font-stretch: 124%; color: var(--accent); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--gutter); padding-block: 40px; border-top: 1px solid var(--line); }
.foot-grid h4 { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--faint); margin-bottom: 14px; line-height: 1.4; }
.foot-grid a, .foot-grid p, .foot-grid span.v { display: block; color: var(--bone); font-weight: 500; line-height: 1.9; }
.foot-grid a { width: max-content; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); }
.foot-grid a:hover { background-size: 100% 1px; }
.foot-brand p { color: var(--dim); max-width: 34ch; line-height: 1.5; font-weight: 400; }
.foot-word {
  display: block; margin-top: 8px; white-space: nowrap; line-height: 0.78; text-align: center;
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; color: var(--bone);
  font-size: clamp(3rem, 13vw, 17rem); margin-bottom: -0.07em; user-select: none;
}
.foot-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 22px 26px; font-family: var(--f-mono); font-size: 0.7rem; color: var(--faint); border-top: 1px solid var(--line); }
.foot-bottom a:hover { color: var(--accent); }
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ---- reveal system (JS adds .js to <html>) ---- */
html.js [data-reveal] { opacity: 0; transform: translateY(36px); }
html.js [data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
html.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
html.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); transition: clip-path 1.2s var(--ease-io); }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.split .wi { display: inline-block; will-change: transform; }
.split .ch { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  body::after { display: none; }
  html.js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
}
