/* Romanotto — the front of house.
   Gallery grammar, not SaaS grammar: art at full size, type doing the
   arguing, hairlines instead of boxes, and no colour anywhere except the
   works themselves. Loaded only by the anonymous landing page. */

/* Self-contained: the landing page never loads the app stylesheet, so the
   faces it needs are declared here. */
@font-face {
  font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/plex-serif-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/plex-serif-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/plex-mono-500.woff2") format("woff2");
}

:root {
  --paper: #FAFAF8;
  --paper-warm: #F2F1EC;
  --ink: #12110F;
  --ink-soft: #5C5A54;
  /* Darkened from #92908A, which measured 3.05:1 on paper — below the 4.5:1
     AA floor, and this token carries the small mono labels throughout. */
  --ink-faint: #6B6963;
  --rule: rgba(18, 17, 15, 0.14);
  --rule-soft: rgba(18, 17, 15, 0.08);
  --dark: #0E0D0C;
  --dark-rule: rgba(250, 250, 248, 0.16);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section: clamp(4.5rem, 11vw, 9.5rem);
}

* { box-sizing: border-box; }

body.lp {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* No overflow-x:hidden crutch: a sideways break should be visible in
     testing, not silently clipped away with the content inside it. */
}

/* Deliberately no blanket `.lp a { color: inherit }`: at (0,1,1) it outranks
   the single-class button rules and silently repaints the solid CTA
   black-on-black. Every anchor states its own colour instead. */
.lp :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Visible only to screen readers: table caption and the two glyph columns
   that carry no visible heading. */
.lp-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Keyboard users land here first; it stays out of sight until focused. */
.lp-skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.2rem; border-radius: 999px; text-decoration: none;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: top 200ms ease;
}
.lp-skip:focus { top: 1rem; }

/* ---------- shared typographic instruments ---------- */

.lp-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lp-display {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.04;
  text-wrap: balance;
  margin: 0;
}

.lp-lede {
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 34em;
}

/* Museum wall label — artist in caps, work in italic serif, then the
   physical facts. The detail that tells a curator we speak the language. */
.lp-wall {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.615rem;
  line-height: 1.85;
  letter-spacing: 0.055em;
  color: var(--ink-faint);
  text-transform: none;
}
.lp-wall b {
  display: block;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lp-wall i {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-style: italic;
  font-size: 0.76rem;
  letter-spacing: 0;
  color: var(--ink-soft);
}

/* ---------- navigation ---------- */

.lp-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--gutter);
  /* Over the hero the bar stops at the dividing rule, so no type ever sits
     on the artwork — the art column keeps its own field, as it would on a
     gallery wall. Once scrolled past, the bar takes the full width. */
  padding-right: calc(45.05% + var(--gutter));
  background: transparent;
  transition: background 400ms ease, border-color 400ms ease, padding 400ms ease;
  border-bottom: 1px solid transparent;
}
.lp-nav.is-stuck {
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--rule-soft);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  padding-right: var(--gutter);
}
.lp-mark {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.lp-nav-right { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.lp-nav-link {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 200ms ease;
}
.lp-nav-link:hover { color: var(--ink); }

/* Bordered pill, filled on hover — the only "button" the page owns. */
.lp-btn {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.62rem 1.35rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  border-radius: 999px;
  transition: background 220ms ease, color 220ms ease;
  white-space: nowrap;
}
.lp-btn:hover { background: var(--ink); color: var(--paper); }
.lp-btn-solid { background: var(--ink); color: var(--paper); }
.lp-btn-solid:hover { background: transparent; color: var(--ink); }

/* ---------- hero: type on the left wall, the work on the right ---------- */

.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  min-height: 100svh;
  border-bottom: 1px solid var(--rule);
}
.lp-hero-type {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 10vh, 7.5rem) var(--gutter) 3rem;
  border-right: 1px solid var(--rule);
  /* Grid items default to min-width:auto, so one long word ("Connoisseurship,")
     can push the track wider than the viewport. */
  min-width: 0;
}
.lp-hero-art { min-width: 0; }
.lp-hero h1 {
  /* Sized so the whole hero — headline, lede and call to action — clears
     the fold on a 900px-tall laptop screen; the floor is set by the longest
     word fitting a 320px screen, not by taste. The measure is 21ch because
     the headline's first sentence is 20 characters: at 13ch it could never
     sit on one line, and broke as "Photograph the / work." */
  font-size: clamp(1.75rem, 3.5vw, 3.2rem);
  margin: 1.2rem 0 1.4rem;
  max-width: 21ch;
}
.lp-hero h1 em {
  font-style: italic;
  font-weight: 500;
}
.lp-hero-cta {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.lp-hero-art {
  position: relative;
  background: var(--paper-warm);
  overflow: hidden;
}
/* Absolutely positioned so the plate's own proportions can't dictate the
   height of the hero row — otherwise a tall portrait pushes the call to
   action below the fold. */
.lp-hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}
.lp-hero-wall {
  position: absolute;
  left: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.85rem 1.1rem;
  max-width: 21rem;
}

/* ---------- thesis ---------- */

.lp-thesis {
  padding: var(--section) var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.lp-thesis blockquote {
  margin: 1.8rem 0 0;
  font-size: clamp(1.55rem, 3.4vw, 2.9rem);
  max-width: 20ch;
}
.lp-thesis .lp-lede { margin-top: 2rem; }

/* ---------- method: four movements, ruled like a catalogue ---------- */

.lp-method { padding: var(--section) var(--gutter); border-bottom: 1px solid var(--rule); }
.lp-method-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.lp-method-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin: 1.1rem 0 0; max-width: 18ch; }
.lp-movements { display: grid; gap: 0; }
.lp-movement {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  border-top: 1px solid var(--rule-soft);
  align-items: start;
}
.lp-movement:last-child { border-bottom: 1px solid var(--rule-soft); }
.lp-movement h3 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}
.lp-movement p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; max-width: 42em; }
.lp-movement p b { font-weight: 500; color: var(--ink); }

/* ---------- specimen: the report, lit like a viewing room ---------- */

.lp-specimen {
  background: var(--dark);
  color: var(--paper);
  padding: var(--section) var(--gutter);
}
.lp-specimen .lp-label { color: rgba(250, 250, 248, 0.5); }
.lp-specimen-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.lp-specimen-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin: 1.1rem 0 0; max-width: 16ch; }
.lp-specimen-head p { color: rgba(250, 250, 248, 0.62); max-width: 30em; margin: 0; font-size: 0.95rem; }

/* The sheet: real paper proportions, faint lift, no rounded corners. */
.lp-sheet {
  background: #FFFDF9;
  color: var(--ink);
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}
/* The sheet is paper inside the dark room, so it takes back the ink-coloured
   labels the surrounding section lightened for its own background. */
.lp-sheet .lp-label { color: var(--ink-faint); }

.lp-sheet-flag {
  position: absolute;
  top: 0;
  right: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  padding: 0.4rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
}
.lp-sheet-top {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}
/* Height-capped rather than column-filling, so a tall plate doesn't leave a
   void beside the catalogue record. */
.lp-plate img { max-height: 28rem; width: auto; max-width: 100%; display: block; }
.lp-plate .lp-wall { margin-top: 0.7rem; }
.lp-sheet h3 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: -0.015em;
  margin: 0.75rem 0 0.15rem;
  line-height: 1.15;
}
.lp-sheet-artist {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lp-record { margin: 1.5rem 0 0; }
.lp-record div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.83rem;
}
.lp-record dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.28em;
}
.lp-record dd { margin: 0; }
.lp-mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.8rem; }

.lp-comps { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
/* The table scrolls within its own frame on very narrow screens rather than
   forcing the page sideways — the prices are the point and must stay
   reachable. */
.lp-comps-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lp-comps table { width: 100%; min-width: 22rem; border-collapse: collapse; font-size: 0.8rem; }
.lp-comps th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: left;
  padding: 0 0.6rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
.lp-comps td {
  padding: 0.6rem 0.6rem 0.6rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.lp-comps .num { text-align: right; padding-right: 0; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.lp-comps .key { width: 1.2rem; padding-right: 0; }
/* A cited comparable is evidence; it is always shown, never just named. */
.lp-comps td.thumb { width: 5.2rem; padding-right: 1rem; }
.lp-comps td.thumb img { display: block; width: 4.2rem; height: auto; }
.lp-basis {
  font-size: 0.66rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0.85rem 0 0;
}
.lp-basis b { font-weight: 500; color: var(--ink); }
/* Secondary line within a comps cell: the sterling original, the lot's
   dimensions, whether a result was published. */
.lp-sub {
  font-size: 0.62rem;
  color: var(--ink-faint);
  line-height: 1.5;
  margin-top: 0.15rem;
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
}
td.num .lp-sub { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.lp-conclusion {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
}
.lp-value {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.lp-value span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.6em;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-right: 0.4rem;
}

.lp-sources {
  max-width: 60rem;
  margin: 1.5rem auto 0;
  font-size: 0.66rem;
  line-height: 1.7;
  color: rgba(250, 250, 248, 0.55);
}

/* ---------- standards strip ---------- */

.lp-standards { padding: var(--section) var(--gutter); border-bottom: 1px solid var(--rule); }
/* Fixed 3-up: six standards in an auto-fit grid landed 4+2, leaving an
   orphan row trailing two unexplained rules. */
.lp-standards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule-soft);
}
@media (max-width: 900px) { .lp-standards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-standards-grid { grid-template-columns: 1fr; } }
.lp-standard {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.lp-standard b {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 500;
  font-size: 1.02rem;
  display: block;
  margin-bottom: 0.2rem;
}
.lp-standard span { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.6; display: block; }

/* ---------- close ---------- */

.lp-close { padding: var(--section) var(--gutter) clamp(3rem, 7vw, 5rem); text-align: center; }
.lp-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.75rem);
  max-width: 58rem;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
}
.lp-triptych figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
/* Contained, never cropped: a page arguing for respect of the object must
   not guillotine the works it shows. Each plate sits on its own field at
   whatever proportion it actually is, in colour. */
.lp-triptych img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 20rem;
  margin: 0 auto;
  display: block;
}
.lp-triptych figcaption { margin-top: 0.65rem; text-align: left; }
.lp-close h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 1.2rem auto 1.6rem; max-width: 16ch; }
.lp-close .lp-lede { margin: 0 auto; }
.lp-close-cta { margin-top: 2.4rem; display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */

.lp-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem var(--gutter) 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.lp-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.lp-footer a { text-decoration: none; color: inherit; }
.lp-footer a:hover { color: var(--ink); }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- responsive ---------- */

/* The bar only stays transparent while its content genuinely fits inside the
   paper column. Below ~1210px it no longer does — it used to overflow the
   padding and land dark-on-dark across the painting — so it becomes an
   opaque full-width bar instead, and the secondary links stand down. */
@media (max-width: 1280px) {
  .lp-nav, .lp-nav.is-stuck { padding-right: var(--gutter); }
  .lp-nav {
    background: rgba(250, 250, 248, 0.94);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom-color: var(--rule-soft);
  }
  .lp-nav-link.hide-xs { display: none; }
}

@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; min-height: 0; }
  .lp-hero-type { order: 2; border-right: none; padding-top: 3rem; }
  .lp-hero-art { order: 1; height: auto; overflow: visible; border-bottom: 1px solid var(--rule); }
  /* Back into the flow so the wall label can sit beneath the work instead
     of covering it. */
  .lp-hero-art img {
    position: static;
    height: 56svh;
    min-height: 20rem;
    object-position: 50% 14%;
  }
  .lp-hero-wall {
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0.9rem var(--gutter) 1.15rem;
    max-width: none;
  }
  .lp-hero h1 { max-width: 18ch; }
  .lp-movement { grid-template-columns: 3rem minmax(0, 1fr); }
  .lp-movement p { grid-column: 2; }
  .lp-sheet-top { grid-template-columns: 1fr; }
  .lp-plate { max-width: 18rem; }
  .lp-conclusion { grid-template-columns: 1fr; gap: 0.5rem; }
  .lp-comps .hide-sm { display: none; }
  .lp-record div { grid-template-columns: 7rem minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .lp-nav { padding-left: 1.15rem; padding-right: 1.15rem; }
  .lp-nav-link.hide-xs { display: none; }
  /* The full CTA pill can't fit beside the wordmark at this width without
     spilling off-screen; the hero carries it a few hundred pixels below. */
  .lp-nav .lp-btn { display: none; }
  .lp-mark { font-size: 0.82rem; letter-spacing: 0.26em; }
  .lp-triptych { grid-template-columns: 1fr; max-width: 22rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .lp-triptych img { transition: none; }
  .lp-nav { transition: none; }
}
