/* Treasure map roadmap — Despre noi */
.treasure-map-section {
  padding-bottom: 4rem;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--yellow-light) 100%);
}

.treasure-map-section__intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.treasure-map-section__intro .section__subtitle {
  margin-inline: auto;
}

.treasure-map {
  --parchment: #f2e0bc;
  --parchment-deep: #e8d4a8;
  --parchment-edge: #c9a96e;
  --ink: #3d2914;
  --trail: #7a4f28;
  --trail-light: #a67c52;
  position: relative;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.treasure-map__parchment {
  position: relative;
  padding: 3.5rem clamp(1.25rem, 4vw, 2.5rem) 4rem;
  background:
    radial-gradient(ellipse 120% 80% at 20% 10%, rgba(255, 248, 214, 0.55), transparent 50%),
    radial-gradient(ellipse 90% 60% at 85% 75%, rgba(201, 169, 110, 0.35), transparent 45%),
    linear-gradient(175deg, var(--parchment) 0%, var(--parchment-deep) 55%, #dcc999 100%);
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow:
    inset 0 0 80px rgba(61, 41, 20, 0.08),
    0 8px 0 var(--black),
    var(--shadow-lg);
}

.treasure-map__parchment::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed var(--parchment-edge);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0.65;
}

.treasure-map__trail-svg {
  position: absolute;
  inset: 6% 8% 8%;
  width: calc(100% - 16%);
  height: calc(100% - 14%);
  z-index: 0;
  pointer-events: none;
}

.treasure-map__trail-bg,
.treasure-map__trail-draw {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.treasure-map__trail-bg {
  stroke: var(--trail-light);
  stroke-dasharray: 8 10;
  opacity: 0.35;
}

.treasure-map__trail-draw {
  stroke: var(--trail);
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.8s var(--ease-out);
}

.treasure-map.is-drawn .treasure-map__trail-draw {
  stroke-dashoffset: 0;
}

.treasure-map__compass {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 64px;
  height: 64px;
  color: var(--ink);
  opacity: 0.75;
  animation: compassSway 6s ease-in-out infinite;
  z-index: 2;
}

.treasure-map__scroll {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.55;
  z-index: 2;
}

.treasure-map__start {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
}

.treasure-map__start-pin {
  display: inline-block;
  font-size: 2rem;
  animation: floatSoft 3s ease-in-out infinite;
}

.treasure-map__start-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0.35rem 0 0;
}

.treasure-map__start-text {
  font-size: 0.85rem;
  color: var(--trail);
  font-style: italic;
  margin: 0.15rem 0 0;
}

.treasure-stop {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  margin-bottom: 3.5rem;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: calc(var(--stop-i, 0) * 0.12s);
}

.treasure-map.is-drawn .treasure-stop {
  opacity: 1;
  transform: translateY(0);
}

.treasure-stop--left {
  padding-right: clamp(0px, 8vw, 80px);
}

.treasure-stop--right {
  grid-template-columns: 1fr auto;
  padding-left: clamp(0px, 8vw, 80px);
}

.treasure-stop--right .treasure-stop__x {
  order: 2;
}

.treasure-stop--right .treasure-stop__body {
  order: 1;
  text-align: right;
}

.treasure-stop--right .treasure-stop__photos,
.treasure-stop--right .treasure-stop__gallery {
  justify-content: flex-end;
}

.treasure-stop--wide .treasure-stop__body {
  max-width: 100%;
}

.treasure-stop--center {
  display: block;
  text-align: center;
  margin-bottom: 0;
  grid-template-columns: unset;
}

.treasure-stop--center.treasure-stop--treasure {
  display: block;
  width: 100%;
}

.treasure-stop__x {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--ink);
  animation: treasureXPulse 2.5s ease-in-out infinite;
  animation-delay: calc(var(--stop-i, 0) * 0.4s);
}

.treasure-stop__x span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1;
}

.treasure-stop__body {
  background: rgba(255, 252, 240, 0.92);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: 4px 4px 0 var(--ink);
  max-width: 520px;
}

.treasure-stop--wide .treasure-stop__body {
  max-width: 640px;
}

.treasure-stop__year {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--yellow);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.treasure-stop__year--gold {
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 0.85rem;
}

.treasure-stop__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.treasure-stop__text {
  font-size: 0.92rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.treasure-stop__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.treasure-stop__photos--duo .treasure-photo {
  flex: 1 1 140px;
  max-width: 220px;
}

.treasure-stop__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 0.65rem;
}

.treasure-photo {
  margin: 0;
  background: var(--white);
  padding: 0.4rem 0.4rem 0.55rem;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(61, 41, 20, 0.25);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s;
}

.treasure-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border: 1px solid var(--gray-200);
}

.treasure-photo--tilt-l {
  transform: rotate(-3deg);
}

.treasure-photo--tilt-r {
  transform: rotate(3deg);
}

.treasure-photo--sm img {
  aspect-ratio: 1;
}

.treasure-photo--hero {
  width: 100%;
  margin: 1.25rem auto 0;
}

.treasure-photo--hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  max-height: none;
  min-height: 0;
  object-fit: cover;
}

.treasure-stop__body--finale {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.treasure-stop--treasure .treasure-stop__body--finale {
  max-width: 780px;
  padding: 1.5rem 1.35rem 1.75rem;
  background: linear-gradient(180deg, #fffef5 0%, var(--yellow-light) 100%);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
}

.treasure-stop--treasure .treasure-photo--hero {
  width: 100%;
  margin-top: 1rem;
}

.treasure-stop--treasure .treasure-photo--hero img {
  aspect-ratio: 16 / 10;
  min-height: 240px;
}

.treasure-photo figcaption {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-align: center;
  margin-top: 0.35rem;
}

.treasure-photo:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 5px 5px 0 rgba(61, 41, 20, 0.35);
  z-index: 2;
}

.treasure-map__finish {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 1rem;
}

.treasure-chest {
  width: 72px;
  margin: 0 auto 1rem;
  animation: floatSoft 4s ease-in-out infinite;
  filter: drop-shadow(2px 3px 0 rgba(61, 41, 20, 0.3));
}

.treasure-stop--treasure .treasure-stop__body:not(.treasure-stop__body--finale) {
  max-width: 560px;
  margin-inline: auto;
  background: linear-gradient(180deg, #fffef5 0%, var(--yellow-light) 100%);
  border-width: 3px;
}

.treasure-stop__cta {
  margin-top: 1.25rem;
}

.treasure-map__walker {
  position: absolute;
  left: 50%;
  top: 4%;
  transform: translate(-50%, -50%);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  font-size: 1.25rem;
  transition: opacity 0.4s;
}

.treasure-map.is-drawn .treasure-map__walker {
  opacity: 1;
  animation: walkerAlongPath 10s var(--ease-out) forwards;
  animation-delay: 0.6s;
}

@keyframes compassSway {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}

@keyframes treasureXPulse {
  0%,
  100% {
    box-shadow: 0 3px 0 var(--ink);
  }
  50% {
    box-shadow: 0 3px 0 var(--ink), 0 0 0 6px rgba(245, 196, 0, 0.35);
  }
}

@keyframes walkerAlongPath {
  0% {
    top: 4%;
    left: 50%;
  }
  15% {
    top: 18%;
    left: 22%;
  }
  30% {
    top: 32%;
    left: 78%;
  }
  45% {
    top: 48%;
    left: 22%;
  }
  60% {
    top: 62%;
    left: 78%;
  }
  80% {
    top: 78%;
    left: 22%;
  }
  100% {
    top: 92%;
    left: 50%;
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .treasure-map__parchment {
    padding: 2.5rem 1rem 3rem;
  }

  .treasure-map__compass {
    width: 48px;
    height: 48px;
    top: 0.75rem;
    right: 0.75rem;
  }

  .treasure-map__scroll {
    display: none;
  }

  .treasure-stop,
  .treasure-stop--right {
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding-left: 0;
    padding-right: 0;
  }

  .treasure-stop--right .treasure-stop__x {
    order: 0;
  }

  .treasure-stop--right .treasure-stop__body {
    order: 1;
    text-align: left;
  }

  .treasure-stop--right .treasure-stop__photos,
  .treasure-stop--right .treasure-stop__gallery {
    justify-content: flex-start;
  }

  .treasure-stop__body {
    max-width: none;
  }

  .treasure-stop__x {
    width: 44px;
    height: 44px;
  }

  .treasure-stop__gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .treasure-map__walker {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .treasure-stop {
    opacity: 1;
    transform: none;
  }

  .treasure-map__trail-draw {
    stroke-dashoffset: 0;
  }

  .treasure-map__walker {
    display: none;
  }

  .header__cta.btn--primary,
  .hero__actions .btn--primary,
  .cta-banner .btn--primary,
  .nav__mobile-cta {
    animation: none;
  }
}
