/* Layout concept: a French illustrated book. Italic serif masthead, ink-navy text on grained drawing paper, comic pages set like plates with captions. */
:root {
  --paper: #f7f4ed;
  --paper-tex: url("paper.jpg");
  --card: #fbf9f4;
  --ink: #1d2a44;
  --ink-soft: #5d6781;
  --rule: #1d2a44;
  --hair: #d6d3ca;
  --gold: #b8620c;
  --logo-light: block;
  --logo-dark: none;
  --btn-fg: #fbf9f4;
  --font-display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --font-body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.8rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.4vw, 2.5rem);
  --step-4: clamp(2.4rem, 5vw, 3.6rem);
  --maxw: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1b1f; --paper-tex: url("paper-dark.jpg"); --card: #22242a; --ink: #ece8de; --ink-soft: #a7abb8;
    --rule: #d8d3c6; --hair: #3a3c44; --gold: #f5a23a; --btn-fg: #1a1b1f; --logo-light: none; --logo-dark: block; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1a1b1f; --paper-tex: url("paper-dark.jpg"); --card: #22242a; --ink: #ece8de; --ink-soft: #a7abb8;
  --rule: #d8d3c6; --hair: #3a3c44; --gold: #f5a23a; --btn-fg: #1a1b1f; --logo-light: none; --logo-dark: block; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  background-color: var(--paper); background-image: var(--paper-tex); background-size: 512px 512px;
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: 1.45rem; }
h1 em, h2 em { font-style: italic; font-weight: 600; }
p { margin: 0; }

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

/* ---------- masthead ---------- */
.site-head .wrap { display: grid; justify-items: center; gap: 0; padding-block: 26px 0; }
.brand { text-decoration: none; display: grid; justify-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); width: 100%; }
.brand .logo { width: auto; height: clamp(74px, 11vw, 120px); }
.brand .logo-light { display: var(--logo-light); }
.brand .logo-dark { display: var(--logo-dark); }
.brand .name { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1; color: var(--ink); }
.brand small { font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-soft); }
.brand:hover .name { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; padding-block: 10px; width: 100%; border-bottom: 1px solid var(--hair); font-size: 0.9rem; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* ---------- home spread ---------- */
.hero { padding-block: 36px 10px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hero-page { margin: 0; display: grid; gap: 8px; }
.hero-page button { all: unset; cursor: zoom-in; display: block; background: #fff; box-shadow: 0 1px 2px rgba(29, 42, 68, .12), 0 8px 26px rgba(29, 42, 68, .10); }
.hero-page figcaption, .gallery figcaption, .gif figcaption { font-family: var(--font-display); font-style: italic; font-size: 1.02rem; color: var(--ink-soft); line-height: 1.35; }
.hero-text { display: grid; gap: 20px; min-width: 0; padding-top: 6px; }
.lede { font-size: 1.05rem; max-width: 44ch; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; }
.toc a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0; text-decoration: none; }
.toc a::after { content: ""; grid-column: 2; grid-row: 1; border-bottom: 1px dotted var(--ink-soft); transform: translateY(-4px); opacity: .7; }
.toc a span:first-child { grid-column: 1; grid-row: 1; }
.toc a span:last-child { grid-column: 3; grid-row: 1; font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--gold); }
.toc a:hover span:first-child { color: var(--gold); }
.facts { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; gap: 8px 30px; color: var(--ink-soft); font-size: 0.85rem; }
.facts strong { display: block; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; }

/* ---------- sections ---------- */
main { display: block; }
.section { padding-block: 44px; }
.section + .section { border-top: 1px solid var(--hair); }
.section-head { display: grid; gap: 8px; margin-bottom: 26px; max-width: 68ch; }
.eyebrow { font-size: var(--step--1); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
.intro { color: var(--ink-soft); max-width: 62ch; }
.page-head { padding-block: 40px 4px; display: grid; gap: 12px; }
.page-head p { max-width: 62ch; }
.page-head p { font-size: 1.08rem; max-width: 62ch; }

/* doors */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 30px; }
@media (max-width: 760px) {
  .about-grid, .about-grid.flip { grid-template-columns: 1fr; }
  .about-grid.flip .about-art { order: 2; }
  .gallery.justify { --rowh: 140px; gap: 18px 12px; }
  .gallery.grid3, .gallery.uniform { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .gallery.grid3 > figure:last-child:nth-child(3n+1) { grid-column: auto; }
  .gallery.feature figure { flex-basis: 100% !important; } .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } }
.door { display: grid; gap: 8px; text-decoration: none; }
.door .frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--card); }
.door .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.door:hover .frame img { transform: scale(1.03); }
.door h3 { margin-top: 4px; }
.door:hover h3 { color: var(--gold); }
.door p { color: var(--ink-soft); font-size: 0.92rem; }

/* clients */
.clientwall { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 0; max-width: 1180px; }
.clientwall li { display: grid; justify-items: center; gap: 2px; padding: 0 22px; text-align: center; }
.clientwall li + li { border-left: 1px solid var(--hair); }
.clientwall .cn { font-family: var(--font-display); font-size: 1.32rem; line-height: 1.2; white-space: nowrap; }
.clientwall .ck { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.section.centered .section-head { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.section.centered .gallery, .section.centered .gif { margin-left: auto; margin-right: auto; }
.section.centered .gif { justify-items: center; text-align: center; }
.row.center { justify-content: center; }

/* story cards */
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 34px 24px; }
.story { all: unset; cursor: pointer; display: grid; gap: 6px; align-content: start; }
.story .stackwrap { position: relative; display: block; }
.story .stackwrap.multi::before { content: ""; position: absolute; inset: 5px -5px -5px 5px; background: var(--card); box-shadow: 0 1px 3px rgba(29, 42, 68, .18); }
.story .cover { display: block; position: relative; background: #fff; aspect-ratio: 5 / 7; overflow: hidden; box-shadow: 0 1px 3px rgba(29, 42, 68, .18), 0 6px 18px rgba(29, 42, 68, .08); }
.story .cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s ease; }
.story:hover .cover img { transform: scale(1.03); }
.story.wide .cover { aspect-ratio: 4 / 3; }
.story .t { display: block; margin-top: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; }
.story:hover .t { color: var(--gold); }
.story .m { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.story .sum { display: block; font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }
.stories.uniform { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 40px; max-width: 980px; margin: 0 auto; }
.stories.uniform .cover img { object-position: left top; }
.story:focus-visible .cover { outline: 2px solid var(--gold); outline-offset: 4px; }

/* featured story */
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 36px; align-items: center; }
.feature-text { display: grid; gap: 14px; justify-items: start; }
.feature-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fpage { all: unset; cursor: zoom-in; background: #fff; box-shadow: 0 1px 3px rgba(29, 42, 68, .18), 0 6px 18px rgba(29, 42, 68, .08); }
.fpage:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* galleries */
.gallery { columns: 4 230px; column-gap: 22px; }
.gallery figure { break-inside: avoid; margin: 0 0 24px; display: grid; gap: 8px; }
.gallery button { all: unset; cursor: zoom-in; display: block; background: var(--card); }
.gallery button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gallery.tight { columns: 3 300px; }

/* prose */
.prose { display: grid; gap: 18px; max-width: 64ch; align-content: start; line-height: 1.75; }
.prose h3 { margin-top: 26px; }
.prose h3:first-child { margin-top: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.two > * { min-width: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; gap: 10px; align-items: baseline; }
.steps li::before { content: counter(s) "."; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.3rem; color: var(--gold); }
.box { border-top: 1px solid var(--rule); padding: 22px 0 6px; display: grid; gap: 16px; line-height: 1.75; }
.box + .box, .about-art + .box { margin-top: 30px; }
.biblio { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.biblio li { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; border-bottom: 1px solid var(--hair); padding-bottom: 12px; }
.biblio .k { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 500; font-size: 0.92rem; letter-spacing: 0.04em; padding: 11px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--btn-fg); text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--btn-fg); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.email { font-family: var(--font-display); font-style: italic; font-size: var(--step-3); user-select: all; word-break: break-all; }

/* closing band */
.cta { border-top: 1px solid var(--rule); }
.cta .wrap { padding-block: 40px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.cta p { max-width: 54ch; color: var(--ink-soft); }
.balloon { font-family: var(--font-display); font-style: italic; font-size: var(--step-3); line-height: 1.15; color: var(--ink); }

/* videos */
.videos { display: grid; gap: 44px; }
.video { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.vframe { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--ink); max-width: 100%; overflow: hidden; box-shadow: 0 6px 18px rgba(29, 42, 68, .14); }
.vfacade img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; opacity: .92; }
.vfacade:hover img { transform: scale(1.03); opacity: 1; }
.vposter-text { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px 24px 80px; text-align: center; font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--paper); }
.vfacade img + .vposter-text { display: none; }
.play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(20, 22, 28, .72); box-shadow: 0 4px 16px rgba(0,0,0,.3); transition: background .2s, transform .2s; }
.play::after { content: ""; position: absolute; left: 31px; top: 24px; border-left: 24px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.vfacade:hover .play { background: var(--gold); transform: scale(1.06); }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vtext { display: grid; gap: 10px; }
.gif { margin: 0; display: grid; gap: 8px; max-width: 520px; }
.gif button { all: unset; cursor: zoom-in; }


/* about */
.about-intro { padding-bottom: 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 96px); align-items: center; }
.about-grid.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.about-art { margin: 0; display: grid; gap: 10px; }
.about-art button { all: unset; cursor: zoom-in; display: block; }
.about-art img { width: 100%; box-shadow: 0 8px 26px rgba(29, 42, 68, .16); }
.about-art figcaption { font-family: var(--font-display); font-style: italic; font-size: 1.02rem; color: var(--ink-soft); }
.about-row { padding-block: 56px; }

/* galleries v2 */
.gallery.justify { columns: auto; display: flex; flex-wrap: wrap; gap: 26px 22px; --rowh: 250px; }
.gallery.justify::after { content: ""; flex: 999 1 0; }
.gallery.justify .gi { flex: var(--ar) 1 calc(var(--ar) * var(--rowh)); margin: 0; min-width: 0; }
.gallery.justify .gi button img, .gallery.justify .pair button img { width: 100%; }
.gallery.justify .pair { display: flex; gap: 12px; align-items: flex-start; }
.gallery.justify .pair figure { flex: var(--ar) 1 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.gallery.grid3 { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 26px; max-width: 980px; margin: 0 auto; }
.gallery.grid3 figure { margin: 0; }
.gallery.grid3 > figure:last-child:nth-child(3n+1) { grid-column: 2; }
.gallery.uniform { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 26px; }
.gallery.uniform figure { margin: 0; }
.gallery.uniform button { aspect-ratio: 3508 / 2480; overflow: hidden; }
.gallery.uniform img { width: 100%; height: 100%; object-fit: cover; }
.gallery.feature { columns: auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 34px 4%; max-width: 980px; margin: 0 auto; }
.gallery.feature figure { flex: 0 0 var(--w, 30%); margin: 0; }
.gallery.feature figure:first-child { flex-basis: 100%; }
.gallery-wide { margin-top: 30px; }
.gallery-wide figure { margin: 0; display: grid; gap: 8px; }
.gallery-wide button { all: unset; cursor: zoom-in; display: block; }
.gallery-wide img { width: 100%; }
.gallery.justify.center-last { justify-content: center; }
.gallery.justify.center-last::after { display: none; }
.gallery.justify .gi.lastrow { flex-grow: 0; }
.gallery-wide figcaption { font-family: var(--font-display); font-style: italic; font-size: 1.02rem; color: var(--ink-soft); }
.story .cover.centered img { object-position: center; }
.stories.uniform .cover.centered img { object-position: center; }

/* footer nav */
.foot-nav { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--hair); font-family: var(--font-body); font-style: normal; font-size: 0.85rem; }
.foot-nav a { text-decoration: none; color: var(--ink-soft); }
.foot-nav a:hover, .foot-nav a[aria-current="page"] { color: var(--gold); }

/* footer */
.site-foot { padding-block: 0 40px; }
.site-foot .wrap { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(20, 22, 28, 0.97); display: grid; grid-template-rows: auto 1fr auto; color: #f0ede5;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.viewer[hidden] { display: none; }
.viewer .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; }
.viewer .bar .ttl { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer .stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: auto; padding: 0 56px; }
.viewer .stage img { max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); max-width: 100%; width: auto; object-fit: contain; background: #fff; }
.viewer.zoom .stage { place-items: start center; }
.viewer.zoom .stage img { max-height: none; max-width: min(1400px, 100%); }
.viewer .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 1.6rem; cursor: pointer; }
.viewer .prev { left: 6px; } .viewer .next { right: 6px; }
.viewer .nav-btn:disabled { opacity: .2; cursor: default; }
.viewer .vbtn { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-family: var(--font-body); padding: 6px 12px; cursor: pointer; font-size: .85rem; }
.viewer .cap { padding: 10px 16px 14px; font-size: .88rem; text-align: center; color: #cfccc3; max-width: 900px; margin: 0 auto; }
.viewer .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 760px) {
  .hero-grid, .feature-grid, .video, 
  .clientwall li { padding: 0 16px; }
  .stories.uniform { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .viewer .stage { padding: 0 8px; }
  .viewer .nav-btn { width: 36px; height: 52px; background: rgba(0,0,0,.35); }
  .biblio li { grid-template-columns: 1fr; gap: 2px; }
  .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
}
@media (max-width: 600px) {
  .site-head .wrap { padding-block: 16px 0; }
  .brand { gap: 8px; padding-bottom: 10px; }
  .brand .logo { height: 62px; }
  .brand small { font-size: 0.62rem; letter-spacing: 0.22em; }
  .nav { gap: 2px 16px; font-size: 0.84rem; padding-block: 8px; }
  .feature-pages { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
