/* garrow.work — styles taken from the approved prototype (prototype/index.html),
   font pairing B: Space Grotesk headings, Instrument Sans body and navigation. */
/* Theme from the Figma "Site-Rebuild" file (30 Nov 2026): light grey background, black text, Poppins. */
:root {
  --bg: #d7d7d7;
  --fg: #000000;
  --muted: #3d3d3d;
  --line: rgba(0, 0, 0, 0.28);
  --rule: #000000;        /* strip lines and tab outlines */
  --mark: #000000;
  --accent: #ff7a45;
  --panel: #cbcbcb;

  --f-display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --w-display: 500;
  --w-body: 300;
  --track-display: -0.02em;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

@property --c1 { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --c2 { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --c3 { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --r1 { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --r2 { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --r3 { syntax: "<length>"; inherits: true; initial-value: 0px; }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-weight: var(--w-body);
  font-size: 16px; line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.ui { font-family: var(--f-body); font-size: 16px; letter-spacing: 0; font-weight: 300; line-height: 1.8; }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter-r); }
.inner { max-width: 1280px; margin: 0 auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 30; background: var(--panel); padding: 8px 12px; }

/* ---------- Header ---------- */
/* Header (Figma "Header" component): logo left, nav + social icons right, 99px tall */
.site-head { position: relative; }
.site-head .inner { max-width: 1216px; display: flex; align-items: center; justify-content: space-between; gap: 16px 44px; flex-wrap: wrap; min-height: 99px; padding-block: 14px; }
.logo { display: block; width: 399px; max-width: 100%; }
.logo img { display: block; width: 100%; height: auto; }
.nav-wrap { display: flex; align-items: center; gap: 44px; flex-wrap: wrap; }
.nav { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.nav a { text-decoration: none; color: var(--fg); }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.social { display: flex; gap: 20px; align-items: center; }
.social a { display: block; width: 22px; height: 22px; color: var(--fg); }
.social svg { display: block; width: 100%; height: 100%; }
.social a:hover, .social a:focus-visible { color: var(--accent); }

/* ---------- Page intro ---------- */
.intro .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: end; padding-block: 56px 40px; }
.intro h1 { font-family: var(--f-display); font-weight: var(--w-display); letter-spacing: var(--track-display); line-height: 0.95; font-size: clamp(48px, 8vw, 112px); margin: 0; text-wrap: balance; }
.intro p { margin: 0; color: var(--fg); max-width: 42ch; }

/* ---------- Reel ---------- */
.reel-stage { position: relative; padding-block: 48px; margin-bottom: 8px; }
.reel-stage::before, .reel-stage::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.reel-stage::before { top: 48px; }
.reel-stage::after { bottom: 48px; }
.reel-box { position: relative; max-width: 1280px; margin: 0 auto; }
.reel-box .vl { position: absolute; top: -48px; bottom: -48px; width: 1px; background: var(--line); }
.reel-box .vl.l { left: 0; } .reel-box .vl.r { right: 0; }
.reel-box .mk { position: absolute; width: 9px; height: 9px; margin: -4px 0 0 -4px; background: var(--mark); z-index: 2; }
.reel-link { display: block; position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: #1b1b1d; }
.reel-link img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.reel-link:hover img, .reel-link:focus-visible img { transform: scale(1.02); }
.reel-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.play { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border: 1px solid rgba(255,255,255,.85); display: grid; place-items: center; background: rgba(13,13,14,.25); transition: background-color .3s, border-color .3s; }
.play svg { width: 26px; height: 26px; margin-left: 4px; }
.reel-link:hover .play, .reel-link:focus-visible .play { background: var(--accent); border-color: var(--accent); }
.welcome .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 32px; padding-block: 40px 80px; }
.welcome h1 { font-family: var(--f-display); font-weight: var(--w-display); letter-spacing: var(--track-display); font-size: clamp(40px, 5.5vw, 72px); line-height: 1; margin: 0; text-wrap: balance; }
.welcome p { margin: 0 0 16px; max-width: 60ch; }

/* ---------- Grid stage (Projects) ---------- */
.stage { position: relative; margin-bottom: 72px; height: calc(var(--r1) + var(--r2) + var(--r3)); transition: --c1 .55s var(--ease), --c2 .55s var(--ease), --c3 .55s var(--ease), --r1 .55s var(--ease), --r2 .55s var(--ease), --r3 .55s var(--ease); }
.lines, .marks { position: absolute; inset: 0; pointer-events: none; }
.lines i { position: absolute; background: var(--line); display: block; }
.lines .h { left: 0; right: 0; height: 1px; }
.lines .v { width: 1px; top: -40px; bottom: -40px; }
.marks i { position: absolute; width: 9px; height: 9px; margin: -4px 0 0 -4px; display: block; background: var(--mark); transition: background-color .3s, transform .3s var(--ease); }
.marks i.on { background: var(--accent); transform: scale(1.45); }
.grid { position: absolute; top: 0; left: var(--gx, 0px); width: calc(var(--c1) + var(--c2) + var(--c3)); height: calc(var(--r1) + var(--r2) + var(--r3)); display: grid; grid-template-columns: var(--c1) var(--c2) var(--c3); grid-template-rows: var(--r1) var(--r2) var(--r3); }
.cell { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px; text-decoration: none; outline: none; }
.cell .media { flex: 1 1 auto; min-height: 0; overflow: hidden; position: relative; background: #1b1b1d; }
.cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .45s var(--ease), filter .45s var(--ease), transform .8s var(--ease); }
.cell { perspective: 1000px; }
.cell .media { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s var(--ease); will-change: transform; }
.cell img { filter: grayscale(1) contrast(1.05); }
.cell.active img { filter: none; }
.cell:focus-visible .media { outline: 2px solid var(--accent); outline-offset: 3px; }
.cell.feature .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(13,13,14,.85)); }
.cell.feature .over { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-family: var(--f-display); font-weight: var(--w-display); letter-spacing: var(--track-display); font-size: clamp(22px, 2.2vw, 32px); line-height: 1.05; }
/* Before the script sizes the tracks (or without JS), show a plain stacked list */
.stage:not(.ready) { height: auto; }
.stage:not(.ready) .lines, .stage:not(.ready) .marks { display: none; }
.stage:not(.ready) .grid { position: static; width: auto; height: auto; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-template-rows: none; }
.stage:not(.ready) .cell .media { aspect-ratio: 1 / 1; flex: none; }
/* Stacked (phone) layout */
.stage.stack { height: auto; margin-bottom: 48px; }
.stage.stack .lines, .stage.stack .marks { display: none; }
.stage.stack .grid { position: static; width: auto; height: auto; grid-template-columns: 1fr; grid-template-rows: none; border-top: 1px solid var(--line); }
.stage.stack .cell { border-bottom: 1px solid var(--line); padding: 16px 0; }
.stage.stack .cell .media { aspect-ratio: 1 / 1; flex: none; }
/* ---------- Project strips (Figma "Project strip" component) ----------
   Full-bleed strips: a black top line, a 24px gap, then a 136px image that opens to 240px on hover
   (and, on touch screens, when the strip is in the middle of the screen). Each tab steps up out of
   its strip's line into the strip above, and the tabs cascade left to right between the rulers
   at 133px and 1301px of a 1440px frame. */
.strips { --L: 9.236%; --span: 81.111%; --tw: max(calc(var(--span) / 8), 124px);
  list-style: none; margin: 0; padding: 110px 0 0; }
.strip { position: relative; border-top: 1px solid var(--rule); padding-top: 24px; }
.strip a { display: block; color: var(--fg); text-decoration: none; outline: none; }
.strip .tab {
  position: absolute; top: -57px; height: 58px; width: var(--tw);
  left: calc(var(--L) + (var(--span) - var(--tw)) * var(--i) / 7);
  display: flex; align-items: center; justify-content: center; padding: 0 8px;
  background: var(--bg); border: 1px solid var(--rule); border-bottom: 0; border-radius: 10px 10px 0 0;
  font-weight: 600; font-size: 14px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  z-index: 1;
}
.strip .band { display: block; position: relative; height: 136px; overflow: hidden; background: var(--panel); transition: height .3s ease-out; }
.strip .band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.strip a:hover .band, .strip a:focus-visible .band, .strip.open .band { height: 240px; }
.strip a:focus-visible .tab { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) {
  .strips { --L: 16px; --span: calc(100% - 32px); --tw: 132px; padding-top: 88px; }
  .strip .tab { font-size: 12px; height: 46px; top: -45px; }
  .strip .band { height: 110px; }
  .strip a:hover .band, .strip.open .band { height: 190px; }
}
@media (prefers-reduced-motion: reduce) { .strip .band { transition: none; } }

.outro .inner { padding-block: 48px 72px; color: var(--fg); max-width: 1280px; }
.outro p { max-width: 70ch; margin: 0; }
.outro a { color: var(--fg); }

/* ---------- Footer ---------- */
/* Footer (Figma "Footer" component): one centred contact line, 90px tall */
.site-foot .inner { min-height: 90px; display: flex; align-items: center; justify-content: center; text-align: center; padding-block: 16px; }
.site-foot a { color: var(--fg); text-decoration: none; }
.site-foot a:hover, .site-foot a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Gallery ---------- */
.gallery .inner { padding-block: 8px 72px; }
.gal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; padding-top: 24px; }
.back { color: var(--muted); text-decoration: none; }
.back:hover, .back:focus-visible { color: var(--fg); }
.gal { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; border: 1px solid var(--line); position: relative; }
.stagebox { position: relative; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.stagebox figure { margin: 0; padding: 28px; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.stagebox img { max-height: min(72vh, 760px); width: auto; max-width: 100%; display: block; transition: opacity .25s; }
.stagebar { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.stagebar .ctrls { display: flex; gap: 8px; }
.btn { font: inherit; color: var(--fg); background: transparent; border: 1px solid var(--line); padding: 8px 12px; cursor: pointer; }
.btn:hover, .btn:focus-visible { border-color: var(--fg); outline: none; }
.side { display: flex; flex-direction: column; min-width: 0; }
.side .about { padding: 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
.side .about h1 { font-family: var(--f-display); font-weight: var(--w-display); letter-spacing: var(--track-display); font-size: 32px; line-height: 1; margin: 0 0 14px; }
.side .about p { margin: 0; color: var(--fg); }
.thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.thumbs button { border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--muted); }
.thumbs button:nth-child(odd) { border-right: 1px solid var(--line); }
.thumbs img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; display: block; opacity: .55; transition: opacity .25s; }
.thumbs button:hover img, .thumbs button[aria-current="true"] img { opacity: 1; }
.thumbs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- Text pages (About, project pages, 404) ---------- */
.stub .inner { padding-block: 56px 96px; }
.stub h1 { font-family: var(--f-display); font-weight: var(--w-display); letter-spacing: var(--track-display); font-size: clamp(48px, 8vw, 112px); line-height: .95; margin: 0 0 24px; text-wrap: balance; }
.stub h2 { font-family: var(--f-display); font-weight: var(--w-display); letter-spacing: var(--track-display); font-size: clamp(28px, 3.4vw, 44px); line-height: 1; margin: 40px 0 16px; }
.stub p { max-width: 62ch; margin: 0 0 16px; }
.stub .ui { color: var(--muted); }
.stub .kicker { color: var(--muted); margin: 0 0 12px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: start; }
.about-grid img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }

.project .inner { padding-block: 24px 96px; }
.project .head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 32px; align-items: end; padding-block: 32px 40px; }
.project .head h1 { margin: 0; }
.project .head p { margin: 0 0 16px; max-width: 60ch; }
.project .body { display: flex; flex-direction: column; gap: 32px; }
.project .body > p, .project .body > h2 { max-width: 62ch; margin: 0; }
.video { position: relative; aspect-ratio: 16 / 9; background: #1b1b1d; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.figs.one { grid-template-columns: minmax(0, 1fr); }
.figs img { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: #1b1b1d; }
.next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.next a { color: var(--muted); text-decoration: none; }
.next a:hover, .next a:focus-visible { color: var(--fg); }

@media (max-width: 900px) {
  .intro .inner, .welcome .inner, .project .head, .about-grid { grid-template-columns: 1fr; }
  .intro .inner { padding-block: 40px 28px; }
  .gal { grid-template-columns: 1fr; }
  .stagebox { border-right: 0; border-bottom: 1px solid var(--line); }
  .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .thumbs button:nth-child(odd) { border-right: 0; }
  .thumbs button { border-right: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .nav { gap: 18px; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .stage, .cell img, .marks i, .cell .media { transition: none !important; }
  .cell .media { transform: none !important; }
}

/* Projects intro: one centred line under the header (Figma "Intro") */
.lede .inner { max-width: 1214px; padding-top: 43px; text-align: center; }
.lede p { margin: 0; }
