/* Ekandji Art. Tokens first; every component below uses them.

   The palette and type are the studio's brand guide: Gesso, Ink, Linen, Stone
   and Studio Red, set in Bricolage Grotesque and Instrument Sans. The guide
   also sets the proportion -- roughly Gesso 70, Ink 18, Linen 8, Studio Red 4
   -- which is why a page gets one dark band and one accent, no more. The
   paintings carry the colour; the interface stays quiet around them.

   Light theme only, and no italics for emphasis anywhere. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
:root {
  --ink: #17151b;             /* text, primary buttons, the one dark band */
  --ink-hover: #2c2930;
  --bone: #f4f0e8;            /* page background (Gesso) */
  --bone-deep: #ece6da;       /* story band (Linen) */
  --line: #ddd6c9;
  --line-strong: #cfc6b5;
  --muted: #5b5650;           /* secondary text on bone, 6.4:1 */
  --muted-strong: #4f4a44;    /* secondary text on linen */
  --on-dark-muted: #b9b2a7;   /* secondary text on ink, 8.6:1 */
  --mat: #ece6da;             /* Linen: the ground a photograph sits on */
  --mat-deep: #f4f0e8;        /* Gesso, for a photograph shown on Linen */
  --accent: #b8321f;          /* Studio Red, 5.3:1 on bone */
  --white: #fff;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-display-xl: clamp(56px, 7.2vw, 108px);
  --text-display-l: clamp(40px, 4.6vw, 64px);
  --text-display-m: clamp(36px, 4.2vw, 56px);
  --text-lead: 19px;
  --text-body: 17px;
  --text-ui: 15px;
  --text-small: 13px;

  --container: 1280px;
  --container-wide: 1376px;
  --gutter: 32px;
  --section-y: 96px;
  --radius-card: 6px;
  --radius-media: 4px;
  --radius-pill: 999px;
  --tap: 44px;
  color-scheme: light;
}
@media (max-width: 600px) { :root { --gutter: 20px; --section-y: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--bone); color: var(--ink); font: 400 var(--text-body)/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
body, figure, h1, h2, h3, p, ol, dl, dd { margin: 0; }
/* height: auto is not optional here: every photograph carries width and
   height attributes to reserve its space, and without it a column narrower
   than the file stretches the painting. */
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #e7d8cf; color: var(--ink); }
[hidden] { display: none !important; }
main { min-height: 60vh; }

.wrap { width: min(100%, var(--container)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { width: min(100%, var(--container-wide)); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 10; transform: translateY(-200%); padding: 12px 18px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bone); }
.skip-link:focus { transform: none; color: var(--bone); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Header and footer */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 18px; }
.masthead nav { flex: 0 1 auto; }
 /* One word in two colours. The guide is explicit: never a space between
    EKANDJI and ART. */
.wordmark { display: inline-flex; align-items: baseline; font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: .04em; }
.wordmark span { color: var(--accent); }
.wordmark:hover { color: var(--ink); }
.masthead nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: var(--text-ui); font-weight: 500; }
.masthead nav a:not(.button), .catalogue-nav a { display: inline-flex; align-items: center; min-height: var(--tap); }
.masthead nav a[aria-current="page"] { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 40px 48px; font-size: var(--text-ui); }
.footer-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.footer-id .wordmark { font-size: 20px; }
.footer-place { color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Buttons and links */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 1.5px solid var(--ink); border-radius: var(--radius-pill); font-size: 16px; font-weight: 600; text-align: center; transition: background-color 150ms ease, color 150ms ease; }
.button-sm { min-height: var(--tap); padding: 0 20px; font-size: var(--text-ui); }
.button-ink { background: var(--ink); color: var(--bone); }
.button-ink:hover { background: var(--ink-hover); color: var(--bone); }
.button-outline { background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--ink); color: var(--bone); }
.button-light { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.button-light:hover { background: var(--white); color: var(--ink); }
.button-outline-light { background: transparent; color: var(--bone); border-color: var(--bone); }
.button-outline-light:hover { background: var(--bone); color: var(--ink); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--text-ui); font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }

/* Type helpers */
.kicker { font-size: var(--text-small); font-weight: 600; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.display-xl { font-size: var(--text-display-xl); line-height: .92; letter-spacing: -.035em; }
.display-l { font-size: var(--text-display-l); line-height: 1; }
.display-m { font-size: var(--text-display-m); line-height: 1.02; }
.lead { font-size: var(--text-lead); line-height: 1.55; color: var(--muted); }

/* A painting is shown at its own proportions. No box, no mat, no crop: the
   collection runs from a canvas three times taller than it is wide to one
   twice as wide as it is tall, and any fixed frame either cuts one of them or
   strands the other in empty ground. The grid keeps the columns even and lets
   the heights fall where the paintings put them, which is how a wall hangs. */
.mat { display: block; background: none; }
.painting a img, .work-stage img, .cover-figure img { width: 100%; }
figcaption { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* The artwork card: used on the home page, the catalogue grid and "More originals". */
/* Display M, the size the guide sets for "Selected originals." */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-head h2 { font-size: var(--text-display-m); line-height: 1.02; }
.painting-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px 32px; }
.painting { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.painting-grid-sm .painting { flex-basis: 300px; gap: 10px; }
.painting > a { display: flex; flex-direction: column; gap: 12px; }
.painting a:hover .painting-title { color: var(--accent); }
.painting figcaption { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.painting-title { display: block; margin-top: 6px; font: 700 24px/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.painting-byline, .painting-line { font-size: var(--text-ui); line-height: 1.5; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.painting-line { max-width: 42ch; }
.painting-enquiry { align-self: flex-start; display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--text-ui); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Catalogue */
.catalogue-page { padding-block: clamp(2.5rem, 5.3vw, 4.5rem) var(--section-y); }
.page-intro h1 { font-size: var(--text-display-l); line-height: 1; }
.catalogue-nav { display: flex; flex-wrap: wrap; gap: 0 clamp(1.25rem, 3vw, 2.75rem); border-block: 1px solid var(--line); margin-top: clamp(1.5rem, 3.4vw, 2.75rem); }
.catalogue-nav a { min-height: 3.15rem; font-size: var(--text-ui); font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.catalogue-nav [aria-current="page"] { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.catalogue-content { margin-top: clamp(1.75rem, 3.4vw, 3rem); }
.catalogue-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; column-gap: 1.5rem; row-gap: .8rem; margin-bottom: 2rem; }
.catalogue-content h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.02; }
.catalogue-bar p, .range-note { color: var(--muted); margin-top: .5rem; font-size: var(--text-ui); }
.artist-filter { display: flex; align-items: center; gap: .68rem; font-size: var(--text-ui); }
.artist-filter label { color: var(--muted); }
.artist-filter select { appearance: none; min-height: var(--tap); min-width: 9rem; padding: .4rem 2.05rem .4rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%235b5650' stroke-width='1.5'/%3E%3C/svg%3E") right .85rem center / .67rem auto no-repeat; }
.empty-state { padding: 2rem 0; color: var(--muted); }
.range-note { max-width: 54ch; }
.range-list { margin-top: 2rem; border-top: 1px solid var(--line); }
.range-list > div { display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr; gap: 1rem 3rem; align-items: baseline; border-bottom: 1px solid var(--line); padding-block: 1.4rem; }
.range-list dt { font: 700 clamp(22px, 2.4vw, 30px)/1.2 var(--display); letter-spacing: -.02em; }
.range-list dd { max-width: 60ch; color: var(--muted); font-size: var(--text-ui); }
.range-enquiry { margin-top: 1.6rem; }
.legacy-search { margin-bottom: 1.2rem; color: var(--muted); font-size: var(--text-ui); }

/* The register: works the studio has described but not yet photographed. */
.catalogue-register { margin-top: clamp(3rem, 6vw, 5rem); }
.catalogue-register h3 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; }
.catalogue-register > p { margin: .65rem 0 1.4rem; color: var(--muted); font-size: var(--text-ui); }
.register-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.register-grid a { display: block; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.register-grid a:hover .register-label { text-decoration: underline; text-underline-offset: 4px; }
.register-label { font: 700 20px/1.3 var(--display); letter-spacing: -.01em; }

/* Artwork page */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-height: var(--tap); padding-top: 24px; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.work-page { padding-bottom: var(--section-y); }
.work-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 64px; padding-top: 24px; }
.work-gallery { flex: 1.5 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.work-stage { display: block; }
.view-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.view-strip a { display: block; padding: 3px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--line); }
.view-strip a:is([aria-current="true"], :hover) { box-shadow: inset 0 0 0 2px var(--ink); }
.view-strip img { width: 4.25rem; height: 3.25rem; object-fit: cover; border-radius: 2px; }
.work-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.work-copy h1 { font-size: clamp(44px, 4.8vw, 68px); line-height: .98; overflow-wrap: anywhere; }
.work-description { font-size: 18px; line-height: 1.55; color: var(--muted-strong); max-width: 46ch; }
.work-facts { margin-top: 8px; border-top: 1px solid var(--line); font-size: var(--text-ui); }
.work-facts > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.work-facts dt { color: var(--muted); }
.work-facts dd { font-weight: 600; text-align: end; }
.work-note { font-size: 14px; line-height: 1.5; color: var(--muted); }
.work-copy .button-row .button { flex: 0 1 auto; }
.more-originals { border-top: 1px solid var(--line); }
.more-originals .wrap { display: flex; flex-direction: column; gap: 40px; padding-block: 80px var(--section-y); }
.more-originals .painting-title { font-size: 22px; }

/* Record page: a work in the register, before its photograph exists. */
.record-page { padding-block: 1rem clamp(4rem, 8vw, 7rem); display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.record-page h1 { font-size: clamp(40px, 4.8vw, 64px); line-height: 1; }
.record-description { max-width: 47ch; font-size: 18px; line-height: 1.55; color: var(--muted-strong); }

/* Story */
.story-cover { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.story-cover .cover-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.story-cover h1 { font-size: var(--text-display-l); line-height: .98; }
.cover-intro { max-width: 40ch; font-size: var(--text-lead); line-height: 1.55; color: var(--muted); }
.cover-figure { flex: 1.1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cover-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.family-section { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 80px; padding-bottom: clamp(3rem, 6vw, 5.5rem); }
.family-heading { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.family-heading h2 { font-size: clamp(36px, 4vw, 56px); line-height: 1; }
.story-prose { flex: 1.4 1 440px; min-width: 0; max-width: 60ch; }
.story-prose p { font-size: 18px; line-height: 1.65; color: var(--muted-strong); }
.story-prose p + p { margin-top: 1em; }
.studio-works { background: var(--bone-deep); }
.studio-works .wrap { display: flex; flex-direction: column; gap: 40px; padding-block: var(--section-y); }

/* Contact */
.contact-page { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section-y); }
.contact-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-copy h1 { font-size: var(--text-display-l); line-height: 1; }
.contact-copy .lead { max-width: 42ch; }
.contact-list { margin-top: 8px; border-top: 1px solid var(--line); font-size: var(--text-ui); }
.contact-list > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: baseline; gap: .5rem; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); }
.contact-list a { display: inline-block; min-height: var(--tap); padding-block: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-figure { flex: 1.1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-figure img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; }

/* Odds and ends */
.missing { padding-block: 6rem 8rem; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.missing h1 { font-size: var(--text-display-m); line-height: 1.02; }
.payment-update { padding-block: .85rem; color: var(--muted); font-size: var(--text-ui); }

@media (max-width: 900px) {
  .register-grid { column-gap: 1.5rem; }
  .work-layout { gap: 32px 40px; }
}
@media (max-width: 720px) {
  /* Two rows rather than three: the wordmark and the one thing a visitor is
     most likely to want, then the sections under them. */
  .masthead-inner { padding-block: 10px; gap: 2px 12px; }
  .masthead nav { order: 3; flex: 1 0 100%; gap: 2px 20px; font-size: 14px; }
  .masthead-cta { order: 2; min-height: 40px; padding: 0 16px; font-size: 14px; }
  .wordmark { font-size: 19px; }
}
@media (max-width: 600px) {
  .register-grid { grid-template-columns: minmax(0, 1fr); }
  .range-list > div { grid-template-columns: 1fr; gap: .45rem; }
  .contact-figure img { aspect-ratio: 4 / 3; }
  .painting-grid { gap: 36px 24px; }
  .footer-inner { padding-block: 32px 36px; }
}
