/* =============================================================================
   pages.css — shared chrome for standalone pages (terms, privacy).

   Mirrors the design system that index.html carries inline: same tokens, same
   typography, same masthead/footer. If you change a colour or the masthead on
   index.html, change it here too — they are intentionally identical, and there
   is no build step keeping them in sync.
   ============================================================================= */

:root {
  color-scheme: light;
  --ink: #1A1917;
  --body: #5A564E;
  --mute: #8A857C;
  --rule: #E5E1D8;
  --rule-soft: #EDE9E0;
  --hair: #C9C3B6;
  --paper: #FCFBF8;
  --accent: #A8674A;

  /* Aliases for the old style.css token names, so any inline style left in the
     legal copy (e.g. color: var(--muted)) still resolves instead of going blank. */
  --muted: var(--mute);
  --ink-light: var(--body);
  --line: var(--rule);
  --terracotta: var(--accent);
  --font-display: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }

/* The `hidden` attribute only works because the UA stylesheet says
   [hidden] { display: none }. Any author rule that sets `display` on the same
   element beats it, so el.hidden = true silently does nothing. That's how the
   newsletter form stayed on screen showing "Sending…" behind its own success
   message. Make `hidden` mean hidden, whatever else is declared. */
[hidden] { display: none !important; }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

.hx { font-family: 'Cormorant Garamond', Georgia, serif; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 3rem; }
.lbl { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: .75rem 1.25rem; z-index: 100; font-size: .85rem;
}
.skip-link:focus { left: .5rem; top: .5rem; color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Masthead — matches index.html */
.masthead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 3rem;
  padding: 3rem 0 1.5rem; border-bottom: 1px solid var(--rule);
}
.studio-mark { display: block; height: 2.6rem; width: auto; }
.nav { display: flex; gap: 2.25rem; font-size: .85rem; padding-bottom: .35rem; flex-wrap: wrap; }
.nav a { color: var(--body); }
.header-right { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }

/* Footer — matches index.html */
footer.site {
  border-top: 1px solid var(--rule); padding: 2rem 0 3rem;
  font-size: .75rem; color: var(--mute);
}
footer.site a { color: var(--mute); }
.foot-mark { display: block; height: 5rem; width: auto; margin: 0 auto 1.75rem; }
.foot-row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot-links { display: flex; gap: 1.5rem; }

/* Legal pages (terms, privacy) */
.legal-page { max-width: 42rem; margin: 0 auto; padding: 4rem 0 5rem; }

.legal-header { margin-bottom: 3rem; }
.legal-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 400; letter-spacing: .01em;
  line-height: 1.15; margin: 0 0 .6rem; color: var(--ink);
}
.legal-header .last-updated {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--mute); margin: 0;
}

.legal-page h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem; font-weight: 400; line-height: 1.25;
  margin: 3rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid var(--rule-soft);
  color: var(--ink);
}

.legal-page p, .legal-page li { color: var(--body); line-height: 1.75; }
.legal-page p { margin: 0 0 1.1rem; }
.legal-page ul { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.legal-page li { margin-bottom: .5rem; }
.legal-page strong { color: var(--ink); font-weight: 500; }
.legal-page em { font-style: italic; }
.legal-page a { color: var(--ink); border-bottom: 1px solid var(--hair); padding-bottom: .05rem; }
.legal-page a:hover { color: var(--accent); border-color: var(--accent); }

.highlight-box {
  background: var(--rule-soft); border-left: 2px solid var(--hair);
  padding: 1.5rem 1.75rem; margin: 0 0 2.5rem;
}
.highlight-box p { margin: 0; color: var(--ink); }

/* Exhibition badge — must match the .ex-badge rule inlined in index.html.
   Two copies exist because index.html carries its CSS inline and there is no
   build step. Change one, change the other. */
.ex-badge {
  display: inline-block; font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 2px;
  padding: .25rem .5rem; line-height: 1.45; margin-bottom: .6rem;
  max-width: 100%; text-wrap: balance;
}

/* Portfolio download — must match the .portfolio-btn rule in index.html. */
.portfolio-btn {
  display: inline-block; margin-top: 2rem; font-size: .85rem;
  border: 1px solid var(--hair); padding: .7rem 1.15rem; color: var(--ink);
}
.portfolio-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--rule-soft); }
.portfolio-btn .pf-meta { color: var(--mute); font-size: .72rem; }

/* ---------------------------------------------------------------------------
   Shared page shell for About / Contact
   --------------------------------------------------------------------------- */
.page { padding: 4rem 0 5rem; }

.page-h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 400; letter-spacing: .01em;
  line-height: 1.15; margin: 0 0 1.5rem; color: var(--ink);
}
.section-h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem; font-weight: 400; line-height: 1.25;
  margin: 0 0 1.25rem; color: var(--ink);
}
.quiet-link { font-size: .85rem; border-bottom: 1px solid var(--hair); padding-bottom: .2rem; }
.prose { color: var(--body); max-width: 34rem; }
.txt-btn {
  background: none; border: none; border-bottom: 1px solid var(--hair);
  padding: 0 0 .25rem; cursor: pointer; font-size: .82rem; color: var(--ink);
  font-family: inherit;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.page-actions {
  display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;
  margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--rule);
}
.page-actions .portfolio-btn { margin-top: 0; }

/* --- About ---------------------------------------------------------------- */
.about-layout {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 5rem; align-items: start;
}
.about-lede {
  font-size: 1.3rem; line-height: 1.6; color: var(--ink);
  margin: 0 0 1.75rem; font-weight: 400; max-width: 36rem;
}
.about-body p { color: var(--body); max-width: 36rem; margin: 0 0 1.25rem; }
.about-body p:last-child { margin-bottom: 0; }
.about-body a { border-bottom: 1px solid var(--hair); }
/* Availability + the portfolio download read as one thought, so they share a
   line: button first, statement beside it. Wraps to two lines on narrow screens. */
.availability {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule);
  color: var(--ink); font-size: 1.05rem; line-height: 1.5;
}
.availability .portfolio-btn { margin-top: 0; flex: none; }
.availability span { flex: 1; min-width: 16rem; }
.headshot { width: 100%; max-width: 260px; display: block; height: auto; }
.headshot-cap {
  font-size: .78rem; color: var(--mute); margin-top: .9rem;
  border-top: 1px solid var(--rule); padding-top: .8rem;
}

.ex-section { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.ex-list { list-style: none; margin: 0 0 1.5rem; padding: 0; max-width: 40rem; }
.ex-list li {
  color: var(--body); font-size: .95rem; padding: .7rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.ex-empty-note { color: var(--mute); font-size: .9rem; margin: 0 0 1.5rem; }

/* --- Contact -------------------------------------------------------------- */
.contact-layout {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 5rem; align-items: start;
}
/* Measure matched to the paragraph beneath it. The mock's 15ch was tuned for a
   240px-rail layout and left the headline narrower than its own body copy, which
   read as broken rather than deliberate. `balance` evens out the line lengths. */
.contact-headline {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 400; line-height: 1.28;
  margin: 0 0 1.5rem; color: var(--ink); max-width: 34ch; text-wrap: balance;
}
.identity-line { color: var(--body); max-width: 34rem; margin: 0 0 2rem; }
.identity-line strong { color: var(--ink); font-weight: 500; }

/* Splits the main column into commissions vs. editorial/licensing — they're
   different enquiries and were running together as one block of prose. */
.contact-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem; font-weight: 400; line-height: 1.3; color: var(--ink);
  margin: 2.25rem 0 .9rem; padding-top: 1.75rem; border-top: 1px solid var(--rule-soft);
}
.prose a { border-bottom: 1px solid var(--hair); }
.prose a:hover { border-color: var(--accent); }
/* Italic credibility line with an upright "Recent" lead-in (mock detail). */
.credibility {
  font-size: .85rem; color: var(--mute); font-style: italic;
  margin: 1.5rem 0 0; max-width: 34rem;
}
.credibility b { font-style: normal; font-weight: 500; color: var(--body); }

/* Right rail: label left, sub-label right, baseline-aligned, fully ruled top and
   bottom. Reads as a contact sheet rather than a stack of links (mock layout). */
/* Artwork above the contact rail. width/height are on the <img> so the browser
   reserves the space before it loads and the links below don't jump. */
.contact-art { margin: 0 0 2rem; }
.contact-art img { display: block; width: 100%; height: auto; }

.side-links { display: flex; flex-direction: column; }
.side-links a {
  display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
  color: var(--ink); font-size: 1rem; padding: .85rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.side-links a:first-child { border-top: 1px solid var(--rule-soft); }
.side-links a:hover { color: var(--accent); }
.side-sub {
  font-size: .7rem; letter-spacing: .08em; color: var(--mute); white-space: nowrap;
}

.newsletter { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
/* Centred beneath both columns rather than inside the left one — the rail is
   short, so keeping it in-column left a large empty block to its right. */
.newsletter {
  margin: 4rem auto 0; padding-top: 2.5rem; border-top: 1px solid var(--rule);
  max-width: 30rem; text-align: center;
}
.newsletter-lede { color: var(--body); margin: 0 0 1.25rem; font-size: .95rem; line-height: 1.6; }
.newsletter-fine { font-size: .72rem; color: var(--mute); margin: 1rem 0 0; }
.newsletter-fine a { color: var(--mute); border-bottom: 1px solid var(--rule); }
.newsletter-fine a:hover { color: var(--accent); }
.newsletter-msg { text-align: center; }

/* Underline-only input rather than a boxed field (mock detail) — matches the
   hairline treatment used everywhere else on the site. */
.newsletter-form { display: flex; gap: .75rem; align-items: baseline; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 0; padding: .5rem .1rem; font-family: inherit;
  font-size: .95rem; color: var(--ink); background: transparent;
  border: none; border-bottom: 1px solid var(--hair); border-radius: 0; outline: none;
}
.newsletter-form input[type="email"]:focus { border-bottom-color: var(--accent); }
.newsletter-form input[type="email"]::placeholder { color: var(--hair); }
.newsletter-form button[disabled] { opacity: .5; cursor: default; }
.newsletter-msg { margin: 1rem 0 0; font-size: .85rem; color: var(--body); }
.newsletter-msg.is-error { color: var(--accent); }

@media (max-width: 1000px) {
  .about-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
}

/* --- Thank-you page (post-signup / post-confirmation landing) -------------- */
.thanks-page { max-width: 42rem; }
.thanks-lede { font-size: 1.15rem; line-height: 1.6; color: var(--ink); margin: 0 0 2rem; }
.thanks-note {
  background: var(--rule-soft); border-left: 2px solid var(--hair);
  padding: 1.25rem 1.5rem; margin: 0;
}
.thanks-note p { color: var(--body); margin: 0 0 .9rem; font-size: .9rem; line-height: 1.65; }
.thanks-note strong { color: var(--ink); font-weight: 500; }
.thanks-note a { border-bottom: 1px solid var(--hair); }

/* ---------------------------------------------------------------------------
   Painting detail pages (paintings/<id>.html — generated by studio-manager)
   These used to load the old style.css and looked nothing like the rest of the
   site. Markup comes from generate_painting_page() in tools/studio-manager.py.
   --------------------------------------------------------------------------- */
.painting-page { padding: 2.5rem 0 5rem; max-width: 60rem; margin: 0 auto; }

.painting-back { font-size: .85rem; color: var(--mute); display: inline-block; margin-bottom: 2rem; }
.painting-back:hover { color: var(--accent); }

.painting-figure { margin: 0 0 2.5rem; }
.painting-figure img {
  display: block; margin: 0 auto; max-width: 100%; max-height: 74vh;
  width: auto; height: auto;
}

.painting-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 400; font-style: italic;
  line-height: 1.15; margin: 0 0 1.5rem; color: var(--ink); text-align: center;
}

.painting-meta {
  display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.75rem;
  margin: 0 auto 2.5rem; font-size: .9rem; max-width: 32rem;
  border-top: 1px solid var(--rule); padding-top: 1.5rem;
}
.painting-meta dt {
  color: var(--mute); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  align-self: baseline;
}
.painting-meta dd { margin: 0; color: var(--body); }

.painting-actions {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  margin: 0 auto 2.5rem;
}
.painting-actions a {
  display: inline-block; font-size: .85rem; padding: .7rem 1.15rem;
  border: 1px solid var(--hair); color: var(--ink);
}
.painting-actions a:hover { border-color: var(--accent); color: var(--accent); background: var(--rule-soft); }
.painting-actions a.is-primary { border-color: var(--ink); }

.painting-note {
  font-size: .9rem; color: var(--body); max-width: 40rem; margin: 0 auto;
  text-align: center; line-height: 1.7;
}

@media (max-width: 680px) {
  .painting-page { padding: 1.5rem 0 3.5rem; }
  .painting-meta { grid-template-columns: 1fr; gap: .15rem; }
  .painting-meta dt { margin-top: .8rem; }
}

/* ---------------------------------------------------------------------------
   Exhibitions page
   --------------------------------------------------------------------------- */
.ex-page { padding: 4rem 0 5rem; }
.ex-intro { max-width: 40rem; margin-bottom: 1rem; }
.ex-intro h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 400; letter-spacing: .01em;
  line-height: 1.15; margin: 0 0 .8rem; color: var(--ink);
}
.ex-intro p { color: var(--body); margin: 0; }

.ex-show { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.ex-show:first-of-type { border-top: none; }

.ex-show-head { margin-bottom: 2rem; max-width: 44rem; }
.ex-show-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem; font-weight: 400; line-height: 1.2;
  margin: 0 0 .5rem; color: var(--ink);
}
.ex-works {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 2.5rem; row-gap: 3rem;
}
.ex-work { display: block; }
.ex-work .ex-plate { height: 240px; display: flex; align-items: flex-end; justify-content: center; }
.ex-work .ex-plate img { max-height: 100%; max-width: 100%; display: block; }
.ex-work figcaption { margin-top: 1rem; border-top: 1px solid var(--rule); padding-top: .8rem; }
.ex-work .ex-w-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.05rem; font-style: italic; line-height: 1.3; color: var(--ink); }
.ex-work .ex-w-spec { font-size: .78rem; color: var(--mute); margin-top: .3rem; }
.ex-work:hover .ex-w-title { color: var(--accent); }

.ex-empty { color: var(--mute); font-size: .9rem; padding: 2rem 0 0; max-width: 40rem; }

@media (max-width: 1000px) {
  .ex-works { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 1.25rem; }
  .masthead { padding: 2rem 0 1.25rem; gap: 1.25rem; flex-direction: column; align-items: flex-start; }
  .studio-mark { height: 2.1rem; }
  .nav { gap: 1.25rem; padding-bottom: 0; }
  .legal-page { padding: 2.5rem 0 4rem; }
  .page { padding: 2.5rem 0 4rem; }
  .ex-page { padding: 2.5rem 0 4rem; }
  .ex-works { grid-template-columns: minmax(0, 1fr); row-gap: 2.5rem; }
  .ex-work .ex-plate { height: 260px; }
}
