/* Faith Baptist Church of Fostoria — approved design (Preview A, "Plain Welcome"). */
:root {
  --brick: #B31942;
  --navy: #0A3161;
  --white: #FFFFFF;
  --paper: #FFFFFF;
  --on-accent: #FFFFFF;
  --accent-text: #B31942;
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--navy);
  background: var(--paper);
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
.wordmark,
.footer-name {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.16;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

p,
address,
dl,
figure {
  margin-top: 0;
}

figure {
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
}

address {
  font-style: normal;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-text);
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--navy);
  transform: translateY(-150%);
}

.skip-link:focus {
  color: var(--white);
  transform: translateY(0);
}

.site-header {
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--navy);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.desktop-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.desktop-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.desktop-navigation a[aria-current="page"] {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.header-cta,
.mobile-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--brick);
  border-radius: 0;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.header-cta,
.mobile-cta,
.button.primary {
  color: var(--on-accent);
  background: var(--brick);
}

.header-cta:hover,
.mobile-cta:hover,
.button.primary:hover {
  color: var(--on-accent);
  background: var(--brick);
  border-color: var(--brick);
}

.button.secondary {
  color: var(--navy);
  background: var(--white);
  border-color: var(--navy);
}

.menu {
  display: none;
}

.page-width {
  width: min(1120px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.home-hero {
  position: relative;
  width: min(1280px, 100%);
  aspect-ratio: 16 / 7;
  margin: 0 auto;
  overflow: hidden;
  background: var(--navy);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
}

.hero-copy {
  position: absolute;
  bottom: 32px;
  left: 32px;
  width: min(620px, calc(100% - 64px));
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--navy);
  border-radius: 4px;
}

.hero-copy h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.hero-copy p {
  margin-bottom: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.weekly-schedule {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px 32px 32px;
  color: var(--white);
  background: var(--navy);
}

.weekly-schedule h2 {
  margin-bottom: 18px;
  color: var(--white);
  font-size: 1.5rem;
}

.day-group {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  border-top: 1px solid var(--white);
}

.day-group h3 {
  margin: 0;
  padding: 12px 16px 12px 0;
  color: var(--white);
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(90px, 0.7fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--white);
}

.schedule-row:first-child {
  border-top: 0;
}

.schedule-row strong {
  white-space: nowrap;
}

.welcome-grid,
.beliefs-split,
.image-split,
.visit-close {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 80px);
}

.welcome-grid,
.beliefs-split,
.visit-close,
.visit-details,
.ministry-list,
.pathways,
.page-intro,
.contact-page,
.announcement-note {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.location-block {
  padding-left: 28px;
  border-left: 1px solid var(--navy);
}

.location-block a,
.visit-close a,
.site-footer address a {
  display: block;
  width: fit-content;
  min-height: 44px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.pathways > h2,
.ministry-list > h2 {
  margin-bottom: 30px;
}

.pathway,
.ministry-row,
.belief-statements li {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.6fr) minmax(140px, 0.6fr);
  gap: 24px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--navy);
}

.pathway:last-child,
.ministry-row:last-child,
.belief-statements li:last-child {
  border-bottom: 1px solid var(--navy);
}

.pathway h3,
.pathway p,
.ministry-row h2,
.ministry-row h3,
.ministry-row p,
.belief-statements li {
  margin: 0;
}

.pathway > a,
.pathway p a {
  min-height: 44px;
}

.beliefs-split {
  align-items: center;
}

.sanctuary-close {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
}

.belief-statements {
  padding: 0;
  margin-bottom: 24px;
  list-style: none;
}

.belief-statements li {
  grid-template-columns: minmax(0, 1fr);
  font-weight: 700;
}

.wide-sanctuary {
  width: 100%;
  margin-bottom: 0;
  background: var(--navy);
}

.wide-sanctuary img {
  width: 100%;
  aspect-ratio: 12 / 5;
  object-fit: cover;
  object-position: center 48%;
}

.visit-close {
  align-items: start;
}

.visit-close > div:last-child {
  padding-left: 28px;
  border-left: 1px solid var(--navy);
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  padding: 48px max(24px, calc((100% - 1120px) / 2));
  color: var(--white);
  background: var(--navy);
  border-top: 1px solid var(--white);
}

.footer-name {
  margin-bottom: 8px;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
}

.site-footer address span,
.site-footer address a {
  color: var(--white);
}

.page-intro h1,
.contact-page h1 {
  margin-bottom: 20px;
}

.p-visit .page-intro,
.p-beliefs .beliefs-page,
.contact-page {
  align-items: center;
}

.exterior-portrait {
  width: min(100%, 277px);
  aspect-ratio: 277 / 600;
  justify-self: center;
  object-fit: cover;
  border-radius: 4px;
}

.visit-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  border-top: 1px solid var(--navy);
}

.visit-details > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--navy);
}

.beliefs-page {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.p-ministries .page-intro,
.p-events .page-intro {
  padding-bottom: 32px;
}

.p-ministries .ministry-list {
  padding-top: 0;
}

.p-ministries .ministry-row {
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1fr);
}

.announcement-note {
  text-align: center;
}

.contact-page h2 {
  margin-top: 32px;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.contact-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.25rem;
  font-weight: 700;
}

.contact-exterior {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 960px) and (min-width: 768px) {
  .header-inner {
    gap: 10px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .wordmark {
    font-size: 1.05rem;
  }

  .desktop-navigation a {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 0.78rem;
  }

  .header-cta {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }

  .site-header {
    position: relative;
    height: 72px;
  }

  .header-inner {
    display: flex;
    gap: 12px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .wordmark {
    font-size: 1.1rem;
  }

  .desktop-navigation,
  .header-cta {
    display: none;
  }

  .menu {
    position: relative;
    display: block;
    margin-left: auto;
  }

  .menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 44px;
    padding: 8px;
    border: 1px solid var(--navy);
    cursor: pointer;
  }

  .mobile-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 13px);
    right: 0;
    display: grid;
    width: min(300px, calc(100vw - 32px));
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--navy);
  }

  .mobile-navigation {
    display: grid;
  }

  .mobile-navigation a,
  .mobile-cta {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
  }

  .mobile-navigation a[aria-current="page"] {
    color: var(--accent-text);
    font-weight: 700;
  }

  .mobile-cta {
    margin-top: 8px;
  }

  main a,
  .site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .page-width {
    width: min(100% - 32px, 1120px);
  }

  .home-hero {
    aspect-ratio: 4 / 3;
  }

  .hero-copy {
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    padding: 14px 16px;
  }

  .hero-copy h1 {
    margin-bottom: 4px;
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .hero-copy p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .actions {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .actions .button {
    flex: 1 1 0;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.82rem;
  }

  .weekly-schedule {
    padding: 24px 16px;
  }

  .day-group,
  .schedule-row,
  .welcome-grid,
  .beliefs-split,
  .image-split,
  .visit-close,
  .visit-details,
  .site-footer,
  .pathway,
  .ministry-row,
  .belief-statements li,
  .p-ministries .ministry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .day-group h3 {
    padding-bottom: 4px;
  }

  .schedule-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }

  .schedule-row > span:last-child {
    grid-column: 1 / -1;
  }

  .schedule-row:first-child {
    border-top: 1px solid var(--white);
  }

  .welcome-grid,
  .beliefs-split,
  .visit-close,
  .visit-details,
  .site-footer {
    gap: 32px;
  }

  .location-block,
  .visit-close > div:last-child,
  .visit-details > div + div {
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid var(--navy);
    border-left: 0;
  }

  .pathway,
  .ministry-row,
  .belief-statements li {
    gap: 8px;
  }

  .beliefs-page .sanctuary-close {
    order: 2;
  }

  .wide-sanctuary img {
    aspect-ratio: 4 / 3;
  }

  .site-footer {
    padding: 40px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
