/* karinacohen.com — one stylesheet, no framework, no reset library.
 *
 * Type scale is deliberately shallow: the largest text on the site is 2.125x body. Against a
 * large gestural canvas in strong colour, display type loses (reference set, pattern C).
 * Contrast comes from capitalisation, letterspacing and whitespace.
 *
 * Ground is a warm neutral, never white and never grey: her paintings carry hot pink and raw
 * cotton edges and a cold ground fights them (docs/research/instagram-inventory.md).
 */

/* Direction A typefaces — self-hosted, subsetted variable fonts (SIL OFL 1.1; licence text and
   fetch provenance beside each file in assets/fonts/<family>/, per rights-ledger.md §G).
   Activated below (DIRECTION-A-FINAL-SPEC.md §7): --font now points at Instrument Sans for the
   whole site, and --font-serif (Newsreader) is used selectively in the home identity block, per
   the mockup's own pairing (docs/creative-council/preview.css: identity-block paragraphs, not
   the name/descriptor/CTA). */
@font-face {
  font-family: 'Instrument Sans Variable';
  src: url('../fonts/instrument-sans/instrument-sans-variable.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader Variable';
  src: url('../fonts/newsreader/newsreader-variable.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #f4f1ec;
  --ink: #1c1a18;
  --muted: #6f6a63;
  --rule: #ddd6cc;
  --alert: #a3372c;

  /* One family, one custom property. Activated per DIRECTION-A-FINAL-SPEC.md §7 — the system
     stack stays as the fallback chain, not the primary. */
  --font: 'Instrument Sans Variable', 'Helvetica Neue', Helvetica, Inter, 'Segoe UI', Arial, sans-serif;
  /* Direction A's pairing (docs/creative-council/preview.css): serif for the home identity
     block's descriptive lines only — never the name, descriptor or CTA, which stay --font. */
  --font-serif: 'Newsreader Variable', Georgia, serif;

  --fs-body: 1rem; /* 16px */
  --fs-lg: 1.25rem; /* 20 */
  --fs-xl: 1.625rem; /* 26 */
  /* Direction A §7: the home identity block only. Floor matches --fs-xl exactly; ceiling matches
     the documented 2.125x-body ceiling above exactly (2.125rem = 34px). */
  --fs-display: clamp(1.625rem, 2.4vw, 2.125rem);

  --measure: 34rem;
  --plate: 45rem; /* 720px. At 2x DPR this asks for the 1440px derivative and never more. */
  --plate-sm: 27.5rem; /* 440px. Shared subordinate-plate cap — .plate--artist img and
     .plate--register img each carry their own comment for why this specific value. */
  --gutter: 1.25rem;
  --step: 2.5rem;
}

/* Eytan, 2026-08-20: warm off-white always, regardless of visitor device theme.
   No dark palette — see color-scheme meta in each page head. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--fs-body) / 1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

h1,
h2 {
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-size: var(--fs-xl);
  letter-spacing: 0.01em;
}

h2 {
  font-size: var(--fs-lg);
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 2;
  background: var(--bg);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ink);
}

/* ------------------------------------------------------------------ frame */

.masthead,
.page,
.colophon {
  max-width: 62rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.masthead {
  padding-block: 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wordmark {
  font-size: 1.4375rem; /* 23px, the Breeder register check */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

/* Nav sits at body size, exactly like Sillman's. Nothing here shouts. */
.nav a {
  text-decoration: none;
  color: var(--muted);
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
}

/* Direction A §5: Salon subordinate behind a visual separator, reduced weight. Instagram stays
   plain `.nav a` — full primary weight, unchanged. */
.nav__sep {
  width: 1px;
  height: 1em;
  align-self: center;
  background: var(--rule);
}

.nav__salon {
  font-size: 0.875rem;
}

/* At 375px the complete navigation stays visible in the hierarchy established for the site:
   three primary links, then Instagram / Contact / divider / secondary Salon. The grid tracks are
   explicit so a browser cannot reflow Salon into an unintended third line. */
@media (max-width: 45.999rem) {
  .nav {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .nav a {
    display: flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
  }

  .nav a:nth-of-type(1),
  .nav a:nth-of-type(2),
  .nav a:nth-of-type(3) {
    grid-column: span 4;
  }

  .nav a:nth-of-type(4),
  .nav a:nth-of-type(5),
  .nav__salon {
    grid-column: span 3;
  }

  .nav__sep {
    grid-column: span 1;
    justify-self: center;
  }
}

.page {
  padding-bottom: 5rem;
}

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.colophon p {
  margin: 0;
}

@media (min-width: 46rem) {
  .masthead {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
    padding-block: 2.5rem 4.5rem;
  }
}

/* ------------------------------------------------------------------ images */

.plate {
  margin: 0 0 1rem;
}

.plate img {
  display: block;
  width: 100%;
  max-width: var(--plate);
  height: auto; /* with the width/height attributes this reserves exact space: no layout shift */
  object-fit: contain; /* never crop a work — the irregular hem IS the work */
}

.plate__caption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  max-width: var(--measure);
}

/* .plate__image (main.js renderSalon()) pairs one image with its own credit line where a caption
   wraps more than one image; .plate__credit is that credit line, and also reused inside
   .plate__caption (content.js figure()) for the single-image case. Both are inert today (copy.js
   `credits{}` is empty — reviewer, 2026-08-23) but must not render as unstyled default browser
   type the day a real photographer name lands. */
.plate__image {
  min-width: 0; /* grid item default is max-content — keeps a long credit line from blowing out .plate-pair's column */
}

.plate__credit {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ------------------------------------------------------------------ home */

.opening {
  margin-bottom: var(--step);
}

/* Direction A §8: the rights-cleared portrait is a full-bleed mobile band and a desktop column. */
.opening__portrait {
  display: block;
  margin-inline: calc(var(--gutter) * -1);
}

/* Zero ink, deliberately: no background, border, or outline. At narrow widths the full-bleed
   frame is 4:3; the 46rem band changes to 16:9 without changing the image source. */
.opening__portrait-frame {
  aspect-ratio: 4 / 3;
}

/* The frame's one child. Cover crops are intentional; 50% 41% preserves the face and upper body
   across the confirmed-rights portrait's mobile and desktop crops. */
.opening__portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 41%;
}

.opening__descriptor {
  font-size: 0.8125rem;
  letter-spacing: 0.045em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

/* Direction A §7: supplies the page's own missing <h1> (every other page already has one). */
.opening__name {
  font-size: var(--fs-display);
  margin: 0 0 0.75rem;
}

/* Direction A's serif pairing (docs/creative-council/preview.css) — the identity block's
   descriptive lines, never the name/descriptor/CTA. Mobile-first: --fs-lg below 46rem so this
   line never ties visually with .opening__name (both sit at --fs-display's shared 26px floor
   below ~68rem viewport width — atelier left this differentiation to the implementer, Direction
   A §7). */
.opening__line {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

@media (min-width: 46rem) {
  .opening__line {
    font-size: var(--fs-xl);
  }
}

.step {
  display: inline-block;
  font-size: var(--fs-lg);
  margin-bottom: 1.25rem;
}

/* Direction A §8: the identity block "stays…unchanged" names five strings, including this one —
   and it is the principal serif headline of the home page's second state (curator,
   docs/creative-council/direction-a-second.png), so it stays present and in the accessibility
   tree at every breakpoint, never display:none. Sized down instead so it reads as subordinate to
   the identity block rather than competing with body text at inherited 16px — curator's
   measurement: this still clears the ≥300px-of-work-in-812px mobile budget (~352px remaining).
   Curator fix, 2026-08-23. */
.opening__material {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.home-plate {
  margin-bottom: 3.5rem;
}

@media (min-width: 46rem) and (max-width: 61.999rem) {
  .opening__portrait-frame {
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 62rem) {
  .opening {
    display: grid;
    /* portrait 4 / hinge 1 / work 7 (ATELIER-DIRECTIONS.md:66), with a floor on the hinge so the
       identity text stays legible instead of literally collapsing to a 1/12 share — the mockup
       (docs/creative-council/preview.css) uses the same minmax(floor, fr) technique. */
    grid-template-columns: minmax(0, 4fr) minmax(11rem, 1fr) minmax(0, 7fr);
    grid-template-areas: 'portrait identity plate';
    gap: 2rem;
    align-items: center;
  }

  .opening__portrait {
    grid-area: portrait;
    width: auto;
    margin-inline: 0;
  }

  .opening__identity {
    grid-area: identity;
  }

  .home-plate {
    grid-area: plate;
  }

  .home-plate {
    /* The grid's own row height plus .opening's margin-bottom already space this from the next
       section — an extra bottom margin here would throw off align-items: center against the
       portrait slot and identity column beside it. */
    margin-bottom: 0;
  }

  .opening__portrait-frame {
    aspect-ratio: 43 / 71;
  }
}

/* Direction A §6: the register band — a second, subordinate position for the work the front door
   used to lead on. Deliberately smaller than the hero plate above (same 440px cap as the Salon
   artist plate, .plate--artist) so it reads as secondary, not competing. */
.register {
  margin-bottom: 3.5rem;
}

.plate--register img {
  max-width: var(--plate-sm);
}

.current {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  margin-bottom: 3.5rem;
}

.current__year {
  font-size: var(--fs-lg);
  letter-spacing: 0.04em;
}

.current__label {
  color: var(--muted);
  margin: 0.25rem 0 0.5rem;
}

.current__list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.current__list li {
  margin-bottom: 0.25rem;
}

/* The second of the CV's two surfaces: the front door leads to the full record. */
.current__more {
  font-size: 0.875rem;
  color: var(--muted);
}

.current__more:hover {
  color: var(--ink);
}

/* One restrained entry, never a co-equal front-door slot (project law #1). */
.salon-entry {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  color: var(--muted);
}

.salon-entry a {
  color: var(--ink);
}

/* ------------------------------------------------------------------ studio */

.lede {
  margin-bottom: 1.25rem;
}

.works {
  margin-top: 3rem;
}

.work {
  margin-bottom: 4.5rem;
}

.tombstone {
  margin: 0 0 0.5rem;
}

.inquire {
  display: inline-block;
  color: var(--muted);
  font-size: 0.875rem;
}

.inquire:hover {
  color: var(--ink);
}

.process {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.process h2 {
  margin-bottom: 1.25rem;
}

/* ------------------------------------------------------------------ CV */

/* Typeset, not designed: one column, conventional, year as heading (CV ruling rule #7). */
.cv {
  margin-bottom: 3rem;
}

.cv__year {
  font-size: var(--fs-lg);
  letter-spacing: 0.04em;
  margin: 2rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.cv__entry {
  margin-bottom: 0.9rem;
  max-width: var(--measure);
}

.cv__line,
.cv__kind,
.cv__year-inline {
  display: block;
}

.cv__kind {
  color: var(--muted);
  font-size: 0.875rem;
}

.cv__year-inline {
  color: var(--muted);
  font-size: 0.875rem;
}

.plate--install {
  margin: 1.25rem 0 2rem;
}

/* ------------------------------------------------------------------ salon */

.salon-hero {
  display: grid;
  margin-inline: calc(var(--gutter) * -1);
}

.salon-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: calc(var(--gutter) * 2) var(--gutter);
  background: var(--ink);
  color: var(--bg);
}

.salon-hero__copy :focus-visible {
  outline-color: var(--bg);
}

.salon-hero h1 {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.salon-hero__label,
.salon-hero__lede,
.salon-hero .inquire,
.salon-hero__ig {
  font-family: var(--font);
}

.salon-hero__label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.salon-hero__promise {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  line-height: 1.1;
}

.salon-hero__lede {
  font-size: var(--fs-lg);
  line-height: 1.35;
}

.salon-hero__support {
  margin-bottom: 1.5rem;
}

.salon-hero .inquire {
  min-height: 44px;
  padding-block: 0.625rem;
  color: var(--bg);
}

.salon-hero__ig {
  margin-top: auto;
  padding-top: 2rem;
}

.salon-hero__ig h2 {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.salon-hero__ig a {
  display: inline-block;
  min-height: 44px;
  padding-block: 0.625rem;
}

.salon-hero #salon-plate-garden,
.salon-hero .plate--salon {
  min-width: 0;
}

/* The hero itself owns the single gutter negation. Its nested Salon plate stays flush. */
.salon-hero .plate--salon {
  margin: 0;
}

.salon-hero .plate--salon img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
}

.salon-hero .plate--salon .plate__caption {
  margin-inline: 0;
  padding-inline: var(--gutter);
}

.salon-hero__copy:only-child {
  grid-column: 1 / -1;
}

@media (min-width: 62rem) {
  .salon-hero {
    grid-template-columns: 5fr 7fr;
  }

  .salon-hero__copy {
    padding: calc(var(--gutter) * 2);
  }
}

/* Shared with bio.html, hence not salon-scoped: it marks a quotation AS a quotation, so the
   site never reads as asserting an artist's words in its own voice. */
.quote {
  margin: 0 0 3rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

.quote cite {
  color: var(--muted);
  font-size: 0.875rem;
  font-style: normal;
}

.salon__block {
  margin-bottom: 3rem;
}

.salon__block h2 {
  margin-bottom: 0.75rem;
}

/*
 * PLATES A, B — full-bleed below 46rem, contained at --plate above it.
 *
 * The negative margin is exactly the .page container's own inline padding, so the image lands
 * edge to edge. Deliberately NOT `100vw`: that includes the scrollbar gutter and puts a
 * horizontal scrollbar on every desktop page. The caption is re-guttered against the bleed.
 */
.plate--salon {
  margin-inline: calc(var(--gutter) * -1);
}

.plate--salon img {
  max-width: none;
}

.plate--salon .plate__caption {
  margin-inline: var(--gutter);
}

@media (min-width: 46rem) {
  .plate--salon {
    margin-inline: 0;
  }

  .plate--salon img {
    max-width: var(--plate);
  }

  .plate--salon .plate__caption {
    margin-inline: 0;
  }
}

/* PLATE C — two-up. Contained even on mobile: both masters are modest (528 and 1320 native) and
   a full-bleed column would visibly upscale the smaller one. `align-items: start` keeps each
   image at its own height instead of stretching the shorter one out of ratio. */
.plate-pair {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  max-width: var(--plate);
  margin: 0 0 1rem;
}

.plate-pair img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain; /* never crop — same rule as .plate */
}

.plate-pair .plate__caption {
  grid-column: 1 / -1; /* one caption under both, never one per column */
  margin-top: 0; /* the grid gap already spaces it */
}

@media (min-width: 46rem) {
  .plate-pair {
    grid-template-columns: 1fr 1fr;
  }
}

/* PLATE D only. The master is 590px wide: shown larger it visibly softens, and the smaller scale
   keeps it subordinate to the garden plate at the top of the page. */
.plate--artist img {
  max-width: var(--plate-sm);
}

/* ------------------------------------------------------------------ inquiry */

.regarding {
  color: var(--muted);
}

.regarding:empty {
  display: none;
}

.regarding__label::after {
  content: ': ';
}

.inquiry {
  max-width: var(--measure);
  margin-top: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.field label {
  color: var(--muted);
  font-size: 0.875rem;
}

.field input,
.field textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.6rem 0.7rem;
  width: 100%;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
}

.field [aria-invalid='true'] {
  border-color: var(--alert);
}

.field__error {
  color: var(--alert);
  font-size: 0.875rem;
  min-height: 1.3em; /* reserved so an error never shifts the form */
}

.inquiry button {
  font: inherit;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
}

.inquiry button:disabled {
  background: var(--muted);
  border-color: var(--muted);
  cursor: not-allowed;
}

.status {
  color: var(--muted);
  max-width: var(--measure);
}

/* ------------------------------------------------------------------ dev only */

/* Deliberately loud and deliberately NOT hidden with display:none. If a [TO SUPPLY] marker ever
   reaches production it must be obvious, not quietly present in the DOM. The real guarantee is
   deepResolve() plus test/content-filter.test.js. */
.dev-note {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--alert);
  border: 1px dashed currentColor;
  padding: 0.5rem 0.7rem;
  margin: 0 0 1rem;
  max-width: var(--measure);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
