/* theme.css
   Styles for the provided HTML, using the design tokens defined in base.css.
   Components only reference CSS variables so skins can override them.
*/

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

html:focus-within {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--type-base);
  line-height: var(--leading);
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:where(button, [role='button'], summary, a, input, select, textarea) {
  outline: none;
}

:where(button, [role='button'], summary, a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in oklab, var(--color-primary) 70%, white 30%);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: color-mix(in oklab, var(--color-primary) 25%, black 0%);
  color: white;
}

/* ---------------------------
   Layout helpers
   --------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: calc(var(--gutter));
}

section {
  padding-block: var(--space-5);
}

@media (min-width: 640px) {
  section {
    padding-block: calc(var(--space-5) + var(--space-1));
  }
}

/* ---------------------------
   Hero
   --------------------------- */
.hero {
  position: relative;
  background-color: #0b1220; /* fallback */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
   min-height: clamp(320px, 45vw, 600px);
}

.hero .overlay {
  position: absolute;
  inset: 0;
  
  padding: clamp(var(--space-4), 6vw, var(--space-6));
  display: grid;
  place-items: start center;
  text-align: center;
  
  color: white;
  background: linear-gradient(
      180deg,
      color-mix(in oklab, black 35%, transparent) 0%,
      color-mix(in oklab, black 45%, transparent) 40%,
      color-mix(in oklab, black 55%, transparent) 100%
    ),
    var(--color-footer-overlay);
}

.church-name {
  margin-top: 0;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  font-size: clamp(var(--fs-3xl), 3.2vw + 1rem, var(--fs-6xl));
}

/* ---------------------------
   Intro / Three-column section
   --------------------------- */
.church-description {
  background: var(--color-surface);
}

.church-description .three-column {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

@media (min-width: 880px) {
  .church-description .three-column {
    grid-template-columns: 1fr minmax(240px, 360px) 1fr;
  }
}

.church-description .col.left,
.church-description .col.right,
.church-description .col.center {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.welcome-intro {
  margin: 0;
  font-size: clamp(var(--fs-lg), 1vw + 0.9rem, var(--fs-xl));
  color: var(--color-text);
}

.welcome-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* ---------------------------
   Info list (right column)
   --------------------------- */
.church-info {
  list-style: none;
  margin: 0;
  padding: 1.25rem 1.5rem;
  display: grid;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.06),
    0 24px 48px rgba(2, 6, 23, 0.12);
}

.info-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.875rem;
  align-items: center;
  padding: 0;
}

.icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8; /* blue icons */
  flex-shrink: 0;
}

.icon svg {
  width: 20px;
  height: 20px;
  display: block;
  
}

.info-text {
  font-size: 1.125rem;
  color: #0b1220; /* dark body text */
  line-height: 1.5;
}

.info-text a {
  color: #1d4ed8;
  text-decoration: none;
  word-break: break-word;
}

.info-text a:hover {
  text-decoration: underline;
}

/* Slightly larger address line to match the screenshot */
.church-info .info-item:first-child .info-text {
  font-size: 1.1875rem;
}

/* ---------------------------
   Subheading after hero
   --------------------------- */
.hero-welcome {
  padding-block: var(--space-4);
  margin: var(--space-2);
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--color-primary) 6%, white 94%),
    transparent
  );
}

.church-subheading {
  margin: 0;
  text-align: center;
  font-size: clamp(var(--fs-lg), 0.8vw + 1rem, var(--fs-2xl));
  color: color-mix(in oklab, var(--color-text) 85%, black 15%);
}

/* ---------------------------
   Services & Ministry (details)
   --------------------------- */
.services {
  background: var(--color-surface);
}

.service-info,
.ministry-info {
  width: min(880px, 100%);
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: clip;
  box-shadow: var(--shadow-sm);
  background: color-mix(in oklab, var(--color-surface) 90%, white 10%);
  border: 1px solid rgba(17, 24, 39, 0.06);
}

.service-info + .ministry-info {
  margin-top: var(--space-3);
}

details > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
  font-size: var(--fs-lg);
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--color-primary) 5%, white 95%),
    color-mix(in oklab, var(--color-primary) 3%, white 97%)
  );
  display: flex;
  align-items: center;
  gap: var(--space-2);
  user-select: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  content: '';
  inline-size: 1em;
  block-size: 1em;
  border: 2px solid var(--color-primary);
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
  border-radius: 2px;
  margin-right: var(--space-2);
  transition: transform var(--ease) ease;
}

details[open] > summary::before {
  transform: rotate(135deg);
}

details[open] > summary {
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

details p {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-md);
}

details p + p {
  padding-top: var(--space-1);
}

details strong {
  color: var(--color-primary-strong);
}

/* ---------------------------
   Pastor section
   --------------------------- */
.pastor {
  background: color-mix(in oklab, var(--color-surface) 92%, white 8%);
}

.pastor h2 {
  text-align: center;
  font-size: clamp(var(--fs-2xl), 1.2vw + 1.2rem, var(--fs-4xl));
  margin: 0 0 var(--space-4);
  letter-spacing: 0.2px;
}

.pastor-info {
  width: min(880px, 100%);
  margin-inline: auto;
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  text-align: center;
  padding-inline: var(--gutter);
}

.pastor-info img {
  width: clamp(140px, 20vw, 220px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: var(--shadow-md);
  background: #eee;
}

.pastor-name {
  margin: 0;
  font-size: clamp(var(--fs-xl), 0.8vw + 1.1rem, var(--fs-3xl));
  color: var(--color-text);
}

.pastor-bio {
  margin: 0;
  max-width: 70ch;
  color: color-mix(in oklab, var(--color-text) 80%, black 20%);
  text-align: left;
  font-size: var(--fs-md);
}

/* ---------------------------
   Utilities
   --------------------------- */
.hidden {
  display: none !important;
}

.muted {
  color: var(--color-muted);
}

/* ---------------------------
   Responsive typography tweaks
   --------------------------- */
@media (min-width: 1100px) {
  .welcome-intro {
    font-size: var(--fs-xl);
  }
}

/* ---------------------------
   Motion-reduction
   --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}