/* ============================================================
   Christian Church In Raleigh — design system
   Navy / off-white identity. No build step, no frameworks.
   ============================================================ */
@import url("./fonts/fonts.css");

:root {
  /* Brand palette (from source visual system) */
  --navy: #3f4359;
  --navy-deep: #2f3346;
  --teal: #2b5672;
  --accent: #e03939;
  --accent-soft: #ff4040;
  --ink: #2c2d2e;
  --paper: #ffffff;
  --off-white: #fafafa;
  --off-white-2: #eef0f2;
  --line: #e2e4ea;
  --muted: #5c6070;

  /* Typography */
  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --maxw: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(47, 51, 70, 0.12);
  --shadow-sm: 0 4px 14px rgba(47, 51, 70, 0.08);
  --focus: 3px solid var(--teal);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); line-height: 1.15; letter-spacing: -0.01em; }
:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---------- accessibility helpers ---------- */
.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--navy); color: #fff; padding: .6rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper); }
.section--navy { background: var(--navy); color: #eef0f4; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  font-family: var(--display); font-weight: 700; font-size: .8rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--teal);
  margin: 0 0 .6rem;
}
.section--navy .eyebrow { color: #9fd0e6; }
h2.section-title { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-weight: 800; margin: 0; }
.lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: var(--muted); }
.section--navy .lede { color: #c7cdda; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand .mark { flex: none; }
.brand-name {
  font-family: var(--display); font-weight: 800; font-size: 1.02rem;
  letter-spacing: .02em; line-height: 1.1; color: var(--navy);
}
.brand-name small { display: block; font-weight: 600; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }

.nav-toggle {
  display: none; align-items: center; gap: .5rem;
  background: var(--navy); color: #fff; border: 0; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: .9rem;
  padding: .55rem .9rem; border-radius: var(--radius-sm);
}
.nav-menu { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: inline-block; font-family: var(--display); font-weight: 600;
  font-size: .93rem; color: var(--navy); text-decoration: none;
  padding: .5rem .8rem; border-radius: var(--radius-sm); transition: background .15s, color .15s;
}
.nav-menu a:hover { background: var(--off-white-2); color: var(--teal); }
.nav-menu a[aria-current="page"] { color: var(--accent); }
.nav-menu a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; background: var(--accent);
  border-radius: 2px; margin-top: 2px;
}
.nav-cta a {
  background: var(--accent); color: #fff !important;
}
.nav-cta a:hover { background: #c62f2f; color: #fff !important; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem var(--gap) 1rem; box-shadow: var(--shadow-sm);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: .8rem .6rem; border-radius: 8px; }
  .nav-menu a[aria-current="page"]::after { display: none; }
  .nav-cta { margin-top: .4rem; }
  .nav-cta a { text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--navy); --btn-fg: #fff;
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg);
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); color: var(--btn-fg); }
.btn--accent { --btn-bg: var(--accent); }
.btn--accent:hover { background: #c62f2f; }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--navy);
  border-color: var(--navy); box-shadow: none;
}
.btn--ghost:hover { background: var(--navy); color: #fff; }
.section--navy .btn--ghost { --btn-fg: #fff; border-color: rgba(255,255,255,.6); }
.section--navy .btn--ghost:hover { background: #fff; color: var(--navy); }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(47,51,70,.72), rgba(47,51,70,.86));
}
.hero-inner { padding-block: clamp(4.5rem, 12vw, 8.5rem); max-width: 44rem; }
.hero h1 {
  color: #fff; font-weight: 800;
  font-size: clamp(2.2rem, 1.4rem + 4.2vw, 4.2rem);
  letter-spacing: -0.02em; margin: 0 0 1.1rem;
}
.hero h1 .accent { color: #ffb4b4; display: block; }
.hero p { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); color: #eef1f6; margin: 0 0 1.8rem; max-width: 34rem; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 2rem;
  font-size: .95rem; color: #dfe3ec;
}
.hero-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta svg { flex: none; opacity: .9; }

/* ---------- prose ---------- */
.prose { max-width: 44rem; }
.prose p { margin: 0 0 1.15rem; }
.prose h3 { margin: 2rem 0 .6rem; font-size: 1.3rem; }
.prose blockquote {
  margin: 1.5rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--teal);
  background: var(--off-white); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.12rem; color: var(--ink);
}
.lead-quote {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.9rem);
  line-height: 1.35; color: var(--navy); max-width: 40rem;
}

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 1.9rem);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 .5rem; font-size: 1.22rem; }
.card .card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--off-white-2); color: var(--teal); margin-bottom: 1rem;
}
.card .card-icon svg { width: 24px; height: 24px; }

/* schedule list inside cards */
.schedule { list-style: none; margin: .4rem 0 0; padding: 0; }
.schedule li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-top: 1px solid var(--line);
}
.schedule li:first-child { border-top: 0; }
.schedule .day { font-weight: 600; color: var(--navy); }
.schedule .time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* split feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(47,51,70,.55));
  opacity: 0; transition: opacity .3s ease;
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figure:hover::after { opacity: 1; }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- messages / video ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.2rem, 3vw, 2rem); }
@media (max-width: 720px) { .video-grid { grid-template-columns: 1fr; } }
.video-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.video-embed {
  position: relative; aspect-ratio: 16 / 9; background: var(--navy-deep);
  border: 0; cursor: pointer; width: 100%; padding: 0; display: block; overflow: hidden;
}
.video-embed img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s, transform .4s; }
.video-embed:hover img { opacity: 1; transform: scale(1.03); }
.video-embed .play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 48px;
  display: grid; place-items: center; background: rgba(224,57,57,.92);
  border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: background .2s, transform .2s;
}
.video-embed:hover .play { background: var(--accent); transform: scale(1.06); }
.video-embed .play svg { width: 26px; height: 26px; fill: #fff; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card .meta { padding: 1rem 1.2rem 1.2rem; }
.video-card .meta h3 { margin: 0; font-size: 1.08rem; }
.video-card .meta a { font-size: .85rem; font-family: var(--display); font-weight: 600; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.info-list li { display: flex; gap: .9rem; align-items: flex-start; }
.info-list .ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--off-white-2); color: var(--teal); }
.info-list .ico svg { width: 20px; height: 20px; }
.info-list .label { font-family: var(--display); font-weight: 700; color: var(--navy); display: block; font-size: .95rem; }
.info-list a { color: var(--teal); }

.form-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2rem); box-shadow: var(--shadow-sm); }
.form-note {
  display: flex; gap: .7rem; align-items: flex-start;
  background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12;
  padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 1.3rem;
}
.form-note svg { flex: none; margin-top: 2px; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--navy); margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--off-white); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(43,86,114,.15); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.field :disabled { cursor: not-allowed; opacity: .8; }
.form-panel button[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin: 0 0 .7rem; }
.cta-band p { color: #c7cdda; max-width: 36rem; margin: 0 auto 1.6rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #c3c8d6; padding-block: clamp(2.5rem, 5vw, 3.5rem); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .9rem; }
.site-footer a { color: #d7dbe6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin: .8rem 0 0; max-width: 24rem; color: #aeb4c4; }
.social { display: flex; gap: .6rem; margin-top: 1rem; }
.social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.social a:hover { background: var(--accent); }
.social svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: #9aa1b4; font-size: .85rem; }

/* utility */
.stack > * + * { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }
