/* Casa Massamagrell A.C. — sitio institucional
   Psicología del color: verde (esperanza/crecimiento), teal (confianza/calma),
   ámbar (calidez/dignidad). Regla: img sin object-fit:cover en fotos. */

:root {
  --ink: #10241c;
  --muted: #4f6358;
  --paper: #f4faf6;
  --surface: #ffffff;
  --leaf: #0d8a52;
  --leaf-mid: #17a86a;
  --leaf-deep: #065c36;
  --leaf-soft: #e3f7ec;
  --teal: #0e7c7b;
  --teal-soft: #e0f4f3;
  --gold: #b8891f;
  --gold-bright: #d4a017;
  --gold-soft: #f8efd6;
  --sky: #e8f3fb;
  --line: rgba(16, 36, 28, 0.11);
  --glow-leaf: rgba(13, 138, 82, 0.35);
  --glow-gold: rgba(184, 137, 31, 0.28);
  --max: 1120px;
  --display: "Fredoka", "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --radius: 20px;
  --shadow: 0 22px 55px rgba(16, 36, 28, 0.12);
  --shadow-lift: 0 28px 64px rgba(13, 138, 82, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  background:
    radial-gradient(1100px 560px at 6% -10%, #c8efd9 0%, transparent 58%),
    radial-gradient(900px 500px at 98% 4%, #f3e4b8 0%, transparent 52%),
    radial-gradient(700px 420px at 70% 30%, #d5f0ee 0%, transparent 55%),
    linear-gradient(180deg, #f4faf6 0%, #eaf6f0 38%, #f2f8f5 72%, #f4faf6 100%);
  overflow-x: hidden;
  isolation: isolate;
}

/* Ambiente vivo — orbes suaves (esperanza + calidez + confianza) */
.ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.ambient .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: .45;
  will-change: transform;
}
.orb-a {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, #7ed9a8 0%, transparent 70%);
  animation: orb-drift 18s var(--ease) infinite alternate;
}
.orb-b {
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  top: 22%;
  right: -8%;
  background: radial-gradient(circle, #f0d48a 0%, transparent 70%);
  animation: orb-drift 22s var(--ease) infinite alternate-reverse;
}
.orb-c {
  width: min(36vw, 320px);
  height: min(36vw, 320px);
  bottom: 8%;
  left: 28%;
  background: radial-gradient(circle, #8fd4d2 0%, transparent 70%);
  animation: orb-drift 26s var(--ease) infinite alternate;
}
@keyframes orb-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(36px, 48px, 0) scale(1.12); }
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--leaf-deep), var(--leaf-mid), var(--gold-bright), var(--teal));
  background-size: 200% 100%;
  animation: progress-sheen 4s linear infinite;
  box-shadow: 0 0 12px var(--glow-leaf);
  transition: width .12s linear;
}
@keyframes progress-sheen {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.skip {
  position: absolute;
  left: -999px; top: 0;
  z-index: 100;
  background: #111;
  color: #fff;
  padding: .65rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap {
  width: min(var(--max), calc(100% - 4rem));
  margin-inline: auto;
}

/* —— Header sticky —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem clamp(1.25rem, 3vw, 2rem);
  background: rgba(244, 250, 246, 0.82);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .35s var(--ease), padding .35s var(--ease), background .35s var(--ease);
}
.site-header.is-scrolled {
  box-shadow: 0 12px 36px rgba(16, 36, 28, 0.1);
  padding-block: .7rem;
  background: rgba(255, 255, 255, 0.92);
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-shrink: 0;
  transition: transform .35s var(--ease);
}
.brand:hover { transform: translateY(-1px); }
.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  border: none;
  background: linear-gradient(145deg, var(--leaf-mid), var(--leaf-deep));
  box-shadow: 0 8px 20px var(--glow-leaf);
  transition: transform .4s var(--ease-spring), box-shadow .35s var(--ease);
}
.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 12px 28px var(--glow-leaf);
}
.brand-text { display: flex; flex-direction: column; gap: .1rem; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.2;
}
.brand-sub {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .95rem 1.15rem;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: .88rem;
  position: relative;
  transition: color .25s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 2px;
  background: linear-gradient(90deg, var(--leaf), var(--gold));
  transition: right .35s var(--ease);
  border-radius: 2px;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a.is-active::after { right: 0; }
.nav-cta {
  padding: .55rem 1.1rem !important;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--leaf-mid), var(--leaf-deep));
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 22px var(--glow-leaf);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease), filter .3s var(--ease) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: linear-gradient(135deg, var(--leaf), var(--leaf-deep));
  color: #fff !important;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 30px var(--glow-leaf);
  filter: brightness(1.05);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: .28rem auto;
  background: var(--ink);
  border-radius: 2px;
}

/* —— Hero —— */
.hero {
  padding: clamp(3rem, 8vh, 5.5rem) 0 clamp(4rem, 9vh, 6rem);
}
.hero-inner {
  width: min(var(--max), calc(100% - 4rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.order-line {
  margin: 0 0 1rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--leaf-deep);
  letter-spacing: .02em;
  line-height: 1.45;
}
.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.h1-ac {
  display: inline-block;
  margin-left: .25rem;
  color: var(--gold);
  font-style: italic;
  font-weight: 600;
}
.lema {
  margin: 0 0 1.15rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 600;
  color: var(--leaf-deep);
  line-height: 1.35;
}
.lema em {
  font-style: italic;
  color: var(--gold);
}
.hero-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-bottom: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 1.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease-spring), background .25s var(--ease), box-shadow .3s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn-solid {
  background: linear-gradient(135deg, var(--leaf-mid) 0%, var(--leaf) 45%, var(--leaf-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 32px var(--glow-leaf);
}
.btn-solid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn-solid:hover::before { transform: translateX(120%); }
.btn-solid:hover {
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf-deep) 100%);
  box-shadow: 0 18px 40px var(--glow-leaf);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border: 1.5px solid rgba(13, 138, 82, 0.28);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--leaf);
  color: var(--leaf-deep);
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 36, 28, 0.1);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.hero-stats div {
  padding: 1rem 0 0;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--leaf-mid), var(--gold), transparent) 1;
  transition: transform .35s var(--ease);
}
.hero-stats div:hover { transform: translateY(-3px); }
.hero-stats dt {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--leaf-deep);
  background: linear-gradient(120deg, var(--leaf-deep), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats dd {
  margin: .2rem 0 0;
  font-size: .82rem;
  color: var(--muted);
}

/* Foto circular — sin esfera de texto encima */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-photo-wrap {
  margin: 0;
  text-align: center;
  max-width: 420px;
  width: 100%;
  position: relative;
}
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--leaf-mid), var(--gold-bright), var(--teal), var(--leaf-mid));
  opacity: .55;
  z-index: -1;
  animation: ring-spin 14s linear infinite;
  filter: blur(1px);
}
.hero-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  background: var(--paper);
  z-index: -1;
}
@keyframes ring-spin {
  to { transform: rotate(360deg); }
}
.hero-photo {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.9),
    0 0 0 14px rgba(13, 138, 82, 0.2),
    0 24px 50px rgba(16, 36, 28, 0.18);
  background: var(--leaf-soft);
  animation: hero-float 6s var(--ease) infinite alternate;
}
.hero-photo-caption {
  margin-top: 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}
@keyframes hero-float {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

/* —— Sections —— */
.section {
  padding: clamp(4rem, 10vh, 6.5rem) 0;
  position: relative;
}
.section-soft {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(232, 243, 251, 0.35) 100%);
  backdrop-filter: blur(2px);
}
.section-tint {
  background: linear-gradient(160deg, rgba(227, 247, 236, 0.95) 0%, rgba(224, 244, 243, 0.55) 55%, transparent 100%);
}
.section-req {
  background: linear-gradient(180deg, #eef5f1 0%, transparent 100%);
}

.sec-head {
  margin-bottom: 2.5rem;
  max-width: 46rem;
}
.eyebrow {
  margin: 0 0 .65rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 1.35rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--leaf), var(--gold));
}
.sec-head h2 {
  margin: 0 0 .85rem;
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--ink) 0%, var(--leaf-deep) 55%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.deck {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 0;
}
.about-text p {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 1.08rem;
}
.about-text strong { color: var(--ink); }
.quote-soft {
  margin-top: 1.5rem !important;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  color: var(--ink) !important;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem !important;
}

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}
.services li {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(21, 35, 28, 0.06);
  border: 1px solid var(--line);
}
.services strong {
  display: block;
  margin-bottom: .25rem;
  font-family: var(--display);
  font-size: 1.1rem;
}
.services span {
  color: var(--muted);
  font-size: .95rem;
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.mv-card {
  padding: 2rem 1.75rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.mv-card h3 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.45rem;
  color: var(--leaf-deep);
}
.mv-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}
.help-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.6rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  min-height: 100%;
}
.help-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(21, 35, 28, 0.14);
}
.help-n {
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .75rem;
}
.help-card h3 {
  margin: 0 0 .75rem;
  font-family: var(--display);
  font-size: 1.3rem;
}
.help-card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  flex: 1;
}
.help-go {
  font-weight: 700;
  color: var(--leaf-deep);
  font-size: .95rem;
}
.help-a { border-top: 4px solid var(--leaf); }
.help-b { border-top: 4px solid var(--gold); }
.help-c { border-top: 4px solid #3a8f7a; }

.team-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.team-grid li {
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .3s var(--ease);
}
.team-grid li:hover { transform: translateY(-4px); }
.team-grid h3 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-size: 1.15rem;
}
.team-grid p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

/* Historia */
.story-panel { margin-bottom: 2.75rem; }
.story-panel:last-child { margin-bottom: 0; }
.story-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}
.story-layout.reverse { direction: rtl; }
.story-layout.reverse > * { direction: ltr; }
.year {
  display: inline-block;
  margin-bottom: .65rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--leaf);
}
.story-copy h3 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.25;
}
.story-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.75;
}
.story-copy p:last-child { margin-bottom: 0; }
.story-copy strong { color: var(--ink); }

/* Congregación */
.cong-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  margin-bottom: 1.75rem;
}
.cong-card {
  padding: 1.75rem 1.5rem;
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(21, 35, 28, 0.07);
}
.cong-card h3 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--leaf-deep);
}
.cong-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.7;
}
.cong-card p:last-child { margin-bottom: 0; }
.cong-list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: .95rem;
}
.cong-list li { margin-bottom: .45rem; }

.inline-link, .source-note a {
  color: var(--leaf-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.source-note {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
}

/* Fotos — contain / altura natural — NUNCA cover */
.photo-frame {
  margin: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
}
.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}
.photo-frame figcaption {
  padding: .85rem 1.15rem 1.05rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Sede Puebla */
.sede-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}
.sede-card {
  margin: 0;
  padding: 1.35rem 1.4rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.sede-card h3 {
  margin: 0 0 .85rem;
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
}
.sede-card p {
  margin: 0 0 .75rem;
  color: var(--muted);
  line-height: 1.65;
}
.sede-dl {
  margin: 0 0 1rem;
  display: grid;
  gap: .85rem;
}
.sede-dl dt {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--leaf-deep);
}
.sede-dl dd {
  margin: .2rem 0 0;
  line-height: 1.55;
}
.sede-list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
}
.sede-list li { margin-bottom: .55rem; }

/* Multimedia */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.media-logo-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  background: #fff;
}
.media-logo-card img {
  width: auto;
  max-width: min(280px, 80%);
  height: auto;
  margin: 1.5rem auto 0;
  object-fit: contain;
}
.media-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem;
}

.video-card {
  padding: 1.25rem 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.video-card h3 {
  margin: 0 0 .35rem;
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
}
.media-video {
  display: block;
  width: 100%;
  max-height: min(70vh, 520px);
  margin-top: 1rem;
  border-radius: 12px;
  background: #0d1512;
}

/* Familia Amigoniana */
.familia-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}
.familia-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(21, 35, 28, 0.07);
}
.familia-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: stretch;
}
.familia-card-wide > div {
  padding: 1.5rem 1.4rem 1.6rem;
}
.familia-fig {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dfece6;
}
.familia-card-wide .familia-fig {
  aspect-ratio: auto;
  min-height: 220px;
  height: 100%;
}
.familia-fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.familia-card > h3,
.familia-card > p {
  padding-left: 1.35rem;
  padding-right: 1.35rem;
}
.familia-card > h3 {
  margin: 1.1rem 0 .55rem;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--leaf-deep);
}
.familia-card > p,
.familia-card-wide p {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.7;
}
.familia-card-wide h3 {
  margin: 0 0 .75rem;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--leaf-deep);
}

/* YouTube embeds */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.yt-card {
  padding: .85rem .85rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.yt-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0d1512;
}
.yt-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.yt-card .fine {
  margin: .7rem .15rem 0;
}

.world-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .75fr);
  gap: 1.5rem;
  align-items: stretch;
}
.world-map {
  min-height: 420px;
  height: 52vh;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #dfece6;
  z-index: 1;
}
.pin-normal .pin-dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2f6f4e;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.pin-highlight .pin-star {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c62828;
  border: 3px solid #fff59d;
  box-shadow: 0 0 0 3px rgba(198,40,40,.35), 0 2px 8px rgba(0,0,0,.4);
  animation: pulse-pin 1.8s ease-in-out infinite;
}
@keyframes pulse-pin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Mapa */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr);
  gap: 1.5rem;
  align-items: stretch;
}
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface);
  min-height: 360px;
}
.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
}
.map-aside {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-aside h3 {
  margin: 0 0 .75rem;
  font-family: "Fredoka", sans-serif;
}
.map-aside p {
  margin: 0 0 1rem;
  line-height: 1.6;
  color: var(--muted);
}
.map-actions {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  line-height: 1.8;
}
.map-actions a {
  color: var(--leaf-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fine {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.55;
}

.badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .4rem 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: #d4f5c8;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
}
.req-layout {
  display: grid;
  gap: 1.5rem;
  max-width: 48rem;
}
.req-list, .doc-list {
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}
.req-list li, .doc-list li {
  margin-bottom: .9rem;
  line-height: 1.65;
  color: var(--muted);
}
.req-list strong, .doc-list strong { color: var(--ink); }
.req-layout h3 {
  margin: 0 0 .9rem;
  font-family: var(--display);
  font-size: 1.25rem;
}

.press-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.press-row li {
  padding: 1.6rem 1.4rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(21, 35, 28, 0.06);
  transition: transform .3s var(--ease);
}
.press-row li:hover { transform: translateY(-4px); }
.press-row small {
  display: block;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .68rem;
  color: var(--muted);
  margin-bottom: .35rem;
}
.press-row strong {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
  margin-bottom: .2rem;
}
.press-row span { color: var(--muted); font-size: .92rem; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.contact-grid article {
  padding: 1.85rem 1.6rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease);
}
.contact-grid article:hover { transform: translateY(-4px); }
.contact-grid h3 {
  margin: 0 0 .7rem;
  font-family: var(--display);
  font-size: 1.2rem;
}
.contact-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.contact-grid a {
  color: var(--leaf-deep);
  font-weight: 700;
}
.contact-grid strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.site-footer {
  padding: 3.25rem 0 3.75rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-row p { margin: .35rem 0 0; }
.fine { color: var(--muted); font-size: .92rem; }
.fine code {
  font-size: .85em;
  background: var(--leaf-soft);
  padding: .1rem .35rem;
  border-radius: 4px;
}

/* —— Animaciones e interactividad —— */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity .9s var(--ease),
    transform .9s var(--ease),
    filter .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.tilt-card {
  transform-style: preserve-3d;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  will-change: transform;
}

.interactive-card {
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .35s var(--ease);
}
.interactive-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(13, 138, 82, 0.28);
}

.photo-frame {
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.photo-frame:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-lift);
}

.help-card,
.mv-card,
.sede-card,
.cong-card,
.familia-card,
.yt-card,
.video-card,
.contact-grid article,
.press-row li {
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .35s var(--ease);
}
.help-card:hover,
.mv-card:hover,
.sede-card:hover,
.cong-card:hover,
.familia-card:hover,
.yt-card:hover,
.video-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lift);
}

.back-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  background: linear-gradient(145deg, var(--leaf-mid), var(--leaf-deep));
  box-shadow: 0 12px 28px var(--glow-leaf);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s, filter .25s;
}
.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-top:hover {
  filter: brightness(1.08);
  transform: translateY(-3px) scale(1.05);
}

.gbp-blurb {
  margin-top: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  font-size: 1rem;
}

/* FAQ — SEO local (casa hogar Puebla / Massamagrell) */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 52rem;
  margin: 0 auto;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  padding: 0.85rem 1.15rem;
  box-shadow: 0 10px 28px rgba(16, 36, 28, 0.06);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--sans);
  color: var(--leaf-deep);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--teal);
  font-weight: 700;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  margin: 0.75rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.98rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo,
  .hero-photo-wrap::before,
  .ambient .orb,
  .scroll-progress { animation: none !important; }
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .scroll-progress { display: none; }
  .back-top { transition: none; }
}

@media (max-width: 980px) {
  .hero-inner,
  .about-grid,
  .mv-grid,
  .help-grid,
  .team-grid,
  .press-row,
  .contact-grid,
  .cong-grid,
  .story-layout,
  .gallery-grid,
  .sede-grid,
  .media-grid,
  .familia-grid,
  .yt-grid,
  .map-layout,
  .world-map-layout {
    grid-template-columns: 1fr;
  }
  .familia-card-wide {
    grid-template-columns: 1fr;
  }
  .story-layout.reverse { direction: ltr; }
  .hero-stats { grid-template-columns: 1fr; gap: .5rem; }
  .site-nav { gap: .75rem 1rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.15rem 1.5rem 1.5rem;
    background: rgba(247, 250, 247, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
}

@media (max-width: 760px) {
  .wrap, .hero-inner { width: min(var(--max), calc(100% - 2.25rem)); }
  .section { padding: clamp(3.5rem, 9vh, 5rem) 0; }
  .hero-photo { max-width: 300px; }
}
