/* ============================================================
   CAMWS — The Classical Association of the Middle West and South
   Shared stylesheet. Palette derived from the CAMWS plum logo,
   the sage-green AJCR cover, Loeb library greens, and ivory marble.
   ============================================================ */

:root {
  --plum: #4a2372;          /* primary — CAMWS logo purple */
  --plum-dark: #33174f;     /* deep surfaces, footer */
  --plum-ink: #241238;      /* body text */
  --plum-soft: #6b4a92;     /* hover / muted plum */
  --sage: #5d7f5c;          /* accent — AJCR cover green */
  --sage-dark: #46624680;
  --sage-deep: #3f5a3f;
  --gold: #a8842c;          /* sparing secondary accent — bronze rule lines */
  --cream: #f6f2ea;         /* page background */
  --paper: #fffdf9;         /* cards / surfaces */
  --marble: #e8e2d6;        /* borders, subtle fills */
  --line: #d9d0c0;
  --on-plum: #f3edf9;

  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --radius-s: 3px;
  --radius-m: 6px;
  --container: 1120px;
  --border: 1px solid var(--line);
}

* { box-sizing: border-box; }

html { 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(--cream);
  color: var(--plum-ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--plum); }
a:hover { color: var(--plum-soft); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--plum-dark);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.45rem; }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: .9rem;
}

.lede {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
  color: #43355a;
}

.small { font-size: .88rem; color: #5c4f70; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  text-decoration: none;
  padding: .78em 1.6em;
  border-radius: var(--radius-s);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary { background: var(--plum); color: #fff; border-color: var(--plum); }
.btn-primary:hover { background: var(--plum-dark); border-color: var(--plum-dark); color: #fff; }

.btn-ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-ghost:hover { background: var(--plum); color: #fff; }

.btn-ivory { background: transparent; color: var(--on-plum); border-color: rgba(243, 237, 249, .55); }
.btn-ivory:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

.btn-sm { padding: .55em 1.15em; font-size: .88rem; }

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--plum-dark);
  color: #fff;
  padding: .7em 1.2em;
  z-index: 200;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; color: #fff; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  text-decoration: none;
  margin-right: auto;
}

.brand img { width: 66px; height: auto; flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .12em;
  color: var(--plum);
  line-height: 1;
}

.brand-tag {
  display: block;
  font-family: var(--font-body);
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6d5f80;
  margin-top: .35rem;
  max-width: 30ch;
}

/* ---------- Navigation ---------- */

.main-nav { position: relative; }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--plum);
  color: var(--plum);
  border-radius: var(--radius-s);
  padding: .55em .9em;
  font: 600 .85rem var(--font-body);
  cursor: pointer;
}

.nav-list {
  display: flex;
  gap: .1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: .55em .7em;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--plum-ink);
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.nav-list a:hover { color: var(--plum); border-bottom-color: var(--gold); }
.nav-list a[aria-current="page"] { color: var(--plum); border-bottom-color: var(--plum); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }

  .nav-list {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    flex-direction: column;
    min-width: 240px;
    background: var(--paper);
    border: var(--border);
    border-radius: var(--radius-m);
    box-shadow: 0 14px 34px rgba(36, 18, 56, .14);
    padding: .5rem;
  }

  .nav-list.open { display: flex; }

  .nav-list a { border-bottom: none; border-radius: var(--radius-s); padding: .65em .8em; }
  .nav-list a:hover, .nav-list a[aria-current="page"] { background: var(--cream); }
  .header-inner { min-height: 72px; }
  .brand-tag { display: none; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 { margin-bottom: .35em; }

.hero .lede { margin-bottom: 1.6rem; max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-figure { position: relative; }

.hero-figure img {
  border-radius: var(--radius-m);
  box-shadow: 0 18px 44px rgba(36, 18, 56, .18);
}

.hero-figure::before {
  content: "";
  position: absolute;
  inset: -14px auto auto -14px;
  width: 58%;
  height: 58%;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-m) 0 0 0;
  pointer-events: none;
}

.hero-figure figcaption {
  margin-top: .9rem;
  font-size: .84rem;
  color: #5c4f70;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 460px; }
}

/* ---------- Announcement band ---------- */

.band {
  background: var(--plum-dark);
  color: var(--on-plum);
  padding: clamp(2.2rem, 5vw, 3.4rem) 0;
}

.band h2, .band h3 { color: #fff; }

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 860px) {
  .band-grid { grid-template-columns: 1fr; }
}

.band .eyebrow { color: #c9b8e2; }

.meeting-card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-m);
  padding: 1.6rem 1.7rem;
}

.meeting-card .place {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  margin: .2rem 0 .8rem;
}

.meeting-meta { color: #cfc2e2; font-size: .95rem; margin-bottom: 1.4rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-tint { background: var(--paper); border-top: var(--border); border-bottom: var(--border); }

.section-head { max-width: 46em; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }

.rule {
  width: 64px;
  height: 3px;
  background: var(--gold);
  border: 0;
  margin: 0 0 1.4rem;
}

/* Bulletin list — announcements */

.bulletin { list-style: none; margin: 0; padding: 0; }

.bulletin li {
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.bulletin li:last-child { border-bottom: none; }

.bulletin a { color: #e4d8f3; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.bulletin a:hover { color: #fff; }

.bulletin p { margin: 0; color: #cfc2e2; }
.bulletin p strong { color: #fff; font-weight: 600; }

/* AJCR feature */

.ajcr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
}

@media (max-width: 760px) {
  .ajcr-grid { grid-template-columns: 1fr; }
  .ajcr-grid .ajcr-cover { max-width: 240px; margin-inline: auto; }
}

.ajcr-cover img {
  border: 1px solid var(--marble);
  border-radius: var(--radius-s);
  box-shadow: 0 10px 26px rgba(36, 18, 56, .12);
}

/* CAMWSCorps */

.corps-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 860px) {
  .corps-grid { grid-template-columns: 1fr; }
}

.corps-fact {
  background: var(--paper);
  border: var(--border);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius-s);
  padding: 1.4rem 1.5rem;
}

.corps-fact .figure {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--plum);
  line-height: 1;
  margin-bottom: .3rem;
}

.corps-fact p { margin: 0; font-size: .92rem; color: #5c4f70; }

.mail-inline {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Featured member */

.featured {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(1.8rem, 5vw, 3.6rem);
  align-items: start;
}

@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
}

.featured-photo img {
  border-radius: var(--radius-m);
  box-shadow: 0 14px 34px rgba(36, 18, 56, .14);
}

blockquote {
  margin: 1.2rem 0;
  padding: .2rem 0 .2rem 1.3rem;
  border-left: 3px solid var(--gold);
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-style: italic;
  color: var(--plum-dark);
}

blockquote cite {
  display: block;
  margin-top: .4rem;
  font-family: var(--font-body);
  font-size: .82rem;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7a6c8e;
}

.share-row { display: flex; align-items: center; gap: .8rem; margin-top: 1.3rem; }
.share-row span { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7a6c8e; }
.share-row a img { width: 30px; height: 30px; border-radius: 50%; }
.share-row a { transition: transform .15s ease; }
.share-row a:hover { transform: translateY(-2px); }

/* Publications */

.pub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

@media (max-width: 820px) {
  .pub-grid { grid-template-columns: 1fr; }
}

.pub-card {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-m);
  padding: 1.7rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: transform .18s ease, box-shadow .18s ease;
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(36, 18, 56, .10);
}

.pub-card img { border-radius: var(--radius-s); max-height: 200px; object-fit: contain; align-self: start; }

.pub-card h3 { margin: 0; }
.pub-card h3 a { text-decoration: none; }
.pub-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

.pub-card p { margin: 0; font-size: .98rem; color: #43355a; }

.pub-card .pub-link { margin-top: auto; font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }

/* Membership / Loeb */

.join {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 3.6rem);
  align-items: center;
}

@media (max-width: 900px) {
  .join { grid-template-columns: 1fr; }
}

.join-photo img {
  border-radius: var(--radius-m);
  box-shadow: 0 16px 38px rgba(36, 18, 56, .16);
}

.benefits { list-style: none; margin: 1.4rem 0 1.8rem; padding: 0; }

.benefits li {
  padding: .55rem 0 .55rem 1.7rem;
  position: relative;
  border-bottom: 1px solid var(--marble);
}

.benefits li::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: .95rem;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

.benefits li:last-child { border-bottom: none; }
.benefits a { text-decoration: none; font-weight: 600; }
.benefits a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Statement */

.statement {
  background: var(--plum);
  color: var(--on-plum);
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.statement .eyebrow { color: #c9b8e2; }

.statement-inner { max-width: 62em; }

.statement p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.5;
  color: #efe6f8;
  margin-bottom: 1.2em;
}

/* Footer */

.site-footer {
  background: var(--plum-dark);
  color: #cfc2e2;
  padding: clamp(2.6rem, 6vw, 4rem) 0 2rem;
  font-size: .95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 5vw, 3.5rem);
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.site-footer h3 {
  color: #fff;
  font-size: .82rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-brand img { width: 84px; margin-bottom: 1rem; background: #fff; border-radius: var(--radius-s); padding: .35rem; }

.footer-brand .brand-name { color: #fff; font-size: 1.3rem; }

.footer-links { list-style: none; margin: 0; padding: 0; }

.footer-links li { margin-bottom: .55rem; }

.footer-links a { color: #d9cdee; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

address { font-style: normal; line-height: 1.7; }
address a { color: #d9cdee; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.6rem;
  font-size: .82rem;
  color: #a392bd;
}

.social-row { display: flex; gap: .7rem; }
.social-row img { width: 26px; height: 26px; border-radius: 50%; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
