/* Asamblea de Dios Quilpué — diseño tradicional y sobrio.
   Paleta tomada del templo: bordó de las sillas y el altar, dorado de la madera del púlpito y los paneles,
   marfil de los muros. Motivo: el arco ojival de los paneles y del púlpito. */
:root {
  --ivory: #faf7f1;
  --paper: #fffdf9;
  --tint: #f3ece0;
  --line: #e2d6c2;
  --ink: #231c19;
  --soft: #5d524b;
  --wine: #7d1a28;
  --wine-deep: #5b111d;
  --gold: #a87a26;        /* dorado para texto sobre claro (contraste suficiente en tamaños grandes) */
  --gold-light: #e3bd62;  /* dorado para fondos oscuros */
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 125' preserveAspectRatio='none'%3E%3Cpath d='M0 125V46C0 21 22 5 50 0c28 5 50 21 50 46v79z'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--ivory);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--wine); text-underline-offset: 3px; }
a:hover { color: var(--wine-deep); }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--wine) 22%, transparent); }

.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--wine); color: #fff; padding: .6rem 1rem; border-radius: 4px;
}
.skip:focus { top: 1rem; }

/* Contenido provisional: se ve a propósito para no olvidarlo */
mark.tbd {
  background: #fff4cf; color: #6b4d00; border: 1px dashed #c9a13c;
  padding: 0 .3em; border-radius: 3px; font-size: .9em; font-family: var(--sans);
}

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.45rem; }
h1 em, h2 em { font-style: italic; color: var(--wine); }

.kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: .75rem;
}
.kicker::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; }

.lede { font-size: 1.2rem; color: var(--soft); max-width: 34rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.5rem; border-radius: 3px; border: 1px solid var(--wine);
  background: var(--wine); color: #fff; font-weight: 600; text-decoration: none; letter-spacing: .01em;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--wine-deep); border-color: var(--wine-deep); color: #fff; }
.btn-small { min-height: 2.5rem; padding: .45rem 1.1rem; }
.btn-ghost { background: transparent; color: var(--wine); }
.btn-ghost:hover { background: var(--wine); color: #fff; }
.btn-gold { background: var(--gold-light); border-color: var(--gold-light); color: var(--wine-deep); }
.btn-gold:hover { background: #f0cf7e; border-color: #f0cf7e; color: var(--wine-deep); }
.btn-outline-light { background: transparent; border-color: rgb(255 255 255 / .55); color: #fff; }
.btn-outline-light:hover { background: rgb(255 255 255 / .1); border-color: #fff; color: #fff; }

/* ---------- Franja superior y encabezado ---------- */
.topbar { background: var(--wine-deep); color: #f6e9d0; font-size: .9rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; }
.topbar .dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold-light); margin-right: .35rem; vertical-align: middle; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 2.1rem; height: auto; fill: var(--wine); }
.brand-mark .cross { fill: var(--gold-light); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand-place { font-size: .72rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; padding-block: .4rem; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { color: var(--wine); border-bottom-color: var(--gold-light); }

.menu-toggle { display: none; }

@media (max-width: 860px) {
  .topbar-address { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .55rem; background: none; border: 1px solid var(--line);
    border-radius: 3px; padding: .55rem .8rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 1.1rem; height: 2px; background: var(--ink); position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; }
  .menu-bars::after { top: 6px; }
  .nav {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem 1rem 1.25rem;
    box-shadow: 0 18px 30px -18px rgb(35 28 25 / .35);
  }
  .nav a:not(.btn) { padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; }
  .js .nav:not(.open) { display: none; }
}

/* ---------- Portada ---------- */
.hero { background: linear-gradient(180deg, var(--paper) 0%, var(--ivory) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem); }
.hero-text > * + * { margin-top: 1.25rem; }
.verse { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--soft); border-left: 2px solid var(--gold-light); padding-left: 1rem; max-width: 32rem; }
.verse cite { display: block; font-style: normal; font-family: var(--sans); font-size: .85rem; font-weight: 600; letter-spacing: .06em; color: var(--gold); margin-top: .25rem; }

.hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: .5rem 2.25rem; padding-block: 1.25rem; border-block: 1px solid var(--line); }
.hero-facts dt { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.hero-facts dd { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .5rem; }

.hero-photo { position: relative; max-width: 440px; justify-self: center; width: 100%; }
.hero-photo::before {
  content: ""; position: absolute; inset: -14px -14px 20px 14px; z-index: 0;
  background: var(--gold-light); opacity: .55;
  -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat;
}
.arch { position: relative; z-index: 1; aspect-ratio: 4 / 5; -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-photo figcaption { position: relative; z-index: 1; text-align: center; margin-top: .9rem; font-size: .9rem; color: var(--soft); font-style: italic; font-family: var(--serif); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { max-width: 320px; }  /* en celular primero el texto y los horarios; la foto después */
  .hero-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .hero-facts { grid-template-columns: 1fr; } }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--tint); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 2.5rem; max-width: 42rem; }
.section-head > * + * { margin-top: .75rem; }
.section-lede { color: var(--soft); font-size: 1.1rem; }

/* Ornamento bajo los títulos: una cruz pequeña entre dos líneas finas */
.section-head h2::after {
  content: "✝"; display: block; width: 6.5rem; height: 14px; margin-top: 1rem;
  font-family: var(--sans); font-size: .8rem; line-height: 14px; text-align: center; color: var(--gold-light);
  background:
    linear-gradient(var(--gold-light), var(--gold-light)) left center / 2.4rem 1px no-repeat,
    linear-gradient(var(--gold-light), var(--gold-light)) right center / 2.4rem 1px no-repeat;
}

/* Primera visita */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; counter-reset: paso; }
.steps li { counter-increment: paso; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--wine); padding: 1.5rem; border-radius: 2px; }
.steps li::before { content: counter(paso, upper-roman); display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--gold); margin-bottom: .35rem; }
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--soft); }

/* Horarios */
.schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.day { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 1.5rem; position: relative; }
.day h3 { padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px solid var(--line); }
.day ul { list-style: none; display: grid; gap: .6rem; }
.day li { display: grid; grid-template-columns: 3.6rem 1fr; gap: .75rem; align-items: baseline; }
.time { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--wine); font-variant-numeric: tabular-nums; }
.day small { color: var(--soft); }
.day.today { border-color: var(--wine); box-shadow: inset 0 3px 0 var(--wine); }
.day.today::after {
  content: "Hoy"; position: absolute; top: 1.35rem; right: 1.25rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--wine); color: #fff; padding: .15rem .55rem; border-radius: 2px;
}
.note { margin-top: 1.5rem; color: var(--soft); font-size: .95rem; }

/* Nosotros */
.about { display: grid; grid-template-columns: 1.4fr .8fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-text > p + p { margin-top: 1rem; }
.about-text > p { max-width: 38rem; }
.pastor-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 2rem 1.75rem; text-align: center; position: relative;
}
.pastor-card::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.pastor-photo { width: 4.5rem; margin: 0 auto 1rem; }
.pastor-photo svg { fill: var(--wine); }
.pastor-photo .cross { fill: var(--gold-light); }
.pastor-role { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pastor-name { font-family: var(--serif); font-size: 1.65rem; line-height: 1.2; margin-top: .2rem; }
.pastor-note { color: var(--soft); font-size: .95rem; margin-top: .75rem; }

/* Lo que creemos: 16 verdades fundamentales, desplegables */
.beliefs { margin-top: clamp(3rem, 6vw, 4.5rem); }
.beliefs-head { margin-bottom: 1.5rem; }
.beliefs-head h3 { font-size: clamp(1.7rem, 3vw, 2.1rem); }
.beliefs-head p { color: var(--soft); margin-top: .35rem; }
.truths { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; border-top: 1px solid var(--line); }
.truths li { border-bottom: 1px solid var(--line); }
.truths summary {
  display: flex; align-items: baseline; gap: .9rem; padding: .9rem .25rem; cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.3;
}
.truths summary::-webkit-details-marker { display: none; }
.truths summary::after { content: "+"; margin-left: auto; font-family: var(--sans); color: var(--wine); font-weight: 600; }
.truths details[open] summary::after { content: "−"; }
.truths summary:hover { color: var(--wine); }
.truths .num { font-family: var(--sans); font-size: .8rem; font-weight: 700; color: var(--gold); min-width: 1.4rem; font-variant-numeric: tabular-nums; }
.truths details p { padding: 0 .25rem 1rem 2.55rem; color: var(--soft); }
@media (max-width: 760px) { .truths { grid-template-columns: 1fr; } }

.directions { color: var(--soft); }
.directions strong { color: var(--ink); font-weight: 600; }
.contact-note a { color: #fff; }

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

/* Ministerios */
.ministries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 860px) { .ministries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ministries { grid-template-columns: 1fr; } }
.ministry { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 1.6rem 1.5rem 1.4rem; display: flex; flex-direction: column; }
.ministry h3 { margin-bottom: .5rem; }
.ministry p { color: var(--soft); }
.ministry .when { margin-top: auto; padding-top: 1rem; font-weight: 700; font-size: .9rem; letter-spacing: .04em; color: var(--wine); }

/* En vivo */
.live { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.live > div > p { max-width: 32rem; color: var(--soft); font-size: 1.1rem; }
.socials { list-style: none; display: grid; gap: .75rem; }
.social {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.35rem; background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
  text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s;
}
.social:hover { border-color: var(--wine); color: var(--ink); transform: translateX(3px); }
.social-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.social-name::after { content: " →"; color: var(--wine); }
.social-note { color: var(--soft); font-size: .95rem; }
@media (max-width: 860px) { .live { grid-template-columns: 1fr; } }

/* Contacto */
.section-wine { background: var(--wine); color: #f8ecd6; }
.section-wine h2 { color: #fff; }
.section-wine h2 em { color: var(--gold-light); }
.section-wine .kicker { color: var(--gold-light); }
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.contact > div > * + * { margin-top: 1rem; }
.contact > div > p { max-width: 34rem; font-size: 1.12rem; }
.contact-actions { display: grid; gap: .75rem; }
.contact-note { font-size: .9rem; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Ubicación */
.location { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.location-info > * + * { margin-top: 1rem; }
address { font-style: normal; font-family: var(--serif); font-size: 1.6rem; line-height: 1.3; }
.map { border: 1px solid var(--line); padding: 6px; background: var(--paper); }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }
@media (max-width: 860px) { .location { grid-template-columns: 1fr; } .map iframe { height: 300px; } }

/* ---------- Pie ---------- */
.site-footer { background: #1f1715; color: #d9ccb8; padding-top: 3rem; font-size: .95rem; }
.site-footer a { color: var(--gold-light); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-bottom: 2.5rem; }
.footer-brand { font-family: var(--serif); font-size: 1.35rem; color: #fff; margin-bottom: .35rem; }
.footer-title { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: .35rem; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .12); padding-block: 1.25rem; font-size: .85rem; color: #a99b87; }

/* ---------- Scroll por bloques ----------
   «proximity»: al soltar el scroll cerca del inicio de una sección, la página se acomoda a ella; si la sección es más
   alta que la pantalla (Lo que creemos, Ministerios) se puede leer libremente. Solo en pantallas grandes: en celular
   el acomodo automático molesta al leer. */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  html { scroll-snap-type: y proximity; }
  /* El primer bloque es el tope de la página (franja de la próxima reunión incluida), no la portada:
     alinear la portada bajo el menú fijo dejaba la franja cortada. */
  .topbar, .section { scroll-snap-align: start; }
  .site-footer { scroll-snap-align: end; }
}
