/* =====================================================
   AVIVA Comunidad de Fe — Sistema de diseño
   Identidad: negro/blanco puro, tipografía geométrica
   ===================================================== */

:root {
  /* Color */
  --black: #000000;
  --ink: #0a0a0a;
  --graphite: #161616;
  --steel: #2a2a2a;
  --smoke: #4a4a4a;
  --silver: #8a8a8a;
  --bone: #e9e7e2;
  --paper: #f5f3ee;
  --white: #ffffff;
  --line: rgba(255,255,255,0.12);
  --line-dark: rgba(0,0,0,0.12);

  /* Typography */
  --display: 'Outfit', 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body: 'Manrope', 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5rem, 10vw, 9rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; transition: opacity .25s var(--ease); }
a:hover { opacity: .65; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--smoke);
}
.eyebrow.on-dark { color: var(--silver); }

.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
  text-transform: lowercase;
}
.display--xxl { font-size: clamp(3.5rem, 14vw, 12rem); }
.display--xl  { font-size: clamp(3rem, 10vw, 8.5rem); }
.display--l   { font-size: clamp(2.5rem, 7vw, 5.5rem); }
.display--m   { font-size: clamp(2rem, 5vw, 3.75rem); }
.display--s   { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.55;
  color: var(--steel);
  max-width: 60ch;
}
.lede.on-dark { color: var(--bone); }

p { max-width: 70ch; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--dark { background: var(--ink); color: var(--white); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--bone { background: var(--bone); color: var(--ink); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--split {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (min-width: 900px) {
  .grid--split { grid-template-columns: 1fr 1fr; }
  .grid--split-asym { grid-template-columns: 5fr 7fr; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav--on-dark { color: var(--white); }
.nav--on-light { color: var(--ink); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.04em;
  line-height: 1;
}
.nav__brand svg { width: 90px; height: auto; }
.nav__menu {
  display: none;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.25rem);
}
@media (min-width: 1024px) {
  .nav__menu { display: flex; }
}
.nav__link {
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
  position: relative;
}
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: currentColor;
}
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.25rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.nav__cta:hover { opacity: 1; background: currentColor; color: var(--ink); }
.nav--on-dark .nav__cta:hover { color: var(--ink); background: var(--white); }
.nav--on-light .nav__cta:hover { color: var(--white); background: var(--ink); }

.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.92);
  color: var(--white);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav.is-scrolled.nav--on-light {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border-bottom-color: var(--line-dark);
}

/* Toggle (hamburguesa) — solo móvil y tablet (<1024px) */
.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  margin-right: -10px;
}
@media (min-width: 1024px) {
  .nav__toggle { display: none; }
}
.nav__toggle span {
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__drawer {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--white);
  padding: 6rem var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transform: translateY(-100%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: transform .45s var(--ease), opacity .3s var(--ease), visibility 0s linear .45s;
  z-index: 49;
}
.nav__drawer.is-open {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: transform .45s var(--ease), opacity .3s var(--ease), visibility 0s linear 0s;
}
@media (min-width: 1024px) {
  .nav__drawer { display: none; }
}
.nav__drawer a {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  text-transform: lowercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: 1.05rem 1.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { opacity: 1; transform: translateY(-2px); }
.btn--solid     { background: var(--ink); color: var(--white); }
.btn--solid:hover { background: var(--graphite); }
.btn--invert    { background: var(--white); color: var(--ink); }
.btn--invert:hover { background: var(--bone); }
.btn--ghost     { border-color: currentColor; }
.btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--ghost.on-dark:hover { color: var(--ink); background: var(--white); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: clamp(7rem, 14vw, 12rem) clamp(3rem, 6vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__grain {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.06), transparent 45%),
    radial-gradient(circle at 82% 88%, rgba(255,255,255,0.04), transparent 50%);
  pointer-events: none;
  z-index: -1;
}
.hero__lockup { display: flex; flex-direction: column; gap: .25em; }
.hero__lockup .display { display: block; }
.hero__lockup .accent { color: var(--silver); }
.hero__meta {
  display: grid;
  gap: 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 800px) {
  .hero__meta { grid-template-columns: 5fr 4fr 3fr; align-items: end; }
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: var(--gutter);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--silver);
  display: inline-flex;
  align-items: center;
  gap: .8rem;
}
.hero__scroll::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* ---------- Service cards (signature module) ---------- */
.service-stack {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  background: var(--ink);
  align-items: center;
}
@media (min-width: 800px) {
  .service { grid-template-columns: 4fr 6fr 2fr; gap: 2rem; }
}
.service__day {
  font-family: var(--display);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  text-transform: lowercase;
}
.service__time { color: var(--silver); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
.service__name { font-size: 1.05rem; color: var(--bone); max-width: 38ch; }
.service__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--silver);
}
.service__cta:hover { color: var(--white); }

/* ---------- Big quote ---------- */
.quote {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
  text-transform: lowercase;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
}
.quote__cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--body);
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--smoke);
  font-weight: 500;
}

/* ---------- Pillars / value cards ---------- */
.pillar {
  border-top: 1px solid var(--line-dark);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.section--dark .pillar { border-color: var(--line); }
.pillar__num {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--smoke);
}
.section--dark .pillar__num { color: var(--silver); }
.pillar__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.pillar__text {
  color: var(--smoke);
  font-size: 1rem;
}
.section--dark .pillar__text { color: var(--bone); }

/* ---------- Type block (graphic element) ---------- */
.typeblock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.04em;
  text-transform: lowercase;
  line-height: .85;
  font-size: clamp(3rem, 11vw, 9rem);
}
.typeblock span {
  padding: .15em .25em;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 1.4em;
}
.section--dark .typeblock span { border-color: var(--line); }
.section--paper .typeblock span,
.section--bone .typeblock span { border-color: var(--line-dark); }
.typeblock span.invert { background: var(--white); color: var(--ink); }
.section--dark .typeblock span.invert { background: var(--white); color: var(--ink); }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  background: var(--ink);
  color: var(--white);
  padding: clamp(8rem, 14vw, 12rem) 0 clamp(4rem, 7vw, 7rem);
  position: relative;
  overflow: hidden;
}
.page-header__crumbs {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 1.5rem;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.page-header__crumbs span { color: var(--smoke); }
.page-header__title {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .95;
  text-transform: lowercase;
}
.page-header__lede {
  margin-top: 1.5rem;
  max-width: 60ch;
  color: var(--bone);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
}

/* ---------- Pastor card ---------- */
.pastors {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 800px) { .pastors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pastor {
  border: 1px solid var(--line-dark);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}
.section--dark .pastor { border-color: var(--line); }
.pastor__role {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--smoke);
}
.section--dark .pastor__role { color: var(--silver); }
.pastor__name {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
}
.pastor__bio { color: var(--smoke); }
.section--dark .pastor__bio { color: var(--bone); }

/* ---------- Form ---------- */
.form { display: grid; gap: 1.5rem; max-width: 640px; }
.form__field { display: flex; flex-direction: column; gap: .5rem; }
.form__label {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--smoke);
  font-weight: 600;
}
.section--dark .form__label { color: var(--silver); }
.form__input,
.form__textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: .75rem 0;
  font-size: 1.05rem;
  color: inherit;
  outline: none;
  width: 100%;
  border-radius: 0;
  transition: border-color .25s var(--ease);
}
.form__input:focus,
.form__textarea:focus { border-bottom-color: var(--silver); }
.form__textarea { min-height: 140px; resize: vertical; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--white);
  padding-top: clamp(4rem, 7vw, 6rem);
  padding-bottom: 2rem;
}
.footer__top {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: clamp(3rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) {
  .footer__top { grid-template-columns: 6fr 3fr 3fr; }
}
.footer__brand {
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: -.04em;
  text-transform: lowercase;
  line-height: .9;
}
.footer__col h4 {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer__col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer__bottom {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: end;
  font-size: .82rem;
  color: var(--silver);
}
.footer__legal { display: flex; flex-direction: column; gap: .35rem; }
.footer__credits { color: var(--silver); }
.footer__credits a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--smoke);
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
.footer__credits a:hover { opacity: 1; color: var(--white); text-decoration-color: var(--white); }
.footer__credits a strong { color: var(--white); font-weight: 600; }
.footer__social { display: flex; gap: 1.25rem; }
.footer__social a {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.footer__social a:hover { opacity: 1; background: var(--white); color: var(--ink); border-color: var(--white); }
.footer__social svg { width: 16px; height: 16px; }

/* ---------- Utilities ---------- */
.u-mt-s { margin-top: 1rem; }
.u-mt-m { margin-top: 2rem; }
.u-mt-l { margin-top: 3rem; }
.u-mb-s { margin-bottom: 1rem; }
.u-mb-m { margin-bottom: 2rem; }
.u-mb-l { margin-bottom: 3rem; }
.u-center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.divider {
  height: 1px;
  background: var(--line-dark);
  margin-block: clamp(2rem, 4vw, 4rem);
}
.section--dark .divider { background: var(--line); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Map block ---------- */
.map {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  background: var(--steel);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--ink);
  color: var(--white);
  padding-block: 1.25rem;
}
.marquee__track {
  display: flex;
  gap: 3rem;
  animation: marquee 32s linear infinite;
  white-space: nowrap;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: -.02em;
}
.marquee__track span { padding-right: 3rem; border-right: 1px solid var(--line); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Selection ---------- */
::selection { background: var(--ink); color: var(--white); }

/* ---------- Print ---------- */
@media print {
  .nav, .footer, .marquee, .hero__scroll { display: none; }
  body { color: #000; background: #fff; }
}
