/* ============================================================
   renmckernan.com — gallery minimalism
   One typeface. Pure white. Generous space. The work carries it.
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #3d3d3d;        /* artwork titles, body emphasis */
  --grey: #6f6f6f;       /* nav, body text */
  --grey-light: #9a9a9a; /* artist name, years, footer */
  --line: #ececec;       /* hairline dividers, used sparingly */
  --kolsch-red: #c00000; /* the coaster red — used only for the language toggle */

  --measure: 62ch;       /* reading width for text pages */
  --gap: 28px;           /* grid gap between artworks */
  --edge: clamp(24px, 6vw, 96px); /* page side margin */

  --fs-name: clamp(24px, 2.6vw, 34px);
  --fs-nav: 15px;
  --fs-title: 18px;
  --fs-year: 14px;
  --fs-body: 19px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--grey);
  font-family: "Questrial", "Avenir Next", "Avenir", "Futura",
               "Century Gothic", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

img { display: block; width: 100%; height: auto; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: clamp(36px, 5vw, 60px) var(--edge) clamp(28px, 4vw, 44px);
}

.site-name {
  font-size: var(--fs-name);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-light);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 46px);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: var(--fs-nav);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.25s ease;
}

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

.site-social {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 6px;
}

.site-social a { line-height: 0; color: var(--grey); transition: color 0.25s ease; }
.site-social a:hover { color: var(--ink); }
.site-social svg { width: 19px; height: 19px; }

/* Language toggle — quiet, in the dialect being offered */
.site-lang {
  font: inherit;
  font-size: var(--fs-nav);
  letter-spacing: 0.06em;
  color: var(--kolsch-red);   /* coaster red — the one accent, ties to Rendröppche */
  background: none;
  border: 0;
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.site-lang:hover { opacity: 0.7; }

/* ---------- Generic page wrapper ---------- */

main {
  padding: clamp(40px, 9vh, 120px) var(--edge) 0;
}

.lead {
  text-align: center;
  font-size: var(--fs-nav);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-light);
  margin-bottom: clamp(40px, 8vh, 96px);
}

.lead a { color: var(--grey); transition: color 0.25s ease; }
.lead a:hover { color: var(--ink); }

/* Exhibition name as a proper headline on the home page */
.lead-title {
  display: block;
  font-size: var(--fs-name);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* Optional second banner line (e.g. the coaster pointer) */
.lead-note {
  display: block;
  margin-top: 12px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 17px;
  color: var(--grey-light);
}

/* ---------- Home: single featured work ---------- */

.featured {
  max-width: 1100px;
  margin: 0 auto;
}

.featured figcaption {
  margin-top: 18px;
  text-align: center;
}

/* Home: show the single work more modestly, with wider side margins */
body[data-page="index.html"] .featured { max-width: 620px; }

/* Home: welcome film — a touch wider than the still work */
.hero-video { display: block; width: 100%; height: auto; cursor: pointer; }
body[data-page="index.html"] .featured.film { max-width: 760px; }

/* Home: coaster teaser — same presentation as the Exhibition page,
   wrapped as a link to the exhibition. */
.coaster-link { display: block; }

/* ---------- Works grid ---------- */

.period {
  font-size: var(--fs-nav);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-light);
  margin: clamp(48px, 8vh, 90px) 0 26px;
}
.period:first-of-type { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap) var(--gap);
  align-items: start; /* works keep natural proportions; tops align */
}

/* Wider two-column variant for richer series (e.g. paintings) */
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 4vw, 56px);
}

.work figcaption { margin-top: 14px; }

.work .title,
.featured .title {
  font-size: var(--fs-title);
  color: var(--ink);
}

.work .year,
.featured .year {
  font-size: var(--fs-year);
  color: var(--grey-light);
  margin-top: 2px;
}

[data-zoom] { cursor: zoom-in; }

/* ---------- Text pages (About / Exhibition / Thoughts) ---------- */

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: var(--fs-body);
}

.prose h1 {
  font-size: var(--fs-name);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 28px;
}

.prose h2 {
  font-size: var(--fs-nav);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-light);
  font-weight: 400;
  margin: 48px 0 18px;
}

.prose p { margin-bottom: 22px; color: var(--grey); }
.prose p strong { color: var(--ink); font-weight: 400; }

.portrait {
  max-width: 320px;
  margin: 0 auto 44px;
}

/* Coaster multiple — two round discs floating on white */
.coaster {
  max-width: 760px;
  margin: clamp(56px, 10vh, 120px) auto 0;
  text-align: center;
}
.coaster-pair {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 72px);
}
.coaster-pair img {
  width: clamp(140px, 40%, 260px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}
.coaster-cap {
  margin-top: 26px;
  font-size: var(--fs-year);
  color: var(--grey-light);
}
.coaster-text {
  max-width: var(--measure);
  margin: 14px auto 0;
  font-size: var(--fs-body);
  color: var(--grey);
}

/* Exhibition work list — the three groups, medium, contained works */
.exh-works { margin-top: clamp(40px, 7vh, 80px); }
.exh-group { margin-bottom: 34px; }
.exh-group:last-child { margin-bottom: 0; }
.exh-group h3 {
  font-size: var(--fs-title);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}
.wl-medium {
  font-size: var(--fs-year);
  color: var(--grey-light);
  margin-bottom: 12px;
}
.worklist { list-style: none; }
.worklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--grey);
}
.worklist li:last-child { border-bottom: 0; }
.wl-thumb { flex: 0 0 auto; width: 72px; height: 54px; object-fit: contain; }
.wl-title { flex: 1; }
.wl-year { flex: 0 0 auto; color: var(--grey-light); }

/* CV / exhibition list — plain stacked lines, no bullets */
.cv { list-style: none; }
.cv li {
  display: flex;
  gap: 18px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--grey);
}
.cv li:last-child { border-bottom: 0; }
.cv .cv-year { flex: 0 0 4.5em; color: var(--grey-light); }
.cv .cv-detail { flex: 1; }
.cv .cv-detail .where { color: var(--grey-light); }

/* Thoughts — list of writings */
.writings { list-style: none; }
.writing { padding: clamp(28px, 5vh, 52px) 0; border-bottom: 1px solid var(--line); }
.writing:last-child { border-bottom: 0; }
.writing h3 { font-size: 19px; font-weight: 400; color: var(--ink); margin-bottom: 4px; }
.writing .when { font-size: var(--fs-year); color: var(--grey-light); margin-bottom: 18px; }
.writing .poem { white-space: pre-line; color: var(--grey); }

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(80px, 14vh, 160px) var(--edge) 56px;
  font-size: var(--fs-year);
  letter-spacing: 0.08em;
  color: var(--grey-light);
}
.site-footer a { color: inherit; transition: color 0.25s ease; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  z-index: 50;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; border-radius: 0; }
.lightbox img.round { border-radius: 50%; }
.lightbox .lb-cap {
  position: absolute;
  bottom: 4vh;
  left: 0; right: 0;
  text-align: center;
  font-size: var(--fs-year);
  color: var(--grey-light);
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .site-header { gap: 18px; }
  .site-nav { gap: 16px 20px; }
  :root { --fs-body: 17px; }
}

@media (max-width: 480px) {
  .site-name { white-space: normal; }
}
