/* alexgruenberg.com - the one stylesheet.

   Every page links only this file. Each page carries its name as a class on
   <html> (home, darkroom, notfound), and its rules sit inside that page's
   block - :where(.home) { ... } - written with CSS nesting. :where() adds no
   specificity, so a page's rules cascade exactly as plain selectors would.
   Inside a block, `&` means the page's own root element.

   build.py flattens the nesting when it builds dist/, so every browser -
   including older ones without nesting support - receives plain CSS.
   Order: fonts and animations, each page's rules, then the type and film
   layer that applies everywhere, then the rules that replaced inline styles.
*/
/* ---------- Fonts (licensed: GT Alpina Fine, GT America, GT America Mono) ---------- */
@font-face {
    font-family: "GT Alpina Fine";
    src: url("fonts/GT-Alpina-Fine-Standard-Light.woff2") format("woff2");
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "GT Alpina Fine";
    src: url("fonts/GT-Alpina-Fine-Standard-Light-Italic.woff2") format("woff2");
    font-weight: 300; font-style: italic; font-display: swap;
}
@font-face { font-family: "GT America"; src: url("fonts/GT-America-Standard-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face { font-family: "GT America"; src: url("fonts/GT-America-Standard-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face { font-family: "GT America"; src: url("fonts/GT-America-Standard-Medium.woff2") format("woff2");
  font-weight: 500 800; font-style: normal; font-display: swap;
}
@font-face { font-family: "GT America Mono"; src: url("fonts/GT-America-Mono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face { font-family: "GT America Mono"; src: url("fonts/GT-America-Mono-Medium.woff2") format("woff2");
  font-weight: 500 800; font-style: normal; font-display: swap;
}
/* An AVIF <picture> wrapper must not change layout: the <img> inside is
   styled and sized as if the wrapper were not there. */
picture { display: contents; }
/* ---------- Animations ---------- */
@keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
  }
@keyframes gl1 {
    0%   { clip-path: inset(8% 0 62% 0);  transform: translate(-12px, 3px) skewX(-2deg); }
    25%  { clip-path: inset(48% 0 22% 0); transform: translate(10px, -3px); }
    50%  { clip-path: inset(24% 0 55% 0); transform: translate(-8px, 2px) skewX(1.5deg); }
    75%  { clip-path: inset(60% 0 8% 0);  transform: translate(9px, -1px); }
    100% { clip-path: inset(75% 0 4% 0);  transform: translate(-6px, 0); }
  }
@keyframes gl2 {
    0%   { clip-path: inset(62% 0 12% 0); transform: translate(11px, -3px); }
    28%  { clip-path: inset(10% 0 68% 0); transform: translate(-10px, 3px) skewX(2deg); }
    55%  { clip-path: inset(52% 0 30% 0); transform: translate(8px, -2px); }
    80%  { clip-path: inset(2% 0 84% 0);  transform: translate(-9px, 2px); }
    100% { clip-path: inset(38% 0 40% 0); transform: translate(6px, 1px); }
  }
@keyframes gl3 {
    0%   { clip-path: inset(30% 0 44% 0); transform: translate(9px, 2px); }
    20%  { clip-path: inset(70% 0 6% 0);  transform: translate(-11px, -2px); }
    45%  { clip-path: inset(14% 0 72% 0); transform: translate(8px, 3px) skewX(-1.5deg); }
    70%  { clip-path: inset(44% 0 34% 0); transform: translate(-7px, -1px); }
    100% { clip-path: inset(58% 0 22% 0); transform: translate(5px, 0); }
  }
@keyframes glshake {
    0%  { transform: translate(2px, 0); opacity: 1; }
    18% { transform: translate(-3px, 1px); opacity: .35; }
    36% { transform: translate(2px, -1px); opacity: 1; }
    60% { transform: translate(-2px, 0); opacity: .75; }
    78% { transform: translate(1px, 0); opacity: 1; }
    100%{ transform: none; opacity: 1; }
  }
@keyframes super8burn {
  0%   { opacity: 0;   transform: scale(1.04); }
  22%  { opacity: .95; }
  55%  { opacity: .7; }
  100% { opacity: 0;   transform: scale(1); }
}
/* ==================================================================
   Homepage
   Scoped with :where(.home) on <html> - zero added specificity.
   ================================================================== */
/* GT Alpina Fine Standard — licensed webfont (Grilli Type order 124217, Light + Light Italic) */
/* GT America (text) and GT America Mono (labels) load from film-and-type.css */
:root:where(.home) {
    --paper: #f4f1ea;
    --ink: #181310;
    --ink-soft: #6b5f55;
    --line: #ddd5c8;
    --vermilion: #d8442b;
    --moss: #1f5b46;
    --fine: "GT Alpina Fine", Georgia, serif;
    --sans: "GT America", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
:where(.home, .darkroom), :where(.home, .darkroom) * { margin: 0; padding: 0; box-sizing: border-box; }
html:where(.home) { scroll-behavior: smooth; }
:where(.home, .darkroom) body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
:where(.home, .darkroom) .wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
:where(.home) .copy { max-width: 620px; }
:where(.home) p { margin-bottom: 1.1rem; }
:where(.home) p:last-child { margin-bottom: 0; }
:where(.home, .darkroom) a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: #b5afa5; }
:where(.home, .darkroom) a:hover { text-decoration-color: currentColor; }
:where(.home) em { font-style: italic; }
/* ---------- Display type ---------- */
:where(.home) .display {
    font-family: var(--fine);
    font-weight: 300;
    line-height: 0.98;
    letter-spacing: -0.015em;
  }
:where(.home) .display em { font-family: var(--fine); font-style: italic; font-weight: 300; color: inherit; }
:where(.home) h2.display {
    font-size: clamp(3.4rem, 9vw, 7.5rem);
    margin-bottom: clamp(2.2rem, 4vw, 3.6rem);
    /* roman opening, funky Alpina Fine Italic ending — same rule as the hero name */
  }
/* Prominent standalone link — takes an accent color per section */
:where(.home) .big-link {
    display: inline-block;
    margin-top: 0.6rem;
    font-family: var(--fine);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.2;
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
    text-decoration-color: currentColor;
  }
:where(.home) .big-link:hover { text-decoration-thickness: 3px; }
/* yellow on the red and dark sections; vermilion where yellow would vanish */
:where(.home) .red .big-link, :where(.home) .dark .big-link { color: #ffd54a; }
:where(.home) .green .big-link { color: var(--vermilion); }
/* Bold grotesk labels — the technical voice */
:where(.home) .kicker {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: inherit;
    margin-bottom: 1.1rem;
  }
:where(.home) section { padding: clamp(5rem, 9vw, 8.5rem) 0; }
:where(.home) section + section { border-top: 1px solid var(--line); }
/* the spine — editorial rail up the left edge (INFRINGE-style) */
:where(.home, .darkroom) .spine {
    position: fixed;
    left: 10px;
    bottom: 24px;
    z-index: 40;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ink);
    mix-blend-mode: difference;
    filter: invert(1);          /* difference+invert: ink on light, paper on dark */
    pointer-events: none;
    user-select: none;
  }
@media (max-width: 900px) {
  :where(.home) .spine { display: none; }
}
/* ---------- Motion ---------- */
:where(.home) .hero-in { opacity: 0; animation: riseIn .7s cubic-bezier(.22,.61,.36,1) forwards; }
:where(.home) h1.display.hero-in { animation-duration: .8s; }
/* scroll reveals */
:where(.home) .rv { opacity: 0; transform: translateY(16px); transition: opacity .5s cubic-bezier(.22,.61,.36,1), transform .5s cubic-bezier(.22,.61,.36,1); }
:where(.home) .rv.in { opacity: 1; transform: none; }
/* glitch: two cloned layers, sliced and jittered */
:where(.home, .darkroom) .glitch-wrap { position: relative; display: inline-block; }
:where(.home, .darkroom) .glitch-layer {
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: 0;
    user-select: none;
  }
:where(.home, .darkroom) .glitching .glitch-layer { opacity: .85; }
:where(.home) .glitching .glitch-layer.g1 {
    color: var(--vermilion);
    animation: gl1 .5s steps(3, jump-none) 1;
  }
:where(.home) .glitching .glitch-layer.g2 {
    color: #f0b429;
    animation: gl2 .5s steps(4, jump-none) 1;
  }
:where(.home) .glitching .glitch-layer.g3 {
    color: var(--moss);
    animation: gl3 .5s steps(5, jump-none) 1;
  }
:where(.home, .darkroom) .glitching > .glitch-src { animation: glshake .5s steps(3, jump-none) 1; }
@media (prefers-reduced-motion: reduce) {
  html:where(.home) { scroll-behavior: auto; }
  :where(.home) .hero-in { animation: none; opacity: 1; }
  :where(.home) .rv { opacity: 1; transform: none; transition: none; }
  :where(.home) .glitch-layer { display: none; }
  :where(.home) .glitching > .glitch-src { animation: none; }
}
/* ---------- Collapsible panels ---------- */
:where(.home) .panel { padding: 0; }
:where(.home) .panel-head {
    display: block;
    width: 100%;
    padding: clamp(2.6rem, 5vw, 4.2rem) 0;
    background: none;
    border: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
:where(.home) .panel-head .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
:where(.home) .panel-head h2.display { margin-bottom: 0; min-width: 0; overflow-wrap: anywhere; }
:where(.home) .panel-head:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
/* the +/× marker, tinted to each section's headline color */
:where(.home) .panel-mark {
    position: relative;
    flex: none;
    width: clamp(28px, 3.4vw, 42px);
    height: clamp(28px, 3.4vw, 42px);
    transition: transform .45s cubic-bezier(.22,.61,.36,1);
  }
:where(.home) .panel-mark::before, :where(.home) .panel-mark::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto 0;
    height: 2px;
    background: currentColor;
    transform: translateY(-50%);
  }
:where(.home) .panel-mark::after { transform: translateY(-50%) rotate(90deg); }
:where(.home) .panel.open .panel-mark { transform: rotate(135deg); }
:where(.home) .green .panel-mark { color: var(--moss); }
:where(.home) .dark .panel-mark { color: #f0b429; }
:where(.home) .red .panel-mark { color: var(--ink); }
:where(.home) .pastel .panel-mark { color: #26593a; }
:where(.home) .panel-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .55s cubic-bezier(.22,.61,.36,1);
  }
:where(.home) .panel.open .panel-body { grid-template-rows: 1fr; }
:where(.home) .panel-inner { overflow: hidden; position: relative; }
:where(.home) .panel-inner > .wrap { padding-bottom: clamp(4rem, 8vw, 7rem); }
/* Sections start open; JS collapses them, so no-JS visitors still see everything */
@media print {
  :where(.home) .panel-body { grid-template-rows: 1fr; }
  :where(.home) .panel-mark { display: none; }
  :where(.home) .rv { opacity: 1; transform: none; }
  :where(.home) .spine { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :where(.home) .panel-body, :where(.home) .panel-mark { transition: none; }
}
:where(.home) .sub { margin-top: 3.4rem; }
:where(.home) .sub:first-of-type { margin-top: 0; }
:where(.home) .sub + .sub { margin-top: clamp(4rem, 7vw, 6rem); }
/* ---------- Section palettes ---------- */
:where(.home) .green {
    background: #fdfcf8;
    border-top: 0;
  }
:where(.home) .green h2.display, :where(.home) .green h2.display em { color: var(--moss); }
:where(.home) .green .kicker { color: var(--moss); }
:where(.home) .green + section { border-top: 0; }
:where(.home) .dark {
    background: #2b2a27;
    color: #f0ede6;
    border-top: 0;
  }
:where(.home) .dark h2.display, :where(.home) .dark h2.display em { color: #f0b429; }
:where(.home) .dark .kicker { color: #f0b429; }
:where(.home) .dark a { text-decoration-color: #6b665e; }
:where(.home) .dark + section { border-top: 0; }
:where(.home) .red {
    background: var(--vermilion);
    color: var(--ink);
    border-top: 0;
  }
:where(.home) .red .kicker { color: var(--ink); }
:where(.home) .red .display em { color: var(--ink); }
:where(.home) .red a { text-decoration-color: rgba(24, 19, 16, 0.45); }
:where(.home) .red .video figcaption .credit { color: rgba(24, 19, 16, 0.72); }
:where(.home) .red + section { border-top: 0; }
:where(.home) .pastel {
    background: #f6e9bb;
    color: var(--ink);
    border-top: 0;
  }
:where(.home) .pastel h2.display, :where(.home) .pastel h2.display em { color: #26593a; }
:where(.home) .pastel + section { border-top: 0; }
/* ---------- Photos ---------- */
:where(.home) .photo-wide {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    margin-top: clamp(2.4rem, 4vw, 3.6rem);
  }
/* ---------- Brand logos ---------- */
:where(.home) .brand-logo {
    height: 40px;
    width: auto;
    display: block;
    margin-bottom: 1.4rem;
  }
:where(.home) .brand-row {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 1.4rem;
  }
:where(.home) .brand-row .brand-logo { margin-bottom: 0; height: 44px; }
/* Preserve the wide proportions of the Dental Rails wordmark. */
:where(.home) .brand-logo.dentalrails-mark { height: auto; width: clamp(190px, 22vw, 260px); }
:where(.home) .logo-invert { filter: invert(1); }
/* ---------- Hero ---------- */
:where(.home) header.opening {
    padding: clamp(4rem, 8vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    background:
      linear-gradient(to bottom, rgba(12,11,10,.42), rgba(12,11,10,.28) 45%, rgba(12,11,10,.55)),
      url("img/photo-3.jpg") 24% 38% / cover no-repeat;
    /* AVIF where the browser takes it; the line above is the JPEG fallback */
    background-image: linear-gradient(to bottom, rgba(12,11,10,.42), rgba(12,11,10,.28) 45%, rgba(12,11,10,.55)),
      image-set(url("img/photo-3.avif") type("image/avif"), url("img/photo-3.jpg") type("image/jpeg"));
    color: #f4f1ea;
  }
:where(.home) .opening .kicker { color: rgba(244, 241, 234, .82); }
:where(.home) .opening .cta-lines a { color: #ffd54a; text-decoration-color: currentColor; }
:where(.home) h1.display {
    /* the name splits around the figure: Alex left of the head, Gruenberg right */
    font-size: clamp(3.2rem, 8.6vw, 7.8rem);
    margin-bottom: 0;
    line-height: 0.98;
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    width: 100%;
    white-space: nowrap;
  }
/* hand-set: Gruenberg tucks in near the head; the two words sit a
       touch uneven, a degree off level - placed, not typeset */
:where(.home) h1.display span:first-child { transform: translateY(-0.05em) rotate(-1.1deg); }
:where(.home) h1.display span:last-child {
    margin-left: clamp(5rem, 14vw, 12.5rem);
                                    transform: translateY(0.14em) rotate(0.9deg);
  }
/* the frame breathes: name at the top, words settle at the bottom left */
:where(.home) .opening .wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
:where(.home) .opening .copy { margin-top: auto; padding-top: clamp(6rem, 18vh, 14rem); }
:where(.home) .sr-only {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
  }
:where(.home) .opening .copy p { font-size: 1.2rem; line-height: 1.6; }
:where(.home) .cta-lines { margin-top: 1.4rem; }
:where(.home) .cta-lines a { text-decoration-color: var(--vermilion); text-underline-offset: 4px; line-height: 2; }
:where(.home) .opening .photo-wide { aspect-ratio: 21 / 9; margin-top: clamp(3rem, 6vw, 5rem); }
/* ---------- Video embeds ---------- */
:where(.home) .video { cursor: pointer; margin-top: 2rem; }
:where(.home) .video .frame { position: relative; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
:where(.home) .video .frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.8); }
:where(.home) .video .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
:where(.home) .video .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
:where(.home) .video .play span {
    width: 58px; height: 58px; border-radius: 50%;
    background: rgba(247, 245, 241, 0.94);
    display: flex; align-items: center; justify-content: center;
  }
:where(.home) .video .play svg { margin-left: 3px; }
:where(.home) .video figcaption { margin-top: 0.7rem; font-size: 0.92rem; }
:where(.home) .video figcaption .credit { display: block; color: var(--ink-soft); font-size: 0.82rem; margin-top: 2px; }
:where(.home) .credit-logo { height: 1.6em; width: auto; vertical-align: -0.1em; margin-left: 2px; }
/* the index — a colophon of everything, hairline-ruled (gustavo.work-style) */
:where(.home) .index { margin-bottom: clamp(2.6rem, 5vw, 4rem); }
:where(.home) .index-row {
    display: grid;
    grid-template-columns: minmax(150px, 34%) 1fr auto;
    gap: 18px;
    align-items: baseline;
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
  }
:where(.home) .index-row:last-child { border-bottom: 1px solid var(--line); }
:where(.home) .ix-role {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
:where(.home) .ix-name {
    font-family: var(--fine);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.15;
  }
:where(.home) .index-row:hover .ix-name { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
:where(.home) .ix-year {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    white-space: nowrap;
  }
@media (max-width: 640px) {
  :where(.home) .index-row { grid-template-columns: 1fr auto; }
  :where(.home) .ix-role { grid-column: 1 / -1; margin-bottom: -0.5rem; }
}
/* ---------- Footer ---------- */
:where(.home) footer { padding: clamp(5rem, 9vw, 8rem) 0; border-top: 1px solid var(--line); }
:where(.home) footer .email {
    font-family: var(--fine);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.45rem, 6vw, 3.4rem);
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.1;
    margin-bottom: 1.4rem;
    display: inline-block;
  }
:where(.home) footer .fine-print { color: var(--ink-soft); font-size: 0.9rem; }
/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  /* no room to flank the figure on a phone - the name stacks again */
  :where(.home) h1.display { display: block; }
  :where(.home) h1.display span { display: block; }
  :where(.home) h1.display span:last-child { margin-left: 0; transform: translateY(0) rotate(0.9deg); }
}
@media (max-width: 720px) {
  :where(.home) body { font-size: 16px; }
  :where(.home) h2.display { font-size: clamp(2.5rem, 11vw, 4rem); }
  :where(.home) .panel-head .wrap { gap: 0.9rem; }
  :where(.home) .panel-mark { width: 22px; height: 22px; }
  :where(.home) .opening .photo-wide { aspect-ratio: 4 / 3; }
  :where(.home) .photo-wide { aspect-ratio: 4 / 3; }
}
/* ==================================================================
   Darkroom (photography)
   Scoped with :where(.darkroom) on <html> - zero added specificity.
   ================================================================== */
:root:where(.darkroom) {
    /* the darkroom: this page inverts the site - prints on a gallery wall */
    --paper: #141210;
    --ink: #ece7dd;
    --ink-soft: #9b948a;
    --line: #2a2724;
    --fine: "GT Alpina Fine", Georgia, serif;
    --sans: "GT America", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
/* The first frame is the masthead: the title sits on the storm. */
/* the whole frame, uncropped - the picture sets the masthead's height */
:where(.darkroom) header.banner {
    position: relative;
    margin-bottom: clamp(1.4rem, 3vw, 2.6rem);
  }
:where(.darkroom) header.banner > .hero-photo, :where(.darkroom) header.banner > .hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    z-index: 0;
  }
:where(.darkroom) header.banner h1, :where(.darkroom) header.banner .back { text-shadow: 0 2px 18px rgba(10, 6, 4, .45); }
:where(.darkroom) header.banner .wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 19%;                 /* up in the cloud mass itself */
    z-index: 2;
    width: 100%;
  }
/* the archive is catalogued from its first frame */
:where(.darkroom) header.banner::before {
    content: '01';
    position: absolute;
    top: clamp(1.1rem, 2.2vw, 1.8rem);
    right: clamp(16px, 2vw, 28px);
    z-index: 2;
    font: 700 11px/1 var(--sans);
    letter-spacing: 0.16em;
    color: rgba(236, 231, 221, .55);
  }
/* a 2:1 frame is only a couple of inches tall on a phone - the title
       takes its own line under the picture rather than crowding it */
@media (max-width: 720px) {
  :where(.darkroom) header.banner { display: block; }
  :where(.darkroom) header.banner .wrap {
      position: static;
      transform: none;
      padding-top: 1.1rem;
    }
  :where(.darkroom) header.banner h1 { margin-top: .2rem; }
}
:where(.darkroom) .back {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: inherit;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 2.4rem;
  }
:where(.darkroom) .back:hover { text-decoration: underline; }
:where(.darkroom) h1 {
    font-family: var(--fine);
    font-weight: 300;
    font-size: clamp(3.6rem, 11vw, 9rem);
    line-height: 0.98;
    letter-spacing: -0.015em;
  }
:where(.darkroom) h1 em { font-style: italic; }
:where(.darkroom) .intro { max-width: 34em; margin-top: 1.6rem; font-size: 1.05rem; }
/* Uniform grid — no column fragmentation, all edges aligned */
:where(.darkroom) .gallery-wrap { padding: 0 clamp(16px, 2vw, 28px); }
:where(.darkroom) .grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding-bottom: 4rem;
  }
:where(.darkroom) .grid .ph {
    grid-column: span 2;             /* landscapes: 3 across */
    aspect-ratio: 3 / 2;
    position: relative;
    margin: 0;
    cursor: zoom-in;
    background: #201d1a;
  }
:where(.darkroom) .grid .ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
:where(.darkroom) .grid .ph.half { grid-column: span 3; }
:where(.darkroom) .grid .ph.pt { grid-column: span 2; aspect-ratio: 3 / 4; }
:where(.darkroom) .grid .ph.pair { grid-column: span 3; aspect-ratio: 3 / 4; }
/* featured landscapes bleed edge-to-edge at natural aspect */
:where(.darkroom) .grid .ph.feat {
    grid-column: 1 / -1;
    /* bleed exactly across the gallery's own padding - never 100vw, which
       counts the scrollbar and pushes the page sideways */
    width: calc(100% + 2 * clamp(16px, 2vw, 28px));
    margin-left: calc(-1 * clamp(16px, 2vw, 28px));
    margin-top: 14px;
    margin-bottom: 14px;
  }
/* frame numbers - the archive is catalogued */
:where(.darkroom) .grid .ph::after {
    content: attr(data-n);
    position: absolute;
    left: 10px;
    bottom: 8px;
    z-index: 2;
    font: 700 11px/1 var(--sans);
    letter-spacing: 0.16em;
    color: rgba(236, 231, 221, .5);
    pointer-events: none;
  }
:where(.darkroom) .grid .ph.feat::after { left: clamp(16px, 2vw, 28px); }
/* A restrained hover cue keeps neighboring photographs visible. */
:where(.darkroom) .grid .ph img { transition: opacity .35s ease, transform .35s cubic-bezier(.22,.61,.36,1); }
:where(.darkroom) .grid .ph:not(.feat):hover img { transform: scale(1.02); }
/* ---------- Motion ---------- */
:where(.darkroom) .hero-in { opacity: 0; animation: riseIn .8s cubic-bezier(.22,.61,.36,1) forwards; }
:where(.darkroom) .rv { opacity: 0; transform: translateY(16px) scale(.99); transition: opacity .5s cubic-bezier(.22,.61,.36,1), transform .5s cubic-bezier(.22,.61,.36,1); }
:where(.darkroom) .rv.in { opacity: 1; transform: none; transition: opacity .45s cubic-bezier(.22,.61,.36,1), transform .35s cubic-bezier(.22,.61,.36,1); }
:where(.darkroom) .glitching .glitch-layer.g1 { color: #d8442b; animation: gl1 .5s steps(3, jump-none) 1; }
:where(.darkroom) .glitching .glitch-layer.g2 { color: #4caf7d; animation: gl2 .5s steps(4, jump-none) 1; }
:where(.darkroom) .glitching .glitch-layer.g3 { color: #f0b429; animation: gl3 .5s steps(5, jump-none) 1; }
@media (prefers-reduced-motion: reduce) {
  :where(.darkroom) .hero-in { animation: none; opacity: 1; }
  :where(.darkroom) .rv { opacity: 1; transform: none; transition: none; }
  :where(.darkroom) .glitch-layer { display: none; }
  :where(.darkroom) .glitching > .glitch-src { animation: none; }
}
:where(.darkroom) footer { padding: 4rem 0 6rem; border-top: 1px solid var(--line); }
:where(.darkroom) footer .email {
    font-family: var(--fine);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.45rem, 6vw, 2.6rem);
    max-width: 100%;
    overflow-wrap: anywhere;
    display: inline-block;
    margin-bottom: 1rem;
  }
:where(.darkroom) footer p { color: var(--ink-soft); font-size: 0.9rem; }
/* lightbox */
:where(.darkroom) .lightbox {
    position: fixed;
    inset: 0;
    background: rgba(14, 12, 10, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    cursor: zoom-out;
    visibility: hidden;
    opacity: 0;
    transition: opacity .35s ease, visibility 0s .35s;
  }
:where(.darkroom) .lightbox.open { visibility: visible; opacity: 1; transition: opacity .35s ease; }
:where(.darkroom) .lightbox img {
    position: fixed;
    top: 0; left: 0;
    transform-origin: top left;
    will-change: transform;
    box-shadow: 0 20px 80px rgba(0,0,0,.5);
  }
@media (prefers-reduced-motion: reduce) {
  html:where(.darkroom) { scroll-behavior: auto; }
  :where(.darkroom) .grid .ph img { transition: none; }
  :where(.darkroom) .grid .ph:hover img { transform: none; }
  :where(.darkroom) .lightbox, :where(.darkroom) .lightbox.open { transition: none; }
}
@media (max-width: 980px) {
  :where(.darkroom) .grid { grid-template-columns: repeat(4, 1fr); }
  :where(.darkroom) .grid .ph, :where(.darkroom) .grid .ph.half, :where(.darkroom) .grid .ph.pt, :where(.darkroom) .grid .ph.pair { grid-column: span 2; }
}
@media (max-width: 600px) {
  :where(.darkroom) .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  :where(.darkroom) .grid .ph, :where(.darkroom) .grid .ph.half { grid-column: 1 / -1; }
  :where(.darkroom) .grid .ph.pt, :where(.darkroom) .grid .ph.pair { grid-column: span 1; }
  :where(.darkroom) .grid .ph.pt + .ph.pt + .ph.pt { grid-column: 1 / -1; }
  /* odd portrait gets the full row */
  :where(.darkroom) body { font-size: 16px; }
}
/* the spine — editorial rail up the left edge (INFRINGE-style) */
@media (max-width: 900px) {
  :where(.darkroom) .spine { display: none; }
}
@media print {
  :where(.darkroom) .rv { opacity: 1; transform: none; }
  :where(.darkroom) .spine, :where(.darkroom) .lightbox { display: none; }
  :where(.darkroom) header.banner { min-height: auto; }
}
/* ==================================================================
   Not found page
   Scoped with :where(.notfound) on <html> - zero added specificity.
   ================================================================== */
:where(.notfound), :where(.notfound) * { margin: 0; padding: 0; box-sizing: border-box; }
:where(.notfound) body {
    background: #f4f1ea; color: #181310;
    font-family: "GT America", sans-serif;
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 24px;
  }
:where(.notfound) h1 { font-family: "GT Alpina Fine", Georgia, serif; font-weight: 300; font-size: clamp(5rem, 18vw, 12rem); line-height: 1; }
:where(.notfound) h1 em { font-style: italic; }
:where(.notfound) p { margin-top: 1.2rem; font-size: 1.05rem; color: #6b5f55; }
:where(.notfound) a { color: #181310; text-decoration: underline; text-underline-offset: 3px; }
/* ==================================================================
   Homepage refinements (September 2026)
   Scoped with :where(.home) on <html> - zero added specificity.
   ================================================================== */
/* September 2026 refinement: keep the typography, color fields, and photographs. */
:where(.home) :focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
:where(.home) .skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; background: var(--paper); color: var(--ink); transform: translateY(-160%); }
:where(.home) .skip-link:focus { transform: none; }
:where(.home) .opening { position: relative; }
:where(.home) .hero-nav { position: absolute; top: 24px; right: clamp(20px, 7.1vw, 110px); font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
:where(.home) .hero-nav a { color: #ffd54a; text-underline-offset: 5px; text-decoration-color: currentColor; }
:where(.home) .panel-title { min-width: 0; }
:where(.home) .panel-subtitle { display: block; margin-top: 1rem; font-family: var(--sans); font-weight: 400; font-size: .9rem; letter-spacing: .015em; }
:where(.home) .panel-body[aria-hidden="true"] { visibility: hidden; transition: grid-template-rows .55s cubic-bezier(.22,.61,.36,1), visibility 0s .55s; }
:where(.home) .panel-body[aria-hidden="false"] { visibility: visible; }
:where(.home) .red .big-link { color: #181310; }
:where(.home) .green .big-link { color: #943521; }
:where(.home) .photography-teaser { display: block; text-decoration: none; }
:where(.home) .photography-teaser .photo-wide { aspect-ratio: 2 / 1; height: auto; }
:where(.home) .teaser-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: .65rem; font-size: .85rem; }
:where(.home) .teaser-caption span { text-decoration: underline; text-underline-offset: 4px; }
:where(.home) .photography-teaser:hover .teaser-caption span { text-decoration-thickness: 2px; }
:where(.home) .video .frame img { filter: none; }
:where(.home) .video .play span { width: 58px; height: 58px; background: rgba(244,241,234,.94); transition: transform .2s; }
:where(.home) .video:hover .play span { transform: scale(1.06); }
:where(.home) footer .email { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  :where(.home) .hero-nav { top: 24px; right: 20px; font-size: .75rem; }
  :where(.home) .panel-subtitle { font-size: .8rem; margin-top: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  :where(.home) .panel-body[aria-hidden="true"], :where(.home) .video .play span { transition: none; }
}
@media print {
  :where(.home) .panel-body[aria-hidden="true"] { visibility: visible; }
  :where(.home) .hero-nav, :where(.home) .skip-link { display: none; }
}
/* ==================================================================
   Darkroom viewer and captions (September 2026)
   Scoped with :where(.darkroom) on <html> - zero added specificity.
   ================================================================== */
:where(.darkroom) :focus-visible { outline: 2px solid #ece7dd; outline-offset: 5px; }
:where(.darkroom) [hidden] { display: none; }
:where(.darkroom) .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:where(.darkroom) .skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
:where(.darkroom) .skip-link:focus { transform: none; }
:where(.darkroom) .hero-photo { display: block; aspect-ratio: 2 / 1; cursor: zoom-in; }
:where(.darkroom) .hero-photo img { width: 100%; height: auto; display: block; }
:where(.darkroom) .photo-open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
:where(.darkroom) .grid .ph { min-width: 0; }
:where(.darkroom) .grid .ph img { max-width: 100%; }
:where(.darkroom) .grid .ph:not(.feat) .photo-open { overflow: hidden; }
:where(.darkroom) .gallery-tools { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1.5rem; padding: 12px clamp(16px, 2vw, 28px); margin: 0 0 24px; background: rgba(20,18,16,.97); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .8rem; }
:where(.darkroom) .gallery-home, :where(.darkroom) .gallery-top { padding: 9px 0; text-underline-offset: 5px; }
:where(.darkroom) .gallery-views { display: flex; gap: 4px; }
:where(.darkroom) .gallery-views button { font: inherit; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
:where(.darkroom) .gallery-views button span { color: #b9b1a6; font-size: .75rem; margin-left: 3px; }
:where(.darkroom) .gallery-views button[aria-pressed="true"] { border-color: #918779; }
:where(.darkroom) .grid.selected-view .ph:not(.feat) { grid-column: span 3; }
:where(.darkroom) .grid.selected-view .ph.feat { grid-column: 1 / -1; }
html:where(.darkroom) { scroll-behavior: smooth; scroll-padding-top: 90px; }
:where(.darkroom) .photo-viewer { position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; padding: 16px clamp(16px, 3vw, 48px); border: 0; color: #ece7dd; background: #141210; overflow: hidden; }
:where(.darkroom) .photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 14px; }
:where(.darkroom) .photo-viewer::backdrop { background: #141210; }
:where(.darkroom) .viewer-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
:where(.darkroom) .viewer-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
:where(.darkroom) .viewer-count { font: 400 .85rem var(--sans); color: #b9b1a6; font-variant-numeric: tabular-nums; }
:where(.darkroom) .photo-viewer button { min-height: 44px; padding: 8px 14px; font: 400 .9rem var(--sans); border: 1px solid #756c60; border-radius: 0; background: transparent; color: #ece7dd; cursor: pointer; touch-action: manipulation; }
:where(.darkroom) .photo-viewer button:hover { background: #2a2724; }
:where(.darkroom) #viewer-close { justify-self: end; border-color: transparent; padding-right: 0; }
:where(.darkroom) #viewer-close span { font-size: 1.5rem; vertical-align: -.08em; padding-left: 7px; }
:where(.darkroom) .viewer-stage { min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }
:where(.darkroom) #viewer-image { display: block; max-height: 100%; max-width: 100%; width: 100%; height: 100%; object-fit: contain; }
:where(.darkroom) .viewer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 4px; }
:where(.darkroom) #viewer-caption { font: 400 15px/1.5 var(--sans); max-width: 55ch; margin: 0; }
:where(.darkroom) .viewer-actions { display: flex; flex-shrink: 0; gap: 8px; }
:where(.darkroom) #viewer-prev, :where(.darkroom) #viewer-next { min-width: 48px; font-size: 1.2rem; }
:where(.darkroom) .viewer-status { min-height: 1.2em; margin: 0; font: 400 12px/1.3 var(--sans); color: #b9b1a6; text-align: right; }
@media (max-width: 980px) {
  :where(.darkroom) .grid.selected-view .ph:not(.feat) { grid-column: span 2; }
}
@media (max-width: 600px) {
  :where(.darkroom) header.banner h1 { font-size: clamp(2.9rem, 14vw, 3.6rem); }
  :where(.darkroom) .gallery-tools { gap: 4px 10px; padding-top: 8px; padding-bottom: 8px; }
  :where(.darkroom) .gallery-home { flex: 1; }
  :where(.darkroom) .gallery-top { order: 2; }
  :where(.darkroom) .gallery-views { order: 3; width: 100%; }
  :where(.darkroom) .gallery-views button { flex: 1; }
  :where(.darkroom) .grid.selected-view .ph:not(.feat) { grid-column: 1 / -1; }
  :where(.darkroom) .grid.selected-view .ph.pair { grid-column: span 1; }
  :where(.darkroom) .viewer-label { font-size: .65rem; letter-spacing: .04em; }
  :where(.darkroom) .photo-viewer { padding: 10px 14px; }
  :where(.darkroom) .photo-viewer[open] { gap: 8px; }
  :where(.darkroom) .viewer-bottom { align-items: stretch; flex-direction: column; gap: 12px; }
  :where(.darkroom) .viewer-actions { display: grid; grid-template-columns: 1fr 1fr 2fr; }
  :where(.darkroom) #viewer-caption { font-size: 14px; }
  :where(.darkroom) .viewer-status { text-align: left; }
  html:where(.darkroom) { scroll-padding-top: 125px; }
}
@media (prefers-reduced-motion: reduce) {
  html:where(.darkroom) { scroll-behavior: auto; }
}
@media print {
  :where(.darkroom) .gallery-tools, :where(.darkroom) .photo-viewer, :where(.darkroom) .skip-link { display: none; }
  :where(.darkroom) .grid .ph[hidden] { display: block; }
}
/* Species and place complement descriptive photographic captions. */
:where(.darkroom) .viewer-caption-block { min-width: 0; }
:where(.darkroom) #viewer-details { margin: 5px 0 0; max-width: 70ch; font: 400 12px/1.6 var(--sans); color: #b9b1a6; }
:where(.darkroom) #viewer-note { max-width: 74ch; margin: 10px 0 0; font: 400 12px/1.6 var(--sans); color: #b9b1a6; }
:where(.darkroom) #viewer-note a { color: #d6cdc0; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 600px) {
  :where(.darkroom) #viewer-details, :where(.darkroom) #viewer-note { font-size: 12px; line-height: 1.5; }
}
/* ==================================================================
   Type and film layer - every page
   Unscoped: applies to every page.
   ================================================================== */
/* ============================================================
   Type and film layer (approved 2026-09-25).
   GT America for text, GT America Mono for the catalogue voice,
   the approved Dental Rails wordmark, and a Super 8 film gate on
   the three films. Loaded last, so it layers over each page.
   ============================================================ */
/* ---------- GT America (licensed web fonts, Grilli) ---------- */
:root {
  --sans: "GT America", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "GT America Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
/* The catalogue voice: every small label, number and year reads like an index card. */
.kicker, .panel-subtitle, .ix-role, .ix-year, .spine, .grid .ph::after, header.banner::before, .viewer-count, .viewer-status, .video figcaption .credit {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.kicker { font-size: 0.8rem; }
.panel-subtitle { font-size: 0.74rem; letter-spacing: 0.02em; opacity: .85; }
.spine { letter-spacing: 0.22em; }
/* ---------- Dental Rails wordmark (approved kit, dark-section variant) ---------- */
.brand-logo.dentalrails-mark { width: clamp(200px, 22vw, 280px); height: auto; }
/* ---------- Super 8: the films sit in a real film gate ---------- */
.video .frame { position: relative; }
.video .frame::after {
  content: "";
  position: absolute; inset: 0;
  background: url("img/super8-gate.png") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 1;
}
.video .frame .play { z-index: 2; }
/* once the film is playing, the gate steps aside for the player controls */
.video .frame:has(iframe)::after { display: none; }
.video { position: relative; }
.super8-burn {
  position: absolute;
  background: url("img/super8-burn.jpg") center / cover no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  animation: super8burn 1.1s cubic-bezier(.3,.6,.3,1) forwards;
}
/* ---------- The name as loose type (name-type.js) ---------- */
type-letter { display: inline-block; will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .super8-burn { display: none; }
}
@media print {
  .video .frame::after { display: none; }
}
/* ==================================================================
   Former inline styles. These were style="" attributes in the pages;
   as classes they let the Content-Security-Policy forbid inline styles.
   They sit last so they win exactly as the attributes did.
   ================================================================== */
:where(.home) .delay-05 { animation-delay: .05s; }
:where(.home) .delay-32 { animation-delay: .32s; }
:where(.home) .brand-logo.logo-yomi { height: 52px; }
:where(.home) .brand-logo.logo-plasmapp { height: 64px; margin-left: -14px; }
/* Full-bleed darkroom frames are cut shorter than their photographs so the
     parallax has room. Written by build.py from photos.json - do not edit. */
/* photos:frames */
#frame-p02 { aspect-ratio: 2560/1570; }
#frame-p23 { aspect-ratio: 2560/1567; }
#frame-p17 { aspect-ratio: 2560/1178; }
#frame-p37 { aspect-ratio: 2560/1515; }
#frame-p14 { aspect-ratio: 2560/806; }
#frame-p45 { aspect-ratio: 2560/1570; }
#frame-p41 { aspect-ratio: 2560/1831; }
/* /photos:frames */
