/* SJA 65 — "Parish Heritage" design
   Stained-glass arches, parchment & navy, archival photography */

@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Display&family=Archivo:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --parchment: #F7F1E4;
  --navy: #1B2340;
  --navy-deep: #12172C;
  --navy-dark: #0F1530;
  --gold: #CBA43D;
  --gold-deep: #A5822B;
  --accent-gold: #CBA43D; /* used by app.js countdown-expired message */
  --cream: #F7F1E4;
  --muted-on-navy: #9AA1BF;
  --ink-70: rgba(27, 35, 64, 0.72);
  --ink-60: rgba(27, 35, 64, 0.62);
  --ink-45: rgba(27, 35, 64, 0.45);
  --font-serif: 'Libre Caslon Display', Georgia, serif;
  --font-sans: 'Archivo', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }

body {
  background: var(--parchment);
  color: var(--navy);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 5rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-family: var(--font-serif); font-size: 1.25rem; color: var(--cream); letter-spacing: 0.2px; }
.brand-name span { color: var(--gold); }
.badge-65 {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 3px; padding: 2px 8px;
}
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  color: #E7E0CC; text-decoration: none; font-size: 0.85rem; font-weight: 600;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn-gold {
  display: inline-block; background: var(--gold); color: var(--navy);
  padding: 0.85rem 1.75rem; border-radius: 2px; font-weight: 700;
  text-decoration: none; transition: background 0.25s ease;
}
.btn-gold:hover { background: #b8933a; }
.btn-gold.small { padding: 0.6rem 1.3rem; font-size: 0.85rem; }
.btn-ghost {
  display: inline-block; border: 1px solid var(--gold); color: var(--gold);
  padding: 0.85rem 1.75rem; border-radius: 2px; font-weight: 700;
  text-decoration: none; transition: background 0.25s ease;
}
.btn-ghost:hover { background: rgba(203, 164, 61, 0.15); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 75% 20%, rgba(203, 164, 61, 0.16), transparent 55%), var(--navy);
  padding: 10.5rem 0 8rem;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4rem; align-items: center; }
.hero-badge {
  display: inline-block; border: 1px solid var(--gold); color: var(--gold);
  font-size: 0.85rem; font-weight: 700; padding: 0.4rem 1.1rem;
  border-radius: 2px; margin-bottom: 1.75rem; letter-spacing: 0.3px;
}
.hero-title {
  font-family: var(--font-serif); font-size: 3.4rem; line-height: 1.1;
  color: var(--cream); margin-bottom: 1.5rem; font-weight: 400;
}
.hero-title span { color: var(--gold); }
.hero-desc { font-size: 1.08rem; color: #C3C8DC; max-width: 520px; margin-bottom: 2.25rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; margin-bottom: 2.75rem; }

.hero-countdown {
  border: 1px solid rgba(203, 164, 61, 0.4); border-radius: 4px;
  padding: 1.5rem; max-width: 520px; background: rgba(0, 0, 0, 0.12);
}
.countdown-label {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-on-navy);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 0.9rem; font-weight: 500;
}
.timer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
.timer-cell { text-align: center; border-top: 2px solid var(--gold); padding-top: 0.6rem; }
.timer-num { font-family: var(--font-serif); font-size: 1.9rem; color: var(--gold); display: block; }
.timer-unit { font-size: 0.68rem; color: var(--muted-on-navy); letter-spacing: 1px; text-transform: uppercase; }

.hero-window-wrap { position: relative; display: flex; justify-content: center; padding-bottom: 3.5rem; }
.hero-window {
  position: relative; width: 100%; max-width: 420px; padding: 16px;
  background: var(--navy-dark); border: 4px solid var(--gold);
  border-radius: 50% 50% 6px 6px / 22% 22% 6px 6px;
  animation: heritageFloat 7s ease-in-out infinite;
}
.hero-window-img-wrap { overflow: hidden; border-radius: 50% 50% 4px 4px / 20% 20% 4px 4px; }
.hero-window-img-wrap img {
  width: 100%; height: 440px; object-fit: cover; display: block;
  filter: sepia(0.35) contrast(1.05) brightness(0.95);
}
.hero-crest {
  position: absolute; bottom: -28px; right: 8px; width: 88px; height: 88px;
  border-radius: 50%; background: var(--parchment); border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.hero-crest img { width: 64px; height: 64px; object-fit: contain; }
.hero-plaque {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  background: var(--navy); border: 1px solid var(--gold); color: var(--gold);
  font-size: 0.78rem; font-weight: 700; padding: 0.4rem 1.1rem;
  border-radius: 2px; white-space: nowrap;
}
@keyframes heritageFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* ---------- Sections ---------- */
.section { padding: 6.5rem 0; }
.section.navy { background: var(--navy); }
.section-head { text-align: center; margin-bottom: 3.5rem; }
.kicker {
  color: var(--gold); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 0.5rem;
}
.section-title { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 400; }
.section.navy .section-title { color: var(--cream); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center; }
.about-copy .section-title { margin: 0.75rem 0 1.5rem; }
.lead { color: var(--ink-70); font-size: 1.05rem; line-height: 1.75; margin-bottom: 1.25rem; }
.glance-card {
  background: var(--navy); border-radius: 6px 6px 40px 40px;
  padding: 2.5rem; border: 1px solid var(--gold);
}
.glance-card h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--cream); font-weight: 400; margin-bottom: 0.5rem; }
.glance-card > p { color: var(--muted-on-navy); font-size: 0.95rem; margin-bottom: 1.75rem; }
.glance-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(203, 164, 61, 0.4); border: 1px solid rgba(203, 164, 61, 0.4);
}
.glance-cell { background: var(--navy); padding: 1.4rem; text-align: center; }
.glance-num { font-family: var(--font-serif); font-size: 2rem; color: var(--gold); display: block; }
.glance-label { font-size: 0.8rem; color: var(--muted-on-navy); }

/* ---------- Then & Now ---------- */
.thennow { margin-top: 6rem; text-align: center; }
.thennow h3 { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 400; margin-bottom: 0.5rem; }
.thennow-sub { color: var(--ink-60); margin-bottom: 3rem; }
.thennow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; text-align: left; }
.arch-card {
  background: var(--navy); border: 3px solid var(--gold);
  border-radius: 50% 50% 6px 6px / 12% 12% 6px 6px; padding: 14px;
}
.arch-img-wrap { position: relative; overflow: hidden; border-radius: 50% 50% 3px 3px / 10% 10% 3px 3px; }
.arch-img-wrap img { width: 100%; height: 280px; object-fit: cover; display: block; }
.arch-img-wrap img.sepia { filter: sepia(0.3) contrast(1.05); }
.arch-tag {
  position: absolute; top: 1rem; left: 1rem; font-size: 0.75rem; font-weight: 700;
  padding: 0.3rem 0.8rem; border-radius: 2px; text-transform: uppercase;
}
.arch-tag.then { background: rgba(10, 14, 26, 0.85); color: #E7E0CC; border: 1px solid rgba(255, 255, 255, 0.2); }
.arch-tag.now { background: var(--gold); color: var(--navy); }
.arch-caption { padding: 1.5rem 0.5rem 0.25rem; }
.arch-caption h4 { font-family: var(--font-serif); font-weight: 400; color: var(--cream); font-size: 1.15rem; margin-bottom: 0.4rem; }
.arch-caption p { color: var(--muted-on-navy); font-size: 0.92rem; }

/* ---------- Schedule ---------- */
.schedule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.schedule-card {
  background: var(--parchment); border-radius: 2px 2px 24px 24px;
  padding: 2rem; border-top: 4px solid var(--gold);
}
.schedule-time {
  display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  color: var(--navy); background: rgba(203, 164, 61, 0.25); border: 1px solid var(--gold);
  padding: 0.3rem 0.75rem; border-radius: 2px; margin-bottom: 0.9rem;
}
.schedule-card h3 { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 400; margin-bottom: 0.6rem; }
.schedule-card p { color: var(--ink-60); font-size: 0.93rem; line-height: 1.55; }

/* ---------- Decade Rooms ---------- */
.decades-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  background: var(--gold); border: 3px solid var(--gold);
}
.decade-pane { padding: 2.25rem 2rem; display: flex; flex-direction: column; gap: 0.6rem; min-height: 280px; }
.pane-1960s { background: #22304F; }
.pane-1970s { background: #4A1626; }
.pane-1980s { background: #1F3A4A; }
.pane-1990s { background: #5C4420; }
.pane-2000s { background: #2A3A5C; }
.pane-2010s { background: #5C2020; }
.decade-roundel {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--gold); margin-bottom: 0.5rem; flex-shrink: 0;
}
.decade-roundel img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.3); }
.decade-chip {
  align-self: flex-start; background: var(--gold); color: var(--navy);
  font-weight: 800; font-size: 0.8rem; padding: 0.25rem 0.7rem; border-radius: 2px;
}
.decade-room { font-family: var(--font-serif); color: var(--cream); font-size: 1.35rem; font-weight: 400; margin-top: 0.3rem; }
.decade-tagline { color: var(--gold); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.decade-desc { color: rgba(247, 241, 228, 0.68); font-size: 0.9rem; line-height: 1.55; }

/* ---------- Timeline ---------- */
.timeline-rail {
  max-width: 760px; margin: 0 auto; padding-left: 2.5rem;
  border-left: 2px solid rgba(203, 164, 61, 0.5);
}
.milestone { position: relative; margin-bottom: 3rem; }
.milestone:last-child { margin-bottom: 0; }
.milestone-node {
  position: absolute; left: -2.95rem; top: 0.4rem; width: 14px; height: 14px;
  border-radius: 50%; background: var(--navy); border: 3px solid var(--gold);
  box-shadow: 0 0 0 4px var(--navy);
}
.milestone-card { background: var(--parchment); border-radius: 4px 24px 24px 4px; padding: 1.75rem 2rem; }
.milestone-year { font-family: var(--font-serif); font-size: 1.5rem; color: var(--gold-deep); margin-bottom: 0.4rem; }
.milestone-card h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 400; margin-bottom: 0.6rem; }
.milestone-card p { color: var(--ink-60); font-size: 0.93rem; line-height: 1.55; }
.milestone-img {
  width: 100%; height: 170px; object-fit: cover; display: block;
  border-radius: 4px 16px 16px 4px; margin-top: 1.1rem;
  filter: sepia(0.3) contrast(1.05);
}

/* ---------- Gallery (markup injected by app.js) ---------- */
.gallery-filters { display: flex; justify-content: center; gap: 0.85rem; margin-bottom: 3rem; flex-wrap: wrap; }
.gallery-filter-btn {
  cursor: pointer; border: 1px solid var(--gold); background: transparent;
  color: var(--navy); font-weight: 700; padding: 0.55rem 1.4rem;
  border-radius: 2px; font-size: 0.85rem; font-family: var(--font-sans);
  transition: background 0.25s ease;
}
.gallery-filter-btn:hover, .gallery-filter-btn.active { background: rgba(203, 164, 61, 0.35); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.gallery-item { background: var(--navy); padding: 12px; border-radius: 2px; }
.gallery-img-wrapper { position: relative; overflow: hidden; height: 260px; }
.gallery-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover .gallery-img-wrapper img { transform: scale(1.04); }
.gallery-tag {
  position: absolute; top: 1rem; left: 1rem; font-family: var(--font-mono);
  background: rgba(10, 14, 26, 0.8); color: var(--gold);
  border: 1px solid rgba(203, 164, 61, 0.4); font-weight: 700; font-size: 0.72rem;
  padding: 0.25rem 0.7rem; border-radius: 2px;
}
.gallery-details {
  background: linear-gradient(#D9B64C, #A5822B);
  padding: 1.25rem 1.5rem; margin-top: 12px; border-radius: 2px;
}
.gallery-details h3 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 400; color: var(--navy); margin-bottom: 0.3rem; }
.gallery-details p { color: rgba(27, 35, 64, 0.75); font-size: 0.85rem; }

/* ---------- Spirit Wear ---------- */
.spirit-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 4rem; align-items: center; }
.spirit-copy h3 { font-family: var(--font-serif); font-size: 2rem; font-weight: 400; color: var(--cream); margin: 0.6rem 0 1.25rem; }
.spirit-copy > p { color: var(--muted-on-navy); font-size: 1.02rem; line-height: 1.7; margin-bottom: 1.5rem; }
.spirit-list { list-style: none; margin-bottom: 2rem; }
.spirit-list li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.7rem; font-weight: 600; color: #E7E0CC; }
.spirit-list svg { color: var(--gold); flex-shrink: 0; }
.spirit-products { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.product-card { background: var(--parchment); border-radius: 6px 6px 32px 32px; padding: 2rem; text-align: center; }
.product-art {
  width: 100%; height: 150px; background: rgba(203, 164, 61, 0.15);
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.product-art svg { color: var(--gold-deep); }
.product-name { font-weight: 700; }
.product-price { color: var(--gold-deep); font-weight: 700; }

/* ---------- Wishes Wall ---------- */
.wishes-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 3.5rem; align-items: start; }
.wish-form { background: var(--navy); border-radius: 6px 40px 6px 6px; padding: 2.5rem; }
.wish-form h3 { font-family: var(--font-serif); color: var(--cream); font-weight: 400; font-size: 1.4rem; margin-bottom: 0.75rem; }
.wish-form .form-intro { color: var(--muted-on-navy); font-size: 0.92rem; margin-bottom: 1.75rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; color: var(--muted-on-navy); font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--navy-dark); border: 1px solid rgba(203, 164, 61, 0.4);
  color: var(--cream); padding: 0.7rem 0.9rem; border-radius: 2px;
  font-family: inherit; font-size: 0.95rem; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 8px rgba(203, 164, 61, 0.2);
}
.wish-submit {
  width: 100%; background: var(--gold); color: var(--navy); border: none;
  padding: 0.85rem; border-radius: 2px; font-weight: 700; font-size: 1rem;
  cursor: pointer; font-family: inherit; transition: background 0.25s ease;
}
.wish-submit:hover { background: #b8933a; }
.wishes-feed {
  display: flex; flex-direction: column; gap: 1.5rem;
  max-height: 640px; overflow-y: auto; padding-right: 0.5rem;
}
.wish-card {
  background: #fff; border: 1px solid rgba(203, 164, 61, 0.3);
  border-left: 4px solid var(--gold); padding: 1.6rem 1.8rem; border-radius: 2px;
}
.wish-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.wish-author { font-family: var(--font-serif); font-size: 1.1rem; }
.wish-role {
  font-size: 0.72rem; background: rgba(203, 164, 61, 0.2); color: var(--gold-deep);
  padding: 0.2rem 0.6rem; border-radius: 2px; font-weight: 700;
}
.wish-content { color: var(--ink-70); font-size: 0.95rem; font-style: italic; }
.wish-meta { margin-top: 0.85rem; font-size: 0.75rem; color: var(--ink-45); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); padding: 4rem 0 2rem; border-top: 3px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; margin-bottom: 2.5rem; }
.footer-brand-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand-row img { width: 40px; height: 40px; object-fit: contain; }
.footer-brand-row h3 { font-family: var(--font-serif); font-weight: 400; color: var(--cream); font-size: 1.4rem; }
.footer-brand-row h3 span { color: var(--gold); }
.footer-brand > p { color: var(--muted-on-navy); max-width: 400px; margin-bottom: 1rem; }
.footer-addr { font-size: 0.85rem; color: #6B7290; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-cols h4 { color: var(--cream); font-family: var(--font-serif); font-weight: 400; margin-bottom: 1rem; }
.footer-cols ul { list-style: none; }
.footer-cols li { margin-bottom: 0.65rem; }
.footer-cols a { color: var(--muted-on-navy); text-decoration: none; font-size: 0.9rem; transition: color 0.25s ease; }
.footer-cols a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 1.5rem;
  color: #6B7290; font-size: 0.82rem; display: flex;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hero-grid, .about-grid, .spirit-grid, .wishes-grid { grid-template-columns: 1fr; gap: 3rem; }
  .schedule-grid, .decades-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .site-header .btn-gold { display: none; }
  .hero { padding: 8.5rem 0 5rem; }
  .hero-title { font-size: 2.5rem; }
  .schedule-grid, .decades-grid, .thennow-grid, .gallery-grid, .spirit-products { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-window-img-wrap img { height: 340px; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-title { font-size: 2.05rem; }
  .section { padding: 4.5rem 0; }
  .section-title { font-size: 1.8rem; }
  .timer-num { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions a { text-align: center; }
  .timeline-rail { padding-left: 1.75rem; }
  .milestone-node { left: -2.2rem; }
  .wish-form { padding: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
