/* =========================================================
   Triangle Catholics
   Palette: Marian blue + warm gold on cream.
   Fonts: Cormorant Garamond (display) + Inter (body), with
   system fallbacks so it still looks right offline.
   ========================================================= */

:root {
  --navy: #1e3a5f;
  --navy-deep: #15293f;
  --gold: #c9a227;
  --gold-soft: #e3c766;
  --teal: #3c7a6b;
  --rose: #a8556b;
  --cream: #faf7f0;
  --paper: #ffffff;
  --ink: #23262b;
  --ink-soft: #5a6068;
  --line: #e7e1d4;
  --shadow: 0 1px 2px rgba(21,41,63,.06), 0 8px 24px rgba(21,41,63,.07);
  --radius: 12px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-text, .display {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: .2px;
  line-height: 1.15;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-subscribe {
  background: var(--gold);
  color: var(--navy-deep);
  box-shadow: 0 2px 8px rgba(201,162,39,.35);
}
.btn-subscribe:hover { background: var(--gold-soft); color: var(--navy-deep); }
.btn-subscribe[data-subscribe]::after { content: " \25BE"; font-size: .8em; }

/* ---------- Subscribe dropdown ---------- */
.subscribe-wrap { position: relative; display: inline-block; }
.subscribe-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 280px; padding: 6px; z-index: 80;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  display: none; text-align: left;
}
.subscribe-wrap.open .subscribe-menu { display: block; }
.subscribe-menu a {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink);
  text-decoration: none;
}
.subscribe-menu a:hover { background: var(--cream); text-decoration: none; }
.subscribe-menu a strong { display: block; color: var(--navy); font-size: .95rem; }
.subscribe-menu a span { display: block; color: var(--ink-soft); font-size: .8rem; margin-top: 2px; }
.subscribe-empty { padding: 10px 12px; color: var(--ink-soft); font-size: .85rem; }
@media (max-width: 480px) {
  .subscribe-menu { right: auto; left: 0; min-width: 230px; }
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  color: var(--gold); font-size: 1.4rem; line-height: 1;
}
.brand-text { font-size: 1.5rem; color: var(--navy); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .98rem; }
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.nav-links a.active { color: var(--navy); }
.nav-links a.btn-subscribe { color: var(--navy-deep); }
.nav-toggle {
  display: none; background: none; border: none; font-size: 1.5rem;
  color: var(--navy); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; text-align: center;
  padding: 64px 20px 56px;
  position: relative;
}
.hero::after {
  content: "\2729";
  position: absolute; right: 24px; bottom: 24px;
  font-size: 12rem; line-height: 1; color: rgba(201,162,39,.10);
  pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0 0 12px; color: #fff; }
.hero p { font-size: 1.15rem; color: #d7e0ec; max-width: 640px; margin: 0 auto 26px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---------- Section scaffolding ---------- */
.section { padding: 48px 0; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: 2.1rem; color: var(--navy); margin: 0 0 6px; }
.section-head p { color: var(--ink-soft); margin: 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: .78rem;
  font-weight: 700; color: var(--gold); font-family: "Inter", sans-serif;
  margin-bottom: 6px;
}

/* ---------- Calendar ---------- */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 18px;
}
.legend-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; font-size: .85rem; color: var(--ink-soft);
  transition: opacity .15s ease;
}
.legend-item.off { opacity: .4; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.calendar {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; overflow: hidden;
}
.cal-header {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 14px;
}
.cal-title { font-size: 1.9rem; color: var(--navy); margin: 0; min-width: 240px; text-align: center; }
.cal-nav {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--cream); color: var(--navy); font-size: 1.3rem; cursor: pointer;
  line-height: 1; transition: background .15s ease;
}
.cal-nav:hover { background: var(--gold); color: var(--navy-deep); }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 118px; gap: 6px;
}
.cal-dow {
  text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-soft); padding: 6px 0;
}
.cal-cell {
  height: 100%; background: var(--cream); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px;
  overflow: hidden;
}
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal-cell.has-events { background: #fff; }
.cal-date { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.cal-cell.today .cal-date {
  color: var(--navy-deep); background: var(--gold); border-radius: 50%;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}
.cal-events { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; }
.cal-chip {
  display: flex; flex-direction: column; gap: 1px;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--navy);
  border-radius: 5px; padding: 4px 6px; font-size: .74rem; line-height: 1.2;
  text-decoration: none; color: var(--ink); transition: background .12s ease;
}
.cal-chip:hover { background: var(--cream); text-decoration: none; }
.chip-time { color: var(--ink-soft); font-weight: 600; font-size: .68rem; }
.chip-title { color: var(--ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Upcoming list ---------- */
.upcoming-wrap { background: var(--paper); }
.up-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }
.up-item {
  display: flex; align-items: stretch; gap: 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); transition: transform .08s ease, border-color .15s;
  color: var(--ink);
}
.up-item:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gold); }
.up-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 64px; padding: 6px 8px; border-radius: 8px; background: var(--navy); color: #fff;
}
.up-mon { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; }
.up-day { font-size: 1.5rem; font-weight: 700; line-height: 1; font-family: "Cormorant Garamond", serif; }
.up-dow { font-size: .68rem; color: #cdd7e3; }
.up-body { flex: 1; }
.up-cat {
  display: inline-block; color: #fff; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; padding: 2px 8px; border-radius: 999px;
  margin-bottom: 4px;
}
.up-title { margin: 2px 0 3px; font-size: 1.3rem; color: var(--navy); }
.up-meta { margin: 0 0 4px; font-size: .85rem; color: var(--ink-soft); }
.up-desc { margin: 0; font-size: .92rem; color: var(--ink); }
.up-arrow { display: flex; align-items: center; font-size: 1.6rem; color: var(--gold); }

/* ---------- Newsletter band ---------- */
.newsletter {
  background: var(--navy); color: #fff; text-align: center; padding: 52px 20px;
}
.newsletter h2 { color: #fff; font-size: 2.1rem; margin: 0 0 8px; }
.newsletter p { color: #d7e0ec; max-width: 560px; margin: 0 auto 22px; }
.news-form {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 480px; margin: 0 auto;
}
.news-form input[type=email] {
  flex: 1; min-width: 220px; padding: 12px 16px; border-radius: 999px; border: none;
  font-size: 1rem; font-family: inherit;
}
.news-fine { font-size: .82rem; color: #aebcce; margin-top: 14px; }

/* ---------- Event detail ---------- */
.detail-page { padding: 36px 0 56px; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--ink-soft); font-size: .92rem; }
.detail {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px; max-width: 720px; margin: 0 auto;
}
.detail-cat, .rec-card .rec-cadence {
  display: inline-block; color: #fff; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; padding: 3px 10px; border-radius: 999px;
}
.detail h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--navy); margin: 14px 0 8px; }
.detail-when { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 22px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.detail-meta {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 26px;
}
.meta-row { display: flex; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.meta-row:last-child { border-bottom: none; }
.meta-row:nth-child(odd) { background: var(--cream); }
.meta-label { min-width: 110px; font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.meta-value { flex: 1; }
.meta-sub { color: var(--ink-soft); font-size: .88rem; }
.detail-body { font-size: 1.05rem; }
.detail-body p { margin: 0 0 14px; }
.detail-footer {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.detail-footer p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.detail-missing { text-align: center; padding: 60px 20px; }

/* ---------- Recurring page ---------- */
.rec-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px;
}
.rec-card {
  background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--navy);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.rec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rec-card h2 { margin: 0; font-size: 1.5rem; color: var(--navy); }
.rec-cadence { background: var(--gold); color: var(--navy-deep); white-space: nowrap; }
.rec-where { font-weight: 600; color: var(--ink-soft); margin: 6px 0 10px; }
.rec-org { margin: 12px 0 0; font-size: .9rem; color: var(--ink-soft); }

/* ---------- Group chats list ---------- */
.groupchat-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px; max-width: 880px; margin: 0 auto;
}
.groupchat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow); color: var(--ink); font-weight: 500;
  transition: transform .08s ease, border-color .15s ease;
}
.groupchat-item:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gold); }
.groupchat-item .gc-join { color: var(--navy); font-weight: 600; white-space: nowrap; }

/* ---------- Forms ---------- */
.form-page { padding: 40px 0 60px; }
.form-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px; max-width: 680px; margin: 0 auto;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .92rem; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; font-family: inherit; background: var(--cream); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--navy); background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }
.submit-status {
  margin-top: 16px; padding: 14px 16px; border-radius: 8px; font-size: .95rem; display: none;
}
.submit-status.ok { display: block; background: #edf6ef; border: 1px solid #b9ddc1; color: #1f5b2e; }

/* ---------- Generic content / about ---------- */
.content { max-width: 760px; margin: 0 auto; }
.content h1 { font-size: 2.6rem; color: var(--navy); margin: 0 0 10px; }
.content h2 { font-size: 1.7rem; color: var(--navy); margin: 32px 0 10px; }
.content p { margin: 0 0 14px; font-size: 1.05rem; }
.content ul { padding-left: 20px; margin: 0 0 14px; }
.content li { margin-bottom: 8px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.admin-list { list-style: none; padding: 0; }
.admin-list li {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 10px;
}
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 40px 0 28px; text-align: center; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--navy); margin: 0 0 8px; }
.page-head p { color: var(--ink-soft); margin: 0; max-width: 600px; margin: 0 auto; }

.empty-note { text-align: center; color: var(--ink-soft); padding: 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c8d2df; margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px; text-align: center; }
.footer-inner p { margin: 4px 0; }
.footer-inner a { color: var(--gold-soft); }
.footer-fine { font-size: .82rem; color: #8a98aa; margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-links a.btn-subscribe { margin-top: 8px; text-align: center; }

  .cal-grid { grid-auto-rows: 84px; }
  .cal-cell { padding: 4px; }
  .chip-title { font-size: .68rem; }
  .cal-title { font-size: 1.4rem; min-width: 160px; }
  .detail { padding: 24px; }
  .up-item { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .cal-grid { gap: 3px; grid-auto-rows: 64px; }
  .chip-time { display: none; }
}
