/* Eli Landsman Designs — site styles */

/* Open Sauce Sans (SIL OFL), self-hosted. build.py appends a ?v= content hash to these URLs. */
@font-face {
  font-family: "Open Sauce Sans";
  src: url("/assets/fonts/open-sauce-sans-300.woff2?v=d5b87f65") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Open Sauce Sans";
  src: url("/assets/fonts/open-sauce-sans-400.woff2?v=7b4bdf64") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Open Sauce Sans";
  src: url("/assets/fonts/open-sauce-sans-500.woff2?v=f7c09d7f") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Open Sauce Sans";
  src: url("/assets/fonts/open-sauce-sans-700.woff2?v=93aadac7") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f8fbfc;
  --surface: #ffffff;
  --tint: #edf4f7;
  --line: #d6e4ea;
  --sky: #a9cbd6;
  --ink: #426d7d;
  --ink-soft: #5d8090;
  --muted: #8ea6b0;
  --deep: #074151;
  --accent: #035772;
  --on-deep: #ffffff;
  --on-deep-soft: #c9dde4;

  --font: "Open Sauce Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --radius: 22px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --header-h: 76px;
  --shadow: 0 1px 2px rgb(7 65 81 / 0.06), 0 8px 28px rgb(7 65 81 / 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, svg, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }
strong { font-weight: 700; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--deep);
  color: var(--on-deep);
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-deep); }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(248 251 252 / 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}
.brand {
  display: block;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand svg { width: clamp(170px, 18vw, 250px); height: auto; }
.brand:hover { color: var(--deep); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 24px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.nav-list,
.subnav { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; align-items: center; gap: clamp(8px, 1.6vw, 28px); }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  color: var(--muted);
  font-size: 1.125rem;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover,
.nav-item:focus-within > .nav-link,
.nav-link[aria-current="page"],
.nav-link.is-section { color: var(--ink); }
.nav-link .chev { width: 10px; height: 10px; transition: transform 0.2s; }
.subnav {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 230px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav-item:hover > .subnav,
.nav-item:focus-within > .subnav,
.nav-item.is-open > .subnav {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.nav-item:last-child > .subnav { left: auto; right: -10px; transform: translate(0, 6px); }
.nav-item:last-child:hover > .subnav,
.nav-item:last-child:focus-within > .subnav { transform: none; }
.nav-item:hover > .nav-link .chev,
.nav-item.is-open > .nav-link .chev { transform: rotate(180deg); }
.subnav a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.subnav a:hover,
.subnav a[aria-current="page"] { background: var(--tint); color: var(--deep); }

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgb(7 65 81 / 0.12);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-item:last-child { border-bottom: 0; }
  .nav-link { width: 100%; padding: 14px 0; font-size: 1.25rem; color: var(--ink); }
  .nav-link .chev { display: none; }
  .subnav,
  .nav-item:hover > .subnav,
  .nav-item:focus-within > .subnav {
    position: static;
    min-width: 0;
    padding: 0 0 12px;
    border: 0;
    box-shadow: none;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .subnav a { padding: 8px 0 8px 14px; color: var(--ink-soft); white-space: normal; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  border: 2px solid var(--deep);
  border-radius: 999px;
  background: var(--deep);
  color: var(--on-deep);
  font: 500 1.0625rem/1 var(--font);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-deep); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--on-deep); }
.btn-light { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); }
.btn-light:hover { background: transparent; color: var(--on-deep); border-color: var(--on-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Generic sections ---------- */
main { display: block; }
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-tight { padding-block: clamp(36px, 5vw, 64px); }
.section + .section { padding-top: 0; }
.eyebrow {
  margin: 0 0 0.6em;
  color: var(--muted);
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem);
  font-weight: 300;
  line-height: 1.55;
}
.prose { max-width: 68ch; }
.prose h3 { margin-top: 1.6em; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 0.25em; }
.prose li::marker { color: var(--sky); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Breadcrumbs */
.breadcrumbs { padding-top: 22px; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--sky); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); }

/* ---------- Home hero ---------- */
.home-hero h1 {
  font-weight: 300;
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.home-hero h1 strong { font-weight: 700; }
.home-hero h1 .hero-sub {
  display: block;
  margin-top: 0.22em;
  font-size: 0.5em;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.home-hero .eyebrow { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); letter-spacing: 0.02em; margin-bottom: 0.2em; }
.home-hero .lead { margin-top: 1.1em; margin-bottom: 1.8em; font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem); }
.portrait {
  position: relative;
  justify-self: center;
  width: min(100%, 470px);
  aspect-ratio: 1;
  padding: clamp(12px, 1.6vw, 20px);
  border-radius: 50%;
  background: linear-gradient(135deg, #a9cbd6 0%, #6f97a6 40%, #426d7d 70%, #2c5868 100%);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #f0f0f0;
}
.hero-tagline { margin-top: 2.2em; color: var(--muted); font-size: 0.85rem; line-height: 1.4; }

/* ---------- Showcase carousel ---------- */
.showcase { position: relative; padding-bottom: clamp(8px, 2vw, 24px); }
.showcase + .section { padding-top: clamp(48px, 6vw, 88px); }
.showcase-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.showcase-head h2 { margin: 0; }
.carousel-controls { display: flex; gap: 10px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--accent); color: var(--on-deep); }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: transparent; color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 24vw, 316px);
  gap: clamp(14px, 2vw, 24px);
  margin: 0;
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
  padding: 4px var(--edge) 18px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: thin;
  scrollbar-color: var(--sky) transparent;
}
.track > li { scroll-snap-align: start; }
.tile {
  position: relative;
  display: block;
  aspect-ratio: 316 / 600;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tint);
  box-shadow: var(--shadow);
  color: var(--on-deep);
  text-decoration: none;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.tile:hover img { transform: scale(1.04); }
.tile-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 48px 18px 16px;
  background: linear-gradient(to top, rgb(4 40 51 / 0.82), transparent);
  font-weight: 500;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}
.tile-label small { display: block; color: var(--on-deep-soft); font-weight: 400; font-size: 0.85rem; }
.tile:hover .tile-label,
.tile:focus-visible .tile-label { opacity: 1; transform: none; }
@media (hover: none) { .tile-label { opacity: 1; transform: none; } }

/* ---------- Work cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.card:hover { color: var(--ink); border-color: var(--sky); box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }
.card-body h3 { margin-bottom: 0.35em; }
.card-body p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
}
.card-more svg { width: 14px; height: 14px; transition: transform 0.2s; }
.card:hover .card-more svg { transform: translateX(3px); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(20px, 4vw, 48px) clamp(40px, 6vw, 80px); }
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.page-hero h1 { margin-bottom: 0.35em; }
.page-hero .lead { margin: 0; }
.page-hero-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .page-hero-grid { grid-template-columns: 1fr; } }

/* ---------- Project / case study ---------- */
.project {
  padding-block: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
.project-head { margin-bottom: clamp(24px, 4vw, 44px); }
.project-head h2 { margin-bottom: 0.2em; }
.project-kicker { margin: 0; color: var(--muted); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
}
.split.media-wide { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.split + .split,
.split + .gallery,
.gallery + .split,
.gallery + .gallery,
.split + .video-row,
.video-row + .split { margin-top: clamp(32px, 5vw, 64px); }
.split.reverse > :first-child { order: 2; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 860px) {
  .split, .split.media-wide { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .sticky-col { position: static; }
}
.figure { margin: 0; }
.figure img,
.figure video {
  width: 100%;
  border-radius: var(--radius-sm);
}
.figure.framed img { box-shadow: var(--shadow); }
.figure figcaption { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.2em; padding: 0; list-style: none; }
.pill-list li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.92rem;
}
.callout {
  margin: 1.4em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--sky);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--tint);
}
.callout > :last-child { margin-bottom: 0; }
.label {
  display: block;
  margin-bottom: 0.25em;
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Galleries ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 260px)), 1fr));
  gap: clamp(12px, 1.8vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery.cols-2 { --min: 420px; }
.gallery.cols-3 { --min: 300px; }
.gallery.cols-4 { --min: 180px; }
.gallery.cols-6 { --min: 130px; }
.gallery.masonry {
  display: block;
  columns: var(--cols, 3) 260px;
  column-gap: clamp(12px, 1.8vw, 20px);
}
.gallery.masonry > li { break-inside: avoid; margin-bottom: clamp(12px, 1.8vw, 20px); }
.gallery.stack { grid-template-columns: 1fr; }
.gallery.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--tint);
  cursor: zoom-in;
}
.zoom img { width: 100%; transition: transform 0.4s ease, opacity 0.2s; }
.zoom:hover img { transform: scale(1.025); }
.gallery.fit .zoom { aspect-ratio: var(--ratio, 4 / 3); display: grid; place-items: center; }
.gallery.fit .zoom img { width: 100%; height: 100%; object-fit: contain; }
.gallery figcaption { padding: 10px 2px 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.45; }
.gallery figcaption strong { display: block; color: var(--ink); font-size: 1rem; }
.gallery figure { margin: 0; }

/* Lightbox */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(4 30 38 / 0.94);
  color: var(--on-deep);
}
.lightbox::backdrop { background: rgb(4 30 38 / 0.6); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox-stage { display: grid; place-items: center; min-height: 0; padding: 64px 16px 8px; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox-stage img.bg-light,
.lightbox-stage img.bg-studio { padding: clamp(12px, 3vw, 36px); border-radius: 14px; }
.lightbox-caption { padding: 8px 24px 20px; text-align: center; color: var(--on-deep-soft); font-size: 0.95rem; }
.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: var(--on-deep);
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgb(255 255 255 / 0.24); }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox svg { width: 20px; height: 20px; }

/* ---------- Video ---------- */
.video-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(16px, 2.4vw, 28px);
}
.video-row .figure { flex: 1 1 200px; max-width: 420px; }
.video-row .figure.portrait-9x16 { flex: 0.8 1 170px; max-width: 320px; }
.figure video { background: #000; box-shadow: var(--shadow); }

/* ---------- Embeds (click to load) ---------- */
.embed {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--deep) center / cover no-repeat;
  box-shadow: var(--shadow);
  aspect-ratio: var(--ratio, 16 / 9);
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-launch {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  width: 100%;
  padding: 24px;
  border: 0;
  background: linear-gradient(160deg, rgb(7 65 81 / 0.55), rgb(4 30 38 / 0.85));
  color: var(--on-deep);
  font: 500 1.1rem/1.3 var(--font);
  text-align: center;
  cursor: pointer;
}
div.embed-launch { cursor: default; }
.embed-launch .play {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--on-deep);
  color: var(--deep);
  transition: transform 0.2s;
}
.embed-launch:hover .play { transform: scale(1.08); }
.embed-launch .play svg { width: 28px; height: 28px; margin-left: 4px; }
.embed-launch small { color: var(--on-deep-soft); font-weight: 400; font-size: 0.9rem; }

.sprite-row { display: flex; flex-wrap: wrap; align-items: end; gap: clamp(14px, 3vw, 36px); margin: 0; padding: 0; list-style: none; }
.sprite-row li { display: grid; justify-items: center; gap: 8px; }
.sprite-row img { image-rendering: pixelated; }
.sprite-row span { color: var(--muted); font-size: 0.85rem; }

/* ---------- Services / pricing ---------- */
.pricing-group + .pricing-group { margin-top: clamp(56px, 8vw, 96px); }
.pricing-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.pricing-head img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.pricing-head h3 { margin: 0; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.8rem); }
.pricing-head p { margin: 2px 0 0; color: var(--ink-soft); }
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(16px, 2.4vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.price-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.price-card h4 { margin: 0; font-size: 1.2rem; }
.price { margin: 10px 0 4px; color: var(--deep); font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); font-weight: 700; line-height: 1; }
.price-card .deliverable { margin: 6px 0 14px; color: var(--ink); font-weight: 500; }
.price-card .desc { color: var(--ink-soft); font-size: 0.97rem; }
.checks { margin: 8px 0 22px; padding: 0; list-style: none; }
.checks li { position: relative; padding: 6px 0 6px 30px; border-top: 1px solid var(--tint); font-size: 0.97rem; }
.checks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 12px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23035772' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m4.5 8.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.price-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
}
.about-grid .figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.info-card {
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.info-card h2 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
.info-card p:last-child { margin-bottom: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
.tools li { display: grid; justify-items: center; gap: 6px; width: 76px; text-align: center; font-size: 0.78rem; line-height: 1.25; color: var(--ink-soft); }
.tools img { width: 56px; height: 56px; border-radius: 12px; }
.tool-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; }
.tool-terminal { background: #d97757; color: #fff7f2; }
.tool-icon svg { width: 30px; height: 30px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.92rem; font-weight: 500; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--deep);
  font: 400 1rem/1.4 var(--font);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 3px solid rgb(3 87 114 / 0.25); border-color: var(--accent); }
.form-note { margin: 0; color: var(--muted); font-size: 0.85rem; }
.form-status { margin: 0; font-weight: 500; }
.panel {
  padding: clamp(24px, 3.4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ---------- Pager ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-block: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.pager a {
  display: grid;
  gap: 4px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
}
.pager a:hover { border-color: var(--sky); box-shadow: var(--shadow); }
.pager span { color: var(--muted); font-size: 0.85rem; }
.pager strong { font-size: 1.1rem; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--accent); color: var(--on-deep); }
.site-footer a { color: var(--on-deep); }
.site-footer a:hover { color: var(--on-deep-soft); }
.footer-cta {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 96px);
  padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px);
}
.footer-cta h2 { color: var(--on-deep); }
.footer-cta p { color: var(--on-deep-soft); max-width: 40ch; }
.site-footer .field label { color: var(--on-deep); }
.site-footer .field input,
.site-footer .field textarea { border-color: transparent; }
.site-footer .form-note { color: var(--on-deep-soft); }
.site-footer .form-status { color: var(--on-deep); }
@media (max-width: 860px) { .footer-cta { grid-template-columns: 1fr; } }
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(36px, 5vw, 56px);
  border-top: 1px solid rgb(255 255 255 / 0.22);
}
.footer-brand { display: flex; align-items: flex-start; gap: 18px; }
.footer-brand img { width: 72px; height: 72px; border-radius: 10px; flex: none; }
.footer-brand address { font-style: normal; color: var(--on-deep-soft); font-size: 0.95rem; line-height: 1.6; }
.footer-brand address strong { display: block; color: var(--on-deep); font-size: 1.2rem; font-weight: 500; margin-bottom: 4px; }
.footer-col h2 { margin: 0 0 12px; color: var(--on-deep); font-size: 1rem; font-weight: 500; letter-spacing: 0.02em; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--on-deep-soft); font-size: 0.95rem; text-decoration: none; }
.footer-col a:hover { color: var(--on-deep); text-decoration: underline; }
.social { display: flex; gap: 12px; }
.social a {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--on-deep);
  color: var(--accent);
  transition: transform 0.15s, background 0.15s;
}
.social a:hover { transform: translateY(-2px); background: var(--on-deep-soft); color: var(--deep); }
.social svg { width: 22px; height: 22px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 28px;
  border-top: 1px solid rgb(255 255 255 / 0.22);
  color: var(--on-deep-soft);
  font-size: 0.85rem;
}
@media (max-width: 960px) { .footer-main { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-main { grid-template-columns: 1fr; } }

/* ---------- Misc components ---------- */
h4 { margin: 0 0 0.5em; font-size: 1.1rem; }
.subhead { margin: clamp(32px, 5vw, 56px) 0 18px; }
.project-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; }
.project-head > :not(.client-logo) { flex: 1 1 320px; }
.client-logo { display: block; width: 180px; opacity: 0.8; transition: opacity 0.15s; }
.client-logo:hover { opacity: 1; }
.client-logo img { width: 100%; }
.trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.trio h3 { margin-bottom: 14px; }
.trio .gallery { gap: 14px; }
/* Backdrops for transparent PNG mockups (chosen per image by tools/backdrops.py) */
.bg-light { background: var(--tint); }
.bg-studio { background: radial-gradient(120% 95% at 50% 28%, #f4f8fa 0%, #d5e2e8 58%, #b9ccd5 100%); }
.card-grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.card-media img[src$=".gif"] { object-fit: contain; image-rendering: pixelated; background: var(--tint); padding: 8%; }
.social-light a { background: var(--tint); color: var(--accent); }
.social-light a:hover { background: var(--accent); color: var(--on-deep); }
.contact-list { margin: 1.4em 0 1.6em; font-style: normal; line-height: 1.9; }
.contact-list strong { font-size: 1.15rem; }

/* ---------- 3D hero stages ---------- */
.stage3d {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  isolation: isolate;
}
.stage3d .stage-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.stage3d.is-3d .stage-canvas { opacity: 1; }
.stage-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, transform 0.6s ease, visibility 0s linear 0.6s;
}
.stage-fallback > img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius);
}
.stage3d.is-3d .stage-fallback { opacity: 0; transform: scale(0.94); visibility: hidden; }
.stage3d.pixel .stage-fallback > img { width: 45%; image-rendering: pixelated; border-radius: 0; }
.about-grid .stage3d { aspect-ratio: 1; }
.about-grid .stage-fallback > img { box-shadow: var(--shadow); }

/* ---------- Scroll-pinned character intro (Gregory on the 3D page; driven by scene3d.js) ---------- */
.scrolly-sticky {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) 1.25fr;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
}
.scrolly-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; }
.scrolly-steps h3 { margin: 0 0 0.35em; }
.scrolly-steps p { margin: 0; color: var(--muted); }
.stage-character { aspect-ratio: 4 / 5; max-height: 78vh; }
.stage-character .stage-fallback > img { border-radius: 0; box-shadow: none; }
.stage-character .stage-canvas {   /* feather the edges so the floor shadow doesn't end in a hard line */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.scrolly:not(.is-live) .scrolly-hint { display: none; }
.scrolly.is-live { height: 330vh; }
.scrolly.is-live .scrolly-sticky {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
}
.scrolly.is-live .stage-character { aspect-ratio: auto; height: 100%; max-height: none; }
.scrolly.is-live .scrolly-steps { position: relative; display: block; min-height: 11em; }
.scrolly.is-live .scrolly-steps > li {
  position: absolute;
  inset: 0 0 auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
  visibility: hidden;
}
.scrolly.is-live .scrolly-steps > li.is-on { opacity: 1; transform: none; visibility: visible; }
.scrolly.is-live .scrolly-sticky::after {   /* thin progress line along the bottom */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--deep) calc(var(--p, 0) * 100%), var(--line) 0);
  border-radius: 2px;
}
@media (max-width: 860px) {
  .scrolly-sticky { grid-template-columns: 1fr; }
  .stage-character { max-width: 420px; justify-self: center; width: 100%; }
  .scrolly.is-live { height: 300vh; }
  .scrolly.is-live .scrolly-sticky { grid-template-rows: 1fr auto; align-items: stretch; gap: 8px; padding-bottom: 40px; }
  .scrolly.is-live .stage-character { order: -1; max-width: none; height: auto; min-height: 0; }
  .scrolly.is-live .scrolly-steps { min-height: 8.5em; }
}

/* Full-bleed 3D hero: the scene fills the hero behind the copy and is composed toward the right
   (scene3d.js offsets the camera), so objects can drift and overlap without a hard edge. */
.hero-3d {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 0;
}
.hero-3d-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 82vh, 900px);
  pointer-events: none;
}
.hero-3d-copy {
  position: relative;
  width: min(46%, 600px);
  padding-block: clamp(40px, 6vh, 72px);
  pointer-events: auto;
}
.hero-3d-copy::before {
  content: "";
  position: absolute;
  inset: -18% -26% -18% -45%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(248 251 252 / 0.96), rgb(248 251 252 / 0.82) 55%, rgb(248 251 252 / 0.4) 80%, transparent);
  pointer-events: none;
}
.page-hero.hero-3d h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem); }
.hero-3d > .stage3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  aspect-ratio: auto;
}
.hero-3d .stage-fallback { left: 42%; padding: 7% 4% 7% 2%; }
.hero-3d .stage-canvas { will-change: transform; }
.home-hero .stage-fallback .portrait { width: min(78%, 470px); height: auto; }
@media (max-width: 860px) {
  .hero-3d-inner { display: block; min-height: 0; }
  .hero-3d-copy { width: auto; padding-block: 8px 0; }
  .hero-3d-copy::before { display: none; }
  .hero-3d > .stage3d { position: relative; inset: auto; height: min(108vw, 600px); }
  .hero-3d .stage-fallback { left: 0; padding: 6%; }
  .home-hero .hero-3d-inner { padding-top: 12px; }
}

/* ---------- Scroll-driven 3D reveals (enabled by main.js) ---------- */
.js-3d .scroll-3d {
  --e: var(--enter, 1);
  --ry: -8deg;
  transform-origin: 50% 90%;
  transform:
    perspective(1200px)
    translate3d(0, calc((1 - var(--e)) * 70px), calc((1 - var(--e)) * -150px))
    rotateX(calc((1 - var(--e)) * 18deg))
    rotateY(calc((1 - var(--e)) * var(--ry)));
  opacity: calc(0.08 + var(--e) * 0.92);
  will-change: transform, opacity;
}
.js-3d .scroll-3d.from-right { --ry: 8deg; }
.js-3d .scroll-3d.strong {
  transform-origin: 50% 100%;
  transform:
    perspective(1000px)
    translate3d(0, calc((1 - var(--e)) * 40px), calc((1 - var(--e)) * -220px))
    rotateX(calc((1 - var(--e)) * 58deg))
    rotateZ(calc((1 - var(--e)) * var(--ry) * 0.6));
}
.js-3d .project-head.scroll-3d {
  transform: translate3d(calc((1 - var(--e)) * -40px), 0, 0);
}

/* Pointer tilt with a soft glare on cards, tiles and gallery images */
.tilt {
  transform: perspective(900px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s, border-color 0.2s;
}
.tilt.is-tilting { transition-duration: 0.08s; }
.card.tilt:hover { transform: perspective(900px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)) translateY(-3px); }
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgb(255 255 255 / 0.38), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.tilt:hover::after { opacity: 1; }
.zoom.tilt, .card.tilt, .price-card.tilt { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .js-3d .scroll-3d, .tilt { transform: none !important; opacity: 1 !important; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 55vh; display: grid; align-content: center; justify-items: start; gap: 8px; }
