/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM — cacao & cía.
   Asegura visualización óptima, legible y fluida en Móviles, Tablets y Desktop.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. MEJORAS GLOBALES DE ESCALA
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) and (max-height: 750px) {
  /* Laptops con pantallas anchas pero altura reducida */
  :root {
    --s: min(calc(100vw / 1376), calc(100vh / 700));
  }
}

/* --------------------------------------------------------------------------
   1b. HERO — MÓVIL Y TABLET (<= 1199px)
   Se conserva la composición del escritorio (lienzo 1376x768) con una escala
   propia --s solo para .hero. Las partículas usan calc(N * var(--s)), así que
   mantienen su posición relativa. Orden visual (como en PC):
   overline -> línea "hecho a mano" -> CHOCOLATE (DETRÁS del chocolate) ->
   escenario con la barra -> carrusel de sabores.

   Variables para afinar (dentro de .hero):
   --hero-fit      : menor = chocolate más grande (580 ≈ ocupa todo el ancho)
   --title-fs      : tamaño de la palabra CHOCOLATE
   --title-overlap : fracción de CHOCOLATE que queda tapada por la barra (0 a 1)
   --cw            : ancho de la tarjeta central del carrusel
   --crop / --stage-h / --glow-cy : recorte del lienzo y posición de la luz
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {

  .hero {
    --hero-fit: 580;
    --crop: 186;
    --stage-h: 440;
    --glow-cy: 405;
    --hero-top: 84px;
    --title-overlap: 0.5;

    /* ===== CONTROL DE LA PALABRA "CHOCOLATE" (solo móvil / tablet) =====
       Valores en unidades de lienzo: se escalan con el chocolate.
       --title-y     : + baja / - sube        (ej. 40, 60, 80, -20)
       --title-x     : + derecha / - izquierda (ej. 0, 15, -15)
       --title-scale : tamaño (1 = normal, 1.1 = 10% más grande, 0.9 = más chico) */
    --title-y: 60;
    --title-x: 0;
    --title-scale: 1;
    --s: min(calc(100vw / var(--hero-fit)), max(calc((100svh - 440px) / 440), 0.42px));
    --title-fs: clamp(40px, min(15.2vw, 19svh), 170px);
    /* 3 tarjetas ocupan la pantalla; de las siguientes solo asoma un poco */
    --cw: clamp(100px, min(34vw, 20svh), 210px);

    height: auto;
    min-height: max(100svh, 560px);
    padding: var(--hero-top) 0 calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .hero .scene {
    display: contents;
  }

  .hero .hero-glow {
    display: none;
  }

  /* ---- Textos: overline y línea corta ARRIBA; CHOCOLATE detrás de la barra ---- */
  .hero .hero-overline {
    order: 1;
    position: relative;
    inset: auto;            /* anula top/left del escritorio */
    z-index: 1;
    transform: none;
    margin: 0;
    padding: 0 12px;
    font-size: clamp(10.5px, 3.3vw, 18px);
    letter-spacing: 0.32em;
    text-align: center;
    white-space: nowrap;
  }

  .hero .hero-corner-left,
  .hero .hero-corner-right {
    display: none !important;
  }

  .hero .hero-corner-mobile {
    order: 2;
    display: block;
    position: relative;
    inset: auto;
    z-index: 1;
    margin: 8px auto 0;
    padding: 0 12px;
    max-width: 100%;
    font-size: clamp(9.5px, 2.8vw, 15px);
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-align: center;
    opacity: 0.9;
  }

  .hero .hero-title {
    order: 3;
    position: relative;
    inset: auto;            /* anula top: 188*s del escritorio (era lo que lo bajaba) */
    z-index: 1;                       /* por debajo de la barra (z-index 3) */
    width: 100%;
    margin: 10px 0 calc(var(--title-fs) * var(--title-overlap) * -1);
    font-size: var(--title-fs);
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-align: center;
    transform-origin: 50% 50%;
    transform: translate(calc(var(--title-x) * var(--s)), calc(var(--title-y) * var(--s))) scale(var(--title-scale));
  }

  /* ---- Escenario ---- */
  .hero .stage {
    order: 4;
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    height: calc(var(--stage-h) * var(--s));
    margin: 0;
    z-index: auto;   /* sin contexto propio: título, luz y barra se apilan en el .hero */
  }

  /* Luz naranja difuminada, centrada detrás del chocolate (y debajo del título) */
  .hero .stage::before {
    content: "";
    position: absolute;
    left: 50%;
    top: calc((var(--glow-cy) - var(--crop)) * var(--s));
    width: calc(900 * var(--s));
    height: calc(700 * var(--s));
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center,
        var(--glow-color) 0%,
        rgba(184, 101, 42, 0.35) 32%,
        transparent 58%);
    filter: blur(12px);
    pointer-events: none;
    z-index: 0;
    transition: --glow-color 0.7s ease;
  }

  .hero .floaters-layer {
    inset: auto;
    left: 50%;
    top: calc(var(--crop) * var(--s) * -1);
    width: calc(1376 * var(--s));
    height: calc(768 * var(--s));
    margin-left: calc(-688 * var(--s));
  }

  .hero .hero-product-showcase {
    top: calc((var(--product-top) - var(--crop)) * var(--s));
    width: calc(var(--product-width) * var(--s));
  }

  /* ---- Carrusel: 3 tarjetas visibles + un pequeño asomo de las siguientes ---- */
  .hero .flavor-dock-container {
    order: 5;
    position: relative;
    bottom: auto;
    left: auto;
    flex: none;
    display: block;
    width: 100%;
    height: calc(var(--cw) * 1.5);
    margin-top: 0;
    padding: 0;
    overflow: visible;
    pointer-events: auto;
    touch-action: pan-y;
    z-index: 10;
  }

  .hero .flavor-dock {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    gap: 0;
  }

  .hero .flavor-dock .flavor-card {
    --dx: 0px;
    --sc: 0.74;
    position: absolute;
    left: 50%;
    top: 58%;
    flex-shrink: 0;
    width: var(--cw);
    height: calc(var(--cw) * 1.08);
    margin: 0;
    padding: calc(var(--cw) * 0.08) calc(var(--cw) * 0.05);
    gap: calc(var(--cw) * 0.07);
    border-radius: calc(var(--cw) * 0.2);
    transform: translate(calc(-50% + var(--dx)), -50%) scale(var(--sc));
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.25, 1),
      opacity 0.45s ease,
      box-shadow 0.35s ease,
      background 0.35s ease,
      border-color 0.35s ease;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
  }

  .hero .flavor-dock .flavor-card[data-pos="0"] {
    --dx: 0px;
    --sc: 1;
    z-index: 4;
    opacity: 1;
  }

  .hero .flavor-dock .flavor-card[data-pos="1"] {
    --dx: calc(var(--cw) * 0.96);
    --sc: 0.88;
    z-index: 3;
    opacity: 1;
  }

  .hero .flavor-dock .flavor-card[data-pos="-1"] {
    --dx: calc(var(--cw) * -0.96);
    --sc: 0.88;
    z-index: 3;
    opacity: 1;
  }

  .hero .flavor-dock .flavor-card[data-pos="2"] {
    --dx: calc(var(--cw) * 1.72);
    --sc: 0.74;
    z-index: 2;
    opacity: 0.8;
  }

  .hero .flavor-dock .flavor-card[data-pos="-2"] {
    --dx: calc(var(--cw) * -1.72);
    --sc: 0.74;
    z-index: 2;
    opacity: 0.8;
  }

  .hero .flavor-dock .flavor-card.is-wrapping {
    transition: none !important;
    opacity: 0;
  }

  .hero .flavor-thumb-box {
    width: calc(var(--cw) * 0.56);
    height: calc(var(--cw) * 0.56);
  }

  .hero .flavor-name {
    font-size: calc(var(--cw) * 0.135);
  }

  .header {
    display: flex;
    justify-content: space-between;
  }
}

@media (max-width: 767px) {
  .hero {
    --hero-top: 72px;
  }
}


/* --------------------------------------------------------------------------
   2. TABLET EN MODO LANDSCAPE Y PORTRAIT (768px a 1199px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1199px) {

  /* Header Tablet */
  .header {
    height: 84px;
    padding: 0 32px;
  }

  .header-nav {
    display: none; /* Navegación limpia mediante drawer en tablet */
  }

  .header-signin {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  /* ------------------------------------------------------------------------
     SECCIÓN EXPLORAR (TABLET)
     ------------------------------------------------------------------------ */
  .explore {
    min-height: 100vh;
    height: auto;
    padding: 110px 32px 80px;
    position: relative;
    overflow-x: hidden;
  }

  .explore-scene {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 860px;
    height: auto;
    margin: 0 auto;
  }

  .view-explore {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ex-overline {
    position: static;
    transform: none;
    font-size: 13px;
    letter-spacing: 0.35em;
    margin-bottom: 8px;
  }

  .ex-title {
    position: static;
    transform: none;
    font-size: clamp(46px, 7vw, 70px);
    line-height: 1.05;
    margin-bottom: 10px;
    padding-top: 0;
  }

  .ex-subtitle {
    position: static;
    transform: none;
    font-size: 15.5px;
    margin-bottom: 32px;
    white-space: normal;
    max-width: 580px;
  }

  /* Cuadrícula 2x2 para las 4 tarjetas en tablet */
  .ex-cards {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 660px;
    height: auto;
  }

  .ex-card {
    width: 100% !important;
    height: 250px !important;
    border-radius: 18px;
  }

  .ex-card-label {
    font-size: 14px;
    letter-spacing: 0.22em;
  }

  .ex-pager {
    position: static;
    transform: none;
    margin-top: 32px;
  }

  /* Vista B (Detalle en Tablet) */
  .view-detail {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .dt-back {
    position: relative;
    left: auto;
    top: auto;
    align-self: flex-start;
    margin-bottom: 24px;
    font-size: 12.5px;
  }

  .dt-media {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 520px;
    height: 340px;
    margin-bottom: 32px;
  }

  .dt-frame {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 100%;
    border-radius: 20px;
  }

  .dt-foreground {
    position: absolute;
    left: 50% !important;
    bottom: -15px !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    width: clamp(220px, 35vw, 320px) !important;
    max-height: 260px;
  }

  .dt-seal {
    width: 80px;
    height: 80px;
    left: 12px;
    top: 12px;
  }

  .dt-polaroid {
    display: none; /* En tablet limpiamos polaroids para foco editorial */
  }

  .dt-info {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 640px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .dt-overline {
    font-size: 12px;
    letter-spacing: 0.35em;
  }

  .dt-title {
    font-size: clamp(34px, 5.5vw, 48px);
    margin-top: 10px;
  }

  .dt-line {
    margin: 14px auto;
  }

  .dt-p {
    font-size: 15px;
    max-width: 100%;
    margin: 14px auto;
  }

  .dt-content-grid {
    position: relative;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    margin-top: 20px;
  }

  .dt-rows {
    width: 100%;
    max-width: 440px;
    text-align: left;
  }

  .dt-aside {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 320px;
    align-items: center;
    text-align: center;
  }

  .dt-aside-caption {
    text-align: center;
  }

  .dt-next {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    margin-top: 30px;
  }

  /* ------------------------------------------------------------------------
     SECCIÓN GALERÍA (TABLET)
     ------------------------------------------------------------------------ */
  .galeria {
    min-height: 100vh;
    height: auto;
    padding: 100px 32px 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .galeria-scene {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 720px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }

  .gal-overline {
    position: static;
    transform: none;
    font-size: 14px;
  }

  .gal-corner-left,
  .gal-corner-right {
    display: none;
  }

  .featured-project {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: clamp(280px, 45vw, 360px);
    height: clamp(360px, 50vh, 460px);
    border-radius: 18px;
    margin: 8px 0;
  }

  .project-title {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: clamp(54px, 10vw, 92px);
    text-align: center;
    margin-top: -12px;
  }
}

/* --------------------------------------------------------------------------
   3. DISPOSITIVOS MÓVILES (Menores a 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

  /* Ajustes generales del viewport */
  html,
  body {
    overflow-x: hidden;
  }

  /* Header Móvil */
  .header {
    height: 72px;
    padding: 0 20px;
  }

  .header-logo {
    font-size: 22px;
    gap: 8px;
  }

  .header-logo-icon {
    width: 26px;
    height: 26px;
  }

  .btn-shop-now {
    padding: 8px 16px;
    font-size: 13.5px;
  }

  /* ------------------------------------------------------------------------
     SECCIÓN EXPLORAR (MÓVIL)
     ------------------------------------------------------------------------ */
  .explore {
    min-height: 100vh;
    height: auto;
    padding: 90px 20px 70px;
    position: relative;
    overflow-x: hidden;
  }

  .explore-scene {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
  }

  .view-explore {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ex-overline {
    position: static;
    transform: none;
    font-size: 11.5px;
    letter-spacing: 0.28em;
    margin-bottom: 6px;
  }

  .ex-title {
    position: static;
    transform: none;
    font-size: clamp(38px, 12vw, 56px);
    line-height: 1;
    margin-bottom: 10px;
    padding-top: 0;
  }

  .ex-subtitle {
    position: static;
    transform: none;
    font-size: 14px;
    margin-bottom: 28px;
    white-space: normal;
    padding: 0 10px;
    max-width: 360px;
  }

  /* Tarjetas apiladas elegantes en móvil */
  .ex-cards {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 360px;
    height: auto;
  }

  .ex-card {
    width: 100% !important;
    height: 220px !important;
    border-radius: 18px;
  }

  .ex-card-label {
    font-size: 14px;
    letter-spacing: 0.22em;
  }

  .ex-pager {
    position: static;
    transform: none;
    margin-top: 24px;
  }

  /* Vista B (Detalle en Móvil) */
  .view-detail {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .dt-back {
    position: relative;
    left: auto;
    top: auto;
    align-self: flex-start;
    margin-bottom: 18px;
    font-size: 12px;
    padding: 6px 0;
  }

  .dt-media {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 360px;
    height: 260px;
    margin-bottom: 24px;
  }

  .dt-frame {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 100%;
    border-radius: 18px;
  }

  .dt-foreground {
    position: absolute;
    left: 50% !important;
    bottom: -15px !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    width: clamp(170px, 48vw, 220px) !important;
    max-height: 210px;
  }

  .dt-seal {
    width: 65px;
    height: 65px;
    left: 8px;
    top: 8px;
  }

  .dt-polaroid {
    display: none;
  }

  .dt-info {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 360px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .dt-overline {
    font-size: 11px;
    letter-spacing: 0.3em;
  }

  .dt-title {
    font-size: clamp(28px, 8.5vw, 40px);
    margin-top: 8px;
    line-height: 1.05;
  }

  .dt-title-line {
    white-space: normal;
  }

  .dt-line {
    margin: 12px auto;
  }

  .dt-p {
    font-size: 14px;
    max-width: 100%;
    margin: 12px auto;
    line-height: 1.55;
  }

  .dt-content-grid {
    position: relative;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
  }

  .dt-rows {
    width: 100%;
    max-width: 340px;
    text-align: left;
    gap: 12px;
  }

  .dt-aside {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 280px;
    align-items: center;
    text-align: center;
  }

  .dt-aside-caption {
    text-align: center;
  }

  .dt-next {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    margin-top: 24px;
  }

  /* ------------------------------------------------------------------------
     SECCIÓN GALERÍA (MÓVIL)
     ------------------------------------------------------------------------ */
  .galeria {
    min-height: 100vh;
    height: auto;
    padding: 90px 20px 70px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .galeria-scene {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 360px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .gal-overline {
    position: static;
    transform: none;
    font-size: 12px;
    letter-spacing: 0.28em;
  }

  .gal-corner-left,
  .gal-corner-right {
    display: none;
  }

  .featured-project {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: clamp(240px, 72vw, 300px);
    height: clamp(310px, 48vh, 390px);
    border-radius: 16px;
    margin: 6px 0;
  }

  .project-title {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: clamp(44px, 13vw, 76px);
    text-align: center;
    line-height: 0.9;
    margin-top: -8px;
  }

  /* Visor a pantalla completa en móvil */
  .gallery-overlay {
    padding: 60px 16px 30px;
  }

  .gallery-header {
    top: 16px;
    left: 16px;
    right: 16px;
    padding: 0 4px;
  }

  .gallery-stage {
    perspective: 800px;
  }

  .gallery-card {
    width: clamp(260px, 80vw, 360px);
    height: clamp(350px, 58vh, 520px);
    border-radius: 16px;
  }
}

/* --------------------------------------------------------------------------
   4. PANTALLAS ULTRA PEQUEÑAS (Menores a 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .ex-card {
    height: 190px !important;
  }
}

/* ==========================================================================
   5. "DESCUBRE MÁS" — CORRECCIONES MÓVIL Y TABLET (<= 1199px)
   Causas que se corrigen:
   a) Vista A: explore.css (móvil) deja en .ex-card `flex: 0 0 72vw` y
      `max-width: 270px`. Como .ex-cards es una columna, 72vw se aplicaba a la
      ALTURA y el ancho quedaba en 270px pegado a la izquierda.
   b) Vista B: muchos tamaños usan calc(N * var(--s)) y --s en móvil es ~0.3px,
      así que textos, iconos, botón y líneas salían diminutos. Aquí se fijan en px.
   ========================================================================== */
@media (max-width: 1199px) {

  /* ---------- VISTA A: tarjetas centradas ---------- */
  .explore .ex-cards {
    align-items: center;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
    margin-inline: auto;
  }

  .explore .ex-card {
    flex: none;
    max-width: none;
    margin-inline: auto;
  }

  .explore .ex-card-body {
    gap: 10px;
    padding-bottom: 22px;
  }

  .explore .ex-card-icon {
    width: 34px;
    height: 34px;
  }

  .explore .ex-card-line,
  .explore .ex-card:hover .ex-card-line {
    width: 44px;
  }

  .explore .ex-pager {
    gap: 6px;
  }

  .explore .ex-pager-line.line-1,
  .explore .ex-pager-line.line-4 {
    width: 40px;
  }

  .explore .ex-pager-line.line-2,
  .explore .ex-pager-line.line-3 {
    width: 34px;
  }

  .explore .ex-pager-ring {
    width: 20px;
    height: 20px;
    margin: 0 4px;
  }

  .explore .ex-pager-dot {
    width: 8px;
    height: 8px;
  }

  /* ---------- VISTA B: detalle con tamaños legibles ---------- */
  .explore .dt-back {
    gap: 10px;
  }

  .explore .dt-back svg {
    width: 18px;
    height: 18px;
  }

  .explore .dt-line {
    width: 48px;
    height: 1.5px;
  }

  /* Lista de datos (REGIÓN, ALTITUD, CLIMA...) */
  .explore .dt-rows {
    width: 100%;
    max-width: 400px;
    gap: 18px;
  }

  .explore .dt-row {
    grid-template-columns: 34px 1fr;
    column-gap: 16px;
    align-items: center;
  }

  .explore .dt-row-icon {
    width: 30px;
    height: 30px;
    display: block;
  }

  .explore .dt-row-icon svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .explore .dt-row-meta {
    gap: 5px;
  }

  .explore .dt-row-label {
    font-size: 11.5px;
    letter-spacing: 0.22em;
    line-height: 1.2;
  }

  .explore .dt-row-value {
    font-size: 14.5px;
    line-height: 1.35;
  }

  /* Mapa lateral (Origen / Locaciones) */
  .explore .dt-aside {
    max-width: 240px;
  }

  .explore .dt-aside-map-wrap {
    width: 150px;
  }

  .explore .dt-aside-map-img {
    max-height: 180px;
  }

  .explore .dt-aside-caption {
    margin-top: 10px;
    gap: 4px;
  }

  .explore .dt-aside-title {
    font-size: 11.5px;
    letter-spacing: 0.3em;
  }

  .explore .dt-aside-subtitle {
    font-size: 15px;
  }

  /* Cierre: línea + botón de avance + tagline */
  .explore .dt-next {
    width: 100%;
    max-width: 440px;
    gap: 14px;
  }

  .explore .dt-next-row {
    gap: 16px;
  }

  .explore .dt-next-btn {
    width: 46px;
    height: 46px;
    flex: none;
  }

  .explore .dt-next-btn svg {
    width: 20px;
    height: 20px;
  }

  .explore .dt-tagline {
    font-size: 12px;
    letter-spacing: 0.28em;
    line-height: 1.5;
    padding: 0 8px;
  }

  /* Paginador de secciones (4 puntos) */
  .explore .dt-dots {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .explore .dt-dots-list {
    gap: 12px;
  }

  .explore .dt-dot {
    width: 15px;
    height: 15px;
  }

  .explore .dt-dot::after {
    width: 7px;
    height: 7px;
  }

  .explore .dt-dots-line {
    width: 30px;
    margin-left: 0;
  }

  .explore .dt-dots-label {
    font-size: 10.5px;
    letter-spacing: 0.26em;
  }
}

/* Tablet: un punto más grande que en móvil */
@media (min-width: 768px) and (max-width: 1199px) {
  .explore .dt-rows {
    max-width: 460px;
  }

  .explore .dt-row-label {
    font-size: 12.5px;
  }

  .explore .dt-row-value {
    font-size: 16px;
  }

  .explore .dt-tagline {
    font-size: 13px;
  }

  .explore .dt-aside-map-wrap {
    width: 180px;
  }
}

/* ==========================================================================
   6. GALERÍA — título "GALERÍA" a todo el ancho (<= 1199px)
   CONTROL: cambia --gal-title-fs para agrandar o reducir la palabra.
   (22vw ≈ ocupa el ancho de la pantalla; sube a 23vw si la quieres aún más grande)
   ========================================================================== */
@media (max-width: 1199px) {
  .galeria {
    /* ===== CONTROL DE LA PALABRA "GALERÍA" (solo móvil / tablet) =====
       --gal-title-fs    : tamaño base (22vw ≈ todo el ancho)
       --gal-title-y     : + baja / - sube        (1 unidad = 1% del ancho de pantalla)
       --gal-title-x     : + derecha / - izquierda (1 unidad = 1% del ancho de pantalla)
       --gal-title-scale : 1 = normal, 1.1 = 10% más grande, 0.9 = más chico
       Ej.: subirla para que la portada la tape un poco -> --gal-title-y: -4 */
    --gal-title-fs: clamp(44px, min(22vw, 26svh), 260px);
    --gal-title-y: 0;
    --gal-title-x: 0;
    --gal-title-scale: 1;
  }

  .galeria .project-title {
    width: 100vw;          /* sale del contenedor de 360px y queda centrado en pantalla */
    max-width: none;
    align-self: center;
    padding: 0;
    font-size: var(--gal-title-fs);
    line-height: 0.9;
    letter-spacing: -0.02em;
    transform-origin: 50% 50%;
    transform: translate(calc(var(--gal-title-x) * 1vw), calc(var(--gal-title-y) * 1vw)) scale(var(--gal-title-scale));
  }
}

/* ==========================================================================
   7. "DESCUBRE MÁS" — paginador de puntos en tablet (768px a 1199px)
   El bloque de tablet no lo sacaba de su posición absoluta de escritorio
   (left: 68*s, top: 656*s), por eso se montaba sobre la imagen principal.
   Ahora fluye al final, debajo de .dt-next (línea + botón + tagline).
   ========================================================================== */
@media (max-width: 1199px) {
  .explore .dt-dots {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    margin-top: 28px;
    justify-content: center;
  }
}

/* ==========================================================================
   8. MENÚ LATERAL (móvil / tablet): botón de cerrar, fondo y bloqueo de scroll
   El drawer (z-index 22) quedaba por encima del header (20), tapando la
   hamburguesa, y no había forma de cerrarlo.
   ========================================================================== */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 21;                       /* sobre el header (20), bajo el drawer (22) */
  background: rgba(10, 5, 2, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.mobile-menu-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease, visibility 0s;
}

.mobile-menu-drawer {
  max-width: 86vw;
  overflow-y: auto;
  visibility: hidden;                /* cerrado: fuera del foco y del tab */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
}

.mobile-menu-drawer.open {
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(245, 233, 215, 0.55);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(245, 233, 215, 0.06);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.mobile-menu-close:hover {
  transform: rotate(90deg);
  border-color: var(--amber);
  background: rgba(224, 138, 60, 0.15);
}

.mobile-menu-close:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.mobile-menu-drawer .mobile-nav-link {
  min-height: 44px;                  /* área táctil cómoda */
}

html.menu-open,
body.menu-open {
  overflow: hidden;
}

@media (min-width: 1200px) {
  .mobile-menu-backdrop,
  .mobile-menu-drawer {
    display: none;
  }
}
