/* ============================================================================
   ⚠️⚠️ NO TOCAR ESTE ARCHIVO ⚠️⚠️  (a menos que sepas de diseño / CSS)
   ============================================================================
   Casa Nagual — hoja de estilos compartida para páginas de sesión
   (ritual.html, hogar.html, mascotas.html). Define TODO el diseño visual
   de esas 3 páginas: colores, tamaños, espacios y comportamiento en
   celular/computador.

   ⚠️ Cualquier cambio aquí afecta A LA VEZ a ritual.html, hogar.html y
   mascotas.html. Un error aquí puede desordenar o romper el diseño de
   las 3 páginas al mismo tiempo.

   🖼️ Este archivo NO contiene imágenes ni videos: esos se cambian
   directamente en ritual.html, hogar.html y mascotas.html (busca ahí
   las etiquetas 🖼️ y 🎬).
   ============================================================================ */

:root {
  --earth: #3E3124;
  --earth-dark: #24180f;
  --olive: #7D8F69;
  --olive-light: #DDE6D2;
  --clay: #C28B71;
  --honey: #D6A143;
  --cream: #F9F6F0;
  --paper: #FFFDF8;
  --rose: #D83BB7;
  --ink: #302417;
  --muted: rgba(48, 36, 23, 0.68);
  --line: rgba(62, 49, 36, 0.14);
  --shadow: 0 24px 70px rgba(62, 49, 36, 0.14);

  --logo-desktop-height: 96px;
  --logo-mobile-height: 68px;
  --max: 1180px;
}

/* Pantallas muy grandes: el contenido puede respirar un poco más */
@media (min-width: 1500px) {
  :root {
    --max: 1320px;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Jost", sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(216, 59, 183, .10), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(214, 161, 67, .18), transparent 28%),
    linear-gradient(180deg, #fffaf2 0%, var(--cream) 52%, #efe0c8 100%);
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .34;
  background-image:
    repeating-linear-gradient(45deg, rgba(62,49,36,.035) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(-45deg, rgba(62,49,36,.028) 0 1px, transparent 1px 9px);
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  display: block;
  max-width: 100%;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: auto;
}

/* NAV */
.top-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max), calc(100% - 22px));
  z-index: 1000;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .88);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 46px rgba(62, 49, 36, .10);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  height: var(--logo-desktop-height);
  width: auto;
  object-fit: contain;
  transition: .25s ease;
}

.brand-text strong {
  display: block;
  font-size: 1rem;
  color: var(--earth);
  line-height: 1;
  white-space: nowrap;
}

.brand-text span {
  display: block;
  margin-top: 4px;
  color: var(--olive);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: .94rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--earth);
}

.nav-links a.active {
  font-weight: 700;
}

/* Botón "hamburguesa": solo aparece en celular y tablet */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, .9);
  color: var(--earth);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: .22s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--earth);
  color: white;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--earth);
  color: var(--paper);
  font-weight: 700;
  border: 1px solid transparent;
  transition: .25s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--olive);
}

.btn-light {
  background: rgba(255, 253, 248, .72);
  color: var(--earth);
  border-color: var(--line);
}

.btn-honey {
  background: var(--honey);
  color: white;
}

/* HERO (páginas secundarias) */
.page-hero {
  min-height: 78vh;
  padding: 150px 0 60px;
  display: grid;
  align-items: center;
}

.page-hero-board {
  position: relative;
  min-height: 560px;
  border-radius: 44px;
  overflow: hidden;
  background: var(--earth);
  color: white;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.page-hero-board img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.8) saturate(1.05);
}

.page-hero-board::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(36,24,15,.1), rgba(36,24,15,.78));
}

.page-hero-badge {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255,253,248,.86);
  color: var(--earth);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.page-hero-caption {
  position: absolute;
  z-index: 2;
  left: 34px;
  right: 34px;
  bottom: 34px;
  max-width: 720px;
}

.page-hero-caption h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: .9;
  letter-spacing: -.05em;
  margin-bottom: 16px;
}

.page-hero-caption p {
  color: rgba(255,253,248,.86);
  line-height: 1.65;
  font-size: 1.08rem;
  margin-bottom: 22px;
  max-width: 560px;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* SECTIONS */
.section {
  padding: 88px 0;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr .68fr;
  gap: 34px;
  align-items: end;
  margin-bottom: 36px;
}

.section-head small {
  display: block;
  color: var(--olive);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(2.3rem, 4.8vw, 4.6rem);
  line-height: .92;
  letter-spacing: -.055em;
  color: var(--earth);
}

.section-head p {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1.04rem;
}

/* GALERÍA / TARJETAS DE PRODUCTO */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: var(--earth);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  min-height: 380px;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.92) saturate(1.04);
  transition: transform .75s ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(36,24,15,.82));
}

.gallery-copy {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: white;
}

.gallery-copy small {
  display: block;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .78;
  margin-bottom: 8px;
}

.gallery-copy h3 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: .95;
  letter-spacing: -.03em;
  margin-bottom: 8px;
}

.gallery-copy p {
  color: rgba(255,253,248,.86);
  line-height: 1.5;
  font-size: .96rem;
}

/* VIDEOS */
.video-section {
  padding: 88px 0;
  background:
    radial-gradient(circle at 5% 0%, rgba(216, 59, 183, .10), transparent 28%),
    linear-gradient(180deg, rgba(255,253,248,.48), rgba(255,253,248,.18));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.video-carousel {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 0 26px;
  scrollbar-width: thin;
}

@media (min-width: 901px) {
  .video-carousel {
    justify-content: center;
  }
}

.video-card {
  flex: 0 0 320px;
  height: 560px;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  background: var(--earth-dark);
  scroll-snap-align: start;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.82) saturate(1.03);
}

.video-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(36,24,15,.82), transparent 58%);
  pointer-events: none;
}

.video-card::before {
  content: "Tocar para ver con audio";
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,253,248,.88);
  color: var(--earth);
  font-size: .76rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.video-label {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  color: white;
}

.video-label span {
  display: block;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .82;
  margin-bottom: 8px;
}

.video-label h3 {
  font-size: 2rem;
  line-height: .95;
  margin-bottom: 8px;
}

.video-label p {
  font-size: .96rem;
  line-height: 1.45;
  opacity: .86;
}

/* LIGHTBOX VIDEO */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(20, 14, 9, .96);
  padding: 18px;
}

.video-lightbox.active {
  display: flex;
  flex-direction: column;
}

.video-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: white;
}

.video-lightbox-header strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  line-height: 1;
}

.video-back-btn {
  border: none;
  background: var(--cream);
  color: var(--earth);
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.video-lightbox-body {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}

.video-lightbox video {
  width: min(100%, 520px);
  height: min(82vh, 860px);
  /* dvh = alto real del celular con la barra del navegador visible */
  height: min(82dvh, 860px);
  object-fit: contain;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

body.video-open {
  overflow: hidden;
}

/* PASOS / TARJETAS DE CONTENIDO */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  border-radius: 28px;
  padding: 28px;
  background: rgba(255,253,248,.76);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(62,49,36,.08);
  transition: .25s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.step-card i {
  color: var(--rose);
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.step-card strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  color: var(--earth);
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 10px;
}

.step-card span {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.55;
}

/* CTA */
.cta-section {
  padding: 76px 0 64px;
}

.cta-box {
  position: relative;
  overflow: hidden;
  border-radius: 44px;
  padding: 58px 34px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(216,59,183,.12), transparent 30%),
    linear-gradient(135deg, rgba(255,253,248,.86), rgba(249,246,240,.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cta-box img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 0 auto 22px;
  border-radius: 50%;
}

.cta-box h2 {
  max-width: 760px;
  margin: 0 auto 18px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: .92;
  letter-spacing: -.055em;
  color: var(--earth);
}

.cta-box p {
  max-width: 620px;
  margin: 0 auto 26px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.04rem;
}

/* FOOTER (compacto: mismo alto en celular, tablet y computador) */
footer {
  padding: 18px 5% 20px;
  text-align: center;
  background: var(--paper);
  color: var(--muted);
}

footer h3 {
  font-size: 1.25rem;
  color: var(--earth);
  margin-bottom: 3px;
}

footer p {
  margin: 2px 0;
  font-size: .92rem;
  line-height: 1.4;
}

.socials {
  font-size: 1.15rem;
  margin: 6px 0;
}

.socials a:hover {
  color: var(--olive);
}

.ws-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 62px;
  height: 62px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 34px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .38);
  z-index: 1000;
  transition: .25s ease;
}

.ws-float:hover {
  transform: scale(1.08);
}

.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: all .9s cubic-bezier(.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 980px) {
  /* logo | hamburguesa | botón Contactar */
  .top-nav {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* El menú se convierte en un panel desplegable bajo la barra */
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 10px;
    border-radius: 26px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 18px 46px rgba(62, 49, 36, .18);
    max-height: min(70vh, 430px);
    overflow-y: auto;
    font-size: 1rem;
  }

  .top-nav.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--olive-light);
    color: var(--earth);
  }

  .brand img {
    height: var(--logo-mobile-height);
  }

  .page-hero {
    padding-top: 122px;
  }

  .page-hero-board {
    min-height: 520px;
  }

  .gallery-grid,
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --logo-mobile-height: 64px;
  }

  .container {
    width: min(var(--max), calc(100% - 22px));
  }

  .top-nav {
    top: 10px;
    width: calc(100% - 20px);
    padding: 8px 10px;
  }

  .brand-text {
    display: none;
  }

  .btn {
    min-height: 42px;
    padding: 10px 14px;
    font-size: .86rem;
  }

  .page-hero {
    padding: 108px 0 48px;
  }

  .page-hero-board {
    min-height: 560px;
    border-radius: 34px;
  }

  .page-hero-caption {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .page-hero-caption h1 {
    font-size: clamp(2.5rem, 12vw, 3.6rem);
  }

  .page-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-head h2,
  .cta-box h2 {
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }

  .gallery-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    min-height: 340px;
  }

  .video-card {
    flex: 0 0 82%;
    height: 520px;
  }

  .video-lightbox {
    padding: 12px;
  }

  .video-lightbox-header strong {
    font-size: 1.25rem;
  }

  .video-back-btn {
    padding: 10px 15px;
    font-size: .9rem;
  }

  .video-lightbox video {
    width: 100%;
    height: 82vh;
    border-radius: 18px;
  }

  .section,
  .video-section {
    padding: 64px 0;
  }

  .cta-box {
    padding: 42px 22px;
    border-radius: 34px;
  }

  .cta-box img {
    width: 100px;
    height: 100px;
  }

  .cta-section {
    padding: 56px 0 44px;
  }

  footer {
    padding: 16px 5% 18px;
  }

  footer p:first-of-type {
    white-space: nowrap;
    font-size: clamp(.62rem, 3.6vw, .92rem);
  }

  .ws-float {
    width: 56px;
    height: 56px;
    font-size: 30px;
    bottom: 18px;
    right: 18px;
  }
}

/* Celulares pequeños / gama baja (iPhone SE, Android 320-380px) */
@media (max-width: 380px) {
  :root {
    --logo-mobile-height: 54px;
  }

  .top-nav {
    gap: 8px;
    padding: 7px 8px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
    font-size: .95rem;
  }

  .btn {
    min-height: 40px;
    padding: 9px 12px;
    font-size: .78rem;
    gap: 6px;
  }

  .page-hero-caption h1 {
    font-size: clamp(2rem, 11vw, 2.9rem);
  }

  .page-hero-caption p,
  .section-head p,
  .cta-box p {
    font-size: .94rem;
  }

  .step-card {
    padding: 22px;
  }

  .cta-box {
    padding: 34px 18px;
  }

  .cta-box img {
    width: 84px;
    height: 84px;
  }

  .ws-float {
    width: 52px;
    height: 52px;
    font-size: 27px;
  }
}

/* Celular acostado (landscape): evita que todo quede más alto que la pantalla */
@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --logo-mobile-height: 48px;
  }

  .page-hero {
    min-height: auto;
    padding: 96px 0 40px;
  }

  .page-hero-board {
    min-height: 78vh;
  }

  .section,
  .video-section {
    padding: 48px 0;
  }

  .video-card {
    height: 76vh;
    min-height: 300px;
  }

  .gallery-card,
  .image-carousel .gallery-card {
    min-height: 260px;
  }

  .nav-links {
    max-height: 62vh;
  }
}
