/* =====================================================================
   COMPONENTS — nav, buttons, cards, forms, banners, footer
   ===================================================================== */

/* ===== Site header / nav ===== */

.site-header {
  background: var(--color-primary-dark);
  color: var(--color-text-on-teal);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text-on-teal);
  flex-shrink: 0;
}

.site-header__brand:hover,
.site-header__brand:focus-visible {
  color: var(--color-text-on-teal);
  text-decoration: none;
}

.site-header__brand svg,
.site-header__brand img {
  height: 44px;
  width: auto;
}

/* Mobile nav toggle */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  /* The drawer (.site-nav) covers the full viewport when open, including
     the header. Lift the toggle above it so its X-shaped open state stays
     visible and tappable — otherwise the user has to click a nav link or
     hit Escape to close. */
  position: relative;
  z-index: 60;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-on-teal);
  transition: transform 250ms ease, opacity 150ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main nav — mobile drawer by default, inline on desktop */
.site-nav {
  position: fixed;
  inset: 0;
  background: var(--color-primary-dark);
  padding: var(--space-10) var(--gutter) var(--space-7);
  display: flex;
  transform: translateX(100%);
  /* Visibility flip is delayed to match the slide-out; on open it
     flips immediately so the drawer is interactive as it animates in. */
  transition: transform 250ms ease, visibility 0s 250ms;
  visibility: hidden;
  /* Short viewports (iPhone SE, landscape phones) can't fit all nav
     items between the top and bottom padding, so the last items get
     cropped. Allow vertical scroll inside the drawer. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.site-nav[data-open="true"] {
  transform: translateX(0);
  visibility: visible;
  transition: transform 250ms ease, visibility 0s 0s;
}

.site-nav__list {
  list-style: none;
  padding: 0;
  margin: auto 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.site-nav__list li + li { margin-top: 0; }

.site-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  letter-spacing: 0.02em;
  color: var(--color-text-on-teal);
  text-decoration: none;
  padding: var(--space-4);
  min-height: 44px;
  border-radius: var(--radius-sm);
  transition: background 150ms ease;
}

/* Chevron on the right of each mobile nav row. Warm gold ties into the
   hover accent system. Desktop overrides content to empty (see the
   @media block below) so the chevron never renders inline. */
.site-nav__link::after {
  content: "›";
  color: var(--color-accent-warm);
  font-weight: 400;
  font-size: 1.3em;
  line-height: 1;
  flex-shrink: 0;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-on-teal);
  text-decoration: none;
}

.site-nav__link[aria-current="page"] {
  font-weight: 700;
  background: rgba(232, 181, 71, 0.16);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  /* "Inicio" is a mobile-only row — on desktop the logo returns home. */
  .site-nav__item--home { display: none; }

  /* Desktop header switches to a 3-column grid so the nav sits at the
     true horizontal center of the container, with the logo on the left
     and a matching empty column on the right to balance it. Flex with
     justify-content: space-between (the mobile default) hugs the nav to
     the right edge, which reads as visually right-biased. */
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .site-header__brand {
    grid-column: 1;
    justify-self: start;
  }
  .site-nav {
    grid-column: 2;
    justify-self: center;
    position: static;
    padding: 0;
    background: transparent;
    transform: none;
    visibility: visible;
  }
  .site-nav__list {
    flex-direction: row;
    gap: var(--space-6);
    margin: 0;
  }
  .site-nav__link {
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    /* Override mobile all-side padding + min-height so the desktop
       links pack tightly with the nav's own flex gap. */
    padding: var(--space-2) 0;
    min-height: 0;
    background: transparent;
    border-radius: 0;
    position: relative;
  }
  .site-nav__link:hover,
  .site-nav__link:focus-visible,
  .site-nav__link[aria-current="page"] {
    background: transparent;
  }
  .site-nav__link::after {
    /* Reset mobile chevron: empty content, absolute-positioned 2px
       line along the bottom (the desktop underline animation). */
    content: "";
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: normal;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--transition-med);
  }
  .site-nav__link:hover::after,
  .site-nav__link:focus-visible::after {
    transform: scaleX(1);
    background: var(--color-accent-warm);
  }
  .site-nav__link[aria-current="page"]::after {
    transform: scaleX(1);
    /* current-page underline stays white to distinguish from hover state */
  }
  .site-nav__link:hover,
  .site-nav__link:focus-visible,
  .site-nav__link[aria-current="page"] {
    text-decoration: none;
  }
}

/* Prevent body scroll while mobile nav is open */
body.nav-open {
  overflow: hidden;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9em 1.8em;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-surface);
  color: var(--color-primary);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-accent-warm);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.btn--on-white {
  background: var(--color-primary);
  color: var(--color-text-on-teal);
}

.btn--on-white:hover,
.btn--on-white:focus-visible {
  background: var(--color-accent-warm);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-on-teal);
  border-color: var(--color-text-on-teal);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--color-accent-warm);
  color: var(--color-primary-dark);
  border-color: var(--color-accent-warm);
  text-decoration: none;
}

.btn--pulse {
  animation: btn-pulse 2.5s ease-in-out infinite;
  transform-origin: center;
}

@keyframes btn-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .btn--pulse { animation: none; }
}

/* ===== Hero ===== */

.hero {
  position: relative;
  /* Target ~75% of viewport on desktop so the next section peeks above
     the fold and signals scroll. On short/mobile viewports, content
     drives height (min-height is a floor, not a ceiling). */
  min-height: 75vh;
  display: flex;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 820px;
  margin-inline: auto;
}

.hero__logo {
  width: clamp(170px, 28vw, 300px);
  height: auto;
}

/* ===== Hero logo staggered reveal =====
   Each visible path (direct children of the main <g>, skipping clipPath
   internals) fades in sequentially. The --i custom property is set by
   JS after sorting paths spatially (top-to-bottom, left-to-right) so
   the sweep reads as spatial rather than DOM-order random. With 29
   paths at 0.015s stagger + 0.4s fade, total reveal ≈ 820ms.

   The animation is gated behind .is-ready so JS can set --i on each
   path *before* the keyframes start. Otherwise the browser bakes in
   delay=0 at first paint and ignores later --i assignments. */

.hero__logo-svg g > path {
  opacity: 0;
}

.hero__logo-svg.is-ready g > path {
  animation: hero-path-in 0.4s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 0.015s);
}

@keyframes hero-path-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Tagline and email fade in after the logo reveal completes.
   Duration 0.8s gives the reveals a more leisurely, elegant pace than
   the original 0.3s. */
.hero__tagline {
  opacity: 0;
  animation: hero-fade-in 0.8s ease-out 0.82s forwards;
}

.hero__email {
  opacity: 0;
  animation: hero-fade-in 0.8s ease-out 1.1s forwards;
}

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero CTA fades in on the heels of the tagline, then hands off to the
   existing btn-pulse loop. Overrides the plain .btn--pulse rule (which
   starts pulsing immediately) only within the hero. */
.hero .btn--pulse {
  opacity: 0;
  animation:
    hero-fade-in 0.8s ease-out 1.3s forwards,
    btn-pulse 2.5s ease-in-out 2.2s infinite;
}

/* Respect prefers-reduced-motion: show everything immediately, no
   path reveal, no fade, no pulse. */
@media (prefers-reduced-motion: reduce) {
  .hero__logo-svg g > path,
  .hero__tagline,
  .hero__email,
  .hero .btn--pulse {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ===== Scroll-triggered reveals (home page sections 2-4) =====
   Elements start hidden and animate to visible when .is-visible is
   added by the IntersectionObserver in main.js. Patterns:
   - reveal-from-left: slides in 30px from the left + fade
   - reveal-fade: straight opacity fade
   - reveal-stagger-item: fade with delay = var(--i) * 0.08s, for grids
     sweeping left-to-right, top-to-bottom. */

.reveal-from-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-fade {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.reveal-stagger-item {
  opacity: 0;
  transition: opacity 0.5s ease-out;
  transition-delay: calc(var(--i, 0) * 0.08s);
}

/* Per-paragraph reveal — 12px Y rise + fade. Used on long-form copy.
   Stagger between paragraphs in the same intersection batch is applied
   via setTimeout in main.js (not transition-delay), so this rule only
   defines the start/end states of the transition itself. */
.reveal-paragraph {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-from-left.is-visible,
.reveal-fade.is-visible,
.reveal-stagger-item.is-visible,
.reveal-paragraph.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-from-left,
  .reveal-fade,
  .reveal-stagger-item,
  .reveal-paragraph {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.hero__tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem);
  line-height: 1.45;
  max-width: 30ch;
  margin-inline: auto;
}

.hero__email {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  letter-spacing: 0.02em;
}

.hero__email a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-on-teal);
}

.hero__email a:hover,
.hero__email a:focus-visible {
  border-bottom-color: var(--color-accent-warm);
  text-decoration: none;
}

/* ===== Cards ===== */

.card {
  background: var(--color-surface);
  color: var(--color-text-body);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.card__price {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  margin-bottom: var(--space-4);
}

.card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
  flex: 1;
}

.card__list li {
  position: relative;
  padding-left: 1.5em;
  margin-top: var(--space-3);
  font-size: var(--fs-body);
}

.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.65em;
  height: 0.65em;
  background: var(--color-primary);
  border-radius: 50%;
}

.card__cta {
  margin-top: auto;
}

/* Tier card — membresias medallion variant */
.tier-card {
  text-align: center;
}

.tier-card__seal {
  width: clamp(120px, 18vw, 180px);
  margin: 0 auto var(--space-4);
}

.tier-card__seal img {
  width: 100%;
  height: auto;
  /* Medallion SVGs are white-on-transparent — they sit on a teal
     circle backdrop so the white shape is actually visible. */
  background: var(--color-primary);
  border-radius: 50%;
  padding: var(--space-4);
}

/* Tier grid — mobile is a horizontal scroll carousel (vertical stack of
   3 tall cards eats too much screen on phones), desktop is a 3-column
   grid. The negative margin lets the carousel bleed to the viewport edge
   so the next card's peek reads as a scroll affordance; scroll-padding
   restores the gutter as the snap inset. */
.tier-grid {
  display: flex;
  /* Explicit stretch so each card fills the carousel's cross-axis
     (height). Without it, the .card's `height: 100%` resolves against
     an auto-height parent and phones render each tier at its
     intrinsic content height — different bullet counts mean visibly
     different card heights. */
  align-items: stretch;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  padding-bottom: var(--space-3);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tier-grid::-webkit-scrollbar {
  display: none;
}

.tier-grid > * {
  flex: 0 0 82%;
  max-width: 320px;
  scroll-snap-align: center;
  /* Force a shared height based on the tallest tier so all three
     cards read as a uniform set while scrolling. */
  align-self: stretch;
  height: auto;
}

@media (min-width: 768px) {
  .tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    padding-bottom: 0;
  }
  .tier-grid > * {
    flex: initial;
    max-width: none;
  }
}

/* Event card — horizontal layout on wider screens */
.event-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border-on-teal);
  border-radius: var(--radius-md);
  color: var(--color-text-on-teal);
  align-items: start;
}

.event-card__icon {
  width: clamp(90px, 20vw, 140px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-dark);
  border-radius: 50%;
  flex-shrink: 0;
  padding: var(--space-3);
  /* Mobile is single-column grid; without this the icon left-aligns
     inside the full-width row. At desktop the column is auto-sized
     to the icon, so centering is a no-op. */
  justify-self: center;
}

.event-card__icon img,
.event-card__icon svg {
  width: 100%;
  height: auto;
}

.event-card__body h3 {
  font-size: var(--fs-h4);
  margin-bottom: var(--space-2);
  letter-spacing: 0.02em;
}

.event-card__meta {
  font-style: italic;
  font-size: var(--fs-small);
  opacity: 0.85;
  margin-top: var(--space-2);
}

@media (min-width: 768px) {
  .event-card {
    grid-template-columns: auto 1fr;
    gap: var(--space-6);
    padding: var(--space-6);
    align-items: center;
  }
}

/* La Red circular illustration — wrapper, used on la-red.html. Halves
   on phones where the full 340px competes with surrounding copy. */
.la-red-illustration {
  max-width: 340px;
  margin-inline: auto;
}

@media (max-width: 767px) {
  .la-red-illustration {
    max-width: 170px;
  }
}

/* ===== Member logo grid ===== */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.logo-grid__item {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  /* iOS Safari on iPhone 17 / Pro Max-class viewports (~430-440px) has
     been observed ignoring aspect-ratio on flex children whose SVG
     descendants lack explicit width/height attrs, expanding the cell
     to the SVG's intrinsic size. max-height + overflow: hidden caps the
     blast radius if aspect-ratio is dropped. */
  max-height: 240px;
  overflow: hidden;
}

.logo-grid__item img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* Belt-and-suspenders against iOS Safari rendering bare SVGs at
     intrinsic size: width/height: 100% forces the cell as the bounds
     and object-fit: contain preserves aspect inside that box. */
}

/* Logos wrapped in an anchor (external member link) — the anchor fills
   the cell, the img inside the anchor object-fits within the anchor.
   Strip default link styling so the logo doesn't get an underline. */
.logo-grid__item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  border-bottom: 0;
  transition: opacity var(--transition-fast);
}

.logo-grid__item a:hover,
.logo-grid__item a:focus-visible {
  opacity: 0.85;
  text-decoration: none;
}

/* Override the section--teal "all anchors are white" rule so that the
   logo links don't render with an underline-on-hover white treatment. */
.section--teal .logo-grid__item a:not(.btn):hover,
.section--teal .logo-grid__item a:not(.btn):focus-visible {
  text-decoration: none;
}

.logo-grid__item--teal {
  background: var(--color-primary);
}

@media (min-width: 600px) {
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

@media (min-width: 900px) {
  .logo-grid--home {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Photo strip — horizontal scroll on mobile, grid on desktop =====
   Mirrors the .tier-grid pattern: the carousel bleeds to the viewport
   edge on phones so the next-frame peek reads as a scroll affordance,
   then promotes to a fixed N-column grid at tablet+ via the --cols
   custom property (default 4). Frames are aspect-ratio locked, so the
   layout reserves space before any image decodes — no CLS on load. */

.photo-strip {
  display: flex;
  align-items: stretch;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-inline: calc(-1 * var(--gutter));
  padding: 0 var(--gutter) var(--space-3);
  scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  list-style: none;
}

.photo-strip::-webkit-scrollbar {
  display: none;
}

.photo-strip > * {
  margin-top: 0;
}

.photo-strip__item {
  flex: 0 0 78%;
  max-width: 340px;
  scroll-snap-align: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10), 0 6px 16px rgba(0, 0, 0, 0.08);
}

.photo-strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Desktop fallback for the base photo-strip (no marquee): swap the
   horizontal scroll-snap carousel for a fixed N-column grid via the
   --cols custom property. This block must precede the marquee rules so
   the always-on marquee variant can override it on strips that should
   keep cycling at every viewport. */
@media (min-width: 768px) {
  .photo-strip {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: var(--space-5);
    overflow: visible;
    margin-inline: 0;
    padding: 0;
  }
  .photo-strip__item {
    flex: initial;
    max-width: none;
  }
}

/* Caption for a photo strip wrapped in a <figure>. Reads as a quiet,
   italic credit/footer line under the strip, not a heading. */
.photo-strip-figure {
  margin: 0;
}

.photo-strip-figure__caption {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-small);
  opacity: 0.85;
  text-align: center;
  margin-top: var(--space-3);
}

/* ===== Photo strip — marquee variant =====
   Auto-scrolls right-to-left at a slow, elegant pace. Photos are
   duplicated in the DOM (originals + aria-hidden copies) so when the
   animation loops from translateX(0) → translateX(-50%) the second half
   is identical to the first and the seam is invisible. User cannot
   interact (pointer-events: none). Always-on by default; add the
   `--mobile` modifier to revert to the standard grid above 768px. */

.photo-strip-figure--marquee {
  overflow: hidden;
  margin-inline: calc(-1 * var(--gutter));
}

.photo-strip--marquee {
  display: flex;
  width: max-content;
  align-items: stretch;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  overflow: visible;
  scroll-snap-type: none;
  pointer-events: none;
  animation: photo-marquee 45s linear infinite;
}

.photo-strip--marquee > .photo-strip__item {
  flex: 0 0 260px;
  max-width: none;
  scroll-snap-align: none;
}

@keyframes photo-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Mobile-only modifier — at ≥768px, revert to the standard grid (no
   marquee, duplicates hidden, manual interaction restored). Used on the
   home strip; omit on strips that should marquee at every viewport. */
@media (min-width: 768px) {
  .photo-strip-figure--marquee-mobile {
    overflow: visible;
    margin-inline: 0;
  }

  .photo-strip--marquee-mobile {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: var(--space-5);
    width: auto;
    overflow: visible;
    pointer-events: auto;
    animation: none;
    transform: none;
  }

  .photo-strip--marquee-mobile > .photo-strip__item {
    flex: initial;
  }

  .photo-strip--marquee-mobile > [aria-hidden="true"] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-strip--marquee {
    animation: none;
  }
}

/* La Red photo-section wrapper: sits flush against the hero above (no
   top padding) and against the directorio below on mobile. On desktop
   the marquee runs at every viewport, so we add a breath of padding
   below it before the directorio grid begins. */
.la-red__photos-section {
  padding-block: 0;
}

@media (min-width: 768px) {
  .la-red__photos-section {
    padding-bottom: var(--space-7);
  }
}

/* Single contained photo — used for the eventos page hero. No scroll
   behavior, just a rounded/shadowed frame that respects the photo's
   intrinsic aspect (set via width/height attrs on the img itself). */

.photo-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10), 0 6px 16px rgba(0, 0, 0, 0.08);
  max-width: 100%;
}

.photo-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Compromise list (shield-check items) ===== */

.compromise-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 52rem;
  margin-inline: auto;
}

.compromise-list__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
  margin-top: 0;
}

.compromise-list__icon {
  width: clamp(44px, 8vw, 64px);
  height: auto;
  flex-shrink: 0;
}

.compromise-list__text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  margin: 0;
  max-width: none;
}

/* ===== References / citation list ===== */

.references {
  list-style: none;
  padding: 0;
  /* Plain `margin: 0` zeroed out stack-lg's space-7 between the heading
     and the list, so the first item sat tight against the h2. Explicit
     top margin restores the breathing room (and pushes a touch beyond
     stack-lg's default for a clearer section break). */
  margin: var(--space-7) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  counter-reset: ref;
}

.references li {
  margin-top: 0;
  padding-left: 2.25rem;
  position: relative;
  font-size: var(--fs-small);
  line-height: 1.55;
  max-width: 70ch;
  counter-increment: ref;
  /* DOI URLs are long unbreakable strings — let them wrap inside the
     citation block instead of pushing past the viewport on phones. */
  overflow-wrap: anywhere;
}

.references li::before {
  content: counter(ref);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  min-width: 1.5rem;
}

.section--teal .references li::before {
  color: var(--color-text-on-teal);
}

/* ===== Direct-contact channels (phone + email block on contacto.html) ===== */

.contact-channels {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

@media (min-width: 600px) {
  .contact-channels {
    grid-template-columns: repeat(2, max-content);
    gap: var(--space-7);
  }
}

.contact-channel {
  margin: 0;
  max-width: none;
}

.contact-channel__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: var(--space-1);
}

.contact-channel__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  letter-spacing: 0.02em;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-on-teal);
}

.contact-channel__value:hover,
.contact-channel__value:focus-visible {
  border-bottom-color: var(--color-accent-warm);
  text-decoration: none;
}

/* ===== Forms ===== */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 560px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form__label .req {
  color: var(--color-primary);
  margin-left: 0.15em;
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.75em 1em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.4;
  transition: border-color var(--transition-fast);
}

.form__textarea {
  min-height: 150px;
  resize: vertical;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}

.form__input:invalid:not(:placeholder-shown),
.form__textarea:invalid:not(:placeholder-shown) {
  border-color: #b4312b;
}

.form__success,
.form__error {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
}

.form__success {
  background: #e5f1e9;
  color: #104e2c;
  border: 1px solid #a9d4b7;
}

.form__error {
  background: #fbe6e4;
  color: #7a1a16;
  border: 1px solid #e4a9a4;
}

/* ===== Footer ===== */

.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-text-on-teal);
  /* Top-only padding: the credit band (.site-footer__credit) owns the
     bottom spacing so the credit line sits flush against the footer's
     bottom edge with symmetric padding around it. */
  padding-block: var(--space-7) 0;
  margin-top: auto;
}

.site-footer a {
  color: var(--color-text-on-teal);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: center;
  text-align: center;
}

.site-footer__brand img {
  height: 72px;
  width: auto;
}

.site-footer__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.site-footer__nav li { margin-top: 0; }

.site-footer__nav a {
  text-decoration: none;
  padding-block: var(--space-1);
  border-bottom: 1px solid transparent;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
  border-bottom-color: var(--color-accent-warm);
  text-decoration: none;
}

/* Social icon row item — Instagram link sits flush right of the nav text
   items. Strips the underline-on-hover treatment and uses color shift
   instead, since the icon doesn't have a baseline to underline against. */
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding-block: 0;
  border-bottom: 0;
  color: var(--color-text-on-teal);
  transition: color var(--transition-fast);
}

.site-footer__social a:hover,
.site-footer__social a:focus-visible {
  color: var(--color-accent-warm);
  border-bottom: 0;
}

.site-footer__social svg {
  width: 22px;
  height: 22px;
  display: block;
  /* Optical nudge: the icon's stroke weight reads as bottom-heavy next
     to the cap-height of the nav text. -2px lifts it into visual center
     without changing the flex row's box. */
  transform: translateY(-4px);
}

.site-footer__legal {
  font-size: var(--fs-small);
  opacity: 0.8;
}

/* Credit stripe — elegant, muted, sits under the main footer row with a
   hairline border above it. Brightens slightly on hover to invite the
   link click. */
.site-footer__credit {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-6);
  padding-block: var(--space-5);
  /* ~20% smaller than --fs-small for a more elegant, secondary feel. */
  font-size: 0.7rem;
  text-align: center;
  opacity: 0.72;
  transition: opacity var(--transition-med);
}

.site-footer__credit:hover,
.site-footer__credit:focus-within {
  opacity: 1;
}

.site-footer__credit p {
  margin: 0;
  max-width: none;
  letter-spacing: 0.02em;
}

.site-footer__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  font-weight: 500;
  transition: color var(--transition-fast), text-decoration-thickness var(--transition-fast);
}

.site-footer__credit a:hover,
.site-footer__credit a:focus-visible {
  color: var(--color-accent-warm);
  text-decoration-thickness: 2px;
}

/* ===== Misc utilities specific to this site ===== */

.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1.05rem;
  display: block;
  margin-bottom: var(--space-3);
}

.pullquote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.35rem, 1rem + 1.5vw, 2.2rem);
  line-height: 1.35;
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
}

.savings-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-3) var(--space-4);
  align-items: baseline;
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border-on-teal);
  font-size: var(--fs-body);
}

.savings-line:last-child { border-bottom: 0; }

.savings-line__original {
  text-decoration: line-through;
  text-decoration-color: #ff5c5c;
  text-decoration-thickness: 2px;
  color: #ff5c5c;
  font-weight: 700;
  font-size: var(--fs-small);
}

.savings-line__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
}

/* Decorative circular badge — used for Congreso icon and home CTA rings */
.circle-badge {
  position: relative;
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1;
  border: 3px solid var(--color-text-on-teal);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-3);
}

.circle-badge__text {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(0.75rem, 0.5rem + 0.6vw, 0.95rem);
  line-height: 1.15;
  color: var(--color-text-on-teal);
}

/* Typography sample — fonts.html */
.pairing-card {
  background: var(--color-surface);
  color: var(--color-text-body);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.pairing-card__label {
  font-family: system-ui, sans-serif;
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.pairing-card__display {
  font-weight: 700;
  font-size: clamp(40px, 4rem + 2vw, 96px);
  line-height: 1;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.pairing-card__heading {
  font-weight: 700;
  font-size: clamp(24px, 2rem + 0.5vw, 36px);
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.pairing-card__body {
  font-size: 1rem;
  line-height: 1.6;
}

.pairing-card__body em {
  font-style: italic;
}

.pairing-card--1 .pairing-card__display,
.pairing-card--1 .pairing-card__heading {
  font-family: "Barlow Condensed", sans-serif;
}
.pairing-card--1 .pairing-card__body {
  font-family: "Lora", serif;
}

.pairing-card--2 .pairing-card__display,
.pairing-card--2 .pairing-card__heading {
  font-family: "Oswald", sans-serif;
}
.pairing-card--2 .pairing-card__body {
  font-family: "Lora", serif;
}

.pairing-card--3 .pairing-card__display,
.pairing-card--3 .pairing-card__heading {
  font-family: "Bebas Neue", sans-serif;
}
.pairing-card--3 .pairing-card__body {
  font-family: "Crimson Pro", serif;
}
