@font-face {
  font-family: "Nickainley";
  src: url("assets/fonts/Nickainley-Normal.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Glacial Indifference";
  src: url("assets/fonts/GlacialIndifference-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Glacial Indifference";
  src: url("assets/fonts/GlacialIndifference-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Glacial Indifference";
  src: url("assets/fonts/GlacialIndifference-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* CSS Variables */
:root {
  /* ── Paleta del diseño ─────────────────────────────────────── */
  --circle-bg: rgba(34, 34, 34, 0.594);
  --title-color: #ffffff;
  --subtitle-color: #ffffff;
  --branch-color: #e7e7e7;

  --pill-text: #71744b;
  --pill-bg: #edeee5;

  --countdown-num: #e0e0e0;
  --countdown-num-bg: #f2f2f23c;
  --countdown-label: #ffffff;

  --page-bg: #0d0d0d;
  --primary: #cbab6b;
  --dark-bg: #0d0d0d;
  --white: #ffffff;
  --scrollbar-size: 8px;

  /* ── Tipografías ───────────────────────────────────────────── */
  --font-display: "Nickainley", cursive; /* títulos */
  --font-body: "Glacial Indifference", "Jost", sans-serif; /* subtítulos y pills */
  --font-countdown: "Poppins", "Montserrat", sans-serif; /* solo el countdown */

  /* Typography Scale */
  --font-xxxl: clamp(6rem, 12vw, 7rem); /* Main title */
  --font-xxl: clamp(4rem, 8vw, 5rem); /* Script headings */
  --font-xl: clamp(2.8rem, 6vw, 3.5rem); /* Section titles */
  --font-lg: clamp(2.2rem, 5vw, 2.8rem);
  --font-md: clamp(1.25rem, 4vw, 2rem); /* Sub-headings */
  --font-base-md: clamp(0.95rem, 3.2vw, 1.5rem);
  --font-base: clamp(0.8rem, 3vw, 1.4rem);
  --font-sm: clamp(0.5rem, 2.5vw, 1.2rem);
  --font-xs: clamp(0.6rem, 2vw, 0.8rem); /* Labels */
  --tracking-wide: 0.12em;
  --tracking-wider: 0.18em;

  /* Font Weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-loose: 1.8;

  /* Spacing */
  --space-xs: 0.25rem; /* 4px */
  --space-sm: 0.5rem; /* 8px */
  --space-md: 1rem; /* 16px */
  --space-lg: 1.5rem; /* 24px */
  --space-xl: 2rem; /* 32px */
  --space-xxl: 3rem; /* 48px */
  --space-xxxl: 4rem; /* 64px */

  /* Animation Timing */
  --transition-slow: 1.5s;
  --transition-medium: 0.8s;
  --transition-fast: 0.4s;
  --animate-duration: 1s;
  --animate-delay: 0.5s;
  --animate-repeat: 1;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--dark-bg);
}

/* Custom Scrollbar for Webkit Browsers */
::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary);
}

body {
  font-family: var(--font-body);
  background-color: var(--page-bg);
  color: var(--white);
  overflow-x: hidden;
  line-height: var(--line-height-normal);
  font-weight: var(--weight-regular);
  font-size: var(--font-base);
  position: relative;
}

/* Preloader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  overflow: hidden;
}

.preloader-content {
  position: relative;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.heart-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 102;
}

.preloader-custom-icon {
  width: 80px;
  height: 80px;
  animation: heartbeat 1.5s infinite;
}

.pulse-dots {
  position: absolute;
  width: 160px;
  height: 160px;
  animation: dotRotate 12s linear infinite;
}

.dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  opacity: 0.5;
}

.dot:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.dot:nth-child(2) {
  top: 14%;
  right: 14%;
}
.dot:nth-child(3) {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}
.dot:nth-child(4) {
  bottom: 14%;
  right: 14%;
}
.dot:nth-child(5) {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.dot:nth-child(6) {
  bottom: 14%;
  left: 14%;
}
.dot:nth-child(7) {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.dot:nth-child(8) {
  top: 14%;
  left: 14%;
}

.curtain {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  background-color: var(--dark-bg);
  transition: transform 1.5s cubic-bezier(0.86, 0, 0.07, 1);
  z-index: 99;
}

.curtain.left {
  left: 0;
  transform: translateX(0);
}
.curtain.right {
  right: 0;
  transform: translateX(0);
}

@keyframes heartbeat {
  0%,
  28%,
  70% {
    transform: scale(1);
  }
  14%,
  42% {
    transform: scale(1.1);
  }
}

@keyframes dotRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Typography */
h1,
h2,
h3,
h4 {
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
  font-weight: var(--weight-regular);
}

h1,
h2,
h3,
h4,
p,
i,
strong,
b,
em,
span {
  user-select: none;
}

p,
span {
  pointer-events: none;
}

h1 {
  font-size: var(--font-xxxl);
  letter-spacing: 1px;
}
h2 {
  font-size: var(--font-md);
  letter-spacing: 0.5px;
}

p {
  margin-bottom: var(--space-md);
  line-height: var(--line-height-normal);
}
strong,
b {
  font-weight: var(--weight-bold);
}
em,
i {
  font-style: italic;
}

/* Utility Classes */
.text-bg-inline {
  display: inline;
  background-color: var(--pill-bg);
  color: var(--pill-text);
  border-radius: var(--space-xs);
  padding: 0.15em 0.55em;
  letter-spacing: var(--tracking-wide);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.section-subtitle {
  font-family: var(--font-body);
  color: var(--subtitle-color);
  font-size: var(--font-base-md);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  line-height: var(--line-height-tight);
}

.section-icon {
  width: 28%;
  max-width: 110px;
  height: auto;
  object-fit: contain;
  margin: var(--space-xs) auto;
  pointer-events: none;
  flex-shrink: 0;
}

.content-frame .section-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18cqi;
  max-width: none;
  margin: 0;
  z-index: 6;
}

.separator {
  width: 62%;
  height: 1.1rem;
  margin: var(--space-sm) auto 0;
  background: url("assets/images/separator.png") center / contain no-repeat;
  pointer-events: none;
  flex-shrink: 0;
}

.content-frame .separator {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 6;
}

.section-hero .separator,
#final .separator {
  position: static;
  transform: none;
  margin: var(--space-sm) auto 0;
}

.pill-link {
  display: inline-block;
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease-out;
}

.pill-link:hover {
  transform: scale(1.04);
}

.pill-link p {
  margin: 0;
}

.hero-title {
  font-size: var(--font-xxl);
}

.hero-date {
  font-size: var(--font-base);
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 56%;
  white-space: nowrap;
}

.uppercase {
  text-transform: uppercase;
}

/* Video Background */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  object-fit: cover;
}

.bg-video {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease-in-out;
}

/* Scroll Indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

.scroll-indicator-progress {
  height: 100%;
  width: 0;
  background-color: var(--primary);
  transition: width 0.1s ease;
}

/* .Section styles */
.section {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: var(--space-lg);
  box-sizing: border-box;
  text-align: center;
}


.section-main-title {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  font-style: normal;
  font-size: var(--font-xl);
  color: var(--title-color);
}

/* Scroll Down Arrow */
.scroll-arrow-wrap {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
}

.scroll-down-arrow {
  width: 100%;
  height: 100%;
}
/* --- Content Frame Styles --- */

.content-frame {
  display: grid;
  place-items: center;
  width: min(90vw, 26rem);
  max-width: min(90vw, 26rem);
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 50%;
  background-color: var(--circle-bg);
  container-type: inline-size;
}

.content-frame::before,
.content-frame::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 64%;
  aspect-ratio: 1 / 1;
  background: url("assets/images/branch.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 3;
}

.content-frame::before {
  left: -18%;
  transform: translateY(-50%);
}

.content-frame::after {
  right: -18%;
  transform: translateY(-50%) scaleX(-1);
}

.content-frame > * {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
}

.frame-content > .section-main-title {
  margin-bottom: var(--space-sm);
}

.content-frame .section-main-title {
  margin-top: 4cqi;
}

.section-hero .section-main-title,
#final .section-main-title {
  margin-top: 0;
}

.frame-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16%;
  box-sizing: border-box;
  z-index: 5;
  text-align: center;
  overflow: hidden;
}

.content-frame .frame-content {
  justify-content: flex-start;
  padding-top: 5%;
}

.section-hero .frame-content,
#final .frame-content {
  justify-content: center;
}

#final .frame-content {
  padding-top: 16%;
}

.frame-content p {
  margin-bottom: 0;
}

.frame-content .text-bg-inline {
  font-size: clamp(0.55rem, 3.4cqi, 1rem);
}

.frame-content .section-subtitle {
  font-size: clamp(0.75rem, 4.2cqi, 1.2rem);
}

/* --- Hero-Specific Layering --- */

/* --- Content & Cleanup --- */

.info-stack {
  gap: var(--space-xs);
}

.section-hero {
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
  background-color: transparent;
}

/* Countdown Section */

#final .final-message {
  max-width: 74%;
  margin: 0 auto;
  padding-top: 8cqi;
}

#final .final-message p {
  line-height: 1.35;
}

#final .final-message p + p {
  margin-top: 2.5cqi;
}

#final .final-title {
  font-size: clamp(1.3rem, 9cqi, 2.4rem);
  margin-top: 4cqi;
  margin-bottom: 0;
}

#confirmation .section-main-title {
  font-size: clamp(2.2rem, 10cqi, 3rem);
}

#confirmation .section-subtitle {
  font-size: clamp(0.85rem, 3cqi, 1rem);
  margin-top: 10cqi;
}

#confirmation .pill-link .text-bg-inline {
  white-space: nowrap;
  font-size: clamp(0.4rem, 2.8cqi, 0.78rem);
}

#gifts .section-subtitle {
  font-size: clamp(0.55rem, 3cqi, 0.9rem);
}

#dresscode .section-main-title {
  white-space: nowrap;
  font-size: clamp(2.2rem, 8cqi, 3rem);
  margin-top: 2rem;
}

#dresscode .section-subtitle {
  margin-top: 40cqi;
}

#dresscode .section-icon {
  width: 25cqi;
  max-width: none;
}

#ceremony .section-subtitle {
  margin-top: 40cqi;
}

.section:not(#hero, #countdown, #final) .content-frame::before,
.section:not(#hero, #countdown, #final) .content-frame::after {
  top: 55%;
}

#ceremony .section-main-title {
  margin-top: 10cqi;
}

#ceremony .section-subtitle {
  margin-top: 40cqi;
}

#party .section-main-title {
  margin-top: 10cqi;
}

#party .section-subtitle {
  margin-top: 40cqi;
}

#party .section-icon {
  width: 27.5cqi;
  max-width: none;
}

#gifts .section-main-title {
  margin-top: 10cqi;
}

#gifts .section-subtitle {
  margin-top: 40cqi;
}

#gifts .section-icon {
  width: 27.5cqi;
  max-width: none;
}

#confirmation .section-main-title {
  margin-top: 10cqi;
}

#confirmation .section-subtitle {
  margin-top: 40cqi;
}

#confirmation .section-icon {
  width: 27.5cqi;
  max-width: none;
}

.section:not(#hero, #countdown, #final) .frame-content > .pill-link,
.section:not(#hero, #countdown, #final) .frame-content > .text-bg-inline {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  margin: 0;
}

.section:not(#hero, #countdown, #final) .frame-content > .pill-link:hover {
  transform: translateX(-50%) scale(1.04);
}

.section:not(#hero, #countdown, #final) .frame-content > .pill-link > .text-bg-inline {
  display: block;
}

.section#confirmation .frame-content > .pill-link {
  bottom: 11%;
}

#party-pill .text-bg-inline {
  white-space: nowrap;
  font-size: clamp(0.4rem, 2.9cqi, 0.8rem);
  padding: 0.35em 0.5em;
}

#countdown .section-main-title {
  font-size: clamp(3rem, 9cqi, 2.5rem);
  margin-top: 14cqi;
}

#countdown .content-frame .separator {
  bottom: 16%;
}

#countdown .countdown-timer {
  display: flex;
  gap: 2cqi;
  justify-content: center;
  margin: 10% 0 0;
}

#countdown .countdown-item {
  position: relative;
  text-align: center;
  min-width: 11cqi;
}

#countdown .countdown-item span:first-child {
  font-family: var(--font-countdown);
  font-size: clamp(0.9rem, 7.5cqi, 1.45rem);
  display: block;
  line-height: 1;
  font-weight: var(--weight-bold);
  color: var(--countdown-num);
  background-color: var(--countdown-num-bg);
  border-radius: 7px;
  padding: 2.8cqi 1.4cqi;
  margin-bottom: 2cqi;
}

#countdown .countdown-item .label {
  font-family: var(--font-countdown);
  font-size: clamp(0.6rem, 3cqi, 0.95rem);
  letter-spacing: 0.05em;
  display: block;
  font-weight: var(--weight-medium);
  color: var(--countdown-label);
}

.info-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
}

.btn {
  background: none;
  border: none;
  padding: 0;
  display: inline-block;
  line-height: 0;
  cursor: default;
  margin-top: 0;
}

.consent-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-md);
}

@media (min-width: 768px) {
  .consent-buttons {
    gap: var(--space-lg);
  }
}

/* Final Section */
#final {
  justify-content: center;
  padding-top: var(--space-xxxl);
  padding-bottom: var(--space-xxxl);
  max-width: 100%;
}

.final-message {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  color: var(--subtitle-color);
}

.final-message p {
  font-size: clamp(0.55rem, 1.2cqi, 0.95rem);
  letter-spacing: 0.08em;
}

.final-title {
  font-size: var(--font-lg);
}

/* Animation States */
body .animate__animated {
  animation-play-state: paused;
  opacity: 0;
}

body .animate__animated:not(.paused-animation) {
  animation-play-state: running;
  opacity: 1;
}

/* Animation Duration Utilities */
.animate__animated.animate__slower {
  --animate-duration: 2s;
}
.animate__animated.animate__slow {
  --animate-duration: 1.5s;
}
.animate__animated.animate__fast {
  --animate-duration: 0.8s;
}
.animate__animated.animate__faster {
  --animate-duration: 0.5s;
}

@media (min-width: 1200px) {
  .container {
    max-width: 80%;
  }
  .final-message {
    max-width: 60%;
  }
}

#hero .animate__animated {
  --animate-duration: 0.5s;
  --animate-delay: 0s;
}

@keyframes thumbGlow {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.7;
  }
}

/* Next Section Arrow Styling */
.next-section-wrap {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: pointer;
  display: flex;
  justify-content: center;
}

.next-section {
  display: block;
}
.next-section svg {
  width: 48px;
  height: 48px;
  fill: var(--white);
  stroke: var(--primary);
  stroke-width: 1.5;
  transition: transform 0.2s ease-out;
}
.next-section:hover svg {
  transform: translateY(5px);
}

#music-consent .btn {
  background-color: var(--primary);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--font-base);
  border-radius: 20px;
  padding: 12px 0;
  transition: transform 0.2s ease-out;
  text-decoration: none;
  width: 130px;
  text-align: center;
  font-weight: var(--weight-bold);
  line-height: 1;
}

#music-consent .btn:hover {
  transform: scale(1.05);
}

#music-consent {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark-bg);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .section {
    padding: 0;
  }

  .section-hero {
    padding-top: 5vh;
    padding-bottom: 5vh;
  }

  .next-section-wrap {
    z-index: 10;
  }

  .content-frame {
    position: relative;
    width: min(52vh, 34rem);
    max-width: min(52vh, 34rem);
  }

  .scroll-arrow-wrap {
    display: none;
  }

  .section-main-title {
    font-size: var(--font-lg);
  }

  .hero-title {
    font-size: var(--font-xl);
  }
}

