/* ============================================================
   layout.css — Casita de Aventuras
   Structural scaffolding. All values via CSS variables from reset.css.
   ============================================================ */

/* ── Scroll progress bar ──────────────────────────────────── */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--coral),
    var(--yellow),
    var(--mint)
  );
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Background canvas ────────────────────────────────────── */

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Base stacking context ────────────────────────────────── */

body > *:not(#bg-canvas):not(#scroll-progress) {
  position: relative;
  z-index: 1;
}

/* ── Container ────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

/* ── Section ──────────────────────────────────────────────── */

.section {
  padding-block: 6rem;
}

.section--alt {
  background: var(--bg-soft);
}

/* ── Section header ───────────────────────────────────────── */

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition),
    backdrop-filter var(--transition);
}

.nav.scrolled {
  background: rgba(255, 250, 245, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-soft);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

.nav__logo {
  height:10px !important;
  width: auto !important;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--text-main);
}

.nav__cta {
  flex-shrink: 0;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: var(--radius-full);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: rgba(255, 250, 245, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.nav__mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.nav__mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  transition: color var(--transition);
}

.nav__mobile-menu a:hover {
  color: var(--coral);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero__content {
  padding: 4rem 3rem 4rem 2rem;
  max-width: 600px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  background: var(--yellow-light);
  border: 1px solid var(--yellow);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.0625rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 2.25rem;
  max-width: 480px;
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero__stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.hero__stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100vh;
}

.hero__mockup {
  position: relative;
  width: min(480px, 90%);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

/* ============================================================
   STATS TICKER BAR
   ============================================================ */

.stats-bar {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding-block: 1rem;
  overflow: hidden;
  white-space: nowrap;
}

.stats-bar__track {
  display: inline-flex;
  gap: 3rem;
  animation: ticker 30s linear infinite;
}

.stats-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-soft);
  flex-shrink: 0;
}

.stats-bar__item strong {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-main);
}

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

/* ============================================================
   GRIDS
   ============================================================ */

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

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

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

/* ============================================================
   EMOTIONAL + NEWSLETTER (2-col grids)
   ============================================================ */

.emotional__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

/* ============================================================
   CAROUSEL
   ============================================================ */

.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform var(--transition);
  will-change: transform;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.carousel-controls button {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.carousel-controls button:hover {
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-medium);
  transition: background var(--transition), width var(--transition);
}

.carousel-dot.active {
  width: 20px;
  background: var(--coral);
}

/* ============================================================
   FAQ
   ============================================================ */

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  margin-inline: auto;
}

/* ============================================================
   CTA FINAL
   ============================================================ */

.cta-final {
  text-align: center;
  padding-block: 8rem;
  position: relative;
  overflow: hidden;
}

.cta-final .container {
  position: relative;
  z-index: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  padding-block: 4rem 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.footer__brand-desc {
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.65;
  max-width: 260px;
}

.footer__col-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.footer__col-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer__col-links a {
  font-size: 0.9375rem;
  color: var(--text-soft);
  transition: color var(--transition);
}

.footer__col-links a:hover {
  color: var(--text-main);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__legal {
  display: flex;
  gap: 1.5rem;
}

.footer__legal a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__legal a:hover {
  color: var(--text-soft);
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1.5rem);
  background: var(--text-main);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9990;
  transition: opacity var(--transition), transform var(--transition);
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   SCROLL REVEAL CLASSES
   ============================================================ */

.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.3, 1),
    transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.reveal {
  transform: translateY(2rem);
}

.reveal-left {
  transform: translateX(-2.5rem);
}

.reveal-right {
  transform: translateX(2.5rem);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* ============================================================
   RESPONSIVE — 1200px
   ============================================================ */

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }

  .footer__grid > :first-child {
    grid-column: 1 / -1;
  }

  .footer__brand-desc {
    max-width: 100%;
  }
}

/* ============================================================
   RESPONSIVE — 900px
   ============================================================ */

@media (max-width: 900px) {
  /* Nav */
  .nav__links {
    display: none;
  }

  .nav__cta {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-height) + 2rem);
    padding-bottom: 4rem;
  }

  .hero__content {
    padding: 2rem;
    max-width: 100%;
    text-align: center;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__visual {
    min-height: auto;
    padding: 2rem;
  }

  .hero__mockup {
    width: min(360px, 90%);
  }

  /* Grids → 2 col */
  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .adventures-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 2-col inner grids → 1 col */
  .emotional__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .newsletter__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Section padding */
  .section {
    padding-block: 4rem;
  }

  .cta-final {
    padding-block: 5rem;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   RESPONSIVE — 500px
   ============================================================ */

@media (max-width: 500px) {
  .container {
    padding-inline: 1.25rem;
  }

  .section {
    padding-block: 3rem;
  }

  .cta-final {
    padding-block: 3.5rem;
  }

  /* Hero */
  .hero__stats {
    gap: 1.25rem;
  }

  /* Grids → 1 col (products → 2 col) */
  .collections-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .adventures-grid {
    grid-template-columns: 1fr;
  }

  /* Footer → 1 col */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer__grid > :first-child {
    grid-column: auto;
  }

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

  .footer__legal {
    flex-wrap: wrap;
    gap: 1rem;
  }

  /* Section header */
  .section-header {
    margin-bottom: 2.25rem;
  }

  /* Carousel controls */
  .carousel-controls {
    gap: 0.625rem;
  }

  .carousel-controls button {
    width: 38px;
    height: 38px;
  }

  /* Toast */
  .toast {
    width: calc(100% - 2.5rem);
    text-align: center;
    white-space: normal;
  }
}
