/* ============================================================
   St. George Cathedral — Ancient Church of the East, Toronto
   ============================================================ */

:root {
  --red: #a51c1c;
  --red-dark: #7e1414;
  --red-deep: #5c0e0e;
  --gold: #c9a227;
  --gold-light: #e8d48b;
  --ink: #232323;
  --ink-soft: #55524c;
  --cream: #faf7f1;
  --paper: #ffffff;
  --line: #e6dfd2;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
}

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

a { color: var(--red); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- top ribbon ---------- */
.ribbon {
  background: var(--red-deep);
  color: #f3e6c8;
  font-size: 14px;
  letter-spacing: .04em;
  text-align: center;
  padding: 7px 16px;
}
.ribbon a { color: var(--gold-light); text-decoration: none; }
.ribbon a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 4px solid var(--red);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 14px;
}
.header-logo img { width: 92px; height: 92px; }
.header-title h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 600;
  color: var(--red-dark);
  line-height: 1.15;
}
.header-title .subtitle {
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}
.header-title .syriac {
  font-size: 18px;
  color: var(--gold);
  margin-top: 2px;
  font-family: "Noto Sans Syriac", var(--serif);
}

/* ---------- nav ---------- */
.site-nav { background: var(--red); position: sticky; top: 0; z-index: 50; }
.nav-inner { display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; list-style: none; width: 100%; justify-content: space-between; }
.nav-links a {
  display: block;
  padding: 14px 22px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .15s ease;
}
.nav-links a:hover { background: var(--red-dark); }
.nav-links a.active { background: var(--red-dark); box-shadow: inset 0 -3px 0 var(--gold); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 26px;
  padding: 10px 16px;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 50% -80px, rgba(201,162,39,.22), transparent 60%),
    linear-gradient(160deg, var(--red-deep) 0%, var(--red-dark) 55%, var(--red) 100%);
  color: #fff;
  text-align: center;
  padding: 84px 24px 92px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(620px, 88vw);
  height: 100%;
  background: url("../assets/seal-mono.png") center / contain no-repeat;
  opacity: .13;
  pointer-events: none;
}
.hero .kicker {
  font-size: 14px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}
.hero h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 600;
  line-height: 1.12;
  max-width: 820px;
  margin: 0 auto 18px;
}
.hero p {
  max-width: 640px;
  margin: 0 auto 34px;
  font-size: 19px;
  color: #f6ede0;
}
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: 14px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #2b2004; }
.btn-outline { border: 2px solid rgba(255,255,255,.75); color: #fff; margin-left: 12px; }
.btn-red { background: var(--red); color: #fff; }

/* ---------- sections ---------- */
.section { padding: 70px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.section-head h2, .section-head h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  color: var(--red-dark);
  margin-top: 8px;
}
.section-head .lede { max-width: 680px; margin: 14px auto 0; color: var(--ink-soft); }

.divider {
  width: 74px; height: 3px; background: var(--gold);
  margin: 18px auto 0; border-radius: 2px;
}

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 6px;
  padding: 30px 26px;
  box-shadow: 0 2px 10px rgba(35,30,20,.05);
}
.card h3 {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--red-dark);
  margin-bottom: 10px;
}
.card p { color: var(--ink-soft); font-size: 16px; }
.card .card-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- service times ---------- */
.times-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.time-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 24px;
  text-align: center;
}
.time-card .day {
  font-size: 13px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold);
}
.time-card h3 { font-family: var(--serif); font-size: 26px; color: var(--red-dark); margin: 6px 0 4px; }
.time-card h3 small { font-size: 17px; font-weight: 500; color: var(--ink-soft); font-style: italic; }
.time-card .hour { font-size: 22px; font-weight: 700; color: var(--ink); }
.time-card p { color: var(--ink-soft); font-size: 15px; margin-top: 6px; }

/* ---------- history page ---------- */
.prose {
  max-width: 780px;
  margin: 0 auto;
}
.prose p { margin-bottom: 20px; color: #3a372f; }
.prose h3 {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--red-dark);
  margin: 42px 0 14px;
}
.prose blockquote {
  border-left: 4px solid var(--gold);
  background: var(--paper);
  padding: 18px 24px;
  margin: 26px 0;
  font-family: var(--serif);
  font-size: 21px;
  color: var(--red-deep);
  font-style: italic;
}

.timeline { max-width: 820px; margin: 0 auto; position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px;
  width: 3px; background: linear-gradient(var(--gold), var(--red));
  border-radius: 2px;
}
.timeline-item { position: relative; padding: 0 0 34px 18px; }
.timeline-item::before {
  content: ""; position: absolute; left: -32px; top: 6px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-item .year {
  font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--red-dark);
}
.timeline-item p { color: var(--ink-soft); margin-top: 4px; }

/* ---------- clergy page ---------- */
.clergy-featured {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 36px;
  box-shadow: 0 3px 14px rgba(35,30,20,.06);
  max-width: 920px;
  margin: 0 auto;
}
.clergy-featured + .clergy-featured { margin-top: 30px; }
.portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(170deg, #efe7d8, #ddd2bd);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .placeholder {
  text-align: center;
  color: #9a8f79;
  padding: 20px;
}
.portrait .placeholder .cross { font-size: 64px; color: var(--red); opacity: .35; display: block; }
.portrait .placeholder span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.clergy-info .rank {
  color: var(--gold); font-size: 13px; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase;
}
.clergy-info h3 {
  font-family: var(--serif); font-size: 34px; font-weight: 600;
  color: var(--red-dark); margin: 6px 0 14px;
}
.clergy-info p { color: #3a372f; margin-bottom: 14px; }

.clergy-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px; margin-top: 10px;
}
.clergy-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 10px rgba(35,30,20,.05);
}
.clergy-card .portrait { border-radius: 0; border: 0; }
.clergy-card .body { padding: 20px 18px 24px; }
.clergy-card .rank {
  color: var(--gold); font-size: 12px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
}
.clergy-card h4 { font-family: var(--serif); font-size: 24px; color: var(--red-dark); margin: 4px 0 8px; }
.clergy-card p { font-size: 15px; color: var(--ink-soft); }

/* ---------- radio page ---------- */
.radio-hero-note {
  max-width: 720px; margin: 0 auto 40px; text-align: center; color: var(--ink-soft);
}
.episode-list { max-width: 820px; margin: 0 auto; display: grid; gap: 22px; }
.episode {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 6px;
  padding: 24px 28px;
  box-shadow: 0 2px 10px rgba(35,30,20,.05);
}
.episode .ep-date {
  font-size: 13px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
}
.episode h3 { font-family: var(--serif); font-size: 26px; color: var(--red-dark); margin: 4px 0 6px; }
.episode .ep-desc { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 14px; }
.episode audio { width: 100%; }
.episode .ep-download {
  display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700;
  letter-spacing: .04em; text-decoration: none;
}
.episode .ep-note { font-size: 13.5px; color: #8a8272; margin-top: 8px; }
.radio-empty {
  text-align: center; color: var(--ink-soft);
  background: var(--paper); border: 1px dashed var(--line);
  border-radius: 6px; padding: 40px;
}

/* ---------- liturgical library ---------- */
.lib-filter {
  display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap;
}
.lib-filter button {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 30px;
  padding: 9px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.lib-filter button:hover { border-color: var(--gold); color: var(--red-dark); }
.lib-filter button.active {
  background: var(--red); border-color: var(--red); color: #fff;
}
.lib-season { margin-bottom: 46px; }
.lib-season-title {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--red-dark);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
  margin-bottom: 22px;
}
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.lib-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 6px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(35,30,20,.05);
}
.lib-item h4 { font-family: var(--serif); font-size: 23px; color: var(--red-dark); margin: 8px 0 6px; }
.lib-item audio { width: 100%; margin-top: 4px; }
.lib-badge {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 12px; border-radius: 20px;
}
.lib-badge-hymn { background: #f6ecd2; color: #8a6d13; }
.lib-badge-psalm { background: #f3dcdc; color: var(--red-dark); }
.lib-badge-qala { background: #e6e9dc; color: #5a6b3a; }
.lib-item .btn.lib-open { padding: 9px 22px; font-size: 13px; margin-right: 14px; }
@media (max-width: 720px) { .lib-grid { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.contact-block h3 { font-family: var(--serif); font-size: 26px; color: var(--red-dark); margin-bottom: 12px; }
.contact-block p { color: var(--ink-soft); margin-bottom: 8px; }
.contact-block strong { color: var(--ink); }
.map-frame {
  width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: #e9e2d3;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- forms ---------- */
.form-tabs {
  display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap;
}
.form-tabs button {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 30px;
  padding: 10px 26px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.form-tabs button:hover { border-color: var(--gold); color: var(--red-dark); }
.form-tabs button.active { background: var(--red); border-color: var(--red); color: #fff; }

.parish-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 8px;
  padding: 38px 40px;
  box-shadow: 0 3px 14px rgba(35,30,20,.06);
}
.parish-form.hidden { display: none; }
.parish-form h3 {
  font-family: var(--serif); font-size: 30px; color: var(--red-dark); margin-bottom: 6px;
}
.parish-form .form-intro { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block; font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px;
}
.form-field label .req { color: var(--red); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d8cfbe;
  border-radius: 4px;
  background: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--gold); border-color: var(--gold);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.parish-form .btn { border: 0; cursor: pointer; font-family: var(--sans); }
.hidden-field { position: absolute; left: -9999px; }
.form-note { font-size: 14px; color: #8a8272; margin-top: 16px; }
@media (max-width: 620px) {
  .form-row { grid-template-columns: 1fr; }
  .parish-form { padding: 28px 22px; }
}

/* ---------- calendar ---------- */
.month-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-bottom: 34px;
}
.month-links a {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: all .15s ease;
}
.month-links a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.calendar-actions { text-align: center; margin: 8px 0 40px; }
.calendar-actions .btn + .btn { margin-left: 12px; }

.calendar-months { display: grid; gap: 34px; }
.cal-month {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(35,30,20,.05);
  scroll-margin-top: 90px;
}
.cal-month figcaption {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--red-dark);
  text-align: center;
  margin-bottom: 14px;
}
.cal-month img {
  width: 100%; height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}
@media (max-width: 620px) {
  .calendar-actions .btn { display: block; margin: 0 auto 12px; max-width: 280px; }
  .calendar-actions .btn + .btn { margin-left: auto; }
  .cal-month { padding: 12px; }
}

/* ---------- youth crest ---------- */
.youth-crest {
  width: min(230px, 60vw);
  height: auto;
  margin: 0 auto 20px;
}

/* ---------- instagram feed ---------- */
.ig-feed { max-width: 1000px; margin: 0 auto 34px; min-height: 120px; }

/* ---------- donate ---------- */
.nav-links a.nav-donate { background: var(--gold); color: #2b2004; }
.nav-links a.nav-donate:hover { background: var(--gold-light); }
.donate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; max-width: 1000px; margin: 0 auto; }
.donate-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(35,30,20,.05);
}
.donate-card h3 { font-family: var(--serif); font-size: 26px; color: var(--red-dark); margin-bottom: 12px; }
.donate-card p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 10px; }
.donate-card .donate-key {
  display: inline-block;
  background: var(--cream);
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 700;
  color: var(--red-dark);
  margin: 8px 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
@media (max-width: 900px) { .donate-grid { grid-template-columns: 1fr; } }

/* ---------- verse band ---------- */
.verse-band {
  background: linear-gradient(160deg, var(--red-deep), var(--red-dark));
  color: #f6ead2;
  text-align: center;
  padding: 56px 24px;
}
.verse-band p {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-style: italic;
  max-width: 760px;
  margin: 0 auto 10px;
}
.verse-band cite { color: var(--gold-light); font-style: normal; letter-spacing: .12em; font-size: 14px; text-transform: uppercase; }

/* ---------- footer ---------- */
.site-footer {
  background: #211d18;
  color: #cfc6b4;
  padding: 54px 0 0;
  font-size: 15px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-grid h4 {
  color: #fff; font-family: var(--serif); font-size: 21px; margin-bottom: 14px;
}
.footer-grid a { color: var(--gold-light); text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-logo img { width: 62px; height: 62px; background: #fff; border-radius: 50%; }
.footer-logo .name { font-family: var(--serif); font-size: 20px; color: #fff; line-height: 1.2; }
.footer-bottom {
  border-top: 1px solid #3a342c;
  text-align: center;
  padding: 18px 0;
  font-size: 13.5px;
  color: #8f8674;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .card-grid, .times-grid, .clergy-grid { grid-template-columns: 1fr 1fr; }
  .clergy-featured { grid-template-columns: 1fr; }
  .clergy-featured .portrait { max-width: 340px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .card-grid, .times-grid, .clergy-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; text-align: center; gap: 10px; }
  .btn-outline { margin-left: 0; margin-top: 12px; }
}

/* the full menu stops fitting on one line below ~900px — switch to the button */
@media (max-width: 900px) {
  .nav-inner { justify-content: flex-start; position: relative; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    width: auto;
    flex-direction: column;
    background: var(--red-dark);
  }
  .nav-links.open { display: flex; }
}
