:root {
  --surface: rgba(4, 53, 15, 0.82);
  --surface-strong: rgba(0, 80, 25, 0.9);
  --text: #fff8e7;
  --muted: #f5efc8;
  --accent: #009421;
  --accent-soft: #fbd42a;
  --accent-warm: #ffb200;
  --accent-hot: #ff3131;
  --line: rgba(251, 212, 42, 0.22);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(0, 46, 12, 0.32), rgba(19, 38, 3, 0.74)),
    url("portada.png") center top / cover no-repeat fixed;
  background-color: #071507;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 48, 14, 0.42) 0%, rgba(34, 43, 0, 0.18) 24%, rgba(44, 11, 11, 0.56) 100%),
    linear-gradient(rgba(251, 212, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 212, 42, 0.05) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  opacity: 0.48;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(255, 240, 166, 0.72) 0.8px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: screen;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-subpage {
  min-height: auto;
  padding-bottom: 0;
}

.hero-subpage::after {
  background: linear-gradient(180deg, rgba(0, 54, 15, 0.2) 0%, rgba(0, 148, 33, 0.12) 42%, rgba(88, 21, 21, 0.24) 100%);
  box-shadow: inset 0 -110px 120px rgba(2, 13, 11, 0.58);
}

.hero-subpage::before {
  opacity: 0.35;
}

.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 5.5rem 0 8rem;
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(0, 54, 15, 0.34) 0%, rgba(0, 148, 33, 0.24) 42%, rgba(88, 21, 21, 0.42) 100%);
  box-shadow: inset 0 -140px 160px rgba(2, 13, 11, 0.92);
}

.hero::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: auto 2% 4rem;
  height: 34%;
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 178, 0, 0.24), transparent 14%),
    linear-gradient(180deg, transparent 0%, rgba(14, 50, 9, 0.12) 38%, rgba(54, 12, 12, 0.42) 100%);
  filter: blur(6px);
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(251, 212, 42, 0.25);
  background: rgba(2, 58, 16, 0.78);
  border-radius: 14px;
  padding: 0.8rem 0.75rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: #f0e8d7;
  border-radius: 999px;
}

.brand,
.nav-links a,
.button,
.contact-box a {
  text-decoration: none;
  color: inherit;
}

.brand {
  display: none;
}

.nav-links {
  position: relative;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 2.75rem;
}

.nav-links-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2.75rem;
}

.nav-links a {
  position: relative;
  z-index: 7;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 2vw, 2.35rem);
  font-weight: 700;
  color: #f0e8d7;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 8rem 0 4rem;
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-content-subpage {
  min-height: auto;
  padding: 5rem 0 3rem;
}

.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3,
.schedule-date {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(5.4rem, 11vw, 11rem);
  line-height: 0.9;
  color: #f7efd8;
  text-shadow: 0 2px 0 rgba(71, 37, 25, 0.8), 0 8px 24px rgba(0, 0, 0, 0.28);
}

.hero-tagline {
  margin: 0.2rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 3.6rem);
  font-weight: 700;
  color: var(--accent-soft);
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 2.2rem;
}

.button {
  padding: 1.1rem 2.4rem;
  border-radius: 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(180deg, var(--accent-hot), #c31414);
  color: #fff4cf;
  box-shadow: 0 18px 34px rgba(120, 15, 15, 0.4);
}

.hero-card,
.story-panel,
.schedule-item,
.gallery-card,
.contact-box {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 1.35rem 1.5rem;
  border-radius: 26px;
  width: min(100%, 1120px);
  background: linear-gradient(180deg, rgba(3, 66, 19, 0.78), rgba(31, 58, 4, 0.6));
}

.hero-card-label {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(251, 212, 42, 0.14);
  color: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hero-stats article,
.schedule-item div {
  display: grid;
  gap: 0.35rem;
}

.hero-stats strong,
.story-panel h3,
.gallery-card span,
.contact-box a {
  font-size: 1.02rem;
  font-weight: 800;
}

.story-panel p,
.schedule-item p,
.gallery-card p,
.contact-copy p,
.hero-stats span {
  color: var(--muted);
  line-height: 1.7;
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 4rem 0 0;
}

.subpage-main {
  padding-bottom: 4rem;
}

.section-subpage {
  padding-top: 3rem;
}

.section-heading {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 0.95;
  max-width: 12ch;
}

.single-line-title {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(2.4rem, 4.1vw, 4.5rem);
}

.story-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 1rem;
}

.subpage-grid,
.subpage-columns {
  display: grid;
  gap: 1rem;
}

.subpage-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.subpage-columns {
  grid-template-columns: repeat(3, 1fr);
}

.story-panel,
.gallery-card,
.contact-box {
  border-radius: 24px;
  padding: 1.4rem;
}

.story-panel.highlight {
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  background: linear-gradient(160deg, rgba(255, 49, 49, 0.18), transparent 54%), var(--surface-strong);
}

.schedule-list,
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding: 1.4rem;
  border-radius: 24px;
}

.schedule-date {
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 800;
}

.gallery-grid {
  grid-template-columns: 1.3fr repeat(3, 1fr);
}

.gallery-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 12%, rgba(11, 42, 10, 0.9) 92%),
    radial-gradient(circle at top, rgba(251, 212, 42, 0.22), rgba(255, 49, 49, 0.08) 36%, transparent 70%),
    var(--surface-strong);
  overflow: hidden;
}

.gallery-card-large {
  min-height: 320px;
}

.gallery-photo {
  position: relative;
  isolation: isolate;
}

.gallery-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("portada.png");
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.68;
  z-index: -2;
  transition: transform 300ms ease, opacity 300ms ease;
}

.gallery-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 39, 10, 0.08) 10%, rgba(7, 34, 8, 0.86) 92%);
  z-index: -1;
}

.gallery-photo:hover::before {
  transform: scale(1.04);
  opacity: 0.82;
}

.gallery-photo-1::before {
  background-image: url("imagenes/cuerda.jpg");
  background-position: center 78%;
}

.gallery-photo-2::before {
  background-image: url("imagenes/baile.jpg");
  background-position: left center;
}

.gallery-photo-3::before {
  background-image: url("imagenes/barrio sur.jpeg");
  background-position: center 24%;
}

.gallery-photo-4::before {
  background-image: url("imagenes/fogon.png");
  background-position: right center;
}

.photo-portal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.featured-carousel {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.carousel-stage {
  position: relative;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(6, 57, 17, 0.72);
  box-shadow: var(--shadow);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-photo-trigger {
  position: absolute;
  inset: 0;
}

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

.carousel-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 1.5rem;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 38, 11, 0) 0%, rgba(6, 57, 17, 0.84) 36%, rgba(6, 57, 17, 0.96) 100%);
}

.carousel-copy span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1rem;
  font-weight: 800;
}

.carousel-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
}

.carousel-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.carousel-arrow {
  border: 1px solid var(--line);
  background: rgba(6, 57, 17, 0.8);
  color: var(--text);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.carousel-thumbs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.carousel-thumb {
  display: block;
  flex: 0 0 108px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  min-width: 108px;
  height: 92px;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.carousel-thumb.is-active {
  opacity: 1;
  transform: translateY(-2px);
  border-color: var(--accent-soft);
}

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

.photo-frame {
  position: relative;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(6, 57, 17, 0.72);
  box-shadow: var(--shadow);
}

.photo-frame-large {
  grid-column: span 2;
  min-height: 420px;
}

.photo-frame-wide {
  grid-column: span 2;
}

.photo-portal-archive .photo-frame {
  min-height: 280px;
}

.video-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(6, 57, 17, 0.72);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

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

.photo-trigger {
  all: unset;
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: zoom-in;
  display: block;
  width: 100%;
  height: 100%;
}

.photo-frame-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  pointer-events: none;
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(6, 38, 11, 0) 0%, rgba(6, 57, 17, 0.84) 36%, rgba(6, 57, 17, 0.96) 100%);
}

.photo-frame-copy span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 800;
}

.photo-frame-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(10, 40, 10, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
}

.lightbox-image {
  width: auto;
  max-width: 100%;
  max-height: 88vh;
  display: block;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  border: 1px solid rgba(251, 212, 42, 0.25);
  background: rgba(87, 16, 16, 0.9);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.contact-box {
  display: grid;
  gap: 1rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 3rem 0 1rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 236, 216, 0.5);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  body {
    background-position: center top, 56% top;
    background-size: auto, cover;
  }

  .story-grid,
  .subpage-grid,
  .subpage-columns,
  .gallery-grid,
  .photo-portal,
  .contact-layout,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .carousel-stage {
    min-height: 520px;
  }

  .carousel-thumbs {
    gap: 0.6rem;
  }

  .photo-frame-large,
  .photo-frame-wide {
    grid-column: span 1;
    min-height: 340px;
  }

  .video-preview {
    grid-template-columns: 1fr;
  }

  .schedule-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content {
    padding-top: 5rem;
  }
}

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(180deg, rgba(10, 42, 8, 0.24), rgba(52, 17, 17, 0.5)),
      url("portada.png") center 16% / cover no-repeat scroll;
  }

  body::before {
    opacity: 0.22;
  }

  body::after {
    opacity: 0.05;
  }

  .page-shell {
    width: min(100% - 1rem, 100%);
  }

  .hero {
    min-height: auto;
    padding-top: 0.5rem;
  }

  .hero::after {
    inset: 4.8rem 0 2rem;
    background: linear-gradient(180deg, rgba(0, 54, 15, 0.12) 0%, rgba(0, 148, 33, 0.08) 42%, rgba(88, 21, 21, 0.14) 100%);
    box-shadow: inset 0 -70px 90px rgba(2, 13, 11, 0.34);
  }

  .hero::before {
    display: none;
  }

  .hero-subpage::after {
    inset: 4.8rem 0 2rem;
    background: linear-gradient(180deg, rgba(0, 54, 15, 0.12) 0%, rgba(0, 148, 33, 0.08) 42%, rgba(88, 21, 21, 0.14) 100%);
    box-shadow: inset 0 -70px 90px rgba(2, 13, 11, 0.34);
  }

  .hero-subpage::before {
    display: none;
  }

  .topbar,
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    align-items: stretch;
    gap: 0.75rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-self: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(194, 248, 228, 0.16);
    border-radius: 24px;
    background: rgba(5, 33, 28, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }

  .nav-links.is-open {
    display: block;
  }

  .nav-links-inner {
    flex-direction: column;
    gap: 0.85rem;
  }

  .nav-links a {
    display: inline-block;
    font-size: 1.8rem;
  }

  .carousel-stage {
    min-height: 420px;
    border-radius: 24px;
  }

  .carousel-controls {
    grid-template-columns: 1fr;
  }

  .carousel-thumbs {
    gap: 0.55rem;
  }

  .carousel-thumb {
    flex-basis: 88px;
    min-width: 88px;
    height: 76px;
  }

  .carousel-arrow {
    display: none;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.85rem;
    right: 0.85rem;
  }

  h1 {
    font-size: clamp(4rem, 17vw, 6rem);
  }

  .hero-tagline {
    font-size: clamp(1.7rem, 8vw, 2.35rem);
  }

  .single-line-title {
    white-space: normal;
    font-size: clamp(2.4rem, 9vw, 3.4rem);
  }

  .matched-title {
    font-size: clamp(2.4rem, 9vw, 3.4rem);
  }

  .hero-card,
  .story-panel,
  .schedule-item,
  .gallery-card,
  .contact-box {
    border-radius: 22px;
  }
}
