/* Gutierrez Painting. Chaptered editorial on paper.
   Tokens ported from the ElevenLabs system (off-white canvas, warm near-black ink,
   light-weight serif display, body sans with a touch of positive tracking, hairline
   dividers, one ink pill). Literal brand hexes replaced: the accent is the studio
   wall from the listing photograph, not a brand colour. */

:root {
  --sc-canvas:      #f5f4f1;
  --sc-surface:     #ffffff;
  --sc-ink:         #14110d;
  --sc-ink-soft:    #6b645a;
  --sc-accent:      #2f4a5b;   /* the studio wall, sampled */
  --sc-accent-ink:  #f5f4f1;
  --sc-font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sc-font-text:    "Geist", system-ui, -apple-system, sans-serif;
  --sc-font-mono:    "Geist", system-ui, sans-serif;
  --sc-shadow-color: 36 12% 8%;
  --sc-e1: 0 1px 2px hsl(var(--sc-shadow-color) / 0.10), 0 2px 6px -1px hsl(var(--sc-shadow-color) / 0.08);
  --sc-e2: 0 2px 4px hsl(var(--sc-shadow-color) / 0.10), 0 8px 18px -4px hsl(var(--sc-shadow-color) / 0.14);
  --sc-edge: inset 0 1px 0 rgba(255,255,255,0.7);
  --sc-track-normal: 0.008em;
  --sc-leading-body: 1.58;
  --sc-r-sm: 4px; --sc-r-md: 8px; --sc-r-lg: 12px;

  --paper:   #f5f4f1;
  --paper-2: #ebe8e1;     /* the primer tone: chapter one and four */
  --white:   #ffffff;
  --ink:     #14110d;
  --ink-2:   #4a453d;
  --ink-3:   #6b645a;
  --hair:    #dedad2;
  --folio-w: 15rem;
  --measure: 34rem;
}

html { scroll-behavior: auto; }
body { background: var(--paper); color: var(--ink); }
a { color: inherit; }
::selection { background: var(--sc-accent); color: var(--sc-accent-ink); }

/* ---------------------------------------------------------- type ramp -- */
.d { font-family: var(--sc-font-display); font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 30; line-height: 1.02; letter-spacing: -0.018em; text-wrap: balance; margin: 0; }
.d--title { font-size: clamp(2.9rem, 1.6rem + 5.2vw, 6.6rem); letter-spacing: -0.028em; line-height: 0.98; }
.d--ch    { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.6rem); letter-spacing: -0.02em; }
.d--quote { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.95rem); line-height: 1.25; letter-spacing: -0.012em; font-style: italic; font-variation-settings: "opsz" 72, "SOFT" 60; }
.d--colophon { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3.1rem); }
.t   { font-family: var(--sc-font-text); }
.lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); line-height: 1.42; letter-spacing: 0; max-width: 40ch; margin: 0; text-wrap: pretty; color: var(--ink-2); }
.prose { font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem); line-height: 1.6; color: var(--ink-2); max-width: var(--measure); margin: 0; text-wrap: pretty; letter-spacing: 0.008em; }
.prose + .prose { margin-top: 1.1em; }
.cap { font-family: var(--sc-font-text); font-size: 0.875rem; line-height: 1.45; letter-spacing: 0.01em; color: var(--ink-3); margin: 0; }
.label { font-family: var(--sc-font-text); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.hair { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* ---------------------------------------------------------------- folio -- */
.folio {
  position: fixed; inset-block: 0; left: 0; width: var(--folio-w);
  padding: 1.5rem 1.4rem; display: flex; flex-direction: column; gap: 1.2rem;
  border-right: 1px solid var(--hair); background: var(--paper);
  z-index: 40; font-family: var(--sc-font-text);
}
.folio__mark { font-family: var(--sc-font-display); font-weight: 400; font-variation-settings: "opsz" 24; font-size: 1.05rem; line-height: 1.2; letter-spacing: -0.005em; margin: 0; }
.folio__mark small { display: block; font-family: var(--sc-font-text); font-size: 0.78rem; font-weight: 400; color: var(--ink-3); letter-spacing: 0.01em; margin-top: 0.25rem; }
.folio__chapters { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.folio__chapters a { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.5rem; align-items: baseline; text-decoration: none; font-size: 0.86rem; color: var(--ink-3); padding: 0.28rem 0.4rem; margin-inline: -0.4rem; border-radius: var(--sc-r-sm); transition: color 240ms var(--sc-ease-out), background-color 240ms var(--sc-ease-out); }
.folio__chapters a .n { font-family: var(--sc-font-display); font-variation-settings: "opsz" 14; font-weight: 400; font-size: 0.95rem; color: var(--ink-3); }
.folio__chapters a[aria-current="true"] { color: var(--ink); background: var(--white); box-shadow: var(--sc-e1), var(--sc-edge); }
.folio__chapters a[aria-current="true"] .n { color: var(--sc-accent); }
.folio__chapters a:hover { color: var(--ink); }
.folio__chips-wrap { margin-top: auto; }
.folio__chips-wrap .label { display: block; margin-bottom: 0.55rem; }
.folio__chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; min-height: 2.5rem; }
.chip { display: grid; grid-template-columns: 2.1rem 1fr; gap: 0.6rem; align-items: center; font-size: 0.78rem; color: var(--ink-2); opacity: 0; transform: translate3d(-6px, 0, 0); }
.chip::before { content: ""; height: 2.1rem; border-radius: 3px; background: var(--c); box-shadow: var(--sc-e1), var(--sc-edge); }
.chip.chip--in { opacity: 1; transform: none; transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }
.chip small { display: block; color: var(--ink-3); font-size: 0.7rem; letter-spacing: 0.02em; }
.folio__call { font-size: 0.82rem; line-height: 1.45; color: var(--ink-2); margin: 0; padding-top: 1rem; border-top: 1px solid var(--hair); }
.folio__call a { text-decoration-color: var(--sc-accent); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
.folio__call a:hover { color: var(--sc-accent); }

main { margin-left: var(--folio-w); }

/* ------------------------------------------------------------- chapters -- */
.ch { position: relative; padding: clamp(3.5rem, 8vw, 7rem) clamp(1.5rem, 5vw, 5rem); }
.ch--title { min-height: 100svh; display: grid; align-content: end; background: var(--paper); padding-bottom: clamp(3rem, 9vh, 7rem); }
.ch--one { background: var(--paper-2); }
.ch--two { background: var(--white); }
.ch--silence { background: var(--ink); color: var(--paper); min-height: 100svh; display: grid; place-items: center; --sc-ink: #f5f4f1; --sc-ink-soft: #b9b3a8; }
.ch--height { background: var(--paper); padding: 0; }
.ch--four { background: var(--paper-2); }
.ch--colophon { background: var(--paper-2); padding: 0; }

.ch__head { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; margin-bottom: clamp(1.5rem, 3vw, 2.6rem); }
.ch__num { font-family: var(--sc-font-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(2.2rem, 1.4rem + 3vw, 4.2rem); line-height: 0.9; color: var(--sc-accent); letter-spacing: -0.03em; }
.spread { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.spread--one  { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.spread--two  { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
.spread--four { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.col { display: grid; gap: 1.2rem; align-content: start; }
.col > * + * { margin-top: 0; }

/* title page */
.title__mast { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; border-bottom: 1px solid var(--hair); padding-bottom: 0.7rem; margin-bottom: clamp(2.5rem, 12vh, 9rem); }
.title__mast .label { color: var(--ink-2); }
.title__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; }
.title__rating { display: grid; gap: 0.35rem; justify-items: start; }
.title__rating .big { font-family: var(--sc-font-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(2.6rem, 2rem + 3vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; }
.title__rating .big em { font-style: normal; font-size: 0.42em; color: var(--ink-3); letter-spacing: 0; margin-left: 0.3em; vertical-align: 0.55em; }

/* plates: media in its own column, with a caption, never under type */
.plate { margin: 0; display: grid; gap: 0.6rem; }
.plate img { width: 100%; height: auto; display: block; border-radius: 3px; background: var(--paper-2); }
.plate--frame img { box-shadow: var(--sc-e2); }
.plate__cap { display: flex; justify-content: space-between; gap: 1rem; }
.plate__cap span:last-child { color: var(--ink-3); white-space: nowrap; }
.stack { display: grid; gap: 1.4rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.pair .plate:nth-child(2) { margin-top: 2.6rem; }

/* the roller pass: an irregular roller edge sweeps the photograph on. Ahead of
   the edge there is paper, never a doctored "before". Progress is --roll (0..1),
   written by site.js; the mask is an SVG built per plate with its own bristle. */
.roll { position: relative; overflow: hidden; border-radius: 3px; --roll: 0; isolation: isolate; }
.roll img { border-radius: 0; }
.roll__paint {
  -webkit-mask-image: var(--roll-mask); mask-image: var(--roll-mask);
  -webkit-mask-size: 200% 100%; mask-size: 200% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: calc((1 - var(--roll)) * 100%) 0; mask-position: calc((1 - var(--roll)) * 100%) 0;
}
.roll--rtl .roll__paint { -webkit-mask-position: calc(var(--roll) * 100%) 0; mask-position: calc(var(--roll) * 100%) 0; }
.roll__edge {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  transform: translate3d(calc((var(--roll) - 1) * 100%), 0, 0);
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0) 0 3px, rgba(255,255,255,0.18) 3px 4px) right / 3.2% 100% no-repeat,
    linear-gradient(to left, rgba(255,255,255,0.55), rgba(255,255,255,0.22) 1.6%, rgba(255,255,255,0) 4.5%);
  mix-blend-mode: soft-light;
  opacity: calc(1 - var(--roll));
}
.roll--rtl .roll__edge {
  transform: translate3d(calc((1 - var(--roll)) * 100%), 0, 0);
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0) 0 3px, rgba(255,255,255,0.18) 3px 4px) left / 3.2% 100% no-repeat,
    linear-gradient(to right, rgba(255,255,255,0.55), rgba(255,255,255,0.22) 1.6%, rgba(255,255,255,0) 4.5%);
}
.roll__shadow { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: var(--paper-2); opacity: 0.001; }

/* quotes: museum labels, not marketing */
.quote { margin: 0; display: grid; gap: 0.6rem; padding-top: 1rem; border-top: 1px solid var(--hair); max-width: 36rem; }
.quote p { margin: 0; }
.quote cite { font-style: normal; font-family: var(--sc-font-text); font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.02em; }
.quote cite::before { content: ""; display: inline-block; width: 1.2rem; height: 1px; background: var(--sc-accent); vertical-align: middle; margin-right: 0.5rem; }

/* silence */
.silence__num { font-family: var(--sc-font-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(5rem, 3rem + 14vw, 15rem); line-height: 0.9; letter-spacing: -0.04em; color: var(--paper); margin: 0; }
.silence__title { font-family: var(--sc-font-display); font-weight: 300; font-style: italic; font-variation-settings: "opsz" 72, "SOFT" 60; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); color: #b9b3a8; margin: 0.8rem 0 0; letter-spacing: -0.01em; }

/* the peak: pinned stage, plate left, caption column right */
.stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3.5rem); align-items: center; padding: clamp(1.25rem, 3vw, 3rem) clamp(1.5rem, 5vw, 5rem); background: var(--paper); }
.stage__plate { align-self: stretch; height: calc(100svh - 2 * clamp(1.25rem, 3vw, 3rem)); }
.stage__plate .roll { height: 100%; }
.stage__plate .roll__paint, .stage__plate .roll__paint img { height: 100%; }
.stage__plate img { object-fit: cover; }
.stage__copy { display: grid; gap: 1.1rem; align-content: center; }
.stage__copy > [data-sc-cue] { grid-area: 1 / 1; }
.stage__copy .lead { display: grid; gap: 1rem; }
.stage__cap { position: absolute; left: 0; bottom: 0; right: 0; padding: 0.6rem 0.8rem; background: rgba(245,244,241,0.92); color: var(--ink-2); z-index: 3; }

/* chapter four figures */
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.figures .plate:first-child { grid-column: 1 / -1; }
.count { font-family: var(--sc-font-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(3rem, 2rem + 4vw, 5.6rem); line-height: 0.95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.count-row { display: flex; gap: 2.2rem; align-items: baseline; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid var(--hair); }
.count-row .cap { max-width: 14rem; }
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; font-size: 0.95rem; color: var(--ink-2); max-width: var(--measure); }
.list li { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.5rem; }
.list li::before { content: "\2014"; color: var(--sc-accent); }

/* colophon: a masthead plate that wipes up and then holds */
.colophon { min-height: 100svh; background: var(--ink); color: var(--paper); display: grid; align-content: space-between; padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 5rem); --sc-ink: #f5f4f1; --sc-ink-soft: #b9b3a8; }
.colophon .label { color: #b9b3a8; }
.colophon__line { font-family: var(--sc-font-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(1.7rem, 1.2rem + 2.4vw, 3.4rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0; max-width: 24ch; }
.colophon__line a { text-decoration-color: var(--sc-accent); text-decoration-thickness: 2px; text-underline-offset: 0.16em; white-space: nowrap; }
.folio__call a { white-space: nowrap; }
.colophon__line a:hover, .colophon__line a:focus-visible { color: #cfd9df; }
.colophon__foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; border-top: 1px solid rgba(245,244,241,0.18); padding-top: 1.2rem; font-family: var(--sc-font-text); font-size: 0.8rem; color: #b9b3a8; line-height: 1.5; }
.colophon__foot p { margin: 0; }
.colophon :focus-visible { outline-color: #cfd9df; }

/* ------------------------------------------------------------- responsive -- */
@media (max-width: 1023px) {
  :root { --folio-w: 0px; }
  main { margin-left: 0; padding-top: 3rem; }
  .folio { inset: 0 0 auto 0; width: auto; height: 3rem; padding: 0 1rem; flex-direction: row; align-items: center; gap: 0.8rem; border-right: 0; border-bottom: 1px solid var(--hair); }
  .folio__mark { font-size: 0.95rem; white-space: nowrap; }
  .folio__mark small { display: none; }
  .folio__chapters { margin: 0; display: flex; gap: 0.1rem; flex: 1; justify-content: center; }
  .folio__chapters a { grid-template-columns: auto; padding: 0.2rem 0.45rem; margin: 0; }
  .folio__chapters a .t { display: none; }
  .folio__chips-wrap { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
  .folio__chips-wrap .label { display: none; }
  .folio__chips { display: flex; gap: 0.3rem; min-height: 0; }
  .chip { grid-template-columns: 1.1rem; }
  .chip::before { height: 1.1rem; width: 1.1rem; border-radius: 2px; }
  .chip span { display: none; }
  .folio__call { display: none; }
  .ch--title { min-height: calc(100svh - 3rem); }
  .title__grid, .spread--one, .spread--two, .spread--four { grid-template-columns: 1fr; }
  .stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 52svh) auto; align-items: start; padding: 0.75rem 1rem 1rem; gap: 1rem; }
  .stage__plate { height: 52svh; }
  .stage__copy { align-content: start; }
  .figures .plate:first-child { grid-column: auto; }
  .colophon__foot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pair { grid-template-columns: 1fr; }
  .pair .plate:nth-child(2) { margin-top: 0; }
  .figures { grid-template-columns: 1fr; }
  .ch__head { grid-template-columns: 3.6rem 1fr; }
  .d--title { font-size: clamp(2.5rem, 1.6rem + 6vw, 3.6rem); }
  .stage { grid-template-rows: minmax(0, 46svh) auto; }
  .stage__plate { height: 46svh; }
  .d--ch { font-size: 1.75rem; }
  .d--quote { font-size: 1.15rem; }
}

/* press feedback: the only interactive elements on the page answer on pointer-down */
.folio__chapters a, .folio__call a, .colophon__line a { display: inline-block; transition: transform 120ms var(--sc-ease-out), color 240ms var(--sc-ease-out), background-color 240ms var(--sc-ease-out); }
.folio__chapters a { display: grid; }
.folio__chapters a:active, .folio__call a:active, .colophon__line a:active { transform: scale(0.98); }

@media (prefers-reduced-motion: reduce) {
  .roll { --roll: 1 !important; }
  .roll__edge { display: none; }
  .chip { opacity: 1; transform: none; transition: none; }
}
