/* PDC site styles. Colours come from theme.css only. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--brand-ink); text-underline-offset: .18em; }
a:hover { color: var(--brand-ink-hover); }
:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .6em; color: var(--brand-dark); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--paper); padding: .6rem 1rem; z-index: 100; border-radius: var(--radius-sm); }
.skip:focus { left: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--brand-dark) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-light) 22%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: flex; align-items: center; color: var(--brand); text-decoration: none; margin-right: auto; padding: 6px 0; }
.brand svg { height: 56px; width: auto; }   /* the solid logo: the outline one is too fine this small */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  display: block; padding: .55rem .8rem; border-radius: 999px; color: var(--on-dark-muted);
  text-decoration: none; font-weight: 600; font-size: .95rem; transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--on-dark); background: color-mix(in srgb, var(--brand-light) 14%, transparent); }
.site-nav a[aria-current="page"] { color: var(--on-dark); background: color-mix(in srgb, var(--brand-light) 22%, transparent); }
.site-nav .nav-cta a { background: var(--brand-light); color: var(--brand-dark); margin-left: .4rem; }
.site-nav .nav-cta a:hover, .site-nav .nav-cta a[aria-current="page"] { background: var(--on-dark); color: var(--brand-dark); }
.nav-toggle { display: none; }

@media (max-width: 1020px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--brand-light) 40%, transparent); background: transparent;
    color: var(--on-dark); font: 600 .95rem var(--font); cursor: pointer;
  }
  .site-nav {
    position: absolute; inset: 72px 0 auto 0; background: var(--brand-dark);
    border-bottom: 1px solid color-mix(in srgb, var(--brand-light) 22%, transparent);
    display: none; padding: .75rem 1.25rem 1.25rem; box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: .8rem 1rem; font-size: 1.05rem; }
  .site-nav .nav-cta a { margin: .5rem 0 0; text-align: center; }
  .js .site-nav:not(.open) { display: none; }
}
@media (max-width: 1020px) { html:not(.js) .site-nav { display: block; position: static; box-shadow: none; } }

/* ---------- Buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.35rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .2s, color .2s;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-light { background: var(--brand-light); color: var(--brand-dark); }
.btn-light:hover { background: var(--on-dark); color: var(--brand-dark); }
.btn-ghost { border-color: color-mix(in srgb, var(--brand-light) 55%, transparent); color: var(--on-dark); }
.btn-ghost:hover { background: color-mix(in srgb, var(--brand-light) 16%, transparent); color: var(--on-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand-ink); }
.btn-outline:hover { background: var(--brand); color: var(--on-brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips li {
  padding: .4rem .85rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark);
  font-size: .9rem; font-weight: 600; border: 1px solid var(--line);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-ink); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--brand-light); }
.dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--brand-light); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--muted); max-width: 62ch; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-soft { background: var(--soft); }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.dark {
  background:
    radial-gradient(900px 400px at 85% -10%, var(--glow), transparent 70%),
    radial-gradient(700px 380px at -10% 110%, color-mix(in srgb, var(--brand-mid) 55%, transparent), transparent 70%),
    var(--brand-dark);
  color: var(--on-dark);
}
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark .lead, .dark p { color: var(--on-dark-muted); }
.dark a:not(.btn) { color: var(--brand-light); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--brand-light) 35%, transparent) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .45em; }
.hero h1 em { font-style: normal; color: var(--brand-light); }
.hero .lead { color: var(--on-dark-muted); margin-bottom: 2rem; }
.hero-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .6rem; color: var(--on-dark); font-weight: 600; }
.hero-points li { display: flex; gap: .6rem; align-items: center; }
.hero-points .icon { color: var(--brand-light); }
.hero-art { position: relative; }
.hero-art svg { width: 100%; filter: drop-shadow(0 30px 60px rgb(0 0 0 / 35%)); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 560px; } }

/* hero illustration parts (inline SVG, coloured from the theme) */
.art-panel { fill: color-mix(in srgb, var(--brand-dark) 70%, var(--brand-mid)); stroke: color-mix(in srgb, var(--brand-light) 50%, transparent); stroke-width: 1.5; }
.art-panel-door { fill: color-mix(in srgb, var(--brand-dark) 55%, var(--brand-mid)); stroke: color-mix(in srgb, var(--brand-light) 35%, transparent); }
.art-screen { fill: color-mix(in srgb, var(--brand-dark) 85%, black); stroke: var(--brand-light); stroke-width: 1.5; }
.art-trend { fill: none; stroke: var(--brand-light); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 220; animation: trend 4s ease-in-out infinite; }
.art-grid { stroke: color-mix(in srgb, var(--brand-light) 18%, transparent); stroke-width: 1; }
.art-led { fill: var(--brand-light); animation: blink 1.6s steps(1) infinite; }
.art-led.l2 { animation-delay: .4s; } .art-led.l3 { animation-delay: .9s; } .art-led.l4 { animation-delay: 1.2s; }
.art-led.ok { fill: #4ade80; }
.art-btn { fill: color-mix(in srgb, var(--brand-light) 30%, var(--brand-dark)); }
.art-module { fill: color-mix(in srgb, var(--brand-mid) 55%, var(--brand-dark)); stroke: color-mix(in srgb, var(--brand-light) 40%, transparent); }
.art-wire { fill: none; stroke: color-mix(in srgb, var(--brand-light) 30%, transparent); stroke-width: 2; }
.art-signal { fill: none; stroke: var(--brand-light); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 16; animation: flow 1.2s linear infinite; }
.art-belt { fill: color-mix(in srgb, var(--brand-dark) 60%, black); stroke: color-mix(in srgb, var(--brand-light) 30%, transparent); stroke-width: 1.5; }
.art-belt-line { stroke: color-mix(in srgb, var(--brand-light) 35%, transparent); stroke-width: 2; stroke-dasharray: 4 14; animation: belt 1s linear infinite; }
.art-roller { fill: color-mix(in srgb, var(--brand-mid) 45%, var(--brand-dark)); stroke: color-mix(in srgb, var(--brand-light) 45%, transparent); stroke-width: 1.5; }
.art-leg { fill: color-mix(in srgb, var(--brand-dark) 40%, var(--brand-mid)); }
.art-can { fill: url(#can-grad); stroke: color-mix(in srgb, var(--brand-light) 60%, white); stroke-width: 1; }
.art-cans { animation: cans 6s linear infinite; }
.art-gear { fill: color-mix(in srgb, var(--brand-light) 75%, white); transform-box: fill-box; transform-origin: center; animation: spin 5s linear infinite; }
.art-motor { fill: color-mix(in srgb, var(--brand-mid) 70%, var(--brand-dark)); stroke: color-mix(in srgb, var(--brand-light) 45%, transparent); stroke-width: 1.5; }
.art-tag rect { fill: color-mix(in srgb, var(--brand-dark) 70%, transparent); stroke: color-mix(in srgb, var(--brand-light) 60%, transparent); }
.art-tag text { fill: var(--on-dark); font: 700 13px var(--font-mono); letter-spacing: .08em; }
.art-tag { animation: bob 5s ease-in-out infinite; }
.art-tag.t2 { animation-delay: -1.7s; } .art-tag.t3 { animation-delay: -3.3s; }
.art-glow { fill: var(--glow); }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }
@keyframes flow { to { stroke-dashoffset: -22; } }
@keyframes belt { to { stroke-dashoffset: -18; } }
@keyframes cans { from { transform: translateX(-90px); } to { transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes trend { 0% { stroke-dashoffset: 220; } 50%, 100% { stroke-dashoffset: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(3rem, 6vw, 4.75rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.page-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.page-hero h1 { margin-bottom: .35em; }
.page-hero .lead { color: var(--on-dark-muted); margin: 0; }
.page-hero-icon {
  width: 132px; height: 132px; border-radius: 32px; display: grid; place-items: center; color: var(--brand-light);
  background: color-mix(in srgb, var(--brand-light) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand-light) 35%, transparent);
  box-shadow: 0 0 60px var(--glow) inset;
}
.page-hero-icon .icon { width: 64px; height: 64px; stroke-width: 1.4; }
.crumbs { font-size: .9rem; margin-bottom: 1rem; color: var(--on-dark-muted); }
.crumbs a { color: var(--on-dark-muted); }
@media (max-width: 700px) { .page-hero .wrap { grid-template-columns: 1fr; } .page-hero-icon { display: none; } }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); position: relative;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: var(--on-brand);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 35%, transparent);
}
.card-icon .icon { width: 26px; height: 26px; }
.value-cards { margin-top: -3.5rem; position: relative; z-index: 2; }
.value-cards .card { border-top: 4px solid var(--brand-light); }

.photo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s; }
a.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.photo-card figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--brand-tint); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a.photo-card:hover img { transform: scale(1.05); }
.photo-card .body { padding: 1.25rem 1.4rem 1.4rem; }
.photo-card .body h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.photo-card .body p { margin: 0; color: var(--muted); font-size: .95rem; }
.more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; margin-top: .75rem; color: var(--brand-ink); }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; background: var(--brand-tint); }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.frame-badge {
  position: absolute; left: 1rem; bottom: 1rem; background: color-mix(in srgb, var(--brand-dark) 85%, transparent);
  color: var(--on-dark); padding: .5rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
  display: inline-flex; gap: .45rem; align-items: center; backdrop-filter: blur(6px);
}
.frame-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 4px rgb(239 68 68 / 25%); }
.pip-wrap { position: relative; max-width: 440px; justify-self: center; margin-bottom: 2rem; }
.pip {
  position: absolute; right: -2rem; bottom: -2rem; width: 236px; border-radius: var(--radius); overflow: hidden;
  border: 6px solid var(--paper); box-shadow: var(--shadow-lg); background: #000;
}
.pip video { display: block; width: 100%; height: auto; }
.pip .frame-badge { left: .6rem; bottom: .6rem; font-size: .75rem; padding: .35rem .65rem; }
@media (max-width: 560px) { .pip { right: .75rem; bottom: -1.5rem; width: 180px; } }
.stack-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stack-photos .frame:first-child { grid-column: span 2; }

/* check lists */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.checks.cols { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 1.5rem; }
.checks li { display: flex; gap: .65rem; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: .15em; border-radius: 50%;
  background: var(--brand-tint-2) url("../img/check.svg") center / 14px no-repeat;
}
.dark .checks li::before { background-color: color-mix(in srgb, var(--brand-light) 22%, transparent); }

/* ---------- Features band (home) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.feature {
  padding: 1.75rem; border-radius: var(--radius); background: color-mix(in srgb, var(--brand-light) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-light) 22%, transparent);
}
.feature .card-icon { box-shadow: 0 0 30px var(--glow); }
.feature ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--on-dark-muted); }

/* ---------- Platforms, logos ---------- */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; align-items: center; }
.logo-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); height: 110px; display: grid; place-items: center; padding: 1rem;
}
.logo-tile img { max-height: 70px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .3s, opacity .3s; }
.logo-tile:hover img { filter: none; opacity: 1; }
@media (max-width: 600px) {     /* two per row, an odd last one centred */
  .logos { display: flex; flex-wrap: wrap; justify-content: center; }
  .logo-tile { flex: 0 0 calc(50% - .5rem); }
}

/* ---------- Process steps (projects) ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; counter-reset: step; }
.steps li {
  counter-increment: step; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.1rem 3.6rem; position: relative; font-weight: 650; color: var(--brand-dark); min-height: 64px; display: flex; align-items: center;
}
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  font: 800 .85rem var(--font-mono); color: var(--brand-ink); background: var(--brand-tint-2); border-radius: 8px; padding: .3rem .4rem;
}

/* ---------- Case studies ---------- */
.case { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.case + .case { margin-top: 1.5rem; }
.case-logo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; place-items: center; min-height: 140px; }
.case-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); font-size: .92rem; margin-bottom: .75rem; }
.case-meta span { display: inline-flex; align-items: center; gap: .35rem; }
@media (max-width: 700px) { .case { grid-template-columns: 1fr; } .case-logo { min-height: 110px; } }

/* ---------- Project list (build.py {{data:projects}}, filters in site.js) ---------- */
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stats li { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.stats strong { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1; color: var(--brand-ink); letter-spacing: -.02em; }
.stats span { display: block; margin-top: .4rem; color: var(--muted); font-weight: 600; }
.proj-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.proj-filter[hidden], .proj-year[hidden], .proj[hidden] { display: none; }
.proj-filter button {
  font: 600 .9rem var(--font); padding: .5rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.proj-filter button span { color: var(--muted); font-weight: 700; margin-left: .2rem; }
.proj-filter button:hover { border-color: var(--brand); }
.proj-filter button[aria-pressed="true"] { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-dark); }
.proj-filter button[aria-pressed="true"] span { color: var(--brand-light); }
.proj-count { min-height: 1.5em; color: var(--muted); font-weight: 600; margin: 0 0 1rem; }
.proj-year { display: grid; grid-template-columns: 110px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.proj-year-label { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1 var(--font); color: var(--brand-ink); margin: .2rem 0 0; position: sticky; top: 96px; align-self: start; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.proj { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.proj-where { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; color: var(--muted); font-size: .92rem; }
.proj-where strong { color: var(--ink); }
.proj-where .icon { color: var(--brand-ink); }
.proj h4 { font-size: 1.1rem; line-height: 1.25; margin: 0 0 .5rem; color: var(--brand-dark); }
.proj p { font-size: .97rem; }
.proj-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin: auto 0 0; padding-top: .5rem; }
.proj-meta span { font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark); }
.proj-meta .proj-for { background: var(--brand-dark); color: var(--on-dark); }
@media (max-width: 700px) {
  /* one row of filters to swipe through, instead of a screenful */
  .proj-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1.25rem; padding: 0 1.25rem .4rem; scrollbar-width: thin; }
  .proj-filter button { flex: none; }
  .proj-year { grid-template-columns: 1fr; gap: .75rem; }
  .proj-year-label { position: static; }
  .proj-grid { grid-template-columns: 1fr; }
}

/* ---------- Project globe: the Projects page's header graphic (build.py, drawn by site.js) ---------- */
.page-hero-globe { width: clamp(220px, 30vw, 340px); }
@media (max-width: 700px) { .page-hero-globe { width: min(260px, 80vw); margin: .5rem auto 0; } }
.globe { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; cursor: grab; user-select: none; }
.globe.dragging { cursor: grabbing; }
.globe-halo { fill: none; stroke: var(--glow); stroke-width: 18; opacity: .35; filter: blur(12px); }
.globe-sphere { fill: url(#globe-shade); }
.globe-shade-1 { stop-color: color-mix(in srgb, var(--brand-mid) 55%, var(--brand-dark)); }
.globe-shade-2 { stop-color: color-mix(in srgb, var(--brand-dark) 92%, black); }
.globe-edge { fill: none; stroke: color-mix(in srgb, var(--brand-light) 65%, transparent); stroke-width: 1.5; }
.globe-grid { fill: none; stroke: color-mix(in srgb, var(--brand-light) 30%, transparent); stroke-width: 1; }
.globe-land { fill: none; stroke: color-mix(in srgb, var(--brand-light) 70%, var(--on-dark)); stroke-width: 1.3; stroke-linejoin: round; opacity: .6; }
.globe-site { display: none; }
.globe.ready .globe-site { display: inline; }
.globe-site.behind { display: none; }
.globe-dot { fill: var(--brand-light); stroke: var(--brand-dark); stroke-width: 2; }
.globe-pulse { fill: var(--glow); transform-box: fill-box; transform-origin: center; animation: globe-pulse 2.4s ease-out infinite; }
.globe-site:hover .globe-dot { fill: var(--on-dark); }
@keyframes globe-pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

/* ---------- People ---------- */
.person { display: grid; gap: 1.5rem; align-content: start; }
.person .frame { aspect-ratio: 4 / 3; }
.person h2 { margin-bottom: .3em; }
.person blockquote { margin: 0 0 1.25rem; color: var(--muted); font-style: italic; }
.profile { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(2rem, 5vw, 4rem); }
.profile aside .card { position: sticky; top: 96px; }
@media (max-width: 900px) { .profile { grid-template-columns: 1fr; } .profile aside .card { position: static; } }
.prose p { max-width: 68ch; }
.prose p:first-of-type::first-letter { font-size: 3.2em; float: left; line-height: .9; margin: .05em .12em 0 0; font-weight: 800; color: var(--brand-ink); }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.gallery button {
  all: unset; cursor: zoom-in; display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--brand-tint);
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; width: 100%;
}
.gallery button:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gallery button:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 3px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* the featured product's drawings: the 3D view big, the two plans under it, whole sheets (not cropped) */
.gallery-3 { grid-template-columns: 1fr 1fr; }
.gallery-3 .gallery-wide { grid-column: 1 / -1; }
.gallery-3 .gallery-wide img { aspect-ratio: auto; }
.gallery-3 img { aspect-ratio: 5 / 4; object-fit: contain; background: #fff; }
.frame-drawing { background: #fff; }
.frame-drawing img { object-fit: contain; }
.feature-product { background: var(--soft); border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .feature-product .split > :last-child { order: -1; } }   /* drawings first on phones */
.gallery span { display: block; padding: .6rem .75rem; font-size: .85rem; font-weight: 600; color: var(--brand-dark); line-height: 1.35; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; color: var(--on-dark); }
.lightbox::backdrop { background: color-mix(in srgb, var(--brand-dark) 88%, transparent); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--radius-sm); background: #000; }
.lightbox figcaption { padding: .9rem 0 0; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.lightbox .lb-btns { display: flex; gap: .5rem; }
.lightbox button {
  border: 1px solid color-mix(in srgb, var(--brand-light) 45%, transparent); background: color-mix(in srgb, var(--brand-dark) 80%, transparent);
  color: var(--on-dark); border-radius: 999px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
}
.lightbox button:hover { background: var(--brand); color: var(--on-brand); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.5rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item .card-icon { margin: 0; width: 46px; height: 46px; }
.contact-item strong { display: block; color: var(--brand-dark); }
.contact-item a { font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 380px; height: 100%; background: var(--brand-tint); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
.contact-top { grid-template-columns: 1.15fr .85fr; align-items: start; }
@media (max-width: 860px) { .contact-top { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .contact-top .card { padding: 1.1rem; } }   /* room for Turnstile's 300 px */
.contact-form { display: grid; gap: 1rem; margin-top: .5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.contact-form label { display: grid; gap: .35rem; font-weight: 650; color: var(--brand-dark); font-size: .95rem; }
.contact-form .req { color: var(--brand-ink); }
.contact-form input, .contact-form textarea {
  font: 400 1rem var(--font); color: var(--ink); background: var(--paper); width: 100%;
  border: 1px solid color-mix(in srgb, var(--brand-dark) 22%, var(--paper)); border-radius: var(--radius-sm); padding: .7rem .8rem;
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand-light) 55%, transparent); outline-offset: 1px; border-color: var(--brand); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.form-note { margin: 0; color: var(--muted); font-size: .9rem; }
.prose-page { max-width: 780px; }
.prose-page h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose-page h2:first-child { margin-top: 0; }
.prose-page .checks { margin-bottom: 1rem; }
.muted { color: var(--muted); }
.form-status { margin: 0; font-weight: 650; min-height: 1.4em; }
.form-status.ok { color: #157a3b; }
.form-status.bad { color: #b42318; }
.contact-form button[disabled] { opacity: .6; cursor: progress; }
address { font-style: normal; }

/* ---------- CTA band ---------- */
.cta { border-radius: calc(var(--radius) * 1.6); padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; overflow: hidden; position: relative; }
.cta h2 { margin-bottom: .3em; }
.cta p { margin: 0; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: var(--on-dark-muted); padding: 4rem 0 0; font-size: .95rem; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-grid h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-light); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-brand svg { width: 210px; height: auto; color: var(--brand); margin-bottom: 1.25rem; }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--brand-light) 18%, transparent); margin-top: 3rem; padding: 1.25rem 0 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: clamp(4rem, 10vw, 8rem) 0; }
.notfound .code { font: 800 clamp(4rem, 14vw, 9rem)/1 var(--font-mono); color: var(--brand-light); letter-spacing: -.04em; text-shadow: 0 0 40px var(--glow); }
.notfound .btn-row { justify-content: center; margin-top: 2rem; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .hero-art, .cta, .nav-toggle { display: none !important; }
  .dark { background: none; color: #000; } .dark h1, .dark h2, .dark p { color: #000; }
}

/* ---------- Small utilities ---------- */
.mt-1 { margin-top: 1.5rem; }
.mt-2 { margin-top: 2rem; }
.mt-s { margin-top: .75rem; }
.mb-1 { margin-bottom: 1.25rem; }
.mb-2 { margin-bottom: 1.5rem; }
.h-small { font-size: 1.25rem; }
.tall { height: 180px; }
.mx-auto { margin-inline: auto; }
.gap-1 { gap: 1.5rem; }
