/* Preston Trail Ward - visual identity v2
   Mobile-first, no frameworks. */

:root {
  --ink: #1d2531;
  --ink-soft: #39424f;
  --muted: #5d6875;
  --paper: #faf9f6;
  --card: #ffffff;
  --line: #e8e2d5;
  --navy: #14202e;
  --navy-deep: #0d1622;
  --gold: #b3872e;
  --gold-soft: #f3e9d2;
  --gold-deep: #8f6c22;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 46, 0.06), 0 8px 24px rgba(20, 32, 46, 0.08);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-deep); }
a:hover { color: var(--gold); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; color: var(--navy); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.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;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.7rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.site-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--navy); }

.brand-mark {
  font-size: 1.7rem; line-height: 1; color: var(--gold);
  border: 2px solid var(--gold); border-radius: 50%;
  width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: 0.66rem; color: var(--muted); letter-spacing: 0.02em; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.65rem 0.7rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.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); }

.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--paper); border-bottom: 1px solid var(--line);
  flex-direction: column; padding: 0.5rem 1.25rem 1rem; gap: 0.15rem;
  box-shadow: 0 12px 24px rgba(20, 32, 46, 0.1);
}
.site-nav.open { display: flex; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 1rem;
  padding: 0.65rem 0.25rem; border-bottom: 1px solid var(--line);
}
.site-nav a:last-child { border-bottom: none; }
.site-nav a.active { color: var(--gold-deep); font-weight: 700; }
.site-nav a:hover { color: var(--gold); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; position: static; flex-direction: row; align-items: center;
    gap: 1.35rem; padding: 0; border: none; box-shadow: none; background: none; }
  .site-nav a { border: none; padding: 0.25rem 0; font-size: 0.95rem; position: relative; }
  .site-nav a.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
    background: var(--gold); border-radius: 2px;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,0.6); color: #fff; padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; color: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,22,34,0.25) 0%, rgba(13,22,34,0.35) 40%, rgba(13,22,34,0.82) 100%); }
.hero-inner { position: relative; padding-top: 6rem; padding-bottom: 3.5rem; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--gold-soft); margin: 0 0 0.75rem; font-weight: 600; }
.hero-title { color: #fff; font-size: clamp(2.6rem, 9vw, 4.6rem); margin: 0 0 0.75rem; font-weight: 600; }
.hero-sub { font-size: 1.15rem; color: rgba(255,255,255,0.88); max-width: 34rem; margin: 0 0 1.75rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }

@media (min-width: 860px) {
  .hero { min-height: 82vh; }
}

/* ---------- meeting band ---------- */
.meeting-band { background: var(--navy); color: #fff; }
.meeting-band-inner { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.meeting-item { display: flex; flex-direction: column; }
.meeting-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--gold-soft); font-weight: 600; }
.meeting-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
@media (min-width: 860px) {
  .meeting-band-inner { flex-direction: row; align-items: center; gap: 3rem; }
  .meeting-band-inner .btn { margin-left: auto; }
}

/* ---------- sections ---------- */
.section { padding: 3.5rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 2rem; max-width: 44rem; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 0.35rem; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.08rem; }

/* ---------- news cards ---------- */
.news-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.5rem;
}
.news-card h3 { font-size: 1.3rem; margin: 0; }
.news-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.news-card p + p { margin-top: 0.5rem; }

/* ---------- quick links ---------- */
.link-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .link-grid { grid-template-columns: repeat(2, 1fr); } }

.quick-link {
  display: block; text-decoration: none; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.6rem;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); }
.quick-link-title { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--navy); }
.quick-link:hover .quick-link-title { color: var(--gold-deep); }
.quick-link-sub { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 0.25rem; }

/* ---------- page hero ---------- */
.page-hero { background: var(--navy); color: #fff; padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.5rem; }
.page-hero .lede { color: rgba(255,255,255,0.82); font-size: 1.1rem; max-width: 46rem; margin: 0; }
.page-hero-img { min-height: 46vh; display: flex; align-items: flex-end; padding: 0; }
.page-hero-img .hero-inner { padding-top: 7rem; padding-bottom: 2.5rem; }
.page-hero-img h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }

/* ---------- prose ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.75rem; }
.prose p, .prose ul { color: var(--ink-soft); }
.prose ul { padding-left: 1.4rem; }

/* ---------- program page ---------- */
.program-hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; text-align: center; padding: 4rem 0 3.25rem; }
.program-kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; color: var(--gold-soft); margin: 0 0 0.75rem; font-weight: 600; }
.program-hero h1 { color: #fff; font-size: clamp(2.2rem, 7vw, 3.4rem); margin: 0 0 0.5rem; font-weight: 500; }
.program-date { color: rgba(255,255,255,0.85); font-size: 1.15rem; margin: 0; font-family: var(--font-display); font-style: italic; }

.program-sheet { max-width: 46rem; }
.program-meta {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.75rem; margin-bottom: 2.5rem;
}
.program-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.program-row:last-child { border-bottom: none; }
.program-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding-top: 0.25rem; }
.program-value { font-size: 1.05rem; color: var(--navy); }

.program-section-title { text-align: center; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold-deep); margin: 2.75rem 0 1.25rem; font-family: var(--font-body); font-weight: 700; }
.program-section-title::after { content: ""; display: block; width: 3.5rem; height: 2px; background: var(--gold); margin: 0.75rem auto 0; border-radius: 2px; }

.order-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.75rem 1.75rem; }
.order-row { display: grid; grid-template-columns: 1fr; gap: 0.1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: none; }
.order-kind { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); }
.order-detail { color: var(--ink-soft); font-size: 1.02rem; }
@media (min-width: 640px) {
  .order-row { grid-template-columns: 13rem 1fr; gap: 1.25rem; align-items: baseline; }
}

.announcements { display: grid; gap: 1.1rem; }
.announcement { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 1.25rem 1.4rem; box-shadow: var(--shadow); }
.announcement h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.announcement p { margin: 0; color: var(--ink-soft); }

/* ---------- archives ---------- */
.archive-controls { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .archive-controls { flex-direction: row; } }
.archive-search { flex: 1; }
.archive-search input, .archive-year select {
  width: 100%; font-size: 1rem; padding: 0.8rem 1rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); font-family: var(--font-body);
}
.archive-search input:focus, .archive-year select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.archive-count { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.25rem; }
.archive-status { color: var(--muted); padding: 2rem 0; text-align: center; }
.archive-error { color: #a33; }

.archive-list { display: grid; gap: 0.75rem; }
.archive-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.archive-card summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.3rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.archive-card summary::-webkit-details-marker { display: none; }
.archive-card summary:hover { background: #fdfcf9; }
.archive-card summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.archive-date { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--navy); }
.archive-summary-line { color: var(--muted); font-size: 0.92rem; }
.archive-body { padding: 0 1.3rem 1.3rem; border-top: 1px solid var(--line); }
.archive-body h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-deep); margin: 1.1rem 0 0.35rem; font-family: var(--font-body); }
.archive-body p, .archive-body li { font-size: 0.95rem; color: var(--ink-soft); margin: 0.15rem 0; }
.archive-body ul { margin: 0; padding-left: 1.2rem; }
.archive-fulltext { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-soft); white-space: pre-wrap; max-height: 20rem; overflow: auto; }

/* ---------- events ---------- */
.events-subhead { font-size: 1.5rem; margin: 0 0 1.25rem; }
.events-subhead:not(:first-child) { margin-top: 2.75rem; }
.event-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .event-grid { grid-template-columns: repeat(3, 1fr); } }

.event-card {
  display: block; text-decoration: none; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(20,32,46,0.08), 0 16px 32px rgba(20,32,46,0.12); }
.event-flyer { aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy); }
.event-flyer img { width: 100%; height: 100%; object-fit: cover; }
.event-body { padding: 1.4rem 1.5rem 1.6rem; }
.event-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-deep); background: var(--gold-soft); border-radius: 999px; padding: 0.25rem 0.75rem; margin: 0 0 0.6rem; }
.event-body h3 { font-size: 1.35rem; margin: 0 0 0.3rem; color: var(--navy); }
.event-date, .event-time { margin: 0; color: var(--muted); font-size: 0.95rem; }

.event-detail { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-top: 3rem; padding-bottom: 3.5rem; max-width: 60rem; }
@media (min-width: 900px) { .event-detail { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.event-hero-flyer { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.event-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--gold-soft); margin: 0 0 0.75rem; font-weight: 600; }
.detail-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.5rem 1.5rem; margin-bottom: 1.75rem; }
.detail-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: none; }
.detail-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding-top: 0.25rem; }
.detail-value { color: var(--navy); font-size: 1.02rem; }
.event-description p { color: var(--ink-soft); font-size: 1.05rem; }
.event-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.back-link { margin-top: 1.5rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.85); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 2.75rem 1.25rem; text-align: center; }
.footer-ward { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: #fff; margin-bottom: 0.6rem; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.9rem; align-items: center; font-size: 0.98rem; }
.footer-meta a { color: var(--gold-soft); }
.footer-meta .dot { color: var(--gold); }
.footer-note { margin-top: 1rem; font-size: 0.85rem; color: rgba(255,255,255,0.55); }
