:root {
  /* Paleta oficial Dulterra (img/colores-oficiales) */
  --green: #327A3C;
  --green-deep: #245A2C;
  --green-soft: #E9F1EA;
  --green-mist: rgba(50, 122, 60, 0.14);
  --red: #F05252;
  --red-deep: #D43B3B;
  --gray: #7E7E7E;
  --gray-dark: #5C5C5C;
  --cream: #FAF6F0;
  --white: #FFFFFF;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, sans-serif;

  --shadow-soft: 0 22px 60px rgba(50, 122, 60, 0.18);
  --shadow-logo: 0 14px 34px rgba(0, 0, 0, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--gray-dark);
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===============================
   Pantalla de carga
   =============================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Fondo: fotografía de frutillas con overlay claro */
.loader-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      180deg,
      rgba(250, 246, 240, 0.88) 0%,
      rgba(250, 246, 240, 0.78) 45%,
      rgba(250, 246, 240, 0.92) 100%
    ),
    url('https://images.unsplash.com/photo-1587393855524-087f83d95bc9?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
}

.loader-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 45% at 50% 40%, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.loader-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.loader-content {
  position: relative;
  z-index: 2;
  width: 92%;
  max-width: 860px;
  text-align: center;
  padding: 28px 0 20px;
}

/* Logo */
.loader-header {
  margin-bottom: 40px;
  animation: fadeInDown 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo-img {
  width: min(230px, 52vw);
  height: auto;
  display: inline-block;
  filter: drop-shadow(var(--shadow-logo));
}

/* Eyebrow */
.loader-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--green);
  margin-bottom: 16px;
  animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Título */
.loader-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--green);
  margin-bottom: 48px;
  animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.title-accent {
  font-style: italic;
  color: var(--red);
}

/* Journey */
.journey {
  position: relative;
  margin-bottom: 32px;
  padding: 0 8px;
  animation: fadeIn 1s ease 0.4s both;
}

.journey-line {
  position: absolute;
  top: 24px;
  left: 52px;
  right: 52px;
  height: 3px;
  background: var(--green-mist);
  border-radius: 3px;
  overflow: hidden;
}

.journey-progress {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--red));
  box-shadow: 0 0 12px rgba(240, 82, 82, 0.35);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.journey-steps {
  list-style: none;
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 4px;
}

.journey-step {
  flex: 1;
  min-width: 0;
  max-width: 100px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.step-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--green-mist);
  color: var(--green);
  font-size: 1.25rem;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(50, 122, 60, 0.10);
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.step-marker::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.45s ease;
}

.step-name {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.35;
  max-width: 92px;
  color: var(--gray);
  transition: color 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.journey-step.is-active .step-marker,
.journey-step.is-completed .step-marker {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(50, 122, 60, 0.35);
  transform: scale(1.06);
}

.journey-step.is-active .step-marker {
  border-color: var(--red);
  box-shadow: 0 10px 30px rgba(240, 82, 82, 0.35);
}

.journey-step.is-active .step-marker::after,
.journey-step.is-completed .step-marker::after {
  border-color: rgba(240, 82, 82, 0.35);
}

.journey-step.is-active .step-name,
.journey-step.is-completed .step-name {
  color: var(--green);
  opacity: 1;
}

.journey-step.is-active .step-name {
  transform: translateY(-3px);
  font-weight: 600;
  color: var(--green-deep);
}

/* Detalle del paso */
.step-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--gray-dark);
  min-height: 44px;
  padding: 10px 28px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--green-mist);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(50, 122, 60, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 1s ease 0.5s both;
}

.step-detail i {
  font-size: 1.3rem;
  color: var(--red);
}

/* Porcentaje */
.loader-percent {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--green);
  animation: fadeIn 1s ease 0.55s both;
}

.percent-unit {
  font-size: 1.6rem;
  font-weight: 400;
  margin-left: 2px;
  color: var(--red);
}

/* Footer */
.loader-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--gray);
  padding: 6px 0 26px;
  animation: fadeIn 1.2s ease 0.9s both;
}

.loader-footer a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.loader-footer a:hover {
  color: var(--green);
}

.footer-dot {
  opacity: 0.5;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .journey-step .step-name {
    display: none;
  }

  .journey-line {
    top: 20px;
    left: 38px;
    right: 38px;
  }

  .step-marker {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .logo-img {
    width: min(180px, 54vw);
  }

  .loader-title {
    margin-bottom: 40px;
  }

  .loader-header {
    margin-bottom: 32px;
  }

  .loader-percent {
    font-size: 2.6rem;
  }

  .percent-unit {
    font-size: 1.3rem;
  }
}
