/* Arch & Circles. Layout is the scroll-driven stage (assets/js/scroll-world.js); no-js.css turns it into a plain gallery.
   Paths are relative so the page also opens straight from disk (file://). */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 500;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #0d0b09;
  --paper: #ece5da;
  --brass: #d9a05b;
  --paper-85: rgb(236 229 218 / 0.85);
  --paper-82: rgb(236 229 218 / 0.82);
  --paper-80: rgb(236 229 218 / 0.8);
  --paper-70: rgb(236 229 218 / 0.7);
  --paper-60: rgb(236 229 218 / 0.6);
  --paper-55: rgb(236 229 218 / 0.55);
  --paper-50: rgb(236 229 218 / 0.5);
  --rule: rgb(236 229 218 / 0.18);
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html { scroll-behavior: auto; background: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--paper); text-decoration: none; }
a:hover { color: var(--brass); }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }
::selection { background: var(--brass); color: var(--ink); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }

.visually-hidden,
.project-copy,
.shot figcaption {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.label,
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass);
}

.skip-link {
  position: fixed; left: var(--gutter); top: 12px; z-index: 100;
  padding: 10px 16px; background: var(--brass); color: var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--ink); }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  font-family: var(--mono); text-transform: uppercase;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { height: 56px; width: auto; }
.brand-name { font-size: 18px; letter-spacing: 0.28em; }
.header-tagline {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: rise 900ms 300ms ease-out both;
}
.header-tagline p { font-size: 11px; letter-spacing: 0.3em; color: #fff; }
.header-tagline p + p { font-size: 10px; letter-spacing: 0.24em; color: var(--brass); }
.header-nav { display: flex; gap: clamp(14px, 2.4vw, 34px); font-size: 10px; letter-spacing: 0.22em; }
.header-nav [aria-expanded="true"] { color: var(--brass); }
.progress { position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--brass); }

/* ---------- Stage ---------- */

.stage {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  background: var(--ink);
}
/* perspective only reaches direct children, so the article wrappers step out of the box tree and every
   .shot is a direct child of .projects, as the renders are in the design. */
.projects { position: absolute; inset: 0; perspective: 1300px; perspective-origin: 50% 40%; }
.project { display: contents; }
.shot {
  position: absolute; inset: 0; margin: 0;
  display: none; opacity: 0;
  transform-origin: 50% 60%;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.project:first-child .shot:first-of-type { display: block; opacity: 1; }
.shot picture, .shot img { width: 100%; height: 100%; }
.shot img { object-fit: cover; }

.vignette {
  position: absolute; inset: 0; z-index: 40; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, rgb(13 11 9 / 0) 45%, rgb(13 11 9 / 0.72) 100%);
}
.dim { position: absolute; inset: 0; z-index: 41; pointer-events: none; background: var(--ink); opacity: 0; }

/* ---------- Now showing ---------- */

.now {
  position: absolute; left: var(--gutter); bottom: clamp(24px, 5vh, 48px); z-index: 52;
  max-width: min(88vw, 520px); pointer-events: none; opacity: 0;
  will-change: transform, opacity;
}
.now-kicker { margin-bottom: 12px; letter-spacing: 0.26em; }
.now-name { font-weight: 300; font-size: clamp(34px, 5vw, 76px); line-height: 0.95; letter-spacing: -0.03em; }
.project-meta { margin-top: 14px; font-weight: 300; font-size: clamp(14px, 1.15vw, 16px); line-height: 1.6; color: var(--paper-82); }
.project-material { margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-60); }

.caption {
  position: absolute; right: var(--gutter); bottom: clamp(24px, 5vh, 48px); z-index: 52;
  padding: 8px 14px;
  background: rgb(13 11 9 / 0.6); border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-85);
  pointer-events: none; opacity: 0;
  will-change: opacity;
}

/* ---------- Project rail ---------- */

.rail {
  position: absolute; right: var(--gutter); top: 50%; z-index: 55;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.rail a {
  display: flex; align-items: center; gap: 12px; padding: 4px 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--paper-55);
  transition: color 300ms ease;
}
.rail a:hover { color: var(--brass); }
.rail a[aria-current="true"] { color: var(--brass); }
.rail a span { opacity: 0; transition: opacity 300ms ease; }
.rail a[aria-current="true"] span { opacity: 1; }
.rail a::after {
  content: ""; display: block; width: 18px; height: 1px; background: currentColor;
  transition: width 400ms var(--ease-out);
}
.rail a[aria-current="true"]::after { width: 44px; }

.hint {
  position: absolute; left: 50%; bottom: 22px; z-index: 55;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--paper-60);
  pointer-events: none;
}
.hint-line { display: block; width: 1px; height: 28px; background: var(--brass); animation: hint 1.8s ease-in-out infinite; }

/* ---------- Studio (rises over the last render) ---------- */

.track { height: 100vh; }

.studio {
  position: absolute; inset: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 5vw, 72px); align-content: end;
  padding: clamp(80px, 12vh, 120px) var(--gutter) clamp(40px, 7vh, 72px);
  background: linear-gradient(180deg, rgb(13 11 9 / 0) 0%, rgb(13 11 9 / 0.92) 30%, var(--ink) 60%);
  transform: translateY(100%);
  will-change: transform;
}
.studio h2 { margin-bottom: 22px; font-weight: 300; font-size: clamp(40px, 6vw, 96px); line-height: 0.92; letter-spacing: -0.04em; text-wrap: balance; }
.studio .lede { max-width: 46ch; font-weight: 300; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.5; }
.studio .label { margin: 30px 0 10px; }
.studio-intro p:not(.lede) { max-width: 46ch; font-weight: 300; font-size: clamp(14px, 1.15vw, 16px); line-height: 1.65; color: var(--paper-80); }
.studio-intro p + p:not(.lede) { margin-top: 14px; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
}
.button-solid { background: var(--brass); color: var(--ink); transition: background 300ms ease; }
.button-solid:hover { background: var(--paper); color: var(--ink); }
.button-line { border: 1px solid rgb(236 229 218 / 0.35); transition: border-color 300ms ease; }
.button-line:hover { border-color: var(--brass); color: var(--paper); }

.studio-services { align-self: end; }
.services li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--rule); }
.service-num { padding-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--brass); }
.services h4 { margin-bottom: 6px; font-weight: 400; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -0.01em; }
.services p { font-weight: 300; font-size: 14px; line-height: 1.55; color: var(--paper-70); }
.footnote {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-50);
}

/* ---------- Work menu (under the header, which stays usable) ---------- */

.menu {
  position: fixed; inset: 0; z-index: 65;
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px var(--gutter) 60px;
  background: rgb(13 11 9 / 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: rise 400ms ease-out both;
}
.menu[hidden] { display: none; }
.menu .label { margin-bottom: 22px; }
.menu-list { width: min(100%, 640px); }
.menu-list li { animation: rise 500ms 80ms ease-out both; }
.menu-list li:nth-child(2) { animation-delay: 140ms; }
.menu-list li:nth-child(3) { animation-delay: 200ms; }
.menu-list li:nth-child(4) { animation-delay: 260ms; }
.menu-list li:nth-child(5) { animation-delay: 320ms; }
.menu-list li:nth-child(6) { animation-delay: 380ms; }
.menu-list a {
  display: flex; align-items: baseline; gap: 18px; padding: 16px 0;
  border-top: 1px solid rgb(236 229 218 / 0.16);
  font-weight: 300; font-size: clamp(26px, 4vw, 56px); line-height: 1; letter-spacing: -0.03em;
  transition: color 250ms ease, letter-spacing 350ms var(--ease-out);
}
.menu-list a:hover { color: var(--brass); letter-spacing: 0.01em; }
.menu-list a[aria-current="true"] { color: var(--brass); }
.menu-list span { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.2em; }

/* ---------- 404 ---------- */

.not-found {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 0 var(--gutter); text-align: center;
}
.not-found-mark { width: clamp(110px, 14vw, 200px); height: auto; }
.not-found h1 { font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }

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

@keyframes hint { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(8px); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- Phones (the design has no small-screen layout; these keep it from overlapping) ---------- */

@media (max-width: 760px) {
  .site-header { padding-top: 14px; padding-bottom: 14px; }
  .header-tagline, .rail, .hint { display: none; }
  .brand-mark { height: 36px; }
  .brand-name { font-size: 12px; letter-spacing: 0.22em; }
  .caption { top: 76px; bottom: auto; left: var(--gutter); right: auto; font-size: 10px; }
  /* The studio is taller than a phone screen: it starts below the header and scrolls on its own. */
  .studio {
    top: 64px; overflow-y: auto; overscroll-behavior: contain; align-content: start; padding-top: 32px;
    background: linear-gradient(180deg, rgb(13 11 9 / 0.84) 0%, rgb(13 11 9 / 0.94) 35%, var(--ink) 70%);
  }
}
@media (max-width: 400px) {
  .brand-name { display: none; }
}
