/* Sheila Fossen — site styles. One file, no framework.
   The font file names in url() below are placeholders; build.mjs replaces them with hashed names.
   Colors were sampled from her paintings; text colors meet WCAG AA on the paper background. */

@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-500-normal.c20b57f6.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-600-normal.0e24538e.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-500-italic.b61f1c3b.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-wght-normal.114a0e5e.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-wght-italic.2456d7eb.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --paper: #faf6ef;          /* page background: warm watercolor paper */
  --paper-deep: #f2ebdf;     /* bands and footer */
  --ink: #15152c;            /* headings */
  --text: #26253d;           /* body text */
  --muted: #57546b;          /* secondary text (6.7:1 on paper) */
  --line: rgba(21, 21, 44, 0.14);
  --vermilion: #b74323;      /* main accent: buttons (white text 5.5:1) */
  --vermilion-deep: #963519; /* button hover */
  --accent-text: #a63c1f;    /* small accent text (5.9:1 on paper) */
  --cerulean: #3882b8;       /* decoration only */
  --focus: #2a6896;          /* focus ring, cerulean darkened (5.4:1) */
  --gold: #d2a83c;           /* decoration only, sparingly */
  --sap: #728744;            /* decoration only */
  --shadow-sheet: 0 1px 2px rgba(21, 21, 44, 0.10), 0 10px 24px -14px rgba(21, 21, 44, 0.45);
  --shadow-lift: 0 2px 4px rgba(21, 21, 44, 0.10), 0 18px 34px -16px rgba(21, 21, 44, 0.45);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
svg { display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 2rem + 3.2vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 1.5rem + 1.6vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); color: var(--text); }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.75rem;
}

a { color: var(--ink); text-decoration-line: underline; text-decoration-color: rgba(183, 67, 35, 0.55); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent-text); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: var(--paper); }
.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; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 48rem; }
.section { padding-block: var(--space); }
.section--tight { padding-block: calc(var(--space) * 0.6); }

/* ---------- header ---------- */
.site-header { padding-block: 1.4rem 1rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 2rem; }
.brand { text-decoration: none; color: var(--ink); display: inline-flex; flex-direction: column; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.85rem; letter-spacing: 0.01em; }
.brand-tag { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 0.35rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-nav a { display: inline-block; padding-block: 0.35rem; text-decoration: none; font-weight: 500; font-size: 1rem; letter-spacing: 0.02em; color: var(--text); border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--accent-text); }
.site-nav a[aria-current="page"], .site-nav a.is-section { border-bottom-color: var(--vermilion); color: var(--ink); }

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  background: var(--vermilion);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 2px;
  border: 1px solid var(--vermilion);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.button:hover { background: var(--vermilion-deep); border-color: var(--vermilion-deep); color: #fff; }
.button--quiet { background: transparent; color: var(--ink); border-color: rgba(21, 21, 44, 0.45); }
.button--quiet:hover { background: rgba(21, 21, 44, 0.05); color: var(--ink); border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; align-items: center; margin-top: 1.75rem; }
.more-link { font-weight: 600; }

/* ---------- paintings on the page ---------- */
.painting-img { box-shadow: var(--shadow-sheet); background: var(--paper-deep); }

/* hero */
.hero { margin: 0.5rem auto 0; }
.hero img { width: min(100%, calc((100svh - 13rem) * var(--ar))); min-width: min(100%, 22rem); margin-inline: auto; }
.hero figcaption { text-align: center; margin-top: 0.9rem; font-size: 0.95rem; color: var(--muted); }
.hero figcaption a { color: var(--muted); }
.hero figcaption a:hover { color: var(--accent-text); }
.title-italic { font-family: var(--serif); font-style: italic; font-size: 1.12em; color: var(--ink); }

/* home intro with a soft watercolor wash behind the name (motif 1 of 3) */
.intro { position: relative; text-align: center; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem); isolation: isolate; overflow: hidden; }
.intro h1 { font-size: clamp(3rem, 2.2rem + 4.2vw, 5.4rem); margin-bottom: 0.2em; }
.intro .lead { margin-inline: auto; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem); color: var(--text); }
.intro .actions { justify-content: center; }
.wash { position: absolute; z-index: -1; left: 50%; top: 52%; width: min(52rem, 118%); height: 15rem; transform: translate(-50%, -62%); pointer-events: none; }

/* justified gallery: rows keep each painting's own shape (never cropped) */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; }
.gallery li { margin: 0; }
.tile a { display: block; text-decoration: none; color: var(--ink); }
.tile img { width: 100%; height: auto; transition: transform 0.35s ease, box-shadow 0.35s ease; }
.tile-title { display: block; margin-top: 0.7rem; font-family: var(--serif); font-size: 1.22rem; font-weight: 600; line-height: 1.2; }
.tile a:hover .tile-title { color: var(--accent-text); }
.tile a:hover img, .tile a:focus-visible img { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile a:focus-visible { outline-offset: 6px; }
@media (min-width: 40em) {
  .gallery { display: flex; flex-wrap: wrap; gap: 2.5rem 1.75rem; --row: 13.5rem; }
  .gallery li { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * var(--row)); min-width: 0; }
  .gallery::after { content: ""; flex: 1000 1 0; }
  .gallery--big { --row: 16rem; }
}
@media (min-width: 80em) { .gallery { --row: 15rem; } .gallery--big { --row: 18rem; } }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }
.browse { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; }
.browse .eyebrow { margin: 0; color: var(--muted); }
.browse ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

/* torn-paper sheet (motif 2 of 3): a band of deeper paper with deckled top and bottom edges */
.sheet-wrap { margin-block: 1rem; }
.sheet { background: var(--paper-deep); }
.tear { width: 100%; height: 14px; color: var(--paper-deep); }
.tear--top { margin-bottom: -1px; }
.tear--bottom { margin-top: -1px; transform: scaleY(-1); }

.bio { display: grid; gap: 2rem 3.5rem; align-items: center; }
.bio-photo img { width: 100%; max-width: 22rem; box-shadow: var(--shadow-sheet); }
@media (min-width: 52em) { .bio { grid-template-columns: minmax(14rem, 22rem) 1fr; } }

.award { display: grid; gap: 1.5rem 3rem; align-items: center; }
.award img { width: 100%; max-width: 30rem; }
@media (min-width: 52em) { .award { grid-template-columns: minmax(16rem, 26rem) 1fr; } }

.invite { text-align: center; }
.invite p { margin-inline: auto; }
.invite .actions { justify-content: center; }

/* ---------- inner pages ---------- */
.page-head { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head p { color: var(--text); }
.breadcrumb { font-size: 0.92rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: rgba(21, 21, 44, 0.35); }
.breadcrumb a { color: var(--muted); }
.chips { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips a { display: inline-block; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.95rem; background: rgba(255, 255, 255, 0.45); }
.chips a:hover { border-color: var(--vermilion); color: var(--accent-text); }
.chips a[aria-current="page"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.count { color: var(--muted); font-weight: 400; }
.collection-block + .collection-block { margin-top: var(--space); }
.collection-block h2 a { text-decoration: none; }
.collection-block h2 a:hover { color: var(--accent-text); }

/* single painting */
.artwork { display: grid; gap: 2rem 3.5rem; padding-top: 0.5rem; }
.artwork-figure { margin: 0; }
.artwork-figure img { width: min(100%, calc(82svh * var(--ar)), var(--maxw, 9999px)); margin-inline: auto; }
.artwork-details { max-width: 40rem; }
.artwork-details h1 { margin-bottom: 0.25em; }
.artwork-meta { color: var(--muted); margin-bottom: 1.25rem; }
.artwork-meta a { color: var(--muted); }
.artwork--stacked .artwork-details { margin-inline: auto; width: 100%; }
.cta-note { font-size: 0.95rem; color: var(--muted); margin-top: 1rem; }
.cta-note a { color: var(--muted); }
@media (min-width: 60em) {
  .artwork--side { grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 1fr); align-items: start; }
  .artwork--side .artwork-details { position: sticky; top: 2rem; padding-top: 1rem; }
  .artwork--side .artwork-figure img { margin-inline: 0 auto; }
}
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: block; }
.pager .label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pager .name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.pager a:hover .name { color: var(--accent-text); }
.pager-next { text-align: right; }

/* about */
.about-grid { display: grid; gap: 2.5rem 4rem; align-items: start; }
.about-grid figure { margin: 0; }
.about-grid img { width: 100%; max-width: 26rem; box-shadow: var(--shadow-sheet); }
.about-grid figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 0.7rem; }
@media (min-width: 56em) { .about-grid { grid-template-columns: minmax(16rem, 24rem) 1fr; } .about-grid.about-ways { grid-template-columns: 1fr 1fr; } }
.about-ways h3 { margin-bottom: 0.3em; }
.about-ways .gallery { --row: 9rem; }
.about-ways .gallery::after { display: none; } /* one short row: let the pair fill the column */
.about-ways p { color: var(--muted); margin-bottom: 1.25rem; }
.own-words { margin: 2.5rem 0 0; padding-left: 1.5rem; border-left: 3px solid var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1.4; color: var(--ink); }

/* exhibitions */
.shows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.shows li { display: grid; grid-template-columns: 1fr; gap: 0.1rem 2rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.shows .when { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.shows .venue { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
@media (min-width: 40em) { .shows li { grid-template-columns: 9.5rem 1fr; align-items: baseline; } }
.photo-grid { display: grid; gap: 2.5rem; margin-top: 2rem; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; box-shadow: var(--shadow-sheet); }
.photo-grid figcaption { margin-top: 0.7rem; font-size: 0.95rem; color: var(--muted); }
@media (min-width: 52em) {
  .photo-grid { grid-template-columns: 1fr 1fr; }
  /* first photo full width; a last photo left alone in its row too (templates.mjs gives it full-width sizes) */
  .photo-grid figure:first-child, .photo-grid figure:last-child:nth-child(even) { grid-column: 1 / -1; }
}
/* show list with the photo of Sheila at a show beside it (exhibitions.json artistAtShow) */
.shows-with-photo { display: grid; gap: 2.5rem 3.5rem; }
.shows-with-photo figure { margin: 0; max-width: 20rem; }
.shows-with-photo img { width: 100%; box-shadow: var(--shadow-sheet); }
.shows-with-photo figcaption { margin-top: 0.7rem; font-size: 0.95rem; color: var(--muted); }
@media (min-width: 52em) { .shows-with-photo { grid-template-columns: 1fr minmax(14rem, 20rem); align-items: start; } }

/* home: one quiet photo of her work on a gallery wall, linking to the exhibitions page (exhibitions.json homeBand) */
.show-band { padding-block: 0 calc(var(--space) * 0.4); }
.show-band figure { margin: 0; }
.show-band img { width: 100%; box-shadow: var(--shadow-sheet); }
.show-band figcaption { margin-top: 0.9rem; text-align: center; font-size: 0.95rem; color: var(--muted); }

/* contact */
.contact-card { margin-top: 0; padding: clamp(1.5rem, 4vw, 2.5rem); background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line); }
.contact-card .email { font-family: var(--serif); font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); font-weight: 600; word-break: break-word; }
.tips { margin: 2rem 0 0; padding-left: 1.2rem; }
.tips li { margin-bottom: 0.75rem; max-width: 62ch; }
.social { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ---------- footer, with a torn paper edge (motif 3 of 3) ---------- */
.site-footer { margin-top: var(--space); }
.site-footer .tear { color: var(--paper-deep); }
.footer-body { background: var(--paper-deep); padding-block: 2.5rem 2rem; font-size: 0.97rem; }
.footer-grid { display: grid; gap: 1.75rem 3rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--ink); margin: 0 0 0.25rem; }
.site-footer h2 { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.footer-small { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.footer-small p { margin: 0; max-width: none; }

/* 404 */
.notfound { text-align: center; }
.notfound p { margin-inline: auto; }
.notfound .actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .tile a:hover img, .tile a:focus-visible img { transform: none; }
}
@media print {
  .site-nav, .site-footer, .skip-link, .actions, .pager { display: none; }
  body { background: #fff; }
}
