/* East Memorial Baptist Church — site styles
   Palette from EMBC 2024 Brand Guide:
   Navy #0D2B42 (primary) · Teal #598E9B · Sky #99E4FF · Gold #F1D27E (details only)
   Mist #BBD1D6 (neutral) · plus black & white
   Type: Montserrat (web stand-in for Gotham) · Sacramento (stand-in for Photograph Signature) */

:root {
  --navy: #0D2B42;
  --navy-deep: #0a2236;
  --teal: #598E9B;
  --sky: #99E4FF;
  --gold: #F1D27E;
  --mist: #BBD1D6;
  --paper: #F7F9FA;
  --ink: #12222f;
  --ink-soft: #3f4f5b;
  --header-h: 84px;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-script: "Sacramento", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e6edf1;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; text-decoration: none; }

.brand img { height: 46px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--gold);
}

.site-nav .nav-cta {
  background: var(--gold);
  color: var(--navy);
  padding: 11px 22px;
  border-radius: 40px;
  border-bottom: 0;
  transition: filter 0.15s ease;
}

.site-nav .nav-cta:hover {
  color: var(--navy);
  border-bottom: 0;
  filter: brightness(0.95);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--navy);
  font-size: 1.7rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(92vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 55%, #0f3a54 100%);
  padding: 96px 0;
}

.hero::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -140px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(153, 228, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  left: -160px;
  bottom: -200px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 142, 155, 0.22), transparent 70%);
  pointer-events: none;
}

/* Photo hero: navy-tinted overlay keeps white text legible over the image */
.hero-photo {
  background:
    linear-gradient(rgba(10, 24, 38, 0.52), rgba(10, 24, 38, 0.66)),
    url('../images/hero.jpg') center 30% / cover no-repeat,
    linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 55%, #0f3a54 100%);
}

.hero-photo::before,
.hero-photo::after { display: none; }

.hero-photo .hero-inner { text-shadow: 0 2px 26px rgba(0, 0, 0, 0.5); }

.hero-photo .btn { text-shadow: none; }

.hero-inner { width: min(900px, 92%); position: relative; z-index: 1; }

.hero .script {
  display: block;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.15;
  color: var(--gold);
  margin-bottom: 2px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5.2vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.hero p.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: #cfe0ea;
  margin-bottom: 34px;
}

/* Page hero (interior pages) */

.page-hero { min-height: 300px; padding: 72px 0; }

.page-hero h1 { margin-bottom: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 40px;
  border: 1.5px solid #fff;
  color: #fff;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.btn:hover { background: #fff; color: var(--navy); }

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.btn-gold:hover { background: var(--gold); filter: brightness(0.95); color: var(--navy); }

.btn-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.btn-navy:hover { background: #123852; border-color: #123852; color: #fff; }

.btn-outline-navy {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* ---------- Sections ---------- */

.section { padding: 92px 0; }

.section-paper { background: var(--paper); }

.section-navy {
  background: var(--navy);
  color: #fff;
}

.section-teal {
  background: linear-gradient(160deg, #0f3a54, var(--teal));
  color: #fff;
}

.kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-navy .kicker,
.section-teal .kicker { color: var(--sky); }

.section h2 {
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 20px;
}

.section-navy h2,
.section-teal h2 { color: #fff; }

.section h2 .script {
  display: block;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  color: var(--teal);
  font-weight: 400;
  margin-bottom: -8px;
}

.section-navy h2 .script,
.section-teal h2 .script { color: var(--gold); }

.divider {
  height: 3px;
  width: 60px;
  background: var(--gold);
  border-radius: 3px;
  margin: 22px 0 0;
}

.section .lede {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 62ch;
}

.section-navy .lede,
.section-teal .lede { color: #cfe0ea; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Service times */

.times-list { list-style: none; margin-top: 8px; }

.times-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--mist);
  font-size: 0.98rem;
}

.section-navy .times-list li,
.section-teal .times-list li { border-bottom-color: rgba(187, 209, 214, 0.3); }

.times-list .time {
  font-weight: 700;
  white-space: nowrap;
  color: var(--teal);
}

.section-navy .times-list .time,
.section-teal .times-list .time { color: var(--sky); }

.times-day {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 28px 0 4px;
}

.section-navy .times-day,
.section-teal .times-day { color: var(--gold); }

/* Card grids */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 44px;
}

.card-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid #e6edf1;
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(13, 43, 66, 0.1);
}

.section-navy .card,
.section-teal .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.section-navy .card h3,
.section-teal .card h3 { color: #fff; }

.card p { font-size: 0.92rem; font-weight: 300; color: var(--ink-soft); flex: 1; }

.section-navy .card p,
.section-teal .card p { color: #c3d4de; }

.card .card-link {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--teal);
}

.card .card-link:hover { color: var(--navy); }

.section-navy .card .card-link,
.section-teal .card .card-link { color: var(--sky); }

.card .meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

/* Ministry tiles */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 44px;
}

/* Tiles are photo-ready: add style="background-image: url('images/....jpg')"
   on a .tile and the gradient below is replaced by the photo. */
.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 190px;
  padding: 22px;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(160deg, #0f3a54 0%, var(--navy) 90%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:nth-child(2) { background: linear-gradient(160deg, var(--teal) 0%, #35606c 90%); }

.tile:nth-child(3) { background: linear-gradient(160deg, #3e7181 0%, var(--navy) 90%); }

.tile:nth-child(4) { background: linear-gradient(160deg, var(--navy) 0%, #35606c 90%); }

.tile:nth-child(5) { background: linear-gradient(160deg, #46707d 0%, #12303f 90%); }

.tile::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(153, 228, 255, 0.22), transparent 70%);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(13, 43, 66, 0.25);
}

.tile h3 { font-size: 1.3rem; font-weight: 800; }

.tile span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Photo placeholder frame */

.photo-frame {
  background: linear-gradient(160deg, #f2f7f8, var(--mist));
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}

.photo-frame img { width: min(150px, 40%); }

.photo-frame span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
}

img.photo-frame { object-fit: cover; padding: 0; }

/* CTA band */

.cta-band { text-align: center; padding: 88px 0; }

.cta-band h2 { margin-bottom: 10px; }

.cta-band p { color: #cfe0ea; font-weight: 300; margin-bottom: 32px; }

.btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Content prose (interior pages) */

.prose { max-width: 72ch; }

.prose p { margin-bottom: 20px; font-weight: 300; color: var(--ink-soft); }

.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 36px 0 10px;
}

.prose ul { margin: 0 0 20px 22px; font-weight: 300; color: var(--ink-soft); }

.prose li { margin-bottom: 8px; }

.prose b, .prose strong { font-weight: 700; color: var(--navy); }

blockquote.verse {
  font-size: 1.15rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: var(--navy);
  border-left: 3px solid var(--gold);
  padding-left: 24px;
  margin: 12px 0 8px;
}

blockquote.verse + cite {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  padding-left: 27px;
  margin-bottom: 28px;
  font-style: normal;
}

/* Staff list */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 32px;
  margin-top: 40px;
}

.staff-grid .person {
  background: #fff;
  border: 1px solid #e6edf1;
  border-top: 3px solid var(--teal);
  border-radius: 0 0 12px 12px;
  padding: 16px 18px;
}

.person .name { font-weight: 700; font-size: 0.98rem; color: var(--navy); }

.person .role { font-size: 0.84rem; font-weight: 300; color: var(--ink-soft); }

/* Contact / info blocks */

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 44px;
}

.info-block {
  background: #fff;
  border: 1px solid #e6edf1;
  border-radius: 16px;
  padding: 28px;
}

.info-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.info-block p { color: var(--ink-soft); font-weight: 300; font-size: 0.94rem; }

.info-block a { color: var(--teal); }

/* Map / iframe */

.embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
  margin-top: 40px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #aebecb;
  padding: 72px 0 36px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.site-footer h4 {
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.site-footer ul { list-style: none; }

.site-footer li { margin-bottom: 9px; font-weight: 300; }

.site-footer a { color: #aebecb; text-decoration: none; }

.site-footer a:hover { color: var(--sky); }

.footer-logo { height: 52px; width: auto; }

.footer-brand p { margin-top: 14px; max-width: 34ch; font-weight: 300; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #7f92a1;
}

.social-row { display: flex; gap: 18px; }

.social-row a { display: inline-flex; }

.social-row svg { width: 20px; height: 20px; fill: #aebecb; transition: fill 0.15s ease; }

.social-row a:hover svg { fill: var(--sky); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .brand img { height: 38px; }

  .nav-toggle { display: block; padding: 10px 4px; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 4vw 24px;
    display: none;
    border-top: 1px solid #e6edf1;
    border-bottom: 1px solid #e6edf1;
  }

  .site-nav.open { display: flex; }

  .site-nav a { padding: 14px 0; width: 100%; border-bottom: 1px solid #eef3f5; }

  .site-nav .nav-cta {
    border-radius: 40px;
    text-align: center;
    margin-top: 14px;
    padding: 12px 22px;
  }

  .two-col { grid-template-columns: 1fr; gap: 40px; }

  .card-grid,
  .card-grid.grid-4,
  .tile-grid,
  .staff-grid,
  .info-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .section { padding: 56px 0; }

  .card-grid,
  .card-grid.grid-4,
  .tile-grid,
  .staff-grid,
  .info-grid,
  .footer-grid { grid-template-columns: 1fr; }

  /* Hero: let content set the height — mobile vh units jump as browser chrome hides */
  .hero { min-height: 0; padding: 76px 0 84px; }

  /* Keep the pastor (right of frame) visible in the narrow mobile crop */
  .hero-photo { background-position: 78% 30%, 78% 30%, center; }

  .page-hero { padding: 60px 0 64px; }

  .hero p.hero-sub { font-size: 0.95rem; }

  .btn { padding: 13px 26px; }

  .two-col { gap: 36px; }

  .tile-grid { gap: 14px; margin-top: 36px; }

  .tile { min-height: 148px; padding: 22px; }

  .tile h3 { font-size: 1.3rem; }

  .card-grid { gap: 14px; margin-top: 36px; }

  .card { padding: 26px 22px; }

  .staff-grid { gap: 12px; }

  .info-grid { gap: 14px; }

  .cta-band { padding: 68px 0; }

  blockquote.verse { font-size: 1.05rem; }

  .embed { aspect-ratio: 4 / 3; }

  .site-footer { padding: 56px 0 32px; }

  .footer-grid { gap: 32px; margin-bottom: 36px; }
}
