/* ASA Foundation — site styles
   Brand blue is the "PHOTOGRAPHY" blue from the Asa Mathat logo (#3E9FD6); a deeper shade carries text on light paper.
   Concept: a photographer's contact sheet. Ink on cool paper, photos in dark film frames,
   film-edge markings (ASA is also the old film-speed scale) as the one recurring detail. */
:root {
  --paper: #f3f4f4;
  --surface: #ffffff;
  --ink: #121614;
  --muted: #59625e;
  --line: #d8ddd8;
  --accent: #1d6fa5;
  --brand-blue: #3e9fd6;
  --accent-ink: #ffffff;
  --accent-soft: #dfedf8;
  --logo-filter: brightness(0);
  --safelight: #c96a1b;
  --frame: #15191c;
  --frame-ink: #c6ced3;
  --ok: #2f7d4a;
  --err: #b23a36;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1180px;
  --read: 64ch;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1114; --surface: #141a1f; --ink: #e8ecef; --muted: #9ba6ad; --line: #252e35;
    --accent: #3e9fd6; --brand-blue: #3e9fd6; --accent-ink: #051521; --accent-soft: #10283a; --logo-filter: none; --safelight: #f0a25c;
    --frame: #050709; --frame-ink: #aab4ba; --ok: #6fcf8d; --err: #ef8a85;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1114; --surface: #141a1f; --ink: #e8ecef; --muted: #9ba6ad; --line: #252e35;
  --accent: #3e9fd6; --brand-blue: #3e9fd6; --accent-ink: #051521; --accent-soft: #10283a; --logo-filter: none; --safelight: #f0a25c;
  --frame: #050709; --frame-ink: #aab4ba; --ok: #6fcf8d; --err: #ef8a85;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

h1, h2, h3 { font-family: var(--display); font-stretch: 112%; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 780; }
h3 { font-size: 1.2rem; font-weight: 720; font-stretch: 104%; }
p { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: var(--read); }
.prose { max-width: var(--read); display: flex; flex-direction: column; gap: 1em; }
.label {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
}
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 16px; }
.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.logo { display: block; height: auto; filter: var(--logo-filter); }
.logo-full { width: 88px; }
.logo-mark { width: 84px; }
.signature { width: min(240px, 70%); }
.signed { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.signed span { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 8px 10px; border-radius: var(--radius); }
.nav a:hover { background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .btn { margin-left: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); padding: 8px 12px; font: 600 0.9rem var(--body); cursor: pointer; }
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
         background: var(--surface); border-bottom: 1px solid var(--line);
         padding: 8px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav .btn { margin: 12px 0 0; text-align: center; border-bottom: none; }
}

/* film edge — decorative */
.edge {
  height: 26px; background: var(--frame); color: var(--frame-ink); overflow: hidden; position: relative;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; white-space: nowrap;
}
.edge::before, .edge::after {
  content: ""; position: absolute; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(90deg, transparent 0 9px, var(--paper) 9px 17px, transparent 17px 26px);
  opacity: 0.55;
}
.edge::before { top: 3px; } .edge::after { bottom: 3px; }
.edge span { position: absolute; top: 50%; transform: translateY(-50%); left: 0; color: var(--safelight); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 650 0.98rem var(--body); text-decoration: none; cursor: pointer;
  padding: 12px 20px; border-radius: var(--radius); border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; max-width: 760px; }
.band { background: var(--frame); color: #e9eeeb; }
.band .label { color: var(--safelight); }
.band .muted, .band .lede { color: #b3bfba; }
.band a:not(.btn) { color: var(--brand-blue); }
.band .btn.ghost { color: #e9eeeb; border-color: #e9eeeb; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(44px, 7vw, 88px) clamp(36px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: end; }
.hero h1 { max-width: 15ch; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.page-hero { padding-block: clamp(44px, 6vw, 80px) clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; }
.page-hero h1 { max-width: 18ch; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- film frames (photos) ---------- */
.frame { margin: 0; background: var(--frame); padding: 10px 10px 8px; border-radius: 3px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.frame .shot { aspect-ratio: 4 / 3; background: #20262b; overflow: hidden; position: relative; max-width: 100%; }
.frame.tall .shot { aspect-ratio: 4 / 5; }
.frame.wide .shot { aspect-ratio: 16 / 9; }
.frame.pos-right img { object-position: 78% 50%; }
.frame.natural .shot { aspect-ratio: auto; }
.frame.natural img { height: auto; }
.gallery { columns: 3 260px; column-gap: 14px; }
.gallery .frame { break-inside: avoid; margin-bottom: 14px; }
.bpr-badge { width: min(280px, 80%); height: auto; background: #fff; padding: 12px 16px; border-radius: 4px; transform: rotate(-3deg); box-shadow: 0 10px 22px -14px rgba(0,0,0,.5); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame figcaption { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--frame-ink); display: flex; justify-content: space-between; gap: 10px; }
.frame figcaption b { color: var(--safelight); font-weight: 500; }
.frame.empty .shot {
  display: grid; place-items: center; text-align: center; padding: 12px;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 34%, rgba(255,255,255,.05) 35% 36%, transparent 37%),
    repeating-linear-gradient(135deg, #1c2227 0 12px, #20272c 12px 24px);
}
.frame.empty .shot::after { content: "Photo coming soon"; font-family: var(--mono); font-size: 0.7rem; color: #7f8d88; letter-spacing: .06em; }
.frame.empty img { display: none; }

.contact-sheet { align-items: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- facts row ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.fact { padding: 20px 18px 20px 0; display: flex; flex-direction: column; gap: 4px; }
.fact + .fact { padding-left: 18px; border-left: 1px solid var(--line); }
.fact strong { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: none; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.step { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 2px solid var(--ink); }
.step .num { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); letter-spacing: .12em; }
.step p { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- cards / lists ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card .label { margin-bottom: 2px; }
.card a.more { margin-top: auto; font-weight: 600; }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.project { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; }
.project .n { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; padding-top: 3px; }
.project h3 { font-size: 1.08rem; }
.project p { grid-column: 2; color: var(--muted); font-size: 0.95rem; }

.names { columns: 3 220px; column-gap: 32px; list-style: none; margin: 0; padding: 0; }
.names li { break-inside: avoid; padding: 9px 0; border-top: 1px solid var(--line); }
.names li span { display: block; color: var(--muted); font-size: 0.86rem; }
.band .names li { border-color: #2c3633; }
.band .names li span { color: #9fb0aa; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.person { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.person .role { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }
.person p { color: var(--muted); font-size: 0.96rem; }

.quote { font-family: var(--display); font-stretch: 100%; font-weight: 500; font-style: normal; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.3; max-width: 28ch; margin: 0; }
.quote cite { display: block; font-family: var(--mono); font-style: normal; font-size: 0.8rem; color: var(--muted); margin-top: 14px; letter-spacing: .06em; }

/* table */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
tbody tr:last-child td { border-bottom: none; }

/* callout */
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-size: 0.84rem; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.form button[disabled] { opacity: .6; cursor: progress; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 220px; background: transparent; border-color: #3a4642; color: inherit; }
.inline-form .form-status { flex-basis: 100%; }

/* ---------- footer ---------- */
.site-footer .logo-mark { filter: none; margin-bottom: 14px; }
.site-footer { background: var(--frame); color: #d6dfdb; padding-block: 56px 32px; margin-top: 0; }
.site-footer a { color: #d6dfdb; }
.site-footer .label { color: var(--safelight); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
.footer-grid h2 { font-size: 1.5rem; color: #fff; margin-bottom: 8px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; min-width: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-base { margin-top: 44px; padding-top: 20px; border-top: 1px solid #2c3633; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: #93a29c; font-family: var(--mono); }
.site-footer .form-status.ok { color: #7fd9a0; }
.site-footer .form-status.err { color: #f2a19c; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.anchor { scroll-margin-top: 24px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------- motion (all of it switches off for people who prefer reduced motion) ---------- */
/* 1. Film advances as you scroll: script sets --film on each strip */
.edge::before, .edge::after { background-position-x: calc(var(--film, 0) * 1px); }
.edge span { transform: translate(calc(var(--film, 0) * 1px), -50%); will-change: transform; }

/* 2. Photos "develop" the first time they scroll into view (script adds .develop, then .developed) */
.frame.develop img { filter: grayscale(1) brightness(.75) contrast(.9); transition: filter 1.6s ease-out, transform .6s ease; }
.frame.develop.developed img { filter: none; }

/* 3. Rollovers */
.frame { transition: transform .35s ease, box-shadow .35s ease; }
.frame img { transition: transform .6s ease, filter 1.6s ease-out; }
.frame:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px rgba(0,0,0,.55); }
.frame:hover img { transform: scale(1.035); }
.frame figcaption b { transition: color .3s ease; }
.frame:hover figcaption b { color: var(--brand-blue); }

.card { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 24px -18px rgba(13, 40, 60, .45); }

.btn:active { transform: scale(.97); }

.nav a:not(.btn) { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-position: 50% 100%; background-repeat: no-repeat; transition: background-size .25s ease, color .2s ease; }
.nav a:not(.btn):hover { background-color: transparent; background-size: calc(100% - 20px) 2px; color: var(--accent); }

.step { transition: border-color .3s ease; }
.step:hover { border-top-color: var(--accent); }
.names a { transition: padding-left .25s ease; }
.names li:hover a { padding-left: 6px; }

.brand .logo { transition: opacity .2s ease; }
.brand:hover .logo { opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .frame.develop img { filter: none; }
  .frame:hover, .card:hover { transform: none; }
  .frame:hover img { transform: none; }
}

/* ---------- lightbox: tap a photo to see it large ---------- */
.frame:not(.empty) .shot { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(5,7,9,.94); display: grid; grid-template-rows: 1fr auto; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); opacity: 0; transition: opacity .25s ease; }
.lb.open { opacity: 1; }
.lb[hidden] { display: none; }
.lb-stage { min-height: 0; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border: 10px solid #15191c; border-bottom-width: 10px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); transform: scale(.97); transition: transform .3s ease; }
.lb.open .lb-stage img { transform: scale(1); }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; color: #c6ced3; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; }
.lb-bar b { color: var(--safelight); font-weight: 500; margin-right: 10px; }
.lb-cap { min-width: 0; }
.lb-ctrls { display: flex; gap: 8px; flex: none; }
.lb button { background: transparent; color: #e8ecef; border: 1px solid #3a444b; border-radius: 6px; font: 500 .9rem var(--body); padding: 9px 14px; cursor: pointer; }
.lb button:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.lb button:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.lb-count { color: #7f8b92; }
@media (max-width: 560px) { .lb-bar { flex-direction: column; align-items: stretch; } .lb-ctrls { justify-content: space-between; } }

.donate-box { background: var(--accent-soft); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.donate-box h2 { margin: 0; }
.donate-box .fine { font-size: .9rem; opacity: .8; margin: 0; }

/* ---------- links on dark backgrounds: logo blue, underline only on hover ---------- */
:root { --link-on-dark: #4fb0e3; }
.band a:not(.btn), .site-footer a:not(.btn) { color: var(--link-on-dark); text-decoration: none; }
.band a:not(.btn):hover, .site-footer a:not(.btn):hover,
.band a:not(.btn):focus-visible, .site-footer a:not(.btn):focus-visible { text-decoration: underline; text-decoration-thickness: 1px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #4fb0e3; --brand-blue: #4fb0e3; }
  :root:not([data-theme="light"]) main a:not(.btn) { text-decoration: none; }
  :root:not([data-theme="light"]) main a:not(.btn):hover { text-decoration: underline; }
}
:root[data-theme="dark"] { --accent: #4fb0e3; --brand-blue: #4fb0e3; }
:root[data-theme="dark"] main a:not(.btn) { text-decoration: none; }
:root[data-theme="dark"] main a:not(.btn):hover { text-decoration: underline; }
