html, body{
    margin: 0;
    padding: 0;
}
p,h1,h2,h3,span {
  font-family: "Familjen Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
}

.container {
    margin-left: auto;
    margin-right: auto;
    padding: 80px;
    text-align: center;
}

@media (max-width: 768px) {
    .container{
      padding: 50px 10px 50px 10px;
    }
}



.video-inicial {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;

    /* Imagen respaldo mientras carga el video */
    background-image: url(../img/background-fotito.jpg);
    background-size: cover;
    background-position: bottom;
}

/* Videos como fondo */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
}

/* Desktop por defecto */
.video-desktop {
    display: block;
}

/* Mobile oculto en desktop */
.video-mobile {
    display: none;
}

/* Media query para usar el mobile video */
@media (max-width: 768px) {
    .video-desktop {
        display: none;
    }
    .video-mobile {
        display: block;
    }
}

/* Overlay negro suave */
.video-inicial .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.50); /* puedes ajustar la opacidad */
    z-index: 2;
}

/* Título encima de overlay y video 
.title-novios {
    position: relative;
    z-index: 3;
    color: white;
}*/

.title-novios{
    position: absolute;
    bottom: 100px;
    left: 20px;
    z-index: 3;
}
.title-novios h1, 
.title-novios p{
    color: #FFF;    
}
.title-novios h1{
    font-size: 160px;
    font-weight: 700;
    line-height: 125px;
    margin-bottom: 0;
}
.title-novios p{
    font-size: 40px;
    margin-top: 25px;
}

.message p{
    font-size: 24px;
    text-align: center;
}
.message span{
    font-weight: 700;
}
.contador{
    text-align: center;
}
.contador h2{
    font-size: 60px;
    font-weight: 900;
    margin: 0;
    line-height: 55px;
}
.contador h3{
    font-size: 30px;
    font-weight: 400;
    margin: 0;
}

/* Contador */
/* ----- Estilo base ----- */
.countdown-section {
  display: flex;
  width: 100%;
  max-width: 1100px;
  margin: auto;
  border: 1px solid #ccc;
}

.mes-dias,
.resto-fecha {
  display: flex;
  flex-direction: row;
  flex: 1;
}

.count-box {
  flex: 1;
  padding: 30px 40px;
  text-align: center;
  border-right: 1px solid #ccc;
}

.count-box span {
  display: block;
  font-size: 70px;
  font-weight: 500;
  color: #222;
}

.count-box p {
  font-size: 20px;
  color: #444;
  margin-top: 0;
}

.mes-dias{
    width: 40%;
}

.resto-fecha{
    width: 60%;
}


/* ---------- DESKTOP: todos en una única fila ---------- */
@media (min-width: 701px) {
  .count-box{
    padding: 15px 10px;
  }  
  .countdown-section {
    display: flex;
  }

  /* Forzar una sola fila: los hijos deben comportarse como columnas */
  .mes-dias,
  .resto-fecha {
    flex-direction: row;
    flex: unset;         /* quita el 1:1 que agrupaba demasiado */
  }

  /* Cada count-box debe ocupar el mismo ancho total (20%) */
  .count-box {
    width: 20%;
  }

  /* Restaurar bordes correctos para las 5 cajas */
  .count-box {
    border-right: 1px solid #ccc;
  }
  
  .countdown-section > .resto-fecha > .count-box:last-child {
    border-right: none; /* último de los 5 no lleva borde */
  }
}


/* ---------- MOBILE: dos filas, 2 arriba + 3 abajo ---------- */
@media (max-width: 700px) {
  .count-box{
    padding: 15px 10px;
  }
  .countdown-section {
    flex-direction: column;
  }

  /* Fila 1: Meses + Días */
  .mes-dias {
    width: 100%;
  }

  .mes-dias .count-box {
    width: 50%;
    border-bottom: 1px solid #ccc;
  }

  .mes-dias .count-box:last-child {
    border-right: none;
  }

  /* Fila 2: Horas + Minutos + Segundos */
  .resto-fecha {
    width: 100%;
  }

  .resto-fecha .count-box {
    width: 33.33%;
    border-bottom: none;
  }

  .resto-fecha .count-box:last-child {
    border-right: none;
  }

  /* Ajuste tamaños */
  .count-box span {
    font-size: 40px;
  }

  .count-box p {
    font-size: 15px;
  }

.message p {
    padding: 0 20px;
}

.title-novios h1{
    font-size: 100px;
    line-height: 80px;
}

.title-novios p {
    font-size: 30px;
}
.countdown-section{
    width: 92%;
}

}


/*GAME GAME GAME */

#game-message{
    font-size: 28px;
}
#game-message small{
    font-size: 20px;
    font-weight: 100;
}

.game-wrapper {
  padding: 20px 16px 40px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.game-title {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 600;
  color: #000;
  min-height: 50px;
}

#game-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

/* Canvas: sin borde ni fondo, se escala al ancho */
#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #f6f6f6;
}

/* Mensajes (inicio, perder, ganar) */
.game-overlay {
  margin-top: 20px;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  text-shadow: 0 2px 6px rgba(255,255,255,0.9);
  pointer-events: none; /* no bloquea taps/clicks */
  opacity: 0;
  transition: opacity 0.25s ease;
  flex-direction: column;
  font-size: 20px;
  font-family: "Familjen Grotesk", sans-serif;
}

.game-overlay.visible {
  opacity: 1;
}

.game-instructions {
  font-size: 0.85rem;
  margin-top: 10px;
  color: #666;
}

/* Un poquito más grande en pantallas grandes */
@media (min-width: 768px) {
  .game-title {
    font-size: 24px;
  }
  .game-instructions {
    font-size: 0.9rem;
  }
}

#game-container {
  touch-action: none; /* evita zoom y scroll dentro del canvas */
}

body {
  touch-action: auto; /* fuera del juego funciona normal */
}

.jump-btn {
  display: none; /* Oculto en desktop */
  width: 70%;
  padding: 14px;
  font-size: 22px;
  font-weight: bold;
  background: #242424;
  color: white;
  border: none;
  border-radius: 12px;
  margin-top: 12px;
  cursor: pointer;
  margin: 12px auto;
}

@media (max-width: 768px) {
  .jump-btn {
    display: block;
  }
}

body.invitation{
  background-color: #F5F4EC;
}

body.invitation .countdown-section{
  width: 60%;
}

body.invitation .count-box span{
  font-size: 50px;
}

body.invitation .count-box p {
    font-size: 15px;
}

@media (max-width: 700px) {
    body.invitation .countdown-section {
        width: 92%;
    }
    body.invitation .mes-dias {
        width: 40%;
    }

    body.invitation .resto-fecha{
        width: 60%;
    }
    body.invitation .countdown-section {
        flex-direction: row;
    }
    body.invitation .mes-dias .count-box,
    body.invitation  .resto-fecha .count-box{
      width: 20%;
    }
    body.invitation .count-box span {
    font-size: 35px;
    }
    body.invitation .message p {
        padding: 0 12px;
    }
    body.invitation .mes-dias .count-box{
      border-bottom: 0;
    }
    body.invitation .mes-dias .count-box:last-child {
        border-right: 1px solid #cccccc;
    }
}



#rsvp-section{
  background: #f5f4ec;
  padding: 50px 0;
  border-radius: 10px;
  max-width: 900px;
  margin: 60px auto;
  text-align: center;
}

@media (max-width: 700px) {
  #rsvp-section{
    margin: 60px 20px;
  }
}

#rsvp-form{
  text-align: center;
  margin-top: 60px;
}

.rsvp-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:12px 0;
}

.rsvp-row label{
  font-weight:600;
}

.rsvp-row select{
  min-width:140px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #ddd;
}
#rsvp-submit{
  padding: 12px 60px;
  border-radius:12px;
  border:none;
  background:#111;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
#rsvp-submit:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/*mapa*/
.location-section {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

.location-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.location-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #222222;
  border: 1px solid #e0e0e0;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-family: "Familjen Grotesk", sans-serif;
}

.location-btn svg {
  width: 18px;
  height: 18px;
  fill: #222222;
}

.location-btn:hover {
  background: #f3f3f3;
  transform: translateY(-1px);
}

.location-text {
  font-size: 30px !important;
  margin-bottom: 24px;
  line-height: 1.4;
}

/* Mapa responsive */
.map-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
}

.map-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .location-title {
    font-size: 1.4rem;
  }

  .map-wrapper {
    aspect-ratio: 4 / 5;
  }
}

#rsvp-section{
  text-align: center;
}

/* INTRO */
:root{
  --ink:#222222;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; background:var(--bg); color:var(--ink); font-family:system-ui, -apple-system, Segoe UI, Arial; }

/* INTRO full screen */
.intro{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px 16px 24px;
  background: #ffffff;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 43%, rgba(245, 244, 236, 1) 100%, rgba(255, 255, 255, 1) 100%)
}

.intro-inner{
  width: 100%;
  max-width: 920px;
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.intro-image{
  width: 50%;
  max-width: 720px;
  height: auto;
  display:block;
  image-rendering: pixelated;
}

/* Parte inferior */
.intro-bottom{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 8px;
  margin-top: 6px;
}

.intro-logo{
  height: 134px;
  width:auto;
  display:block;
}

.intro-text{
  margin:0;
  font-size: 0.95rem;
  opacity: .8;
}

/* Mouse */
.scroll-hint{
  margin-top: 6px;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(34,34,34,.35);
  border-radius: 999px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top: 8px;
  opacity: .75;
}
.scroll-hint span{
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(34,34,34,.5);
  animation: dot 1.2s infinite ease-in-out;
}
@keyframes dot{
  0%{ transform: translateY(0); opacity:.3; }
  50%{ transform: translateY(16px); opacity:1; }
  100%{ transform: translateY(0); opacity:.3; }
}

/* CONTENIDO: aparece cuando haces scroll */
.content{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
body.revealed .content{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Logo fijo arriba (solo cuando revealed) */
.fixed-logo{
  position: fixed;
  width: 100%;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  background: #ffffffa8;
  backdrop-filter: blur(20px);
}
.fixed-logo img{
  height: 75px; /* pequeño */
  width: auto;
  display:block;
  margin: 0 auto;
}

body.revealed .fixed-logo{
  opacity: 1;
}

/*Marquee fotos*/
.photo-marquee{
  padding: 24px 0;
  overflow: hidden; /* recorta el loop */
}

/* Cada fila */
.photo-marquee__row{
  width: 100%;
  overflow: hidden;
  padding: 8px 0;
}

/* Track animado */
.photo-marquee__track{
  display: flex;
  gap: 14px;
  width: max-content;
  will-change: transform;
}

/* Cada cuadrito */
.photo-tile{
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0,0,0,.04);
}

/* El ancho del tile define cuántos "se ven" en pantalla */
.photo-tile img{
  display:block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Desktop: 4 tiles visibles aprox */
@media (min-width: 768px){
  .photo-tile{
    width: calc((min(1100px, 100vw) - 16px*2 - 14px*3) / 4);
    aspect-ratio: 1 / 1; /* cuadrado */
  }
}

/* Mobile: 2 tiles visibles */
@media (max-width: 767px){
  .photo-tile{
    width: calc((100vw - 16px*2 - 14px*1) / 2);
    aspect-ratio: 1 / 1;
  }
}

/* Animaciones */
.photo-marquee__row--right .photo-marquee__track{
  animation: marquee-right 26s linear infinite;
}
.photo-marquee__row--left .photo-marquee__track{
  animation: marquee-left 28s linear infinite;
}

/* De izquierda a derecha: va del -50% a 0% (porque duplicamos el set) */
@keyframes marquee-right{
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}

/* Derecha a izquierda: va de 0% a -50% */
@keyframes marquee-left{
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce){
  .photo-marquee__track{
    animation: none !important;
    transform: translateX(0) !important;
  }
}

#saludo-container{
  background: #fff;
}

body.invitation #saludo{
  font-size: 40px;
}

body.invitation .titlesectinos{
  font-size: 80px;
  line-height: 60px;
  color: #e9e8dd;
}

.nuestra-historia p{
  font-family: "Lato", sans-serif;
  font-weight: 300;
}

.mensaje-info{
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-size: 16px !important;
}

.dresscode p{
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-size: 18px;
}

@media (max-width: 767px){
  .nuestra-historia p{
    padding: 0 30px;
    font-size: 20px;
  }
  .titlesectinos{
    font-size: 60px !important;
    line-height: 40px !important;
  }
}