/* St. Mags Artist's Guild — stmagsartistsguild.org
   Palette drawn from the guild photo: cover red, gilt cross, canvas drop cloth, ink, studio teal. */

:root {
  --canvas: #f4eee1;
  --canvas-2: #ebe2cf;
  --paper: #fbf8f1;
  --ink: #241d19;
  --ink-soft: #5a4e45;
  --red: #a3201b;
  --red-deep: #7c1713;
  --gold: #8a6a22;
  --gold-bright: #c9a24a;
  --teal: #2f5f5b;
  --line: rgba(36, 29, 25, 0.16);
  --on-red: #fbf3e4;
  --shadow: 0 1px 2px rgba(36, 29, 25, .06), 0 12px 32px -12px rgba(36, 29, 25, .22);
  --radius: 4px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --measure: 66ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #1b1613; --canvas-2: #241e1a; --paper: #211b17;
    --ink: #efe6d6; --ink-soft: #bfb2a2;
    --red: #e0574d; --red-deep: #b8352c; --gold: #d4b062; --gold-bright: #e2c27a;
    --teal: #7fb3ad; --line: rgba(239, 230, 214, .16); --on-red: #fff7ea;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #1b1613; --canvas-2: #241e1a; --paper: #211b17;
  --ink: #efe6d6; --ink-soft: #bfb2a2;
  --red: #e0574d; --red-deep: #b8352c; --gold: #d4b062; --gold-bright: #e2c27a;
  --teal: #7fb3ad; --line: rgba(239, 230, 214, .16); --on-red: #fff7ea;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1.1em; text-wrap: pretty; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--canvas); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  font: 700 .75rem/1 var(--sans);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: .7rem;
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; color: var(--red); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: italic 600 1.55rem/1 var(--serif); }
.brand-sub { font: 700 .62rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); margin-top: .3rem; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.nav a {
  display: block; padding: .55rem .8rem; color: var(--ink); text-decoration: none;
  font-size: .95rem; border-radius: var(--radius); position: relative;
}
.nav a::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--red); }
.nav .btn { margin-left: .5rem; }
.nav .btn::after { display: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.header-tools { display: flex; align-items: center; gap: .5rem; }

@media (max-width: 920px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; background: var(--canvas);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; padding: .75rem 16px 1.25rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s ease;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; }
  .nav a { padding: .85rem .5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin: 1rem 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 .82rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  padding: 1rem 1.4rem; border-radius: var(--radius); text-decoration: none; cursor: pointer;
  border: 1px solid var(--red); background: var(--red); color: var(--on-red);
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--on-red); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.btn-small { padding: .7rem 1rem; font-size: .72rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--canvas) 0%, color-mix(in srgb, var(--canvas) 88%, transparent) 34%, transparent 64%);
}
.hero .wrap { position: relative; min-height: min(86vh, 760px); display: grid; align-items: center; padding-block: 5rem; }
.hero-copy { max-width: 33rem; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 30rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

@media (max-width: 760px) {
  .hero-media { position: relative; aspect-ratio: 3 / 2; }
  .hero-media::after { background: linear-gradient(0deg, var(--canvas) 0%, transparent 40%); }
  .hero .wrap { min-height: 0; padding-block: 0 3.5rem; margin-top: -2.5rem; }
}

/* Page header (interior pages) */
.page-head { background: var(--canvas-2); border-bottom: 1px solid var(--line); padding: 5rem 0 3.5rem; position: relative; overflow: hidden; }
.page-head h1 { margin-bottom: .3em; }
.page-head p { font-size: 1.2rem; color: var(--ink-soft); max-width: 40rem; margin: 0; }
.page-head .mark { position: absolute; right: -40px; bottom: -60px; width: 300px; color: var(--red); opacity: .07; }

/* ---------- Sections ---------- */
section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 3rem; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split.reverse { grid-template-columns: 1.25fr 1fr; }
@media (max-width: 860px) { .split, .split.reverse { grid-template-columns: 1fr; } }

/* Purpose */
.purpose { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.purpose li { list-style: none; padding: 2rem 1.75rem 2rem 0; border-right: 1px solid var(--line); }
.purpose li + li { padding-left: 1.75rem; }
.purpose li:last-child { border-right: 0; }
.purpose .num { font: italic 500 3.2rem/1 var(--serif); color: var(--red); display: block; margin-bottom: 1rem; }
.purpose h3 { font-size: 1.45rem; margin-bottom: .6rem; }
.purpose p { color: var(--ink-soft); margin: 0; }
.purpose { padding: 0; margin: 0; }
@media (max-width: 860px) {
  .purpose { grid-template-columns: 1fr; }
  .purpose li, .purpose li + li { padding: 1.75rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Quote */
.quote-band { background: var(--red); color: var(--on-red); position: relative; overflow: hidden; }
.quote-band .mark { position: absolute; right: 4%; top: 50%; translate: 0 -50%; width: 340px; color: var(--gold-bright); opacity: .18; }
.quote-band blockquote { margin: 0; max-width: 52rem; position: relative; }
.quote-band blockquote p { font: italic 500 clamp(1.7rem, 3.4vw, 2.6rem)/1.25 var(--serif); margin: 0 0 1.5rem; }
.quote-band cite { font: 700 .75rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; font-style: normal; opacity: .85; }
:root[data-theme="dark"] .quote-band { background: var(--red-deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .quote-band { background: var(--red-deep); } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; display: flex; flex-direction: column; position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--red); transform: scaleX(.18); transform-origin: left; transition: transform .35s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card .tag { font: 700 .7rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--ink-soft); }
.card .more { margin-top: auto; font-weight: 700; font-size: .9rem; text-decoration: none; }
.card .more::after { content: " \2192"; }
.section-alt .card { background: var(--canvas); }

/* Media frame */
.frame { position: relative; }
.frame img { border-radius: var(--radius); box-shadow: var(--shadow); }
.frame::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--gold); border-radius: var(--radius); z-index: -1; }
.frame { isolation: isolate; }

/* Seasons / timeline */
.seasons { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.seasons li { position: relative; padding: 0 0 2.25rem 2rem; }
.seasons li::before { content: ""; position: absolute; left: -6px; top: .5rem; width: 11px; height: 11px; border-radius: 50%; background: var(--canvas); border: 2px solid var(--red); }
.seasons li.lit::before { background: var(--red); }
.seasons .when { font: 700 .72rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: .5rem; }
.seasons h3 { font-size: 1.5rem; margin-bottom: .4rem; }
.seasons p { color: var(--ink-soft); margin: 0; }

/* Mediums */
.mediums { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.mediums li { border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font-size: .9rem; background: var(--paper); }

/* Vision list */
.dreams { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 760px) { .dreams { grid-template-columns: 1fr; } }
.dream { border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.dream .num { font: italic 500 1.1rem/1 var(--serif); color: var(--red); }
.dream h3 { margin: .5rem 0; }
.dream p { color: var(--ink-soft); }
.dream.feature { grid-column: 1 / -1; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 2rem; border-radius: var(--radius); }

/* CTA band */
.cta { text-align: center; }
.cta .wrap { max-width: 46rem; }
.cta p { color: var(--ink-soft); font-size: 1.15rem; }
.cta .hero-actions { justify-content: center; }

/* Forms */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .35rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--radius); padding: .8rem .9rem;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold-bright); outline-offset: 1px; border-color: var(--gold); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 700; font-size: .88rem; margin-bottom: .5rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.checks label { display: inline-flex; align-items: center; gap: .45rem; font-weight: 400; font-size: 1rem; margin: 0; }
.checks input { width: auto; accent-color: var(--red); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .88rem; color: var(--ink-soft); }
.alert { padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid; margin-bottom: 1.5rem; }
.alert-ok { border-color: var(--teal); color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, transparent); }
.alert-err { border-color: var(--red); color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.info-list strong { display: block; font: 700 .72rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: .45rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--canvas) 82%, transparent); padding: 4.5rem 0 2rem; font-size: .95rem; }
:root[data-theme="dark"] .site-footer { background: #120e0c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #120e0c; } }
.site-footer a { color: var(--canvas); }
:root[data-theme="dark"] .site-footer a, :root[data-theme="dark"] .site-footer .brand-name { color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(244, 238, 225, .14); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #f4eee1; }
.site-footer .brand svg { color: #e2c27a; }
.site-footer .brand-sub { color: rgba(244, 238, 225, .65); }
.site-footer h4 { font: 700 .72rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #e2c27a; margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer ul a { text-decoration: none; color: rgba(244, 238, 225, .85); }
.site-footer ul a:hover { color: #fff; text-decoration: underline; }
.socials { display: flex; gap: .6rem; margin-top: 1.25rem; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(244, 238, 225, .25); color: #f4eee1; }
.socials a:hover { background: #e2c27a; color: #241d19; border-color: #e2c27a; }
.socials svg { width: 17px; height: 17px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.75rem; font-size: .85rem; color: rgba(244, 238, 225, .65); }
.footer-base a { color: #e2c27a; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
