:root {
  --cream: #f5efe0;
  --cream-2: #ede4cf;
  --accent: #cd2653;
  --accent-dark: #a91d44;
  --gold: #f7a81b; /* Rotary gold, used sparingly */
  --ink: #111;
  --ink-2: #4a4a4a;
  --muted: #6d6d6d;
  --line: #dcd7ca;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 28px rgb(0 0 0 / .07);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1180px;
  --narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; font-weight: 700; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { max-width: calc(var(--narrow) + 2 * clamp(16px, 4vw, 40px)); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); padding: 8px 14px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 1.05rem; letter-spacing: -0.015em; line-height: 1.15; }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand strong { font-weight: 800; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); background: rgb(205 38 83 / .08); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 76px 0 auto 0; background: var(--white);
    border-bottom: 1px solid var(--line); padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 14px 12px; font-size: 1.1rem; border-radius: 10px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--white); text-decoration: none;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  padding: 14px 24px; border-radius: 999px; border: 2px solid var(--accent);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Home hero (mirrors the original: white top, team photo overlapping cream band) */
.hero { text-align: center; padding: clamp(48px, 8vw, 96px) 0 0; }
.hero-band { background: linear-gradient(var(--white) 50%, var(--cream) 50%); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.hero h1 { max-width: 14ch; margin: 0 auto .35em; }
.hero .lead { max-width: 56ch; margin: 0 auto 32px; color: var(--ink-2); font-size: 1.15rem; }
.hero .actions { justify-content: center; margin-bottom: clamp(40px, 6vw, 64px); }
.hero-photo { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(12px, 3vw, 32px) clamp(12px, 3vw, 32px) clamp(8px, 2vw, 16px); }
.hero-photo img { width: 100%; }

/* Inner-page hero */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); text-align: center; }
.page-hero h1 { margin-bottom: .2em; }
.page-hero .lead { color: var(--ink-2); font-size: 1.15rem; max-width: 60ch; margin: 0 auto; }
.page-hero--post { text-align: left; }
.back { display: inline-block; margin-bottom: 24px; text-decoration: none; font-weight: 600; font-size: .9rem; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--cream { background: var(--cream); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.panel { background: var(--white); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.panel h3 { margin-bottom: .8em; }
.panel p:last-child { margin-bottom: 0; }
.panel .big { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; padding-top: 2px; }
dl.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 480px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 10px; } }

.copy { all: unset; cursor: pointer; color: var(--accent); font-size: .8rem; font-weight: 600; margin-left: 8px; }
.copy:hover { text-decoration: underline; }

/* Values */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value { border-top: 3px solid var(--accent); padding-top: 18px; }
.value p { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); margin: 0; }
@media (max-width: 960px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

.quote { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.4; margin: 0; color: var(--ink); }

/* Board */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.member { background: var(--white); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.member .role { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.member .name { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; }
@media (max-width: 860px) { .board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .board { grid-template-columns: 1fr; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); color: var(--ink); box-shadow: 0 2px 4px rgb(0 0 0 / .05), 0 16px 40px rgb(0 0 0 / .1); }
.card-img { aspect-ratio: 16 / 10; background: var(--cream-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-ph { display: block; width: 100%; height: 100%; background: url(/img/rotary-wheel-gold.png) center / 72px no-repeat, var(--cream-2); opacity: .7; }
.card-body { padding: 20px 22px 24px; }
.card-body time { font-size: .8rem; color: var(--muted); font-weight: 500; }
.card-body h3 { margin: 6px 0 8px; }
.card-body p { color: var(--ink-2); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* CTA band */
.cta { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; overflow: hidden; }
.cta h2 { color: var(--white); }
.cta p { color: #cfcfcf; }
.cta .eyebrow { color: var(--gold); }
.cta img { border-radius: 10px; }
.cta .btn--ghost { color: var(--white); border-color: var(--white); }
.cta .btn--ghost:hover { background: var(--white); color: var(--ink); }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } }

/* Prose (long-form text keeps the original serif reading style) */
.prose { font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; color: #222; padding-bottom: clamp(56px, 8vw, 96px); }
.prose h2, .prose h3 { font-family: var(--sans); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: 10px; }
.prose .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 2em 0; }
.prose .pair img { border-radius: 10px; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
@media (max-width: 560px) { .prose .pair { grid-template-columns: 1fr; } }
.post-cover { margin: 0 auto 40px; }
.post-cover img { width: 100%; max-height: 620px; object-fit: cover; border-radius: var(--radius); }

/* RYLA */
.ryla-hero { background: var(--cream); padding: clamp(48px, 8vw, 96px) 0; }
.ryla-hero .grid-2 { align-items: center; }
.ryla-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.ryla-hero .meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.chip { background: var(--white); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); }
.chip--past { background: var(--ink); color: var(--white); }
.ryla-hero figure { margin: 0; }
.ryla-hero figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.ryla-hero figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.notice { background: var(--white); border-left: 4px solid var(--accent); padding: 14px 18px; border-radius: 8px; font-size: .95rem; margin-bottom: 24px; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.check li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.price { font-size: 3rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 4px; }
.timeline { display: grid; gap: 0; }
.timeline > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline strong { font-size: .95rem; }
@media (max-width: 520px) { .timeline > div { grid-template-columns: 1fr; gap: 2px; } }
.program img { border-radius: 10px; background: var(--white); box-shadow: var(--shadow); cursor: zoom-in; }
.speaker { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: center; }
.speaker img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; }
@media (max-width: 760px) { .speaker { grid-template-columns: 1fr; } .speaker img { max-width: 280px; } }

/* Gallery */
.gallery { columns: 3 280px; column-gap: 14px; }
.gallery a { display: block; margin-bottom: 14px; break-inside: avoid; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.gallery img { width: 100%; transition: transform .4s, opacity .2s; }
.gallery a:hover img { transform: scale(1.03); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgb(10 10 10 / .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox button { position: fixed; background: rgb(255 255 255 / .12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

/* Contact */
.contact-email { font-size: clamp(1.2rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; word-break: break-word; }
.map { border: 0; width: 100%; height: 100%; min-height: 360px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Footer */
.site-footer { background: var(--ink); color: #cfcfcf; padding: 64px 0 24px; font-size: .95rem; }
.site-footer a { color: var(--white); }
.site-footer h4 { color: #8a8a8a; }
.brand--footer { color: var(--white); margin-bottom: 16px; }
.brand--footer:hover { color: var(--white); }
.brand--footer img { filter: none; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid #2a2a2a; margin-top: 48px; padding-top: 20px; font-size: .85rem; color: #8a8a8a; }
.footer-bottom a { color: #8a8a8a; text-decoration: none; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ---- v2 additions ---- */

/* Next-meeting pill */
.pill { max-width: 100%; display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; margin-bottom: 22px; border-radius: 999px; background: var(--cream); color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 500; }
.pill:hover { color: var(--ink); background: var(--cream-2); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 4px rgb(34 160 107 / .18); }

/* Intro + stats */
.intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.intro-photo { margin: 0; }
.intro-photo img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.link-arrow { display: inline-block; margin-top: 20px; font-weight: 700; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(40px, 6vw, 72px) 0 0; border-top: 1px solid var(--line); }
.stats > div { padding: 24px 20px 0 0; }
.stats > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.stats dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.stats dd { margin: 6px 0 0; font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* RYLA collage inside CTA */
.collage { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; aspect-ratio: 4 / 3; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.collage img:first-child { grid-row: span 2; }

/* About mosaic */
.mosaic { columns: auto !important; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(140px, 17vw, 230px); gap: 12px; }
.mosaic a { position: relative; margin: 0; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .m-big { grid-column: span 2; grid-row: span 2; }
.mosaic .m-wide { grid-column: span 2; }
.mosaic span { position: absolute; left: 12px; bottom: 12px; background: rgb(0 0 0 / .6); color: #fff; font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
@media (max-width: 700px) {
  .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .mosaic .m-big { grid-row: span 2; }
}

/* Project filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { font: inherit; font-size: .9rem; font-weight: 600; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.filters .count { opacity: .55; margin-left: 4px; font-weight: 500; }
.card[hidden] { display: none; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-right: 8px; }

/* Post prev/next */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding: 32px 0 clamp(56px, 8vw, 96px); }
.post-nav a { display: block; padding: 18px 20px; border-radius: var(--radius); background: var(--cream); color: var(--ink); text-decoration: none; transition: background .15s; }
.post-nav a:hover { background: var(--cream-2); color: var(--ink); }
.post-nav small { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 4px; }
.post-nav strong { font-size: 1.02rem; letter-spacing: -0.01em; }
.post-nav .next { text-align: right; grid-column: 2; }
.prose:has(+ .post-nav) { padding-bottom: 40px; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: 1; } }

/* Gallery groups */
.gallery-group + .gallery-group { margin-top: clamp(48px, 7vw, 80px); }
.gallery-group h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 4px; }
.gallery-group > p { color: var(--muted); margin-bottom: 24px; }

/* Footer wordmark + links */
.footer-logo { width: 220px; margin-bottom: 18px; }
.footer-grid { grid-template-columns: 1.4fr 1fr 1fr .7fr; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { text-decoration: none; color: #cfcfcf; }
.footer-links a:hover { color: var(--white); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Scroll reveal (only when JS is on and motion allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}
