/* =========================================================================
   St Werburgh & St Laurence Catholic Church, Birkenhead
   Modern responsive rebuild — shared stylesheet
   Keeps the ecclesiastical "spirit": heritage blue + gold, church imagery.
   ========================================================================= */

:root {
  --blue-900: #14263f;
  --blue-800: #1d3a5f;
  --blue-700: #285285;  /* heritage #336699 family, deepened */
  --blue-600: #336699;
  --gold-600: #b8902a;
  --gold-500: #c9a227;  /* heritage #cc9900 family */
  --gold-300: #e3c766;
  --ink: #20303f;
  --slate: #4a5a68;
  --paper: #f7f5f0;
  --paper-2: #ffffff;
  --line: #e3ddd0;
  --shadow: 0 10px 30px rgba(20, 38, 63, 0.12);
  --shadow-lg: 0 18px 50px rgba(20, 38, 63, 0.20);
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1140px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { 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;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--blue-900);
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1rem; }

a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--gold-600); }

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

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

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--blue { background: var(--blue-800); color: #eaf0f7; }
.section--blue h2, .section--blue h3 { color: #fff; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .78rem;
  font-weight: 700; color: var(--gold-600); margin: 0 0 .4rem;
}
.section--blue .eyebrow { color: var(--gold-300); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--slate); }
.section--blue .lead { color: #cdd8e6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold-500); color: #2a2208; }
.btn--gold:hover { background: var(--gold-300); color: #2a2208; }
.btn--ghost { border-color: currentColor; color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color:#fff; }
.btn--blue { background: var(--blue-700); color: #fff; }
.btn--blue:hover { background: var(--blue-800); color:#fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 38, 63, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--gold-500);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.18rem; font-weight: 600; }
.brand-text span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-300); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: #dce5f0; font-weight: 500; font-size: .95rem;
  padding: 8px 11px; border-radius: 8px; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.10); }
/* Default (offline / unknown): muted, NOT red */
.nav-links .nav-live {
  color: #cdd8e6; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.20);
  padding: 8px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.nav-links .nav-live:hover { background: rgba(255,255,255,.16); color: #fff; }
.nav-links .nav-live .live-dot { background: #8d9bab; animation: none; }
/* Live: red, pulsing */
.nav-links .nav-live.is-live {
  color: #fff; background: #b3261e; border-color: #b3261e;
}
.nav-links .nav-live.is-live:hover { background: #cf2e25; color: #fff; }
.nav-links .nav-live.is-live .live-dot { background: #fff; animation: pulse 1.6s infinite; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.35;} }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  background: linear-gradient(rgba(13,26,45,.62), rgba(13,26,45,.72)),
              url("../images/church.jpg") center 30% / cover no-repeat;
}
.hero-inner { padding: 96px 0 88px; }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero p { font-size: 1.25rem; color: #e7eef6; max-width: 640px; margin: 0 auto 1.6rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Live stream ---------- */
.stream-wrap { max-width: 980px; margin: 0 auto; }
.stream-frame {
  position: relative; background: #000; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9;
}
.stream-frame video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.stream-status {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 7px 13px; border-radius: 999px;
}
.stream-status .dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa7b4; }
.stream-status.is-live { background: #b3261e; }
.stream-status.is-live .dot { background: #fff; animation: pulse 1.6s infinite; }
.stream-offline {
  position: absolute; inset: 0; display: none; z-index: 2;
  flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #cdd8e6; text-align: center; padding: 24px; overflow-y: auto;
  background: radial-gradient(circle at center, #1d3a5f, #0c1929);
}
.stream-offline.show { display: flex; }
.stream-offline h3 { color: #fff; }
/* Scale the offline message down on phones so it fits the 16:9 box */
@media (max-width: 600px) {
  .stream-offline { padding: 12px; gap: 6px; }
  .stream-offline h3 { font-size: 1rem; line-height: 1.2; }
  .stream-offline p { font-size: .8rem; line-height: 1.35; margin: 0; }
  .stream-offline .btn { padding: 8px 14px; font-size: .82rem; }
}

/* ---------- Schedule ---------- */
.schedule {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-top: 26px;
}
.sched-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 18px 20px;
}
.sched-card .day { font-weight: 700; color: var(--gold-300); letter-spacing: .04em; }
.sched-card .time { font-family: var(--font-display); font-size: 1.6rem; color: #fff; }
.sched-card .what { font-size: .92rem; color: #cdd8e6; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card .icon { font-size: 1.6rem; color: var(--gold-600); }

.info-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.info-row .k { min-width: 92px; font-weight: 700; color: var(--blue-800); }

/* Saints / figure */
.figure { text-align: center; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto 12px; }
.saints { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.saints .figure img { width: 150px; }

/* image card (newsletter / parish team / diary) */
.image-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 14px; max-width: 1000px; margin: 0 auto;
}
.image-card img { border-radius: 8px; margin: 0 auto; }

/* Links grid */
.link-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; }
.link-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; text-align: center; transition: transform .15s;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.link-tile:hover { transform: translateY(-4px); }
.link-tile img { height: 130px; width: auto; object-fit: contain; }
.link-tile span { font-weight: 600; color: var(--blue-800); }

/* News archive */
.news-year { margin-bottom: 30px; }
.news-year h3 { color: var(--gold-600); border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Map */
.map-embed iframe { width: 100%; height: 420px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: #c6d2e0; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px; }
.site-footer a { color: #c6d2e0; }
.site-footer a:hover { color: var(--gold-300); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .85rem; color: #8ea0b5;
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}
.site-header a:focus-visible, .hero a:focus-visible, .btn:focus-visible {
  outline-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 5px;
    background: var(--blue-900); padding: 12px 14px 18px;
    border-bottom: 3px solid var(--gold-500);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a, .nav-links .nav-live { padding: 14px 12px; border-radius: 8px; justify-content: center; line-height: 1.2; }
  .nav-links .nav-live { margin-top: 6px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
