/* ==========================================================================
   Life Chapel — site styles
   Built from the LC-Website Figma file (desktop frames are 1440px wide).
   ========================================================================== */

:root {
  /* LC Brand Colors (named styles in the Figma file) */
  --cream:      #f6f5ee;   /* page background */
  --stone:      #e8e6d9;
  --grey:       #8e8c86;   /* placeholders, secondary text */
  --butter:     #ffe6a6;
  --forest:     #36423a;
  --mist:       #b4d1d3;
  --sky:        #6295b7;
  --navy:       #313b54;
  --charcoal:   #443f3b;   /* primary text, footer */
  --ink:        #3d3b39;   /* logo + FAQ rules */
  --lime:       #e7ea71;
  --olive:      #80844d;
  --rust:       #703e23;
  --orange:     #ff8f43;
  --sand:       #c5bca3;   /* search placeholder */

  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Sentient", Georgia, "Times New Roman", serif;

  --gutter: 60px;
  --track: -0.03em;        /* every text style in the file uses -3% tracking */

  /* Type scale — exact at 1440px, scales down on smaller screens */
  --fs-display: clamp(44px, 6.6667vw, 96px);
  --fs-h2:      clamp(40px, 4.4445vw, 64px);
  --fs-h3:      clamp(24px, 2.2223vw, 32px);
  --fs-body:    20px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-body);
  letter-spacing: var(--track);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.serif {
  font-family: var(--font-serif);
  font-weight: 500;
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: normal;
}

.h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: normal;
}

/* Blank 20px line used between headings and body copy in the mockups */
.gap-line { height: 1.21em; font-size: var(--fs-body); }

/* --------------------------------------------------------------------------
   Buttons (40px pills)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 23px;
  border-radius: 46px;
  border: 0;
  font: inherit;
  font-size: 20px;
  line-height: normal;
  letter-spacing: var(--track);
  white-space: nowrap;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(0.92); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 3px;
}

.btn--navy     { background: var(--navy);     color: var(--cream); }
.btn--olive    { background: var(--olive);    color: var(--cream); }
.btn--lime     { background: var(--lime);     color: var(--charcoal); }
.btn--mist     { background: var(--mist);     color: var(--charcoal); }
.btn--forest   { background: var(--forest);   color: var(--cream); }
.btn--charcoal { background: var(--charcoal); color: var(--cream); }
.btn--rust     { background: var(--rust);     color: var(--cream); }
.btn--orange   { background: var(--orange);   color: var(--charcoal); }
.btn--butter   { background: var(--butter);   color: var(--charcoal); }

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

/* Search pill (440px outlined) */
.search {
  width: 440px;
  max-width: 100%;
  height: 40px;
  padding: 0 23px;
  border: 1px solid var(--grey);
  border-radius: 46px;
  background: transparent;
  color: var(--charcoal);
  font: inherit;
  font-size: 20px;
  letter-spacing: var(--track);
}
.search::placeholder { color: var(--sand); opacity: 1; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  width: 100%;
}
.site-header .logo { padding: 15px 0; }
.site-header .logo img { width: 249.34px; height: 29px; }

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav a:not(.btn) { font-size: 20px; line-height: 0.9; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }

.menu-toggle { display: none; }

/* --------------------------------------------------------------------------
   Heroes
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  height: 1000px;
  padding: 40px var(--gutter);
}
.hero__body {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
  min-height: 0;
}
.hero__title {
  font-size: var(--fs-display);
  line-height: 0.9;
  letter-spacing: var(--track);
}
.hero__title em {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
}

/* Optional background video slot for the home hero (see index.html) */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.hero--has-video { isolation: isolate; }

/* Compact page heading used on Events and Give */
.page-hero {
  display: flex;
  flex-direction: column;
  gap: 37px;
  padding: 40px var(--gutter);
}
.page-hero__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.page-hero__intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lede { max-width: 620px; }

/* --------------------------------------------------------------------------
   Generic content section
   -------------------------------------------------------------------------- */
.section {
  padding: 40px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section--end    { align-items: flex-end; }
.section--end > .h2 { align-self: stretch; }
.section--center { align-items: center; gap: 20px; }

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}

/* Video player box (YouTube). 16:9 so the video fills it edge to edge. */
.embed {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--grey);
  color: var(--cream);
  font-size: 20px;
}
.embed--video { aspect-ratio: 16 / 9; background: var(--charcoal); }
.embed > iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Loading placeholder for data-driven areas (events) */
.loading {
  width: 100%;
  min-height: 325px;
  background: var(--stone);
  animation: pulse 1.6s ease-in-out infinite;
}
.loading--tall { min-height: 800px; }
@keyframes pulse { 50% { opacity: .55; } }

/* Shown when a feed isn't available */
.notice {
  width: 100%;
  min-height: 325px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding: 40px var(--gutter);
  background: var(--stone);
}
.notice p { font-family: var(--font-serif); font-weight: 500; max-width: 620px; }

/* "Live" tag on the Watch page title */
.is-live::before {
  content: "Live";
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  height: 40px;
  padding: 0 18px;
  margin-right: 16px;
  border-radius: 46px;
  background: var(--orange);
  color: var(--charcoal);
  font-size: 20px;
  letter-spacing: var(--track);
  position: relative;
  top: -0.12em;
}
.hero--watch { height: auto; min-height: 1000px; }
.hero--watch .hero__body { flex: 1 0 auto; }

/* --------------------------------------------------------------------------
   Split rows (Time & Place, Connect Classes) — two 50% halves, 450px tall
   -------------------------------------------------------------------------- */
.split {
  display: flex;
  height: 450px;
}
.split > * { flex: 0 0 50%; min-width: 0; }
.split__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px var(--gutter);
}
.split__text--stone    { background: var(--stone); }
.split__text--charcoal { background: var(--charcoal); color: var(--cream); }
.split__text .btn { align-self: flex-start; margin-top: 10px; }
.split__media { position: relative; overflow: hidden; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split .embed { height: 100%; color: #fff; }

/* --------------------------------------------------------------------------
   Map (Time & Place)
   -------------------------------------------------------------------------- */
.map { position: relative; background: var(--cream); }
.map__canvas { position: absolute; inset: 0; }
.map__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 20px;
  transition: opacity .4s ease;
}
.map__fallback .serif { font-size: 20px; }
.map.is-ready .map__fallback { opacity: 0; pointer-events: none; }
.map__directions { position: absolute; left: 24px; bottom: 24px; z-index: 2; }

.map-pin { display: flex; flex-direction: column; align-items: center; cursor: default; }
.map-pin__label {
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: var(--track);
  padding: 8px 16px;
  border-radius: 46px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(68, 63, 59, .25);
}
.map-pin__dot {
  width: 16px;
  height: 16px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--olive);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 0 rgba(128, 132, 77, .55);
  animation: ping 2.2s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(128, 132, 77, .55); }
  80%  { box-shadow: 0 0 0 18px rgba(128, 132, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(128, 132, 77, 0); }
}
.map .maplibregl-ctrl-group { border-radius: 20px; overflow: hidden; box-shadow: 0 4px 14px rgba(68, 63, 59, .18); }
.map .maplibregl-ctrl-attrib { font-family: system-ui, sans-serif; font-weight: 400; letter-spacing: 0; }

/* --------------------------------------------------------------------------
   Color cards with a texture strip on top
   -------------------------------------------------------------------------- */
.cards {
  display: flex;
  height: 441px;
}
.cards--tall { height: 564px; }
.card {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cards--tall .card { gap: 10px; }
.card__img {
  flex: 1 0 0;
  min-height: 0;
  position: relative;
}
.card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__text { padding: 40px var(--gutter); }

.bg-stone    { background: var(--stone);    color: var(--charcoal); }
.bg-butter   { background: var(--butter);   color: var(--charcoal); }
.bg-forest   { background: var(--forest);   color: var(--cream); }
.bg-mist     { background: var(--mist);     color: var(--charcoal); }
.bg-mist-ink { background: var(--mist);     color: var(--ink); }
.bg-sky      { background: var(--sky);      color: var(--cream); }
.bg-navy     { background: var(--navy);     color: var(--cream); }
.bg-lime     { background: var(--lime);     color: var(--charcoal); }

/* --------------------------------------------------------------------------
   Tile grids (sermons, team)
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 30px 20px;
  width: 100%;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tile { display: flex; flex-direction: column; gap: 10px; }
.tile__thumb {
  background: var(--grey);
  width: 100%;
  overflow: hidden;
}
.tile__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile__thumb--sermon { height: 255px; }
.tile__thumb--event  { aspect-ratio: 16 / 9; }
.tile__thumb img { transition: transform .35s ease; }

/* Clickable tiles (sermons play in the player above, events open Church Center) */
.tile--button, .tile--link {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}
.tile--button:hover .tile__thumb img,
.tile--link:hover .tile__thumb img { transform: scale(1.04); }
.tile--button:hover .h3,
.tile--link:hover .h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.tile__thumb--person { height: 250px; }
.tile__meta { color: var(--grey); font-size: 20px; line-height: 22.5px; }
.tile .h3 { line-height: 37.5px; }

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.faq__rule {
  height: 3px;
  background: var(--ink);
  transform: rotate(-0.127deg);
  transform-origin: center;
}
.faq details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  font-size: var(--fs-h3);
  line-height: normal;
}
.faq details > summary::-webkit-details-marker { display: none; }
.faq__chevron { width: 39.6px; height: 19.8px; flex: none; }
.faq__chevron img { width: 41px; height: 23px; max-width: none; margin: -1px 0 0 -0.7px; }
.faq__answer { max-width: 620px; margin-top: 10px; }

/* --------------------------------------------------------------------------
   Footer + oversize outline logo
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  align-items: flex-start;
  padding: 120px var(--gutter);
  background: var(--charcoal);
  color: var(--cream);
}
.site-footer__links {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  font-size: var(--fs-h2);
}
.site-footer__links a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.site-footer__info {
  width: 660px;
  min-height: 308px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 20px;
}
.site-footer__info .serif a:hover,
.site-footer__info .social a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__info .social { display: flex; flex-direction: column; }

.oversize-logo {
  background: var(--charcoal);
  padding-top: 24px;
  overflow: hidden;
}
.oversize-logo img { width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--tall { flex-wrap: wrap; height: auto; }
  .cards--tall .card { flex: 1 1 50%; }
  .cards--tall .card__img { flex: none; height: 192px; }
}

@media (max-width: 960px) {
  :root { --gutter: 32px; }

  .hero { height: auto; min-height: 85svh; }

  .split { flex-direction: column; height: auto; }
  .split__text { padding: 60px var(--gutter); }
  .split > * { flex: none; }
  .split__media, .split .embed, .split .map { height: 360px; }

  .cards { flex-direction: column; height: auto; }
  .cards .card, .cards--tall .card { flex: none; }
  .cards--tall .card { gap: 0; }
  .card__img, .cards--tall .card__img { flex: none; height: 160px; }

  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile__thumb--sermon, .tile__thumb--person { height: auto; aspect-ratio: 433 / 255; }
  .tile__thumb--person { aspect-ratio: 315 / 250; }


  .site-footer { flex-direction: column; gap: 48px; padding: 80px var(--gutter); }
  .site-footer__info { width: 100%; min-height: 0; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }

  .site-header { flex-wrap: wrap; }
  .site-header .logo img { width: 190px; height: auto; }
  .menu-toggle {
    display: inline-flex;
    background: transparent;
    color: var(--charcoal);
    border: 1px solid var(--charcoal);
  }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 16px 0 8px;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { font-size: 28px; }

  .search { width: 100%; }
  .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .faq__answer { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .tile__thumb img { transition: none; }
  .map-pin__dot, .loading { animation: none; }
}

/* Placeholder tiles while sermons load */
.tile--skeleton .tile__thumb,
.tile--skeleton .bar { background: var(--stone); animation: pulse 1.6s ease-in-out infinite; }
.tile--skeleton .bar { display: block; height: 30px; width: 75%; margin-top: 4px; }
.tile--skeleton .bar--short { height: 18px; width: 40%; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .tile--skeleton .tile__thumb, .tile--skeleton .bar { animation: none; } }

[hidden] { display: none !important; }

/* Team: photos, initials placeholder, bios */
.tile__thumb--person img { object-position: center 25%; }
.tile__thumb--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stone);
  color: var(--grey);
  font-size: 64px;
  letter-spacing: var(--track);
}
.tile__bio { font-size: 18px; margin-top: 10px; }

/* MapLibre's own stylesheet sets position:relative on the map container,
   which collapsed the map to zero height. Keep it filling its box. */
.map .map__canvas.maplibregl-map,
.map .map__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.connect-next { font-size: 20px; color: var(--lime); margin-top: 20px; }

/* Give page: keep texture strips equal height when a card has a button */
.cards--give { height: auto; }
.cards--give .card__img { flex: none; height: 133px; }
.card__cta { margin-top: 20px; }
