/* Faithflames Global Ministries — site styles
   Brand: maroon #A8102A and flame orange #F89000, from the FGM logo. */

:root {
  --maroon: #a8102a;
  --maroon-dark: #7c0b1f;
  --orange: #f89000;
  --orange-dark: #d97c00;
  --ink: #1d1b1c;
  --text: #4a4547;
  --muted: #8a8487;
  --line: #ece7e3;
  --cream: #faf6f1;
  --white: #ffffff;
  --radius: 6px;
  --wrap: 1180px;
  --head: "Outfit", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 17px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--maroon);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--ink);
  font-family: var(--head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; }

p {
  margin: 0 0 1.1em;
}

.wrap {
  width: min(var(--wrap), 100% - 40px);
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  color: var(--orange-dark);
  font: 700 0.78rem/1 var(--body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lead {
  font-size: 1.2rem;
  color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.95rem 1.8rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 600 0.95rem/1 var(--body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-maroon { background: var(--maroon); color: var(--white); }
.btn-maroon:hover { background: var(--maroon-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.85); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ── Header ── */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--white);
}

.site-header.is-solid {
  position: sticky;
  top: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-name {
  font: 700 1.05rem/1.05 var(--head);
  letter-spacing: 0.02em;
}

.brand-name small {
  display: block;
  font: 500 0.68rem/1.4 var(--body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav a {
  color: inherit;
  font: 500 0.95rem/1 var(--body);
  text-decoration: none;
  opacity: 0.92;
}

.nav a:hover,
.nav a[aria-current="page"] {
  opacity: 1;
  box-shadow: inset 0 -2px 0 var(--orange);
}

.nav .btn {
  padding: 0.7rem 1.3rem;
  opacity: 1;
  box-shadow: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  margin: auto;
  background: currentColor;
  transition: transform 0.25s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}

.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    background: var(--maroon-dark);
    color: var(--white);
    font-size: 1.3rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav a { font-size: 1.3rem; }
  .nav-open .nav { transform: none; }
  .nav-open .nav-toggle { position: relative; z-index: 60; color: var(--white); }
  .nav-open .nav-toggle span { background: transparent; }
  .nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); }
}

/* ── Hero (home: slideshow; inner pages: single photo) ── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 92vh;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.hero-page {
  min-height: 62vh;
  align-items: flex-end;
  padding-bottom: 4.5rem;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity 1.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  animation: hero-zoom 9s ease-out both;
}

@keyframes hero-zoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 8, 12, 0.55) 0%, rgba(20, 8, 12, 0.35) 45%, rgba(20, 8, 12, 0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 84px;
}

.hero h1 {
  max-width: 14ch;
  color: var(--white);
}

.hero .lead {
  max-width: 40rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.88);
}

.hero .eyebrow {
  color: var(--orange);
}

.hero-content > * {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-content > :nth-child(2) { animation-delay: 0.15s; }
.hero-content > :nth-child(3) { animation-delay: 0.3s; }
.hero-content > :nth-child(4) { animation-delay: 0.45s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 2rem;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.3s, background-color 0.3s;
}

.hero-dots button[aria-current="true"] {
  width: 28px;
  background: var(--orange);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active,
  .hero-content > * { animation: none; }
  .hero-slide { transition: none; }
}

/* ── Service times bar ── */
.visit-bar {
  background: var(--maroon);
  color: var(--white);
}

.visit-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.4rem;
}

.visit-bar strong {
  font-family: var(--head);
  font-size: 1.15rem;
}

.visit-bar span {
  opacity: 0.85;
}

/* ── Sections ── */
.section {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}

.section-cream { background: var(--cream); }
.section-dark { background: var(--ink); color: rgba(255, 255, 255, 0.85); }
.section-dark h2,
.section-dark h3 { color: var(--white); }

.section-head {
  max-width: 44rem;
  margin-bottom: 3.5rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

/* Two columns: text beside an image */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.split-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius);
  object-fit: cover;
}

.split.reverse .split-media { order: 2; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}

/* Win · Build · Send pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: pillar;
}

.pillar {
  padding-top: 1.6rem;
  border-top: 3px solid var(--orange);
}

.pillar::before {
  counter-increment: pillar;
  content: "0" counter(pillar);
  display: block;
  margin-bottom: 0.6rem;
  color: var(--maroon);
  font: 700 0.85rem/1 var(--body);
  letter-spacing: 0.15em;
}

.pillar h3 {
  font-size: 1.7rem;
}

@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Image tiles (ministries) */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  padding: 1.6rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--maroon) center / cover no-repeat;
  color: var(--white);
  text-decoration: none;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 8, 12, 0.05) 30%, rgba(20, 8, 12, 0.85) 100%);
  transition: background-color 0.3s;
}

.tile:hover::before {
  background-color: rgba(168, 16, 42, 0.35);
}

.tile-body {
  position: relative;
}

.tile h3 {
  margin-bottom: 0.3rem;
  color: var(--white);
}

.tile p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.88;
}

.tile-plain {
  background-image: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
}

.tile-plain.alt {
  background-image: linear-gradient(135deg, var(--orange), #c56a00);
}

@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr; } }

/* Full-width photo band with a scripture or call to action */
.band {
  position: relative;
  padding-block: clamp(5rem, 11vw, 9rem);
  background: center / cover no-repeat;
  color: var(--white);
  text-align: center;
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(124, 11, 31, 0.82);
}

.band .wrap {
  position: relative;
}

.band blockquote {
  max-width: 46rem;
  margin: 0 auto 1.2rem;
  font: 600 clamp(1.5rem, 3vw, 2.2rem)/1.35 var(--head);
}

.band cite {
  color: var(--orange);
  font: 600 0.85rem/1 var(--body);
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Detailed list rows (departments, classes) */
.rows {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 3.5rem;
}

.row {
  padding-block: 1.8rem;
  border-top: 1px solid var(--line);
}

.row h3 {
  margin-bottom: 0.4rem;
}

.row p {
  margin: 0;
}

@media (max-width: 760px) { .rows { grid-template-columns: 1fr; } }

/* Numbered class list (Foundation School) */
.classes {
  display: grid;
  gap: 1rem;
  counter-reset: cls;
}

.class {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--white);
}

.class::before {
  counter-increment: cls;
  content: counter(cls);
  color: var(--orange);
  font: 700 3rem/1 var(--head);
}

.class ul {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
}

/* People */
.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  gap: 2.5rem;
}

.person-photo {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 5;
  margin-bottom: 1.2rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #e3dedb, #cfc8c4);
  color: #6f6669;
  font: 600 0.72rem/1 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.person h3 { margin-bottom: 0.2rem; }
.person .role { color: var(--maroon); font-weight: 600; }

@media (max-width: 640px) { .people { grid-template-columns: 1fr; } }

/* Giving */
.tiers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
  margin: 2rem 0;
}

.tier {
  padding: 1.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
}

.tier strong {
  display: block;
  color: var(--maroon);
  font: 700 1.35rem/1.2 var(--head);
}

.tier span {
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 760px) { .tiers { grid-template-columns: repeat(2, 1fr); } }

.give-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.give-card {
  padding: 2.2rem;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: inset 0 4px 0 var(--orange);
}

.give-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.2rem;
  margin: 1.2rem 0 0;
}

.give-card dt { color: var(--muted); }
.give-card dd { margin: 0; color: var(--ink); font-weight: 600; }

@media (max-width: 760px) { .give-cards { grid-template-columns: 1fr; } }

.progress {
  height: 12px;
  margin: 0.6rem 0 0.4rem;
  overflow: hidden;
  border-radius: 6px;
  background: var(--line);
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--maroon));
}

/* Radio player */
.player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.8rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius);
  background: var(--cream);
}

.player audio {
  flex: 1 1 260px;
}

.stations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.station {
  padding: 2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.station strong {
  display: block;
  color: var(--orange);
  font: 700 1.5rem/1.2 var(--head);
}

@media (max-width: 760px) { .stations { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--cream);
}

.contact-card a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.contact-card a:hover { color: var(--maroon); }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ── Footer ── */
.site-footer {
  padding: 5rem 0 2rem;
  background: #140a0d;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer h4 {
  color: var(--white);
  font: 600 0.8rem/1 var(--body);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

.site-footer li { margin-bottom: 0.55rem; }

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

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

.footer-brand { color: var(--white); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.8rem;
  font-size: 0.85rem;
}

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Fade-in on scroll (only when main.js is running, which adds .js) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Events */
.events {
  display: grid;
  gap: 1rem;
}

.event {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.8rem;
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.event-date {
  align-self: start;
  padding: 0.9rem 0;
  border-radius: var(--radius);
  background: var(--maroon);
  color: var(--white);
  text-align: center;
}

.event-date span {
  display: block;
  color: var(--orange);
  font: 700 0.8rem/1 var(--body);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.event-date strong {
  font: 700 2.2rem/1.1 var(--head);
}

.event h3 { margin-bottom: 0.3rem; }
.event-meta { color: var(--maroon); font-weight: 600; font-size: 0.95rem; }
.event p:last-child { margin-bottom: 0; }

@media (max-width: 520px) {
  .event { grid-template-columns: 1fr; gap: 1rem; }
  .event-date { width: 5.5rem; }
}

/* Stay connected: daily devotional + social */
.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.connect-options {
  display: grid;
  gap: 1.2rem;
}

.connect-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--cream);
}

.connect-card h3 { margin-bottom: 0.3rem; }

.connect-card input {
  display: block;
  width: 100%;
  margin-bottom: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
}

.connect-card input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.connect-status:empty { display: none; }
.connect-status { margin: 0.8rem 0 0; color: var(--maroon); font-size: 0.92rem; }

.connect-whatsapp { background: #eaf7ef; }

.btn-whatsapp { background: #1f8f4e; color: var(--white); }
.btn-whatsapp:hover { background: #17723e; }

.connect-follow { margin-top: 2rem; }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-link {
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.social-link:hover { border-color: var(--maroon); color: var(--maroon); }

.footer-social a { margin-right: 1rem; }
.footer-social:empty { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 860px) { .connect-grid { grid-template-columns: 1fr; } }

/* Spam-trap field: keep it hidden even inside styled forms */
.connect-card .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Public reading page (/read/<type>/) */
.read-wrap { max-width: 760px; }
.read-today h1 { font-size: clamp(2rem, 5vw, 3rem); }
.read-date { margin-bottom: 0.4rem; color: var(--muted); font-size: 0.95rem; }
.read-ref { color: var(--maroon); font-weight: 600; font-size: 1.1rem; }
.read-body { color: var(--ink); font: 400 1.15rem/1.8 Georgia, serif; }
.read-body h3 { margin-top: 1.6rem; font-size: 1.2rem; }
.read-body blockquote { margin: 1rem 0; padding: 0.4rem 0 0.4rem 1.2rem; border-left: 3px solid var(--orange); color: var(--text); font-style: italic; }
.read-signup { margin: 2.5rem 0; padding: 1.2rem 1.4rem; border-radius: var(--radius); background: var(--cream); }
.read-signup p { margin: 0; }
.read-archive h2 { font-size: 1.4rem; }
.read-archive ol { margin: 0; padding: 0; list-style: none; }
.read-archive li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.read-archive li span { color: var(--muted); font-size: 0.9rem; }

/* Media in devotionals (share pages and reading page) */
.media { margin: 1.6rem 0; }
.media img, .media video { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #000; }
.media audio { display: block; width: 100%; margin-top: 0.5rem; }
.media-audio { padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--cream); }
.media-label { color: var(--maroon); font: 700 0.78rem/1 var(--body); letter-spacing: 0.15em; text-transform: uppercase; }
.media figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.media .embed { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #000; }
.media .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }

/* Compact header button (share pages) */
.header-inner > .btn { padding: 0.65rem 1.1rem; font-size: 0.88rem; white-space: nowrap; }
