/* Mobile-first, no framework. Brand: /home/box/brand/brand-guide.md + site-restyle.md (Instrument Sans only). */
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-400-600.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap; }
:root {
  --evergreen: #1F4D3A;  /* primary: headings, links, buttons */
  --fir:       #15322A;  /* body text, footer bg */
  --cedar:     #9A4E2B;  /* small accent labels only */
  --sand:      #D8BC8E;  /* accents on dark only, never text on light */
  --cream:     #F7F0E2;  /* page background */
  --panel:     #FBF7EF;  /* cards */
  --stone:     #56655B;  /* secondary text (5.43:1 on cream) */
  --line:      #E3D6BE;  /* hairlines only */
  --ph:        #E8DCC4;  /* photo placeholders */
  --text: var(--fir); --muted: var(--stone); --bg: var(--cream);
  --soft: var(--panel); --accent: var(--evergreen);
  --max: 72rem;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-synthesis: none; font-family: var(--sans); font-weight: 400; font-size: 1.0625rem; line-height: 1.65; color: var(--fir); background: var(--cream); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--evergreen); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--fir); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--evergreen); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 500; color: var(--evergreen);
  line-height: 1.15; letter-spacing: -0.015em; margin: 2.2em 0 .6em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-top: 1.6em; max-width: 22ch; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
strong { font-weight: 600; }
p, ul { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
main { padding-bottom: 2rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--fir); color: var(--cream); padding: .5rem 1rem; }
.skip:focus { left: 0; z-index: 10; }
.kicker { font: 500 .75rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--cedar); margin: 2.4rem 0 -1rem; }                   /* cedar on cream 5.29:1; hidden from 64rem */
.label { font: 500 .75rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--cedar); }

.draft-banner { background: #fff8d6; border-bottom: 1px solid #e8d98a; font-size: .85rem; padding: .4rem 1rem; text-align: center; }
.tbd { background: #fff3b0; outline: 1px dashed #b89b00; padding: 0 .2em; border-radius: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; color: #5a4a00; }

.site-header { border-bottom: 1px solid var(--line); background: var(--cream); }
/* Header padding lives on .site-header .header-inner so the .wrap padding shorthand at 40rem+ can't reset it to 0. */
.site-header .header-inner { display: flex; flex-direction: column; gap: .4rem; padding-top: 1.125rem; padding-bottom: 1rem; }
.brand { display: inline-block; padding: .25rem 0; line-height: 0; align-self: flex-start; }
.brand img { display: block; width: 206px; height: 22px; }         /* mobile: plain lockup, 204px artwork in a 206px box */
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 .75rem; }
.site-header nav a { display: inline-block; padding: .5rem .25rem; text-decoration: none;
  font-weight: 500; font-size: .95rem; letter-spacing: .02em; color: var(--stone); }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--fir);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

.lead { font-size: 1.15rem; color: var(--stone); max-width: 38rem; }
.hero { margin: 1rem 0 1.5rem; }
.hero .slot-photo img { max-height: 70vh; }
.btn { display: inline-block; background: var(--evergreen); color: var(--cream);
  font: 500 .95rem/1 var(--sans); letter-spacing: .03em; padding: .95rem 1.6rem;
  border: 1px solid var(--evergreen); border-radius: 2px; text-decoration: none;
  transition: background-color .15s ease; }
.btn:hover { background: var(--fir); border-color: var(--fir); color: var(--cream); }
.btn-quiet { background: transparent; color: var(--evergreen); }
.btn-quiet:hover { background: var(--evergreen); color: var(--cream); }
.cta { background: transparent; border-top: 1px solid var(--line); border-radius: 0; padding: 3rem 0 0; margin: 4rem 0; }
.cta h2 { margin-top: 0; }

.cards { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.cards li { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 1.5rem; }
.cards h3 { margin: 0 0 .3rem; }
.cards h3 a { text-decoration: none; }
.cards h3 a:hover { text-decoration: underline; }
.cards p { margin: 0; color: var(--stone); font-size: .95rem; }
.cards .slot { margin-bottom: .75rem; }

/* Photo / video slots */
.grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin: 1rem 0 2rem; }
.slot { margin: 0; }
.slot-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; }
.slot-video video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 0; }
.placeholder { background: var(--ph); }
.slot-video video.placeholder { background: var(--ph); }

/* Tap targets for small links */
.breadcrumb a, .footer-links a { display: inline-block; padding: .5rem .25rem; }
.other-work { margin-top: 2rem; }
.other-work ul { list-style: none; padding: 0; margin: .25rem 0 0; }
.other-work li a { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }

.coming-soon { border-top: 1px solid var(--line); padding: 1.5rem 0 0; margin: 2.5rem 0 0; }
.grid.videos > .slot:only-child { grid-column: 1 / -1; max-width: 48rem; }   /* a lone clip gets more room */
.coming-soon .label { margin: 0 0 .4rem; }
.coming-soon p:last-child { margin: 0; font-size: 1.15rem; color: var(--fir); }
.muted { color: var(--stone); }
.site-footer { background: var(--fir); color: var(--cream); border-top: 0; margin-top: 5rem; padding: 2.5rem 0; font-size: .9rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--sand); }
.site-footer .tbd { color: #5a4a00; }
.site-footer p { margin: 0 0 .4rem; }

@media (min-width: 40rem) {
  body { font-size: 1.125rem; }
  .wrap { padding: 0 2rem; }
  .site-header .header-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .brand { align-self: auto; }
  .brand img { width: 260px; height: 28px; }                        /* tablet: plain lockup, 260px wide */
  .site-header nav ul { gap: 0 1.5rem; }
  .grid, .cards { grid-template-columns: repeat(2, 1fr); }
  /* 70vh alone still pushes the quote button below the fold on common laptop screens
     (banner + header + H1 + lead take ~22rem; more with the larger restyle type), so cap by the remaining viewport too. */
  .hero .slot-photo img { max-height: min(70vh, calc(100vh - 28rem)); min-height: 12rem; }
  .other-work ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
  .other-work li a { display: inline-block; padding: .5rem .25rem; border-bottom: 0; }
}
@media (min-width: 64rem) {
  .grid.photos, .cards { grid-template-columns: repeat(3, 1fr); }
  .brand img { width: 304px; height: 44px; }                        /* descriptor lockup, 304px wide */
  .kicker { display: none; }                                        /* header already says it */
  .hero .slot-photo img { max-height: min(70vh, calc(100vh - 30rem)); }         /* taller descriptor header: keep quote button above the fold */
}

/* Viewfinder corners (brand-guide.md): home hero and Work-index category covers only, never gallery grids.
   Home cards have no photos, so .cards .slot-photo only matches the covers on work/index.html. */
.hero .slot-photo, .cards .slot-photo { position: relative; container-type: inline-size; }
.hero .slot-photo::after, .cards .slot-photo::after, .hero-video .hero-media::after {
  content: ""; position: absolute; pointer-events: none;
  --c: var(--cream);
  --i: clamp(12px, 3.33cqi, 40px);          /* inset  = 5% of short side */
  --l: clamp(18px, 5.33cqi, 64px);          /* arm    = 8% of short side */
  --w: max(1.5px, .17cqi);                  /* stroke = 0.25% of short side, min 1.5px */
  inset: var(--i);
  background:
    linear-gradient(var(--c) 0 0) top left     / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) top left     / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) top right    / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) top right    / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) bottom left  / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) bottom left  / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) bottom right / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}
/* Hero background video: ONE layer at a time. Either the <video> (its own poster attribute shows while it loads)
   or the poster-only fallback <picture> (no JS, reduced motion, Save-Data, autoplay refused, error). Never both. */
.hero-video { position: relative; overflow: hidden; margin: 1rem 0 1.5rem; background: var(--fir); color: var(--cream);
  container-type: inline-size; display: flex; align-items: flex-end;
  height: clamp(30rem, calc(100vh - 13rem), 38rem); height: clamp(30rem, calc(100svh - 13rem), 38rem); }
.hero-video .hero-media { position: absolute; inset: 0; }
.hero-video .hero-media img, .hero-video .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%;
  max-height: none; min-height: 0; object-fit: cover; z-index: 0; }
.hero-video .hero-media [hidden] { display: none !important; }
/* The video is the star: no full-frame scrim. The short headline + button sit in a small translucent Deep Fir
   panel tucked inside the bottom-left viewfinder corner (bottom on phones); the rest of the frame is undarkened.
   Panel at .76 keeps cream text above 4.5:1 even over pure white (worst case 5.1:1). */
.hero-video .hero-media::after { z-index: 2; }
.hero-content { position: relative; z-index: 3; max-width: 31rem; box-sizing: border-box;
  --gap: calc(clamp(12px, 3.33cqi, 40px) + clamp(12px, 2cqi, 24px));      /* corner inset + a little air */
  margin: 0 0 var(--gap) var(--gap); padding: 1.25rem 1.5rem 1.5rem; background: rgba(21,50,42,.76); border-radius: 2px; }
.hero-content h1 { color: var(--cream); margin: 0 0 1rem; font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.12; }
.hero-content .hero-cta { margin: 0; }
.btn-on-dark { background: var(--cream); color: var(--fir); border-color: var(--cream); }           /* fir on cream 12.17:1 */
.btn-on-dark:hover { background: var(--sand); border-color: var(--sand); color: var(--fir); }        /* fir on sand 7.1:1 */
.hero-video :focus-visible { outline-color: var(--cream); }
@media (min-width: 40rem) {
  .hero-video { height: clamp(28rem, calc(100vh - 10rem), 48rem); height: clamp(28rem, calc(100svh - 10rem), 48rem); }
}
@media (min-width: 40rem) and (max-height: 32rem) {   /* landscape phones: keep the quote button above the fold */
  .hero-video { height: max(16rem, calc(100vh - 6.5rem)); height: max(16rem, calc(100svh - 6.5rem)); }
}
@media (max-width: 39.99rem) {
  .hero-video { height: clamp(30rem, calc(100vh - 9.5rem), 46rem); height: clamp(30rem, calc(100svh - 9.5rem), 46rem); }
  .hero-content { max-width: none; width: calc(100% - 2 * var(--gap)); margin-right: var(--gap); padding: 1.1rem 1.25rem 1.25rem; }
  .hero-content .btn { padding: .85rem 1.4rem; }
}
/* Intro moved out of the hero: sits just below it. The kicker shows below 64rem only (the header lockup says it on desktop). */
.home-intro { margin: 0 0 1rem; }
.home-intro .kicker { margin: 0 0 .5rem; }
.home-intro .lead { margin: 0; }
/* Draft placeholders are light (#E8DCC4): use Evergreen corners so they still show */
.hero .slot-photo:has(img.placeholder)::after,
.cards .slot-photo:has(img.placeholder)::after { --c: var(--evergreen); }
