/* rosemariecusin.ch — the only stylesheet.
   A quiet gallery wall: the paintings hang whole (never cropped) on the warm white of her
   canvases, the words stay in charcoal, and the one colour is the grey-blue of her lakes. */

@font-face { font-family: 'Cormorant Garamond'; src: url('../fonts/CormorantGaramond.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('../fonts/CormorantGaramond-Italic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/Jost.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }

/* the colours' KNOBS, typed (@property): every other shade is derived from them on :root (color-mix in oklab), so one
   changed changes the whole site. Defacto's « Réglages » sets --wall and --lake (assets/defacto-theme.css, linked after
   this file: theme.php's settings `css`); a value there that is no colour falls back to the default here. */
@property --wall { syntax: "<color>"; inherits: true; initial-value: #f3f1ec; }   /* the white of her canvases, warmed */
@property --lake { syntax: "<color>"; inherits: true; initial-value: #375670; }   /* the grey-blue of her lakes: links, focus */
@property --ink { syntax: "<color>"; inherits: true; initial-value: #23262a; }    /* charcoal */
@property --light { syntax: "<color>"; inherits: true; initial-value: #fff; }     /* the viewer's buttons; paper when printed */
:root {
  color-scheme: only light;   /* one light design: no browser's forced dark re-tinting it */
  accent-color: var(--lake);   /* the forms' own controls: checkboxes, a range, a progress */
  --wall-2: color-mix(in oklab, var(--wall) 96%, black);     /* the footer, a shade further from the light */
  --ink-2: color-mix(in oklab, var(--ink) 72%, var(--wall));  /* captions, dates — AA on both walls */
  --line: color-mix(in oklab, var(--wall) 84%, var(--ink));
  --night: color-mix(in oklab, var(--ink) 85%, black);        /* the viewer */
  --shade: color-mix(in oklab, var(--wall) 27%, black);       /* the shadows, warm */
  --shadow: 0 1px 2px color-mix(in oklab, var(--shade) 10%, transparent), 0 14px 30px -16px color-mix(in oklab, var(--shade) 42%, transparent);
  --shadow-up: 0 2px 4px color-mix(in oklab, var(--shade) 10%, transparent), 0 22px 40px -18px color-mix(in oklab, var(--shade) 50%, transparent);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --qry-speed: 0.25s;
  --qry-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* more contrast asked for (the system's setting): the greys to the ink, the lines firmer — the knobs' shades, nothing else */
@media (prefers-contrast: more) { :root { --ink-2: var(--ink); --line: color-mix(in oklab, var(--wall) 55%, var(--ink)); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--wall); color: var(--ink);
  font: 400 1.0625rem/1.7 var(--sans); font-feature-settings: 'kern', 'liga';
}
img { max-width: 100%; height: auto; }
a { color: var(--lake); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--lake); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 300; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.75rem; }
p, blockquote { margin: 0 0 1em; }
p { text-wrap: pretty; }   /* no word alone on a last line (where the browser can) */
[hidden] { display: none !important; }

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.5rem 1rem; background: var(--ink); color: var(--wall); }
.skip:focus { top: 1rem; }

/* ── header: the name, the menu, the languages ───────────────────────── */
.top {
  padding: 1.6rem 0 1.4rem;
  display: flex; align-items: baseline; gap: 1rem 2.5rem; flex-wrap: wrap;
}
.brand { font: 500 1.55rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: 0.01em; margin-right: auto; }
.top ul { list-style: none; margin: 0; padding: 0; display: flex; }
.menu ul { gap: 0.4rem 1.9rem; flex-wrap: wrap; }
.menu a { color: var(--ink); text-decoration: none; font-size: 1rem; letter-spacing: 0.02em; padding-block: 0.2rem; }
.menu a[aria-current='page'], .menu a:hover { box-shadow: inset 0 -1px var(--ink); }
.langs ul { gap: 0.15rem; }
.langs { font-size: 0.8rem; letter-spacing: 0.08em; }
.langs a { display: block; padding: 0.2rem 0.4rem; color: var(--ink-2); text-decoration: none; border-radius: 2px; }
.langs a:hover { color: var(--ink); }
.langs a[aria-current='true'] { color: var(--ink); box-shadow: inset 0 -1px var(--ink); }
@media (max-width: 40rem) {
  .top { display: grid; grid-template-columns: 1fr auto; padding-top: 1.2rem; }
  .menu { grid-column: 1 / -1; grid-row: 2; }
  .menu ul { gap: 0.3rem 1.4rem; }
}

/* ── home: name, motto, and one painting hung whole ─────────────────── */
.hero { padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-text { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0.5rem 2rem; margin-bottom: clamp(1.8rem, 4vw, 3.2rem); }
.hero h1 { font-size: clamp(3.1rem, 10vw, 8rem); line-height: 0.92; margin: 0; letter-spacing: -0.02em; grid-row: span 2; }
.role { margin: 0; color: var(--ink-2); letter-spacing: 0.06em; text-align: right; }
.motto { margin: 0; font: italic 400 clamp(1.35rem, 2.4vw, 1.8rem)/1.25 var(--serif); color: var(--ink); text-align: right; }
@media (max-width: 40rem) {
  .hero-text { grid-template-columns: 1fr; }
  .hero h1 { grid-row: auto; margin-bottom: 0.5rem; }
  .role, .motto { text-align: left; }
}
.hang { margin: 0; }
.hang a { display: block; }
.hang img { display: block; width: 100%; box-shadow: var(--shadow); }
.hang figcaption { margin-top: 0.8rem; text-align: right; }
.hang figcaption, .work-caption, .drawing figcaption { font-size: 0.8rem; color: var(--ink-2); letter-spacing: 0.04em; font-variant-numeric: lining-nums tabular-nums; }

section { scroll-margin-top: 1rem; }
.intro, .selection, .recent { padding-block: clamp(2.5rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.intro { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.lead { font: 400 clamp(1.45rem, 2.4vw, 1.85rem)/1.35 var(--serif); }
.intro-drawing { margin: 0; justify-self: center; max-width: 20rem; }
.intro-drawing img, .drawing img { display: block; box-shadow: var(--shadow); }
@media (max-width: 48rem) { .intro { grid-template-columns: 1fr; } .intro-drawing { max-width: 14rem; justify-self: start; } }
.more { font-size: 0.95rem; letter-spacing: 0.04em; }

/* ── a wall of works: whole paintings in rows of one height ──────────────
   Each item grows with its shape (--ar = width / height, set by build.mjs), so a row's
   paintings share a height and none is cropped; the filler keeps the last row from stretching. */
.wall { --row: 15rem; list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 2.6rem clamp(1.2rem, 2.6vw, 2.4rem); align-items: flex-start; }
.wall::after { content: ''; flex: 999 1 0; }
.wall-even::after { display: none; }   /* a chosen set (the home's) fills its last row too: 3 + 3 on a screen — on a phone, a work alone on its row takes it whole, never a small one beside a void */
@media (max-width: 40rem) { .wall.wall-even > li { max-width: none; } }
.wall > li { flex: var(--ar) 1 calc(var(--ar) * var(--row)); min-width: 0; max-width: calc(var(--ar) * var(--row) * 2); }   /* a lone tall work stays a painting, not a poster */
.wall a { display: block; }
.wall img { display: block; width: 100%; box-shadow: var(--shadow); }
.work-caption { margin: 0.7rem 0 0; }
.wall-large { --row: 17rem; }
@media (max-width: 40rem) { .wall { --row: 8.5rem; gap: 1.8rem 1rem; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .wall img, .hang img, .poster img { transition: transform var(--qry-speed) var(--qry-ease), box-shadow var(--qry-speed) var(--qry-ease); }
  .wall a:hover img, .hang a:hover img, .poster a:hover img { transform: translateY(-3px); box-shadow: var(--shadow-up); }
}

/* ── inner pages ─────────────────────────────────────────────────────── */
.page { padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 6rem); }
.page-lead { color: var(--ink-2); max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.artist { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; margin-top: 1.5rem; }
.prose { max-width: 38rem; }
.drawing { margin: 0; max-width: 24rem; }
.drawing figcaption { margin-top: 0.7rem; }
.drawing video, .drawing audio { display: block; width: 100%; }
@media (max-width: 48rem) { .artist { grid-template-columns: 1fr; } .drawing { max-width: 16rem; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.5rem; margin: 2rem 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.facts dt { font-size: 0.85rem; color: var(--ink-2); letter-spacing: 0.04em; padding-top: 0.1rem; }
.facts dd { margin: 0; }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; gap: 0.1rem; } .facts dd { margin-bottom: 0.7rem; } }

/* ── exhibitions ─────────────────────────────────────────────────────── */
.shows { border-top: 1px solid var(--line); padding-top: 1.6rem; margin-top: 1rem; }
.shows > h2 { font-weight: 300; color: var(--ink-2); }
.show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); gap: 1.5rem clamp(2rem, 6vw, 5rem); padding-block: 1.5rem 2.5rem; }
.show + .show { border-top: 1px solid var(--line); }
.show h3 { margin-bottom: 0.2rem; }
.show-dates { margin: 0 0 0.4rem; font-size: 0.9rem; color: var(--lake); letter-spacing: 0.04em; }
.show-kind { color: var(--ink-2); margin-bottom: 0.4rem; }
.show .facts { margin-top: 1.4rem; }
.poster { margin: 0; }
.poster a { display: block; }
.poster img { display: block; box-shadow: var(--shadow); }
@media (max-width: 48rem) { .show { grid-template-columns: 1fr; } .poster { max-width: 15rem; } }
.shows-brief { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.shows-brief .show { display: block; padding-block: 0.5rem 1.5rem; }
.shows-brief .show + .show { border-top: 0; }

.lost > div + div { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.lost h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

/* ── footer ──────────────────────────────────────────────────────────── */
.colophon { background: var(--wall-2); padding: 2.6rem 0 2rem; font-size: 0.95rem; }
.colophon-inner { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: end; }
.colophon-name { margin: 0; color: var(--ink-2); }
.colophon-name a { font: 500 1.5rem/1.2 var(--serif); color: var(--ink); text-decoration: none; }
.colophon-motto { margin: 0; font: italic 400 1.35rem/1.3 var(--serif); }
.colophon-small { grid-column: 1 / -1; margin: 0.8rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-2); }
/* discreet: the way to the site's admin (theme.php cu_footer), the ©'s colour until pointed at */
.colophon .admin-link { margin-inline-start: .5rem; color: inherit; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
.colophon .admin-link:hover, .colophon .admin-link:focus-visible { color: var(--lake); }
@media (max-width: 40rem) { .colophon-inner { grid-template-columns: 1fr; } }

/* ── the viewer (makeViewer in site.js) ──────────────────────────────── */
.qry-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--night); color: var(--wall); }
.qry-viewer::backdrop { background: var(--night); }
.qry-viewer figure { height: 100%; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; padding: 3.5rem 4.5rem 1.2rem; }
.qry-viewer img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.qry-viewer figcaption { min-height: 1.6em; padding-top: 0.8rem; font-size: 0.85rem; letter-spacing: 0.05em; color: color-mix(in oklab, var(--wall) 87%, var(--ink)); font-variant-numeric: tabular-nums; }
.qry-viewer button { position: absolute; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: color-mix(in oklab, var(--light) 10%, transparent); color: var(--wall); font: 300 1.7rem/1 var(--sans); cursor: pointer; }
.qry-viewer button:hover { background: color-mix(in oklab, var(--light) 22%, transparent); }
.qry-viewer :focus-visible { outline-color: var(--wall); }
.qry-viewer .close { top: 0.8rem; right: 0.8rem; }
.qry-viewer [data-go="-1"] { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.qry-viewer [data-go="1"] { right: 0.8rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 40rem) {
  .qry-viewer figure { padding: 3.5rem 0.5rem 4.8rem; }
  .qry-viewer [data-go] { top: auto; bottom: 0.8rem; transform: none; }
}

/* ── print: the words and the works, nothing else ────────────────────── */
@media print {
  body { background: var(--light); font-size: 11pt; }
  .skip, .menu, .langs, .qry-viewer, .colophon-small { display: none !important; }
  .wall > li, figure, .show { break-inside: avoid; }
  .wall img, .hang img, .poster img, .drawing img, .intro-drawing img { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}

/* page to page: a cross-fade where the browser can */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-group(root) { animation-duration: var(--qry-speed); animation-timing-function: var(--qry-ease); }

/* the visit counter's info icon in the footer (Tools/visit.js, the site's admin): discreet, it says what is counted on a click */
.visits-info { display: inline-block; margin-inline-start: .4rem; font-size: .9em; }
.visits-info[open] { display: block; margin: .6rem 0 0; }
.visits-info summary { display: inline; cursor: pointer; list-style: none; opacity: .65; }
.visits-info summary::-webkit-details-marker { display: none; }
.visits-info summary svg { display: inline-block; vertical-align: -.14em; }   /* Tools/visit.js draws it: on the text's line */
.visits-info summary:hover, .visits-info summary:focus-visible, .visits-info[open] summary { opacity: 1; }
.visits-info p { max-width: 36rem; margin: .35rem 0 0; font-size: .92em; line-height: 1.45; }
