/* =========================================================
   Art Galleries of Victoria — shared stylesheet
   Layout concept: a "white cube" gallery wall. Calm neutral
   walls, the artwork carries the colour, museum-style wall
   labels carry the detail. Mood words: curious, coastal, welcoming.
   Tokens follow the Website Project Profile design system.
   ========================================================= */

/* Palette: BC coast, where the rainforest meets the sea.
   Misty walls keep the artwork first; deep cedar-green bands and a
   Salish Sea blue-green accent add contrast at the edges. */
:root {
  --bg: #F3F6F3;            /* coastal mist */
  --surface: #FFFFFF;
  --text: #13241F;          /* rainforest ink */
  --muted: #4B5D56;
  --accent: #1B5E6B;        /* Salish Sea */
  --accent-ink: #FFFFFF;
  --border: #D3DDD7;
  --wall: #E4ECE6;          /* moss-and-fog band */
  --forest: #17332A;        /* deep cedar: footer and closing bands */
  --on-forest: #EAF2ED;
  --on-forest-muted: #A8C0B5;
  --driftwood: #D9C7A7;     /* small highlights on dark bands only */
  --shadow: 0 1px 2px rgba(19,36,31,.07), 0 10px 28px rgba(19,36,31,.10);

  /* Type roles */
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sub: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-accent: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Montserrat", "Segoe UI", system-ui, sans-serif;

  /* 8px spacing scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --radius: 8px;
  --radius-card: 12px;
  --max: 1120px;
  --text-max: 680px;
  --header-h: 72px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1815; --surface: #15221E; --text: #E5EEE9; --muted: #9DB1A8;
    --accent: #7FC6CE; --accent-ink: #082024; --border: #263A33; --wall: #122019;
    --forest: #08110E; --on-forest: #E5EEE9; --on-forest-muted: #93ABA1; --driftwood: #D9C7A7;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1815; --surface: #15221E; --text: #E5EEE9; --muted: #9DB1A8;
  --accent: #7FC6CE; --accent-ink: #082024; --border: #263A33; --wall: #122019;
  --forest: #08110E; --on-forest: #E5EEE9; --on-forest-muted: #93ABA1; --driftwood: #D9C7A7;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { /* paints the safe-area band above the sticky header */
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface);
}
img, canvas, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; color: var(--text); }
h1, h2 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3, h4 { font-family: var(--font-sub); font-weight: 600; line-height: 1.3; }
h3 { font-size: clamp(20px, 2vw, 24px); }
h4 { font-size: 18px; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: var(--radius);
  font-family: var(--font-ui); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* Side gutter lives on every band's inner wrapper */
.wrap {
  width: 100%; max-width: calc(var(--max) + 2 * 24px); margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
.section { padding-block: var(--s7); }
.section--wall { background: var(--wall); }
@media (max-width: 640px) { .section { padding-block: var(--s5); } }

.eyebrow {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: var(--text-max); }
.prose { max-width: var(--text-max); display: grid; gap: var(--s2); }
.section-head { display: grid; gap: var(--s2); max-width: var(--text-max); margin-bottom: var(--s5); }
.accent-line { font-family: var(--font-accent); font-style: italic; font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: var(--radius);
  font-family: var(--font-ui); font-weight: 600; font-size: 15px; letter-spacing: .02em;
  text-decoration: none; cursor: pointer; border: 2px solid var(--accent);
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn--secondary { background: transparent; color: var(--accent); }
.btn--secondary:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.text-link { font-family: var(--font-ui); font-weight: 600; font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo-word { font-family: var(--font-heading); font-weight: 700; font-size: 19px; line-height: 1.05; }
.logo-word small { display: block; font-family: var(--font-ui); font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-list { display: flex; align-items: center; gap: var(--s1); list-style: none; }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-family: var(--font-ui); font-weight: 500; font-size: 15px; letter-spacing: .03em;
  color: var(--text); text-decoration: none; border-radius: 6px; position: relative;
}
.nav-list a:hover { color: var(--accent); }
.nav-list a[aria-current="page"] { color: var(--accent); }
.nav-list a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; background: var(--accent);
}
.header-actions { display: flex; align-items: center; gap: var(--s2); }
.menu-toggle {
  display: none; min-height: 44px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; cursor: pointer; gap: 8px; align-items: center;
}
.menu-toggle span[aria-hidden] { display: inline-block; width: 18px; height: 12px; border-block: 2px solid currentColor; position: relative; }
.menu-toggle span[aria-hidden]::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: currentColor; }
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .site-nav[data-open="false"] { display: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s1) max(16px, env(safe-area-inset-right, 0px)) var(--s2) max(16px, env(safe-area-inset-left, 0px)); }
  .nav-list a { padding: 0 8px; font-size: 17px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-list a[aria-current="page"]::after { left: 0; right: auto; width: 4px; top: 12px; bottom: 12px; height: auto; }
  .header-actions .btn { display: none; }
  .nav-cta { display: block !important; padding-top: var(--s2); }
}
.nav-cta { display: none; }
@media (max-width: 400px) { .logo-word { font-size: 16px; } .logo-word small { display: none; } }

/* ---------- Banner (hero) ---------- */
.banner { padding-block: var(--s6) var(--s6); border-bottom: 1px solid var(--border); }
.banner .wrap { display: grid; gap: var(--s3); }
.banner--page h1 { max-width: 18ch; }
.banner--page .lede { margin-top: var(--s1); }
.banner--split .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--s6); }
.banner-copy { display: grid; gap: var(--s3); min-width: 0; }
.banner-stats { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); padding-top: var(--s2); border-top: 1px solid var(--border); margin-top: var(--s1); }
.stat { display: grid; }
.stat b { font-family: var(--font-heading); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--font-ui); font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--muted); }
.banner-art { position: relative; min-width: 0; }
@media (max-width: 960px) {
  .banner--split .wrap { grid-template-columns: 1fr; gap: var(--s5); }
  .banner { padding-block: var(--s5); }
}
@media (prefers-reduced-motion: no-preference) {
  .banner-copy > * { animation: rise .6s ease both; }
  .banner-copy > *:nth-child(2) { animation-delay: .06s; }
  .banner-copy > *:nth-child(3) { animation-delay: .12s; }
  .banner-copy > *:nth-child(4) { animation-delay: .18s; }
  .salon .frame { animation: hang .8s cubic-bezier(.2,.7,.2,1) both; }
  .salon .frame:nth-child(2) { animation-delay: .12s; }
  .salon .frame:nth-child(3) { animation-delay: .24s; }
}
@keyframes rise { from { transform: translateY(10px); opacity: .001; } to { transform: none; opacity: 1; } }
@keyframes hang { from { transform: translateY(-14px) rotate(-.6deg); opacity: .001; } to { transform: none; opacity: 1; } }

/* ---------- Salon hang (hero artworks) ---------- */
.salon { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto; gap: var(--s3); align-items: end; }
.salon .frame:nth-child(1) { grid-row: span 2; align-self: center; }
.frame { display: grid; gap: 10px; min-width: 0; margin: 0; }
.frame-inner {
  background: var(--surface); padding: 10px; border: 1px solid var(--border);
  box-shadow: var(--shadow); border-radius: 2px;
}
.art { width: 100%; height: auto; aspect-ratio: var(--ratio, 4 / 5); background: var(--wall); border-radius: 1px; }
.wall-label { font-family: var(--font-ui); font-size: 12px; line-height: 1.45; color: var(--muted); }
.wall-label b { display: block; color: var(--text); font-weight: 600; font-size: 13px; }
.wall-label i { font-style: italic; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: var(--s3); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: var(--s3); display: grid; gap: var(--s2); align-content: start; min-width: 0;
}
.card p { color: var(--muted); }
.card .btn, .card .text-link { justify-self: start; }

/* Persona pathways */
.path { border-top: 2px solid var(--text); padding-top: var(--s3); display: grid; gap: var(--s2); align-content: start; min-width: 0; }
.path p { color: var(--muted); }
.path ul { list-style: none; display: grid; gap: 6px; font-size: 15px; }
.path li::before { content: "—"; color: var(--accent); margin-right: 8px; }

/* Event cards */
.event { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3); }
.event-date {
  display: grid; justify-items: center; align-content: center; gap: 2px; padding: 12px 6px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
  font-family: var(--font-ui); text-align: center; font-variant-numeric: tabular-nums;
}
.event-date .m { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.event-date .d { font-family: var(--font-heading); font-size: 32px; font-weight: 700; line-height: 1; }
.event-date .w { font-size: 12px; color: var(--muted); }
.event-body { display: grid; gap: 10px; min-width: 0; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.event-meta span { display: inline-flex; gap: 6px; align-items: center; }
.tag {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  border: 1px solid var(--border); color: var(--text); background: var(--bg); justify-self: start;
}
.tag--accent { border-color: var(--accent); color: var(--accent); }
@media (max-width: 480px) { .event { grid-template-columns: 1fr; } .event-date { grid-auto-flow: column; justify-content: start; gap: 10px; padding: 8px 12px; } .event-date .d { font-size: 24px; } }

.filters { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s4); }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-ui); font-weight: 500; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.event-list { display: grid; gap: var(--s2); }
.empty-note { color: var(--muted); padding: var(--s3); border: 1px dashed var(--border); border-radius: var(--radius-card); }

/* Artist cards */
.artist-card { padding: 0; overflow: hidden; gap: 0; }
.artist-card .art-wrap { overflow: hidden; background: var(--wall); padding: var(--s3); border-bottom: 1px solid var(--border); }
.artist-card .art { --ratio: 4 / 3; box-shadow: var(--shadow); transition: transform .4s ease; }
.artist-card:hover .art { transform: scale(1.03); }
.artist-card .card-body { padding: var(--s3); display: grid; gap: 10px; align-content: start; }
.artist-card .card-body p { color: var(--muted); }
.artist-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.artist-card .card-body .btn { margin-top: var(--s1); }

/* Artist profile dialog */
dialog.profile {
  width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
dialog.profile::backdrop { background: rgba(20, 20, 20, .55); }
.profile-head { display: flex; justify-content: space-between; align-items: start; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.profile-head h2 { font-size: clamp(26px, 3vw, 34px); }
.close-btn { min-width: 44px; min-height: 44px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--font-ui); font-weight: 600; cursor: pointer; }
.profile-body { padding: var(--s4); display: grid; gap: var(--s4); }
.profile-works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.profile-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s4); }
.profile-cols h3 { font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s1); font-family: var(--font-ui); }
.profile-cols section { display: grid; gap: var(--s1); }
.profile-cols .stack { display: grid; gap: var(--s3); align-content: start; }
.facts { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 16px; font-size: 15px; }
.facts dt { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; }
.results { list-style: none; display: grid; gap: 8px; }
.results li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.results b { font-family: var(--font-heading); font-size: 22px; font-variant-numeric: tabular-nums; color: var(--accent); }
@media (max-width: 720px) {
  .profile-cols { grid-template-columns: 1fr; }
  .profile-works { grid-template-columns: 1fr 1fr; }
  .profile-works .frame:nth-child(3) { display: none; }
  .profile-body, .profile-head { padding: var(--s3) var(--s2); }
}

/* Testimonials */
.quote { margin: 0; display: grid; gap: var(--s2); align-content: start; }
.quote blockquote { margin: 0; font-family: var(--font-accent); font-style: italic; font-weight: 500; font-size: clamp(21px, 2vw, 25px); line-height: 1.35; }
.quote figcaption { font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.quote figcaption b { color: var(--text); font-weight: 600; display: block; }

/* Member galleries list */
.gallery-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 var(--s5); }
.gallery-list li { display: flex; justify-content: space-between; gap: var(--s2); padding: 14px 0; border-bottom: 1px solid var(--border); }
.gallery-list b { font-family: var(--font-sub); font-weight: 600; }
.gallery-list span { color: var(--muted); font-size: 15px; text-align: right; }
@media (max-width: 640px) { .gallery-list { grid-template-columns: 1fr; } }

/* Split content */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--s5); } }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--font-sub); font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 16px; font-size: 24px; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 20px; color: var(--muted); max-width: var(--text-max); }

/* Closing CTA */
.cta-band { border-top: 1px solid var(--border); }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.cta-band h2 { max-width: 20ch; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--s4); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } .form { padding: var(--s3); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-family: var(--font-ui); font-weight: 600; font-size: 14px; }
.field label .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: #B42318; border-width: 2px; }
.field .error { color: #B42318; font-size: 14px; font-weight: 500; }
:root[data-theme="dark"] .field .error, :root[data-theme="dark"] .field [aria-invalid="true"] { color: #FDA29B; border-color: #FDA29B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field .error { color: #FDA29B; } :root:not([data-theme="light"]) .field [aria-invalid="true"] { border-color: #FDA29B; } }
.form-note { font-size: 14px; color: var(--muted); }
.form-success { border: 1px solid var(--accent); border-radius: var(--radius-card); padding: var(--s3); display: grid; gap: var(--s1); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.form-success h3 { color: var(--accent); }

.contact-list { list-style: none; display: grid; gap: var(--s3); }
.contact-list li { display: grid; gap: 2px; }
.contact-list .label { font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hours { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 2px 24px; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: var(--s6) var(--s4); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s5); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s4); } }
.footer-brand { display: grid; gap: var(--s2); align-content: start; }
.footer-brand .accent-line { font-size: 22px; }
.footer-col h2 { font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s2); }
.footer-nav { list-style: none; display: grid; gap: 4px; }
.footer-nav a { color: var(--text); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.social { display: flex; gap: var(--s1); list-style: none; }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; color: var(--text); }
.social a:hover { color: var(--accent); border-color: var(--accent); }
.social svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); color: var(--muted); font-size: 14px; }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); }
.footer-bottom a { color: var(--muted); }
.land { color: var(--muted); font-size: 14px; max-width: 60ch; }

.to-top {
  position: fixed; z-index: 40;
  right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center; font-size: 20px; transition: opacity .2s ease, transform .2s ease;
}
.to-top[data-visible="false"] { opacity: 0; pointer-events: none; transform: translateY(8px); }

/* Cookie banner */
.cookie {
  position: fixed; z-index: 70; left: 0; right: 0; bottom: 0;
  padding: var(--s3) max(16px, env(safe-area-inset-right, 0px)) calc(var(--s3) + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(0,0,0,.08);
}
.cookie-inner { max-width: var(--max); margin-inline: auto; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; justify-content: space-between; }
.cookie p { max-width: 70ch; font-size: 15px; }

.placeholder-note { font-family: var(--font-ui); font-size: 13px; padding: 10px 14px; border-radius: var(--radius); border: 1px dashed var(--muted); color: var(--muted); }
.legal .prose h2 { font-size: 26px; margin-top: var(--s3); }

/* Scroll reveal: only applied by JS to elements below the fold at load */
@media (prefers-reduced-motion: no-preference) {
  .reveal-pending { transform: translateY(16px); }
  .reveal-in { transform: none; transition: transform .5s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Deep-forest bands (footer + closing CTA) ---------- */
.cta-band, .site-footer { background: var(--forest); color: var(--on-forest); border-top: 0; }
.cta-band h2, .site-footer .accent-line, .site-footer .logo { color: var(--on-forest); }
.cta-band .lede, .site-footer .land, .footer-bottom, .footer-bottom a, .site-footer .logo-word small { color: var(--on-forest-muted); }
.footer-col h2 { color: var(--driftwood); }
.footer-nav a, .footer-nav li { color: var(--on-forest); }
.footer-nav a:hover { color: var(--driftwood); }
.site-footer .social a { color: var(--on-forest); border-color: color-mix(in srgb, var(--on-forest) 30%, transparent); }
.site-footer .social a:hover { color: var(--driftwood); border-color: var(--driftwood); }
.footer-bottom { border-top-color: color-mix(in srgb, var(--on-forest) 18%, transparent); }
.site-footer .logo svg { --surface: var(--forest); }
.site-footer .logo rect:first-child { stroke: var(--on-forest); }
.cta-band .btn--primary { background: var(--on-forest); color: var(--forest); border-color: var(--on-forest); }
.cta-band .btn--secondary { color: var(--on-forest); border-color: color-mix(in srgb, var(--on-forest) 55%, transparent); }
.cta-band .btn--secondary:hover { background: color-mix(in srgb, var(--on-forest) 10%, transparent); }
.site-footer :focus-visible, .cta-band :focus-visible { outline-color: var(--driftwood); }

/* Page banners: a thin tideline of forest into sea under the header */
.banner { position: relative; }
.banner::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--forest), var(--accent)); }
.eyebrow { color: var(--accent); }
.path { border-top-color: var(--forest); }
:root[data-theme="dark"] .path { border-top-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .path { border-top-color: var(--accent); } }
.cta-band + .site-footer, main + .site-footer { border-top: 1px solid color-mix(in srgb, var(--on-forest) 14%, transparent); }

/* =========================================================
   Coastal contrast layer: ocean, driftwood, cedar
   Sequence down each page: ocean banner → sea-mist and
   driftwood-sand bands → ocean CTA → cedar footer.
   ========================================================= */
:root {
  --ocean: #123F52;          /* deep Pacific */
  --ocean-mid: #2A6F86;      /* open water */
  --on-ocean: #ECF4F6;
  --on-ocean-muted: #AFCAD4;
  --sea-mist: #DCE9EE;       /* cool band */
  --sand: #EBE1CF;           /* driftwood sand band */
  --driftwood: #9C7F57;      /* weathered wood (rules, borders) */
  --driftwood-light: #DCC9A6;
  --accent: #17566E;         /* buttons and links, shifted toward ocean blue */
  --wall: var(--sea-mist);
  --border: #CBD8DB;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ocean: #0B2B38; --ocean-mid: #3E8BA3; --on-ocean: #E6F0F3; --on-ocean-muted: #9DBBC6;
    --sea-mist: #0F2129; --sand: #1E1A13; --driftwood: #C2A57B; --driftwood-light: #DCC9A6;
    --accent: #86C7DA; --wall: var(--sea-mist); --border: #263B42;
  }
}
:root[data-theme="dark"] {
  --ocean: #0B2B38; --ocean-mid: #3E8BA3; --on-ocean: #E6F0F3; --on-ocean-muted: #9DBBC6;
  --sea-mist: #0F2129; --sand: #1E1A13; --driftwood: #C2A57B; --driftwood-light: #DCC9A6;
  --accent: #86C7DA; --wall: var(--sea-mist); --border: #263B42;
}

.section--sand { background: var(--sand); }
.section--sand .card { border-color: color-mix(in srgb, var(--driftwood) 35%, transparent); }
.section--sand .artist-card .art-wrap { background: color-mix(in srgb, var(--driftwood) 18%, var(--sand)); }

/* Header: ocean tideline */
.site-header { border-bottom: 3px solid var(--ocean); }
.banner::before { height: 6px; background: linear-gradient(90deg, var(--ocean) 0 45%, var(--driftwood) 45% 70%, var(--forest) 70%); }

/* Home hero on driftwood sand: white frames pop like a gallery wall */
.banner--split { background: var(--sand); border-bottom: 0; }
.banner--split .banner-stats { border-top-color: color-mix(in srgb, var(--driftwood) 45%, transparent); }
.banner--split .stat b { color: var(--ocean); }
:root[data-theme="dark"] .banner--split .stat b { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner--split .stat b { color: var(--accent); } }

/* Inner-page banners: deep ocean */
.banner--page { background: var(--ocean); color: var(--on-ocean); border-bottom: 0; }
.banner--page h1 { color: var(--on-ocean); }
.banner--page .eyebrow { color: var(--driftwood-light); }
.banner--page .lede { color: var(--on-ocean-muted); }
.banner--page .btn--primary { background: var(--on-ocean); color: var(--ocean); border-color: var(--on-ocean); }
.banner--page .btn--secondary { color: var(--on-ocean); border-color: color-mix(in srgb, var(--on-ocean) 55%, transparent); }
.banner--page :focus-visible { outline-color: var(--driftwood-light); }

/* Closing CTA: ocean, footer stays cedar */
.cta-band { background: var(--ocean); }
.cta-band h2 { color: var(--on-ocean); }
.cta-band .lede { color: var(--on-ocean-muted); }
.cta-band .btn--primary { background: var(--driftwood-light); color: #1C2A2E; border-color: var(--driftwood-light); }
.cta-band .btn--secondary { color: var(--on-ocean); }

/* Persona pathways: ocean / driftwood / cedar / open water */
.path { border-top-width: 4px; }
.grid .path:nth-child(1) { border-top-color: var(--ocean); }
.grid .path:nth-child(2) { border-top-color: var(--driftwood); }
.grid .path:nth-child(3) { border-top-color: var(--forest); }
.grid .path:nth-child(4) { border-top-color: var(--ocean-mid); }
:root[data-theme="dark"] .grid .path:nth-child(3) { border-top-color: #4F8A72; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grid .path:nth-child(3) { border-top-color: #4F8A72; } }

/* Event date blocks: ocean tiles */
.event-date { background: var(--ocean); border-color: var(--ocean); color: var(--on-ocean); }
.event-date .m { color: var(--driftwood-light); }
.event-date .w { color: var(--on-ocean-muted); }
.tag--accent { border-color: var(--ocean-mid); color: var(--ocean); background: var(--sea-mist); }
:root[data-theme="dark"] .tag--accent { color: var(--on-ocean); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag--accent { color: var(--on-ocean); } }

/* Driftwood details */
.quote blockquote { border-left: 3px solid var(--driftwood); padding-left: var(--s2); }
.results b { color: var(--ocean-mid); }
.faq summary::after { color: var(--driftwood); }
.gallery-list li { border-bottom-color: color-mix(in srgb, var(--driftwood) 40%, transparent); }
.footer-col h2 { color: var(--driftwood-light); }

/* Contrast divider between the ocean CTA band and the cedar footer */
main + .site-footer { border-top: 6px solid var(--driftwood-light); }
