/* Self-hosted fonts (SIL Open Font License 1.1, see /site/fonts/OFL-*.txt): the same families, axes and
   weights as the mockup's Google Fonts link, subsets latin + latin-ext (Czech). Variable fonts: one file
   per family, style and subset covers the whole weight range. No request goes to Google (GDPR). */
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("/site/fonts/bodoni-moda-italic-latin-ext-7edf045cd2e652ccb3cee78d24ec0026.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("/site/fonts/bodoni-moda-italic-latin-1871af2b0798167f80a287e85893e7d7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/site/fonts/bodoni-moda-latin-ext-16f173db2e2692271176992758986e94.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/site/fonts/bodoni-moda-latin-2c2bff3fe09a8e9028f318d62e7fca17.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/site/fonts/jetbrains-mono-latin-ext-e6155c5cfacf3867c500daf0ebcba222.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/site/fonts/jetbrains-mono-latin-570751c5f8b418972c1976160ba6ed85.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/site/fonts/schibsted-grotesk-latin-ext-52c63824a8f6494c8a418712e84d57f5.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/site/fonts/schibsted-grotesk-latin-c5e9a9901938d27cc1f895de4b3b32ec.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Public site styles (ported from the mockup: tokens.css, HomeView, GalleryBlock, PrintFrame,
   FilmDivider, Lightbox). Mobile-first: base rules are the 390 px layout, min-width queries add columns. */

:root {
  --paper: #ECEEF0;
  --surface: #F8F9FA;
  --ink: #111418;
  --muted: #59616B;
  --line: #C9CED5;
  --accent: #0099CC;
  /* AA-safe darker shade of --accent, used wherever the accent is text, a solid-fill
     hover background under white text, or a focus ring against light surfaces: plain
     --accent (#0099CC) falls under the 3:1/4.5:1 WCAG thresholds in those contexts. */
  --accent-strong: #007399;
  --on-accent: #FFFFFF;
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --s-1: .75rem;
  --s0: 1rem;
  --s1: 1.25rem;
  --s2: 1.6rem;
  --s3: 2.4rem;
  --s4: 3.6rem;
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  /* sticky footer: short pages (404) still end with the footer at the bottom of the viewport */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > footer { flex-shrink: 0; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }

.mono { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; line-height: 1.02; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); letter-spacing: -.01em; }
h2 em, h1 em { font-style: italic; font-weight: 400; }
p { margin: 0; }
ul.grid, ul.gallery-index { list-style: none; padding: 0; }
ul.grid { margin: 0; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

/* skip link: first focusable element, visible on focus */
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: .6em 1em; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 10px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s0); min-height: 60px; }
.brand { font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; text-decoration: none; letter-spacing: .01em; }
.brand span { font-style: italic; font-weight: 400; color: var(--muted); }
.nav { display: flex; align-items: center; gap: var(--s2); }
.nav a { text-decoration: none; font-size: .92rem; color: var(--muted); cursor: pointer; }
.nav a:hover { color: var(--ink); }
.nav .links { display: none; gap: var(--s2); }
@media (min-width: 820px) { .nav .links { display: flex; } }
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .72em 1.15em; min-height: 44px; border-radius: 999px; font-weight: 600; font-size: .92rem; text-decoration: none; border: 1px solid var(--ink); transition: background .2s, color .2s; cursor: pointer; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.nav .btn { color: var(--paper); }

/* print frame: photo with crop marks and a two-part mono caption */
.print { position: relative; margin: 0; }
.print .frame { position: relative; width: 100%; overflow: hidden; }
.print img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--line); }
.print.grayscale img { filter: grayscale(1); }
.print::before, .print::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--ink); border-style: solid; opacity: .55; z-index: 1;
}
.print::before { top: -8px; left: -8px; border-width: 1px 0 0 1px; }
.print::after { bottom: -8px; right: -8px; border-width: 0 1px 1px 0; }
.print figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25em .75em; margin-top: .55rem; }
/* owner-written photo caption (D14): sentence case, wraps, clamped by CSS only (the server never cuts it) */
.print figcaption .custom {
  text-transform: none; font-size: .72rem; color: var(--muted); text-align: right; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; margin-left: auto;
}
.print figcaption .custom.clamp-2 { -webkit-line-clamp: 2; }
.print figcaption .custom.clamp-3 { -webkit-line-clamp: 3; }
.shutter { display: block; width: 100%; height: 100%; cursor: pointer; }
.shutter.zoom { cursor: zoom-in; }
.shutter img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.shutter:hover img { transform: scale(1.03); }
.shutter:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 11px; }

/* film divider */
.film { height: 26px; background: var(--ink); position: relative; overflow: hidden; }
.film::before {
  content: ""; position: absolute; inset: 6px 0;
  background: repeating-linear-gradient(90deg, var(--paper) 0 10px, transparent 10px 26px);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 4px no-repeat, linear-gradient(#000 0 0) bottom / 100% 4px no-repeat;
  mask: linear-gradient(#000 0 0) top / 100% 4px no-repeat, linear-gradient(#000 0 0) bottom / 100% 4px no-repeat;
  opacity: .9;
}
.film span {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 3rem; white-space: nowrap;
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em; color: var(--paper); opacity: .75; padding-left: 1rem;
}

/* hero */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: end; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.hero .lead { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.hero h1 { font-size: clamp(4.2rem, 13.5vw, 10.5rem); letter-spacing: -.035em; line-height: .86; font-weight: 600; overflow-wrap: normal; }
.hero h1 em { display: block; padding-left: .42em; color: var(--accent-strong); font-weight: 600; }
.hero .tag { font-size: clamp(1.1rem, 1.7vw, 1.35rem); max-width: 34ch; line-height: 1.45; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: var(--s0); }
@media (min-width: 600px) { .ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ledger div { padding: .9rem .9rem .9rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }
.ledger b { font-family: var(--f-display); font-size: 1.9rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.ledger span { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.hero-print { max-width: 520px; justify-self: end; width: 100%; }

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); scroll-margin-top: 60px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s1); margin-bottom: var(--s3); }
.head p { max-width: 46ch; color: var(--muted); }

/* portfolio: jump index */
.gallery-index { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }
.index-card { display: flex; flex-direction: column; align-items: center; gap: .5rem; width: 128px; text-decoration: none; }
.index-card .print { width: 100%; }
.index-card .mono { text-align: center; }
.index-card:hover .mono { color: var(--ink); }

/* gallery block (homepage preview and gallery page) */
.gallery-block + .gallery-block { margin-top: clamp(2.5rem, 5vw, 4rem); }
.gallery-head { display: flex; flex-direction: column; gap: .3rem; margin-bottom: var(--s2); }
.gallery-head h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.6; text-wrap: wrap; }
.gallery-head h3 a { text-decoration: none; }
.gallery-head h3 a:hover { color: var(--accent-strong); }
.gallery-head h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); letter-spacing: -.01em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); grid-auto-flow: dense; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid-item.wide { grid-column: span 2; }
.more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s0); margin-top: var(--s2); }

/* gallery page */
.gallery-body { padding-block: clamp(2rem, 5vw, 4rem); }
.back { display: inline-block; text-decoration: none; margin-bottom: var(--s2); padding-block: .6rem; }
.back:hover { color: var(--ink); }

/* story */
.story { background: var(--surface); border-block: 1px solid var(--line); }
.story .wrap { display: grid; gap: clamp(2rem, 5vw, 4.5rem); }
@media (min-width: 900px) { .story .wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; } }
.story-print { max-width: 440px; }
.story .copy { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.story .intro { font-family: var(--f-display); font-size: clamp(1.35rem, 2.3vw, 1.8rem); line-height: 1.35; max-width: 32ch; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--s1); padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.timeline .yr { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.timeline p { max-width: 60ch; }
.sitters { display: flex; flex-direction: column; gap: .6rem; padding-top: var(--s0); }
.sitters p { font-family: var(--f-display); font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.7rem); line-height: 1.35; }
.sitters p.mono { font-family: var(--f-mono); font-style: normal; font-size: .72rem; }
.sitters p span { color: var(--muted); font-style: normal; }

/* why */
.why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
@media (min-width: 760px) { .why ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4rem); } }
.why li { padding-block: 1.4rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .4rem; }
.why h3 { font-size: 1.55rem; }
.why li p { color: var(--muted); max-width: 52ch; }
.uses { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--s3); }
.uses span { border: 1px solid var(--line); border-radius: 999px; padding: .45em .95em; font-size: .9rem; background: var(--surface); }

/* contact */
.contact { background: var(--ink); color: var(--paper); }
.contact .wrap { display: grid; gap: var(--s3); }
@media (min-width: 900px) { .contact .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }
.contact h2 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.contact h2 em { color: var(--accent); }
.contact .mono { color: color-mix(in srgb, var(--paper) 60%, var(--ink)); }
.contact p.sub { max-width: 60ch; opacity: .8; margin-top: var(--s1); }
.channels { display: flex; flex-direction: column; border-top: 1px solid color-mix(in srgb, var(--paper) 30%, var(--ink)); }
.channels a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding-block: 1.15rem; border-bottom: 1px solid color-mix(in srgb, var(--paper) 30%, var(--ink)); text-decoration: none; }
.channels strong { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; display: block; }
.channels small { display: block; opacity: .65; font-size: .88rem; overflow-wrap: anywhere; }
.channels .arr { font-size: 1.4rem; transition: transform .25s; }
.channels a:hover .arr { transform: translate(4px, -4px); }
.channels a:hover strong { color: var(--accent); }
.channels a.primary strong { color: var(--accent); }

/* footer */
footer { background: var(--ink); color: var(--paper); border-top: 1px solid color-mix(in srgb, var(--paper) 20%, var(--ink)); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; }
footer .mono { color: color-mix(in srgb, var(--paper) 60%, var(--ink)); }
.footer-credit a { text-decoration: underline; text-underline-offset: 2px; opacity: .8; }
.footer-credit a:hover { opacity: 1; }

/* 404 / 5xx */
.error-main .wrap { min-height: 60vh; height: 100%; display: flex; align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
.error-block { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); max-width: 40rem; padding-block: var(--s2); }
.error-block::before, .error-block::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--ink); border-style: solid; opacity: .55;
}
.error-block::before { top: 0; left: -8px; border-width: 1px 0 0 1px; }
.error-block::after { bottom: 0; right: -8px; border-width: 0 1px 1px 0; }
.error-block h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); letter-spacing: -.01em; }
.error-text { color: var(--muted); max-width: 46ch; }
@media (min-width: 720px) { .error-main .wrap { justify-content: center; } }

/* lightbox (SCR-002) */
.lb {
  border: 0; padding: 0; margin: 0; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh;
  background: color-mix(in srgb, var(--paper) 96%, transparent); color: var(--ink);
}
.lb::backdrop { background: var(--paper); }
.lb .stage {
  position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
           max(14px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.lb .bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; }
.lb .lb-view { position: relative; min-height: 0; display: grid; }
.lb .lb-view > img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; min-height: 0; transition: opacity .15s; }
.lb .lb-placeholder { filter: blur(2px); }
.lb .lb-image.is-loading { opacity: 0; }
.lb .lb-view > p { grid-area: 1 / 1; place-self: center; background: var(--paper); padding: .4em .8em; border-radius: 999px; }
.lb .ctl { display: flex; justify-content: center; align-items: center; gap: .6rem; padding-top: .6rem; }
.lb .lb-counter { color: var(--ink); font-size: .82rem; min-width: 4.5em; text-align: center; }
.lb button {
  font: inherit; background: transparent; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; min-width: 44px; height: 44px; padding: 0 1rem; cursor: pointer;
}
.lb button:hover { border-color: var(--ink); }
html.lb-open { overflow: hidden; }
