/* Mission Possible — minimal agent-for-Jesus theme */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=IBM+Plex+Mono:wght@400;500&family=Oswald:wght@500;600;700&display=swap");

:root {
  --red: #f80810;
  --red-dark: #c41019;
  --ink: #111111;
  --paper: #fafaf8;
  --paper-alt: #f3f2ef;
  --muted: #5c5c5c;
  --border: #d8d6d0;
  --max: 68rem;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 4px;
  --shadow: 0 1px 3px rgb(17 17 17 / 6%);
  --page-pad: 1.5rem;
  --site-gutter: var(--page-pad);
}

@media (max-width: 768px) {
  :root {
    /* One gutter everywhere — hero, prose, and carousel borders share the same edge */
    --page-pad: 2.5rem;
    --site-gutter: var(--page-pad);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--red-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--red);
}

:focus-visible {
  outline: 2px solid var(--red-dark);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  border-bottom: 1px dashed var(--border);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: max(var(--site-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--site-gutter), env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: block;
  line-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(100% - 3.5rem);
}

.logo-link img {
  height: 2.25rem;
  width: auto;
  max-width: 100%;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.site-nav a[aria-current="page"] {
  color: var(--red-dark);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px dashed var(--border);
    padding-left: max(var(--site-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--site-gutter), env(safe-area-inset-right, 0px));
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .site-nav.is-open {
    max-height: 16rem;
    padding-bottom: 1rem;
  }

  .site-nav ul {
    flex-direction: column;
    padding-top: 0.75rem;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

/* Layout */
main {
  min-height: 50vh;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--site-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--site-gutter), env(safe-area-inset-right, 0px));
}

.section {
  padding: 3.5rem 0;
}

.section--alt {
  background: var(--paper-alt);
  border-block: 1px dashed var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

/* Hero — same .section > .container pattern as other section--alt blocks */
.hero.section {
  padding: 3rem 0 4rem;
  text-align: center;
}

.hero .logo-link img {
  height: clamp(2.5rem, 8vw, 3.75rem);
  margin: 0 auto 1.5rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  max-width: 28rem;
  margin: 0 auto 1rem;
}

.hero-desc {
  max-width: 32rem;
  margin: 0 auto 2rem;
  color: var(--muted);
  text-wrap: pretty;
}

@media (max-width: 768px) {
  /* Keep spaced headings inside the same column as the carousel frame */
  .container,
  .header-inner,
  .footer-inner,
  .cta-band {
    overflow-x: clip;
  }

  .hero-tagline,
  .hero-desc,
  .lead,
  .prose {
    max-width: 100%;
  }

  .carousel {
    width: 100%;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 600;
}

.btn--primary {
  background: var(--red-dark);
  color: #fff;
}

.btn--primary:hover {
  background: var(--red);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--red-dark);
  color: var(--red-dark);
}

/* Carousel */
.carousel {
  position: relative;
  max-width: 40rem;
  margin: 0 auto;
}

.carousel-viewport {
  overflow: hidden;
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  padding: 2rem 1.75rem;
  min-height: 10rem;
}

.carousel-slide blockquote {
  margin: 0;
  font-size: 1.05rem;
  font-style: italic;
}

.carousel-slide cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red-dark);
}

.carousel--photo .carousel-slide {
  padding: 0;
  min-height: auto;
}

.carousel--photo figure {
  margin: 0;
}

.carousel--photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.carousel--photo figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px dashed var(--border);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.carousel-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.carousel-btn:hover {
  border-color: var(--red-dark);
  color: var(--red-dark);
}

.carousel-dots {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
}

.carousel-dots button[aria-selected="true"] {
  background: var(--red-dark);
}

/* Steps */
.steps {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  padding: 1.25rem;
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: var(--radius);
}

.step-card .section-label {
  color: var(--red-dark);
}

/* Quotes */
.quotes {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .quotes {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-card {
  padding: 1.5rem;
  border-left: 3px solid var(--red);
  background: #fff;
  margin: 0;
}

.quote-card p {
  margin: 0 0 0.75rem;
}

.quote-card footer {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* Mission cards */
.mission-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .mission-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mission-card {
  padding: 1.35rem;
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: var(--radius);
}

.mission-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.mission-card .verse {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--red-dark);
}

/* Events */
.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-item {
  padding: 1.25rem;
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: var(--radius);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.form-card {
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.form-card iframe {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
}

.contact-details dl {
  margin: 0;
}

.contact-details dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1rem;
}

.contact-details dt:first-child {
  margin-top: 0;
}

.contact-details dd {
  margin: 0.25rem 0 0;
}

.todo-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Page header — same .section > .container pattern as section--alt blocks */
.page-header.section {
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
}

.page-header .lead {
  margin-bottom: 0;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
  padding-left: max(var(--site-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--site-gutter), env(safe-area-inset-right, 0px));
  background: var(--ink);
  color: #fff;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgb(255 255 255 / 78%);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.cta-band .btn--primary {
  background: var(--red);
}

.cta-band .btn--secondary {
  border-color: #fff;
  color: #fff;
}

.cta-band .btn--secondary:hover {
  border-color: var(--red);
}

/* Footer */
.site-footer {
  border-top: 1px dashed var(--border);
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--site-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--site-gutter), env(safe-area-inset-right, 0px));
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-inner a {
  color: var(--muted);
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
