/* =============================================================
   SL Carpentry & Construction — site stylesheet
   Brand: black + white + yellow #F0D000
   ============================================================= */

:root {
  /* palette */
  --ink:        #0a0a0a;
  --ink-soft:   #1c1c1c;
  --ink-60:     rgba(10,10,10,0.60);
  --ink-40:     rgba(10,10,10,0.40);
  --ink-12:     rgba(10,10,10,0.12);
  --ink-06:     rgba(10,10,10,0.06);
  --paper:      #ffffff;
  --paper-soft: #fafafa;
  --paper-warm: #f5f3ee;
  --yellow:     #F0D000;
  --yellow-hi:  #fff47a;
  --yellow-lo:  #F0B812;

  /* type */
  --font-display: "Archivo", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* spacing scale (4px base) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  /* layout */
  --container:   min(100% - 2rem, 1200px);
  --container-narrow: min(100% - 2rem, 820px);

  /* radius + shadow */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 1px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px -8px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 48px -20px rgba(0,0,0,.28);

  /* motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* -------- reset -------- */
*, *::before, *::after { box-sizing: border-box; }
/* Disable double-tap-to-zoom site-wide; pinch-zoom still works. */
html, body, button, a, input, textarea, select, label, .project-card, .project-modal, .project-lightbox { touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;           /* stop horizontal scroll on mobile from off-canvas nav */
  max-width: 100vw;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
/* `<picture>` is layout-transparent — existing CSS targets its inner <img>. */
picture { display: contents; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 var(--sp-4); }
p, ul, ol { margin: 0 0 var(--sp-4); }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: var(--sp-2); }

/* type scale — fluid */
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); letter-spacing: -0.005em; }
h4 { font-size: 1.125rem; letter-spacing: 0; }
.lede { font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem); color: var(--ink-60); max-width: 60ch; }

/* utility: visually hide but keep for screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* -------- focus rings -------- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* -------- container -------- */
.wrap { width: var(--container); margin-inline: auto; }
.wrap-narrow { width: var(--container-narrow); margin-inline: auto; }

/* -------- header -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-12);
  /* NOTE: no backdrop-filter / filter / transform / will-change here.
     Any of those create a containing block and break position:fixed on the
     mobile nav descendant, collapsing it to content height. */
}
.site-header .bar {
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-3) 0;
}
.site-header .logo {
  display: flex; align-items: center;
  text-decoration: none;
}
.site-header .logo img { height: 40px; width: auto; }
@media (max-width: 520px) { .site-header .logo img { height: 34px; } }
.site-header .logo:focus-visible { outline-offset: 6px; }
.nav-primary {
  display: flex; align-items: center; gap: var(--sp-5);
  margin-left: auto;
}
.nav-primary a {
  text-decoration: none; color: var(--ink); font-weight: 500;
  padding: var(--sp-2) 0; position: relative;
}
.nav-primary a[aria-current="page"]::after,
.nav-primary a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px; background: var(--yellow);
}
.nav-primary .cta {
  background: var(--ink); color: var(--paper); padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
}
.nav-primary .cta:hover { background: var(--yellow); color: var(--ink); }
.nav-primary .cta::after { display: none !important; }

.nav-toggle {
  display: none; background: transparent; border: 0; padding: var(--sp-2);
  margin-left: auto;
  color: #0a0a0a;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.nav-toggle svg,
.nav-toggle svg path {
  width: 28px; height: 28px; display: block;
  stroke: #0a0a0a !important;
  fill: none !important;
  opacity: 1 !important;
}

/* mobile nav */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-primary {
    position: fixed;
    top: 64px; right: 0; bottom: 0; left: 0;       /* explicit sides — avoids some Android quirks with inset shorthand */
    width: 100%;
    background: var(--paper);
    flex-direction: column; align-items: stretch;
    padding: var(--sp-5);
    transform: translateX(100%); transition: transform .25s var(--ease);
    margin-left: 0;
    visibility: hidden;                             /* belt-and-braces: fully hidden from a11y + rendering when closed */
  }
  body.nav-open .nav-primary { transform: translateX(0); visibility: visible; }
  .nav-primary a { font-size: 1.25rem; padding: var(--sp-4) var(--sp-2); border-bottom: 1px solid var(--ink-12); }
  body.nav-open { overflow: hidden; }
}

/* -------- hero -------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid; gap: var(--sp-6);
  grid-template-columns: 1fr;
  padding: var(--sp-9) 0 var(--sp-8);
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: center; padding: var(--sp-10) 0; }
}
.hero-kicker {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  font-size: 0.8rem;
  background: var(--yellow); color: var(--ink);
  padding: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-5);
  border-radius: var(--r-sm);
}
.hero h1 { color: var(--paper); }
.hero .lede { color: rgba(255,255,255,.78); max-width: 42ch; margin-bottom: var(--sp-6); font-size: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.hero-proof { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-top: var(--sp-7); color: rgba(255,255,255,.7); font-size: .9rem; }
.hero-proof strong { display: block; color: var(--yellow); font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }

.hero-figure {
  position: relative; aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-figure .tag {
  position: absolute; left: var(--sp-4); bottom: var(--sp-4);
  background: var(--yellow); color: var(--ink);
  padding: var(--sp-2) var(--sp-3); font-size: .8rem; font-weight: 600;
  border-radius: var(--r-sm);
}

/* -------- banner hero (secondary pages) -------- */
.hero-banner {
  position: relative;
  min-height: clamp(360px, 56vh, 540px);
  background-color: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-banner img.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero-banner::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.82) 100%),
    linear-gradient(90deg, rgba(0,0,0,.50) 0%, rgba(0,0,0,0) 55%);
  pointer-events: none;
}
.hero-banner > .wrap { position: relative; z-index: 2; padding: var(--sp-9) 0 var(--sp-7); width: var(--container); max-width: 900px; margin-inline: auto; }
@media (max-width: 720px) {
  .hero-banner { align-items: center; min-height: clamp(340px, 58vh, 460px); }
  .hero-banner > .wrap { padding: var(--sp-6) 0; }
}
.hero-banner .hero-kicker {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  font-size: 0.8rem;
  background: var(--yellow); color: var(--ink);
  padding: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-4);
  border-radius: var(--r-sm);
}
.hero-banner h1 {
  color: var(--paper);
  max-width: 20ch;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
  margin-bottom: var(--sp-4);
}
.hero-banner .lede {
  color: rgba(255,255,255,.92);
  max-width: 48ch; font-size: 1.2rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.35);
  margin-bottom: var(--sp-5);
}
.hero-banner .hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero-banner .tag {
  position: absolute; right: var(--sp-5); bottom: var(--sp-5); z-index: 2;
  background: var(--yellow); color: var(--ink);
  padding: var(--sp-2) var(--sp-3); font-size: .8rem; font-weight: 600;
  border-radius: var(--r-sm);
}
@media (max-width: 720px) { .hero-banner .tag { display: none; } }

/* crumbs sitting on a dark banner below */
.hero-banner + .crumbs,
.crumbs.on-dark { background: var(--paper); }

/* -------- sections -------- */
section { padding: var(--sp-9) 0; }
@media (max-width: 720px) { section { padding: var(--sp-8) 0; } }
.section-head { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); align-items: end; margin-bottom: var(--sp-7); }
@media (min-width: 900px) { .section-head { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
.section-head .eyebrow {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--yellow-lo); font-size: .8rem; margin-bottom: var(--sp-2);
}
.section-head h2 { margin: 0; max-width: 18ch; }
.section-head .desc { color: var(--ink-60); max-width: 48ch; margin: 0; }

.alt { background: var(--paper-warm); }
.dark { background: var(--ink); color: var(--paper); }
.dark h2, .dark h3 { color: var(--paper); }
.dark .desc { color: rgba(255,255,255,.7); }
.dark .eyebrow { color: var(--yellow); }

/* -------- answer block (AI-SEO: 40–60 word direct answer near top) -------- */
.answer {
  background: var(--paper-warm);
  border-left: 4px solid var(--yellow);
  padding: var(--sp-4) var(--sp-5);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 1.05rem;
  max-width: 72ch;
  margin-inline: auto;
}
.answer p { margin: 0; }

/* -------- buttons -------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-weight: 600; text-decoration: none;
  border-radius: var(--r-md); border: 2px solid transparent;
  transition: background .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--yellow-hi); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: var(--yellow); color: var(--yellow); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* -------- service grid -------- */
.services-grid {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  position: relative; background: var(--paper); border: 1px solid var(--ink-12);
  border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--ink-40); }
.service-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--ink-06); }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.service-card:hover .thumb img { transform: scale(1.04); }
.service-card .body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.service-card h3 { margin: 0; }
.service-card p { margin: 0; color: var(--ink-60); font-size: .95rem; }
.service-card .more { margin-top: auto; font-weight: 700; color: var(--ink); display: inline-flex; gap: var(--sp-1); align-items: center; }
.service-card .more::after { content: "→"; transition: transform .15s var(--ease); }
.service-card:hover .more::after { transform: translateX(3px); }

/* -------- portfolio grid -------- */
.portfolio-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.portfolio-item {
  position: relative; overflow: hidden; border-radius: var(--r-md);
  background: var(--ink-06);
  aspect-ratio: 4 / 3;
}
/* legacy class no-ops — kept to avoid HTML churn */
.portfolio-item.tall, .portfolio-item.wide { aspect-ratio: 4 / 3; grid-column: auto; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-item figcaption {
  position: absolute; inset: auto 0 0; padding: var(--sp-4);
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
  color: var(--paper); font-size: .9rem;
}
.portfolio-item figcaption strong { display: block; color: var(--yellow); font-family: var(--font-display); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: .75rem; margin-bottom: 2px; }

/* -------- filters (portfolio) -------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.filters button {
  background: var(--paper); border: 1px solid var(--ink-12);
  padding: var(--sp-2) var(--sp-4); border-radius: 999px;
  font-weight: 500; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* -------- feature row (alternating image+text) -------- */
.feature {
  display: grid; gap: var(--sp-6);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--sp-8); }
  .feature.reverse > figure { order: 2; }
}
.feature figure { margin: 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 5/4; box-shadow: var(--shadow-md); }
.feature figure img { width: 100%; height: 100%; object-fit: cover; }
.feature ul { padding-left: 1.25em; }
.feature ul li { margin-bottom: var(--sp-2); }

/* -------- stat strip -------- */
.stats {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  text-align: left;
}
.stat {
  padding: var(--sp-5);
  background: var(--paper); border-radius: var(--r-md);
  border: 1px solid var(--ink-12);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 140px;
}
.dark .stat { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.stat strong {
  display: block;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem);
  color: var(--yellow-lo); line-height: 1.1;
  margin-bottom: var(--sp-2);
}
.dark .stat strong { color: var(--yellow); }
.stat span { font-size: .95rem; color: var(--ink-60); line-height: 1.3; }
.dark .stat span { color: rgba(255,255,255,.7); }

/* -------- process steps -------- */
.steps { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { position: relative; padding: var(--sp-5); background: var(--paper); border: 1px solid var(--ink-12); border-radius: var(--r-md); counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--yellow);
  line-height: 1;
}
.step h3 { font-size: 1.1rem; margin: 0 0 var(--sp-2); padding-right: 3rem; }
.step p { color: var(--ink-60); font-size: .95rem; margin: 0; }

/* -------- testimonial / quote -------- */
.quote { max-width: 60ch; margin-inline: auto; text-align: center; }
.quote blockquote {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  line-height: 1.3; margin: 0 0 var(--sp-4); letter-spacing: -.01em;
}
.quote cite { color: var(--ink-60); font-style: normal; font-size: .95rem; }

/* -------- areas list (tag-style, size-to-content) -------- */
.areas { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.areas a {
  display: inline-flex; align-items: center;
  padding: var(--sp-2) var(--sp-4);
  background: var(--paper); border: 1px solid var(--ink-12);
  text-decoration: none; border-radius: 999px;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  font-weight: 500; font-size: .95rem; white-space: nowrap;
}
.areas a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

/* -------- FAQ -------- */
.faq details {
  border-top: 1px solid var(--ink-12);
  padding: var(--sp-4) 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--ink-12); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: var(--sp-4);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 800; color: var(--yellow-lo); transition: transform .15s var(--ease);
  font-size: 1.5rem; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: var(--sp-3) 0 0; color: var(--ink-60); max-width: 70ch; }

/* -------- CTA banner -------- */
.cta-banner {
  background: var(--ink); color: var(--paper);
  padding: var(--sp-8) 0; text-align: center;
  border-top: 4px solid var(--yellow);
}
.cta-banner h2 { max-width: 22ch; margin-inline: auto; }
.cta-banner p { color: rgba(255,255,255,.75); max-width: 52ch; margin: 0 auto var(--sp-5); }
.cta-banner .hero-actions { justify-content: center; }

/* -------- contact form -------- */
.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: span 2; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: span 1; } }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label { font-weight: 600; font-size: .95rem; }
.field label .req { color: var(--yellow-lo); }
.field input, .field textarea, .field select {
  font: inherit; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  border: 1.5px solid var(--ink-12); background: var(--paper);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(240,208,0,.4);
}
.field textarea { resize: vertical; min-height: 140px; }
.field-help { font-size: .85rem; color: var(--ink-60); margin-top: var(--sp-1); }
.form-status { padding: var(--sp-4); border-radius: var(--r-md); font-size: .95rem; margin-bottom: var(--sp-4); display: none; }
.form-status.success { display: block; background: #e8f7ec; border-left: 4px solid #1b8a3a; }
.form-status.error   { display: block; background: #fde8e8; border-left: 4px solid #b42020; }

/* -------- footer -------- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,.72);
  padding: var(--sp-8) 0 var(--sp-5); font-size: .95rem;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer-grid {
  display: grid; gap: var(--sp-7);
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  padding-bottom: var(--sp-6); border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: var(--paper); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.site-footer .logo img { height: 38px; width: auto; margin-bottom: var(--sp-4); display: block; max-width: 100%; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 var(--sp-2); }
.social-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease);
}
.social-row a:hover { background: var(--yellow); color: var(--ink); }
.social-row svg { width: 18px; height: 18px; }
.bottom-bar {
  display: flex; justify-content: space-between; gap: var(--sp-4);
  flex-wrap: wrap; padding-top: var(--sp-5); font-size: .85rem;
}

/* -------- breadcrumbs -------- */
.crumbs { padding: var(--sp-4) 0; font-size: .9rem; color: var(--ink-60); line-height: 1.3; }
/* Breadcrumbs sitting directly under a full-bleed hero get a tight visual seam + subtle separator */
.hero-banner + .crumbs { padding: var(--sp-4) 0; border-bottom: 1px solid var(--ink-12); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; }
.crumbs li { display: inline-flex; align-items: baseline; gap: var(--sp-2); }
.crumbs li + li::before { content: "/"; color: var(--ink-40); }
.crumbs a { color: var(--ink-60); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* -------- table of contents / prose -------- */
.prose { max-width: 65ch; margin-inline: auto; }
.prose p, .prose li { font-size: 1.05rem; line-height: 1.7; }
.prose h2 { margin-top: var(--sp-7); }
.prose h3 { margin-top: var(--sp-6); }
.prose ul li, .prose ol li { margin-bottom: var(--sp-2); }

/* -------- small helpers -------- */
.muted { color: var(--ink-60); }
.mb-0 { margin-bottom: 0 !important; }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.center { text-align: center; }

/* -------- footer email wrap fix -------- */
.site-footer .contact-email { overflow-wrap: anywhere; word-break: break-word; display: inline-block; }

/* -------- lightbox -------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.93);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
  opacity: 0; transition: opacity .2s var(--ease);
}
.lightbox[hidden] { display: none !important; }
.lightbox[aria-hidden="true"] { pointer-events: none; }
.lightbox[aria-hidden="false"] { opacity: 1; }
.lightbox img {
  max-width: 92vw; max-height: 82vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-caption {
  position: absolute; left: 0; right: 0; bottom: 24px;
  text-align: center; color: rgba(255,255,255,.92);
  font-size: .95rem; margin: 0;
  padding: 0 var(--sp-6);
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  background: transparent; border: 0;
  width: 48px; height: 48px; border-radius: 999px;
  color: #fff; font-size: 2rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.12); }
.portfolio-item { cursor: zoom-in; }

/* ========================================================================= */
/*  Project portfolio (cards + modal)                                         */
/* ========================================================================= */

/* -------- project-card grid -------- */
.projects-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 440px) {
  .projects-grid { grid-template-columns: 1fr; }
}
@media (min-width: 720px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
}
@media (min-width: 1200px) {
  .projects-grid { grid-template-columns: repeat(4, 1fr); }
}
.project-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--ink-06);
  padding: 0; border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.06);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  display: block;
}
.project-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08), 0 18px 40px rgba(0,0,0,.12); }
.project-card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.project-cover {
  display: block; position: relative; aspect-ratio: 4/3; overflow: hidden;
  background: var(--ink-06);
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.project-card:hover .project-cover img { transform: scale(1.04); }
.project-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  background: linear-gradient(to top, rgba(0,0,0,.85) 10%, rgba(0,0,0,.45) 55%, transparent 100%);
  color: var(--paper);
  display: block;
}
.project-title {
  display: block;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em;
  font-size: 1rem; line-height: 1.25;
  color: var(--paper);
  margin-bottom: 2px;
}
.project-blurb {
  display: block;
  font-size: .78rem; line-height: 1.4;
  color: rgba(255,255,255,.78);
}
.project-count {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  background: rgba(10,10,10,.75); color: var(--yellow);
  font-family: var(--font-display); font-weight: 700;
  font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* -------- project modal shell -------- */
.project-modal {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.project-modal[hidden] { display: none !important; }
.project-modal[data-open="true"] { opacity: 1; }
.project-modal-scrim {
  position: absolute; inset: 0;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.project-modal-panel {
  position: relative;
  width: min(1280px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: var(--paper);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
}
.project-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 2px solid #0a0a0a;
  -webkit-appearance: none;
  appearance: none;
  background-color: #F0D000;
  color: #0a0a0a;
  font-family: var(--font-display); font-weight: 800;
  font-size: .85rem; letter-spacing: .05em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.project-modal-close:hover { background-color: #fff47a; transform: scale(1.04); }
.project-modal-close svg { width: 20px; height: 20px; flex: 0 0 auto; stroke: #0a0a0a; }
.project-modal-close-label { display: inline; color: #0a0a0a; }

.project-modal-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
/* All direct/nested grid descendants need min-width:0 so no single intrinsic
   child (e.g. the horizontal thumbnail row) can force the grid track wider
   than its parent container. */
.project-modal-gallery,
.project-modal-info,
.project-modal-stage,
.project-modal-description,
.project-modal-thumbs { min-width: 0; }
.project-modal-thumbs { max-width: 100%; box-sizing: border-box; }

/* gallery area */
.project-modal-gallery {
  display: flex; flex-direction: column;
  background: #111;
  min-height: 0;
}
.project-modal-stage {
  position: relative;
  margin: 0;
  flex: 1 1 auto;
  min-height: 260px;
  overflow: hidden;
}
.project-modal-stage img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.project-modal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px;
  background: rgba(255,255,255,.88); color: var(--ink); border: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background .15s var(--ease), transform .15s var(--ease);
  z-index: 2;
}
.project-modal-nav:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.project-modal-nav.prev { left: 12px; }
.project-modal-nav.next { right: 12px; }
.project-modal-caption {
  position: absolute; left: 0; right: 0; bottom: 8px;
  text-align: center;
  pointer-events: none;
}
.project-modal-counter {
  display: inline-block;
  background: rgba(10,10,10,.65);
  color: #fff;
  font-size: .75rem; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.project-modal-thumbs {
  display: flex; gap: 6px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  background: #0a0a0a;
  scroll-snap-type: x proximity;
}
.project-modal-thumbs::-webkit-scrollbar { height: 6px; }
.project-modal-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.project-modal-thumbs button {
  flex: 0 0 auto;
  width: 68px; height: 52px;
  padding: 0; border: 2px solid transparent; border-radius: 6px;
  background: transparent; cursor: pointer;
  overflow: hidden;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
  scroll-snap-align: start;
}
.project-modal-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-modal-thumbs button:hover { transform: translateY(-1px); }
.project-modal-thumbs button[aria-current="true"] { border-color: var(--yellow); }

/* info side */
.project-modal-info {
  padding: var(--sp-5);
  overflow-y: auto;
  background: var(--paper);
  min-height: 0;
}
.project-modal-kicker {
  font-family: var(--font-display); font-weight: 700;
  color: var(--yellow-lo);
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.project-modal-info h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  margin: 0 0 var(--sp-2);
}
.project-modal-meta {
  color: var(--ink-60);
  font-size: .9rem;
  margin: 0 0 var(--sp-4);
}
.project-modal-description p { margin: 0 0 var(--sp-3); line-height: 1.6; }
.project-modal-description p:last-child { margin-bottom: var(--sp-5); }
.project-modal-scope-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: var(--sp-2);
}
.project-modal-scope ul {
  list-style: none; padding: 0; margin: 0 0 var(--sp-5);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project-modal-scope ul li {
  background: var(--ink-06);
  color: var(--ink);
  font-size: .78rem;
  padding: 5px 10px; border-radius: 999px;
  margin: 0;
}
.project-modal-scope ul li + li { margin-top: 0; }
.project-modal-cta { margin-top: var(--sp-4); }

/* -------- desktop layout -------- */
@media (min-width: 960px) {
  .project-modal-content {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    min-height: 520px;
  }
  .project-modal-stage { min-height: 520px; }
  .project-modal-panel { max-height: min(92vh, 900px); }
  .project-modal-info { padding: var(--sp-6) var(--sp-6) var(--sp-6); }
}

/* ---------------- Fullscreen image lightbox (second layer) ---------------- */
.project-lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.project-lightbox[hidden] { display: none !important; }
.project-lightbox[data-open="true"] { opacity: 1; }
.project-lightbox-scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.94);
  cursor: zoom-out;
}
.project-lightbox-stage {
  position: relative; margin: 0;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 56px;           /* room for nav + close */
  box-sizing: border-box;
  pointer-events: none;          /* let swipes / taps reach img + scrim */
}
.project-lightbox-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  pointer-events: auto;
}
.project-lightbox-close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0) + 16px);
  right: 16px;
  height: 44px;
  padding: 0 16px 0 12px;
  border: 2px solid #0a0a0a;
  -webkit-appearance: none; appearance: none;
  background-color: #F0D000;
  color: #0a0a0a;
  font-family: var(--font-display); font-weight: 800;
  font-size: .85rem; letter-spacing: .05em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  z-index: 2;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.project-lightbox-close:hover { background-color: #fff47a; transform: scale(1.04); }
.project-lightbox-close svg { width: 20px; height: 20px; stroke: #0a0a0a; }
.project-lightbox-nav {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 999px;
  border: 0;
  -webkit-appearance: none; appearance: none;
  background-color: rgba(255,255,255,0.92);
  color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  z-index: 2;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.project-lightbox-nav:hover { background-color: #fff; transform: translateY(-50%) scale(1.05); }
.project-lightbox-nav.prev { left: 16px; }
.project-lightbox-nav.next { right: 16px; }
.project-lightbox-counter {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0) + 16px);
  left: 50%; transform: translateX(-50%);
  background: rgba(10,10,10,0.7);
  color: #fff;
  font-size: .8rem; letter-spacing: .08em;
  padding: 6px 14px; border-radius: 999px;
  backdrop-filter: blur(6px);
  z-index: 2;
}

@media (max-width: 600px) {
  .project-lightbox-stage { padding: 72px 12px; }
  .project-lightbox-nav { width: 44px; height: 44px; }
  .project-lightbox-nav.prev { left: 8px; }
  .project-lightbox-nav.next { right: 8px; }
}

/* -------- mobile layout -------- */
@media (max-width: 959px) {
  .project-modal-panel {
    width: 100vw;
    height: 100vh;            /* fallback */
    height: 100dvh;           /* dynamic viewport — accounts for iOS URL bar */
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .project-modal-content {
    grid-template-rows: min-content auto;
    overflow-y: auto;
    max-height: none;
    height: 100%;
  }
  .project-modal-gallery { position: sticky; top: 0; z-index: 1; }
  .project-modal-stage {
    /* Replace vh-based sizing with aspect ratio so the stage is compact
       and consistent regardless of the image's natural aspect. */
    min-height: 0;
    aspect-ratio: 4 / 3;
    max-height: 45vh;
  }
  .project-modal-info {
    padding: var(--sp-4) var(--sp-5);
  }
  /* Close button: always visible, clear of iOS notch, high-contrast against
     any image behind it, and tappable target ≥ 48px. */
  .project-modal-close {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0) + 12px);
    right: 12px;
    height: 48px;
    padding: 0 18px 0 14px;
    background-color: #F0D000;
    color: #0a0a0a;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 10;
  }
  .project-modal-close:hover { background-color: #fff47a; }
  .project-modal-nav { width: 40px; height: 40px; }
  .project-modal-thumbs { padding: 6px 8px; }
  .project-modal-thumbs button { width: 60px; height: 46px; }
}

/* -------- cookie banner -------- */
.cookie-banner {
  position: fixed; bottom: 16px; left: 50%; z-index: 100;
  width: calc(100% - 32px);
  max-width: 680px;
  box-sizing: border-box;
  background: var(--ink); color: var(--paper);
  border-radius: var(--r-lg); border-top: 3px solid var(--yellow);
  box-shadow: 0 16px 36px -8px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.2);
  padding: var(--sp-5) var(--sp-5);
  transform: translate(-50%, calc(100% + 24px));
  transition: transform .32s var(--ease);
}
.cookie-banner[data-open="true"] { transform: translate(-50%, 0); }
.cookie-banner h2 {
  font-family: var(--font-display); font-size: 1.05rem;
  margin: 0 0 var(--sp-2); color: var(--paper);
}
.cookie-banner p { margin: 0 0 var(--sp-4); color: rgba(255,255,255,.82); font-size: .92rem; line-height: 1.55; }
.cookie-banner p a { color: var(--yellow); }
.cookie-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.cookie-actions button {
  flex: 1 1 auto;
  padding: var(--sp-3) var(--sp-4);
  border: 0; border-radius: var(--r-md);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.cookie-actions .btn-accept { background: var(--yellow); color: var(--ink); }
.cookie-actions .btn-accept:hover { background: var(--yellow-hi); }
.cookie-actions .btn-reject { background: transparent; color: var(--paper); border: 1.5px solid rgba(255,255,255,.25); }
.cookie-actions .btn-reject:hover { border-color: var(--yellow); color: var(--yellow); }
@media (max-width: 480px) { .cookie-actions { flex-direction: column; } }

/* -------- reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
