/* ==============================================================
   Cedarcross Community Church — CanadaWebs church template
   WCAG 2.1 AA contrast-checked palette. Indigo-plum + warm gold.
   Verified ratios (foreground on background):
     #FFFFFF on #3B2A54  12.76:1   #FFFFFF on #2A1D3E  15.63:1
     #E3C878 on #3B2A54   7.78:1   #E3C878 on #2A1D3E   9.52:1
     #8A6A1F on #FAF8F3   4.75:1   #8A6A1F on #FFFFFF   5.05:1
     #2A2733 on #FAF8F3  13.77:1   #3B2A54 on #FAF8F3  12.03:1
     #2A1D3E on #E3C878   9.52:1   #5C5566 on #FAF8F3   6.72:1
   ============================================================== */
:root {
  --plum: #3B2A54;        /* primary — 12.8:1 with white text */
  --plum-deep: #2A1D3E;
  --gold-dark: #8A6A1F;   /* gold for text on light bg, 4.8:1+ */
  --gold-light: #E3C878;  /* gold for text on plum, 7.8:1+ */
  --paper: #FAF8F3;       /* warm off-white */
  --ink: #2A2733;
  --muted: #5C5566;       /* 6.7:1 on paper */
  --line: #E6E0D4;
  --white: #fff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { font-family: 'Source Sans 3', -apple-system, sans-serif; font-size: 1.05rem; line-height: 1.65; color: var(--ink); background: var(--paper); }
a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--plum); }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 2px; }
h1, h2, h3 { font-family: 'Lora', Georgia, serif; color: var(--plum); line-height: 1.18; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 600; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--plum-deep); color: #fff; padding: 0.7rem 1.2rem; z-index: 99; font-weight: 700; }
.skip-link:focus { left: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.85rem 1.6rem; font-family: 'Source Sans 3', sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; text-decoration: none; border: 2px solid transparent; border-radius: 999px; cursor: pointer; min-height: 44px; }
.btn-gold { background: var(--gold-light); color: var(--plum-deep) !important; }
.btn-gold:hover { background: #EFDA9C; }
.btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,0.65); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.98rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.15rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Service-times strip */
.times-strip { background: var(--plum-deep); color: #fff; font-weight: 600; font-size: 0.95rem; }
.times-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 0.45rem; padding-bottom: 0.45rem; flex-wrap: wrap; }
.times-addr { color: var(--gold-light); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--plum); box-shadow: 0 1px 0 rgba(255,255,255,0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--plum-deep); color: var(--gold-light); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(227,200,120,0.4); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { font-family: 'Lora', Georgia, serif; font-size: 1.4rem; font-weight: 700; color: #fff; line-height: 1.05; }
.brand-text em { display: block; font-style: normal; font-family: 'Source Sans 3', sans-serif; font-size: 0.78rem; font-weight: 600; color: var(--gold-light); letter-spacing: 0.16em; text-transform: uppercase; }
.navmenu { display: flex; align-items: center; gap: 0.35rem; }
.navmenu > a { color: #fff; text-decoration: none; font-weight: 600; padding: 0.5rem 0.8rem; border-radius: 8px; }
.navmenu > a:not(.btn):hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-toggle { display: none; align-items: center; gap: 0.5rem; background: var(--gold-light); color: var(--plum-deep); border: none; padding: 0.55rem 1rem; font-weight: 700; font-size: 1rem; border-radius: 8px; cursor: pointer; min-height: 44px; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; display: block; width: 20px; height: 2.5px; background: var(--plum-deep); position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
@media (max-width: 56rem) {
  .nav-toggle { display: inline-flex; }
  .navmenu { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 0.8rem; }
  .navmenu.open { display: flex; }
  .navmenu > a { padding: 0.85rem 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.14); border-radius: 0; }
}

/* Hero */
.hero { background: linear-gradient(155deg, var(--plum) 0%, var(--plum-deep) 75%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -140px; top: -80px; width: 460px; height: 460px; border: 22px solid rgba(227,200,120,0.12); border-radius: 50%; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: center; padding-top: 4.4rem; padding-bottom: 4rem; }
.eyebrow { font-family: 'Source Sans 3', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold-dark); margin-bottom: 0.6rem; font-size: 0.92rem; }
.eyebrow-light { color: var(--gold-light); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 600; max-width: 14em; margin-bottom: 0.8rem; }
.hero-sub { font-size: 1.18rem; color: rgba(255,255,255,0.9); max-width: 36rem; margin-bottom: 1.7rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-times { background: rgba(255,255,255,0.07); border: 1px solid rgba(227,200,120,0.35); border-radius: 16px; padding: 1.7rem 1.8rem; }
.hero-times-head { font-family: 'Lora', Georgia, serif; color: var(--gold-light); font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; }
.times-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.times-list strong { display: block; font-size: 1.25rem; color: #fff; }
.times-list span { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.hero-times-addr { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.18); color: var(--gold-light); font-size: 0.95rem; }
@media (max-width: 56rem) { .hero-inner { grid-template-columns: 1fr; gap: 2rem; } }

/* Sections */
section { padding: 4.2rem 0; }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-lead { color: var(--muted); margin-top: 0.6rem; }

/* New here */
.newhere { background: var(--white); }
.nh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.nh-card { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold-light); border-radius: 12px; padding: 1.5rem 1.4rem; }
.nh-card h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.nh-card p { color: var(--muted); font-size: 0.98rem; }
.nh-note { margin-top: 1.6rem; max-width: 46rem; color: var(--muted); }

/* Ministries */
.ministries { background: var(--paper); }
.min-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.2rem; }
.min-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem 1.5rem; }
.min-icon { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; background: var(--plum); color: var(--gold-light); align-items: center; justify-content: center; margin-bottom: 0.9rem; }
.min-icon svg { width: 28px; height: 28px; }
.min-card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.min-card p { color: var(--muted); font-size: 0.98rem; }

/* Sermons */
.sermons { background: var(--plum); color: #fff; }
.sermons h2 { color: #fff; }
.sermon-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.sermon-card { display: grid; grid-template-columns: 12rem 1fr auto; gap: 1.4rem; align-items: center; background: rgba(255,255,255,0.06); border-left: 4px solid var(--gold-light); border-radius: 10px; padding: 1.3rem 1.5rem; }
.sermon-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.sermon-date { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.sermon-scripture { color: var(--gold-light); font-weight: 700; font-size: 0.98rem; }
.sermon-body h3 { color: #fff; font-size: 1.3rem; margin-bottom: 0.15rem; }
.sermon-speaker { color: var(--gold-light); font-size: 0.95rem; margin-bottom: 0.35rem; }
.sermon-summary { color: rgba(255,255,255,0.88); font-size: 0.98rem; }
.sermon-action .btn { white-space: nowrap; }
.demo-tag { font-weight: 400; font-size: 0.85em; }
@media (max-width: 52rem) { .sermon-card { grid-template-columns: 1fr; gap: 0.7rem; } .sermon-meta { flex-direction: row; gap: 1rem; } }

/* Events */
.events { background: var(--white); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.4rem; }
.ev-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--white); }
.ev-photo { position: relative; min-height: 150px; }
.e-a { background: linear-gradient(140deg, #58447A, #2A1D3E); }
.e-b { background: linear-gradient(140deg, #A8842E, #6E5416); }
.e-c { background: linear-gradient(140deg, #6E5B8E, #3B2A54); }
.e-d { background: linear-gradient(140deg, #3B2A54, #171023); }
.ev-pill { position: absolute; left: 14px; bottom: 12px; background: rgba(255,255,255,0.95); color: var(--plum-deep); font-weight: 700; font-size: 0.85rem; padding: 0.3rem 0.85rem; border-radius: 999px; }
.ev-body { padding: 1.2rem 1.3rem 1.4rem; }
.ev-body h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.ev-when { color: var(--gold-dark); font-weight: 700; font-size: 0.92rem; margin-bottom: 0.45rem; }
.ev-body p:not(.ev-when) { color: var(--muted); font-size: 0.96rem; }

/* Giving */
.giving { background: var(--plum-deep); color: #fff; }
.giving h2 { color: #fff; }
.giving-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.giving-lead { color: rgba(255,255,255,0.88); margin-top: 0.8rem; }
.giving-panel { background: rgba(255,255,255,0.06); border: 1px solid rgba(227,200,120,0.3); border-radius: 14px; padding: 1.6rem 1.7rem; }
.giving-ways { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.giving-ways strong { display: block; color: var(--gold-light); font-size: 1.05rem; }
.giving-ways span { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.giving-demo { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.8); font-size: 0.9rem; }
@media (max-width: 52rem) { .giving-grid { grid-template-columns: 1fr; gap: 1.6rem; } }

/* Staff */
.staff { background: var(--paper); }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.staff-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 1.7rem 1.5rem; }
.staff-photo { width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(140deg, var(--plum), var(--plum-deep)); border: 3px solid var(--gold-light); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.staff-photo span { font-family: 'Lora', Georgia, serif; font-size: 1.9rem; font-weight: 600; color: var(--gold-light); }
.staff-card h3 { font-size: 1.25rem; margin-bottom: 0.1rem; }
.staff-role { color: var(--gold-dark); font-weight: 700; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.55rem; }
.staff-card p:not(.staff-role) { color: var(--muted); font-size: 0.97rem; }

/* Visit */
.visit { background: var(--white); }
.visit-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; }
.visit-info p { margin-bottom: 1rem; }
.visit-details { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.98rem; }
.visit-form { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.8rem; }
.vf-note { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.vf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.vf-field { margin-bottom: 1rem; }
.vf-field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; color: var(--plum); }
.vf-field input, .vf-field select, .vf-field textarea { width: 100%; padding: 0.7rem 0.8rem; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--white); }
.vf-field input:focus, .vf-field select:focus, .vf-field textarea:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(138,106,31,0.18); }
@media (max-width: 52rem) { .visit-grid { grid-template-columns: 1fr; gap: 1.6rem; } .vf-row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--plum-deep); color: rgba(255,255,255,0.87); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-top: 2.4rem; padding-bottom: 2rem; }
.footer-brand { font-family: 'Lora', Georgia, serif; font-size: 1.45rem; font-weight: 700; color: #fff; }
.footer-brand em { font-style: normal; font-family: 'Source Sans 3', sans-serif; color: var(--gold-light); font-size: 0.85rem; display: block; letter-spacing: 0.16em; text-transform: uppercase; }
.footer-line { font-size: 0.92rem; color: rgba(255,255,255,0.8); }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.14); padding: 1rem 0 1.2rem; }
.footer-legal p { font-size: 0.85rem; color: rgba(255,255,255,0.8); margin: 0.15rem 0; }
.demo-note a { color: var(--gold-light); font-weight: 700; }
