:root {
  --shadow: 0 24px 64px rgba(3, 10, 18, 0.45);
  --panel-radius: 28px;
  --sidebar-width: 200px;
  --transition-fast: 200ms ease;
  --transition-slow: 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}


body.is-map-open {
  overflow: hidden;
}

.debug-draggable {
  position: fixed;
  top: 10%;
  right: 5%;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  color: #0b1420;
  display: grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
  z-index: 45;
}

.debug-draggable.is-dragging {
  cursor: grabbing;
  background: rgba(255, 255, 255, 0.25);
}

.hero {
  min-height: 100vh;
  padding: clamp(3rem, 6vw, 7rem) clamp(1.5rem, 6vw, 7rem);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero__content {
  max-width: 720px;
}

.hero h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--muted);
}


.map-toggle .toggle-button {
  pointer-events: auto;
}

  .toggle-button {
      position: absolute;
      top:16px;
      right:calc(16px + 0.628em);
      z-index: 9999;
      color: #fff;
      border: none;
       -webkit-backdrop-filter: blur(13px);
      backdrop-filter: blur(13px);
      border-bottom: 1px solid #000;
      border-radius: 1.618em;
      padding: 0;
  width:150px;
  height:50px;
  font-size:16px;
  align-items:center;
  align-content:center;
  justify-content:center;
  text-align:center;
  border:2px solid #fff;
  text-shadow: none !important;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;
  background-color: rgba(0, 0, 0, 0.15) !important;
}

.toggle-button.is-loading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.toggle-button--ghost {
  color: #fff;
  box-shadow: none;
  font-size:16px;
  background-color:#625e41 !important;
  border: 2px solid #343223;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}


.panel__inner {
  max-width: 680px;
  text-align: center;
}

.panel__inner h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 3.5vw, 3rem);
}

.panel__inner p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}


.map-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-slow);
  padding: 0;
  overflow: hidden;
  z-index:999999;
}

#compass {
  position:absolute;
  bottom:1em;
  left:1em;
  width:10em;
  height: auto;
  pointer-events:none;
  z-index:99;
  display:none;
}

@media (min-width:48em){
  #compass{
   display:block;
  }
}

#america-map {
  position:absolute;
  top:0.309em;
  left:0.309em;
  width:17em;
  height: auto;
  z-index:99;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  display:none;
  border: 2px solid #343223;
}

#america-map img {
  width:100%;
  height:auto;
  pointer-events:none;
}

@media(min-width:48em) {
  #america-map{
    display:block;
  }
}





.map-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 16, 0.65);
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
}

.map-panel__inner {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  background: var(--bg-panel);
  backdrop-filter: blur(24px);
  padding: 0.618em;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1em;
  pointer-events: auto;
  overflow: hidden;
  background-color: #f2e8d4;
}

@media(min-width:48em){
.map-panel__inner {
  background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/Vintage-Paper-Texture.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/Vintage-Paper-Texture.jpg') type('image/png')
  );
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
}}

.map-panel.is-active {
  opacity: 1;
  pointer-events: auto;
}

.map-panel.is-active::before {
  opacity: 1;
}

.map-panel__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.map-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.map-stop-button {
  display: none;
}

.map-stop-button.is-visible {
  display: inline-flex;
}

.map-panel__header h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-controls {
  display: flex;
  gap: 0.75rem;
}

.map-control {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #343223;
  background: #625e41;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.map-control:hover,
.map-control:focus-visible {
  background: rgba(4, 16, 28, 0.9);
  transform: translateY(-1px);
}

.map-panel__body {
  flex: 1;
  display: grid;
  gap: 1em;
  grid-template-columns: minmax(0, 8fr) minmax(var(--sidebar-width), 3fr);
  min-height: 0;
  overflow: hidden;
}

.map-stage {
  position: relative;
  overflow: hidden;
  min-height: clamp(360px, 50vw, 560px);
  cursor: grab;
  touch-action: none;
  border: 6px double #343223;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.cloud-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220%;
  height: 220%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  display: block;
  will-change: transform;
}

.cloud-layer__cloud {
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.7;
  pointer-events: none;
  will-change: transform;
  transform-origin: 50% 50%;
  --cloud-parallax-x: 0px;
  --cloud-parallax-y: 0px;
  --cloud-drift-x: 0px;
  --cloud-drift-y: 0px;
  --cloud-scale: 1;
  transform: translate3d(var(--cloud-parallax-x), var(--cloud-parallax-y), 0)
    translate3d(var(--cloud-drift-x), var(--cloud-drift-y), 0)
    scale(var(--cloud-scale));
      -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 85%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 85%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}


.cloud-layer__cloud--a {
  top: 22%;
  left: 15%;
  width: 48%;
  height: 48%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso1__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso1__S.png') type('image/png')
  );
}

.cloud-layer__cloud--b {
  top: 30%;
  right: 22%;
  width: 44%;
  height: 44%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso2__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso2__S.png') type('image/png')
  );
}

.cloud-layer__cloud--c {
  bottom: 12%;
  left: 24%;
  width: 46%;
  height: 46%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso3__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso3.png') type('image/png')
  );
}

.cloud-layer__cloud--d {
  bottom: 10%;
  right: 30%;
  width: 40%;
  height: 40%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso2__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso2__S.png') type('image/png')
  );
}

.cloud-layer__cloud--e {
  top: 5%;
  left: 20%;
  width: 36%;
  height: 36%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso2__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso2__S.png') type('image/png')
  );
}

.cloud-layer__cloud--f {
  bottom: 18%;
  right: 18%;
  width: 50%;
  height: 50%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso1__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso1__S.png') type('image/png')
  );
}

.cloud-layer__cloud--g {
  bottom: -5%;
  left: 10%;
  width: 55%;
  height: 55%;
  background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso1__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso1__S.png') type('image/png')
  );
}

.cloud-layer__cloud--h {
  bottom: -8%;
  left: 35%;
  width: 55%;
  height: 55%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso1__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso1__S.png') type('image/png')
  );
}

.cloud-layer__cloud--i {
  top: 11%;
  left: 3%;
  width: 36%;
  height: 36%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso2__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso2__S.png') type('image/png')
  );
}

.cloud-layer__cloud--j {
  top: 17%;
  left: 28%;
  width: 50%;
  height: 50%;
    background-image:image-set(
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.8/img/webp/fog_perso2__S.webp') type('image/webp'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/fog_perso2.png') type('image/png')
  );
}


@media (max-width: 48em) {
  .cloud-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud-layer__cloud {
    transition: none !important;
  }
  .map-canvas,
  .map-panel.is-active .map-canvas,
  .map-pin,
  .map-pin.is-active {
    animation: none !important;
  }
}

.map-stage.is-dragging {
  cursor: grabbing;
}


.map-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 180%;
  transform: translate(-50%, -50%);
  touch-action: none;
  cursor: inherit;
  user-select: none;
  animation: mapDrift 22s ease-in-out infinite;
  animation-play-state: paused;
}

@media(min-width:48em) {
  
.map-canvas {
    background-image:
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/travel-line-icons-revised-FINAL.svg'),
    url('https://sp-comm-arkfiles.s3.theark.cloud/website/landing-pages/occ-peru/1.6/img/peru-interative-map-textured__corrected.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
}

.map-panel.is-active .map-canvas {
  animation-play-state: running;
}

@keyframes mapDrift {
  0% { background-position: 50% 50%, 50% 50%; }
  50% { background-position: 52% 48%, 49% 51%; }
  100% { background-position: 50% 50%, 50% 50%; }
}

@supports (aspect-ratio: 1 / 1) {
  /* Preserve the square map so pin coordinates remain stable on resize */
  .map-canvas {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

.map-pin {
  position: absolute;
  width: 1.618em;
  height:1.618em;
  transform: translate(-50%, -50%);
  top: var(--y);
  left: var(--x);
  cursor: pointer;
  z-index: 3;
  transition: box-shadow 300ms ease, transform 300ms ease;
  background:none;
  border:none;
  display:flex;
  flex-direction:row;
  gap:1em;
  background-color: #6f2428;
  border: 0.25em solid #fff;
  border-radius:50%;
  box-shadow: 0 0 0 6px var(--accent-muted), 0 0 0 0 rgba(101, 245, 198, 0.6);
  transition: box-shadow 500ms ease, transform 500ms ease;
  animation: pinPulse 7s ease-in-out infinite;
  animation-play-state: paused;
}

.map-pin.is-active {
  width:2em;
  height: 2em;
    box-shadow: 0 0 0 10px rgba(129, 225, 179, 0.5), 0 0 25px rgba(129, 225, 179, 0.8);
  transform: translate(-50%, -50%) scale(1.025);
  animation: pinPulseActive 4.5s ease-in-out infinite;
  animation-play-state: paused;
}

.map-panel.is-active .map-pin {
  animation-play-state: running;
}

.map-panel.is-active .map-pin.is-active {
  animation-play-state: running;
}

@keyframes mistDrift {
  0% { transform: translate3d(-3%, 0, 0) scale(1); opacity: 0.32; }
  25% { transform: translate3d(2%, -1%, 0) scale(1.02); opacity: 0.36; }
  50% { transform: translate3d(3%, 1%, 0) scale(1.01); opacity: 0.3; }
  75% { transform: translate3d(-1%, 2%, 0) scale(1.02); opacity: 0.34; }
  100% { transform: translate3d(-3%, 0, 0) scale(1); opacity: 0.32; }
}

@keyframes pinPulse {
  0% { box-shadow: 0 0 0 6px var(--accent-muted), 0 0 0 0 rgba(101, 245, 198, 0.45); }
  45% { box-shadow: 0 0 0 8px rgba(129, 225, 179, 0.45), 0 0 10px 4px rgba(129, 225, 179, 0.35); }
  100% { box-shadow: 0 0 0 6px var(--accent-muted), 0 0 0 0 rgba(101, 245, 198, 0.45); }
}

@keyframes pinPulseActive {
  0% { box-shadow: 0 0 0 10px rgba(129, 225, 179, 0.5), 0 0 25px rgba(129, 225, 179, 0.8); }
  50% { box-shadow: 0 0 0 13px rgba(129, 225, 179, 0.65), 0 0 28px rgba(129, 225, 179, 0.9); }
  100% { box-shadow: 0 0 0 10px rgba(129, 225, 179, 0.5), 0 0 25px rgba(129, 225, 179, 0.8); }
}

.map-pin h3 {
  font-size:2em;
font-family: cheddar-gothic-sans, sans-serif;
font-style: normal;
font-weight: 400;
  align-self:center;
  text-shadow: 5px 5px 12px #000000 !important;
  padding-left: 1.309em;
}



@media(min-width:48em) {
  .map-pin h3 {
  font-size:6em;
}
.map-pin {
  width: 4em;
  height:4em;
  
  border: 0.5em solid #fff;
}

.map-pin.is-active {
  width:5em;
  height:5em;
}
}

#america-map-pin .map-pin.is-active {
  width:4em;
  height:4em;
}

@media(min-width:48em) {

#america-map-pin.map-pin {
  width: 2.618em;
  height: 2.618em;
  border: 0.3em solid #fff;
}

#america-map-pin.map-pin.is-active {
  width: 3em;
  height: 3em;
}
}

.map-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.618em;
  align-content: stretch;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.75rem;
  overflow: scroll;
  scrollbar-color: #343223 rgba(0,0,0,0);
  scrollbar-width: thin;
}

.map-sidebar h2 {
  color:#343223;
}

.map-sidebar header {
  padding-top:1.618em;
}

.map-card {
  background: #625e41;
  padding: 1em;
  transition: border var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
  outline: none;
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 100%;
  position: relative;
  border: 2px solid transparent;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}


.map-card__content {
  display: grid;
  gap: 0.6rem;
}

.map-card__content h3 {
  margin: 0;
  font-family: gotham, system-ui;
  font-size:1.618em;
  line-height:1.2;
  font-weight:500;
}

.map-card__content p {
  margin: 0;
  color: #fff;
  font-family:roboto,system-ui;font-size:100%;line-height:1.2;
}

.map-card__gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 420ms ease, opacity 320ms ease;
}

.map-card__gallery-wrapper {
  position: relative;
  display: block;
}

.map-card__gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5em;
  height: 3.5em;
  border-radius: 50%;
  border: 2px solid #343223;
  background: #625e41;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding-bottom: 0.4em;
  transition: opacity 400ms ease, background 400ms ease, transform 400ms ease;
  opacity: 0;
  pointer-events: none;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.map-card__gallery-nav span {
  font-size: 1.5rem;
  line-height: 1;
  pointer-events: none;
}

.map-card__gallery-nav:hover,
.map-card__gallery-nav:focus-visible {
  background: #75704d;
  transform: translateY(-50%) scale(1.025);
}

.map-card__gallery-nav--prev {
  left: 0.618em;
}

.map-card__gallery-nav--next {
  right: 0.618em;
}

.map-card__gallery-nav.is-disabled {
  opacity: 0;
  pointer-events: none;
}

.map-card.is-active .map-card__gallery-nav {
  opacity: 1;
  pointer-events: auto;
}

.map-card.is-active .map-card__gallery-nav.is-disabled {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .map-card__gallery-nav {
    display: none;
  }
}

.map-card__gallery::-webkit-scrollbar {
  height: 0;
}

.map-card__gallery::-webkit-scrollbar-thumb {
  background: transparent;
}

.map-card__photo {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 3 / 2;
  scroll-snap-align: start;
  overflow: hidden;
  position: relative;
  margin: 0;
}

.map-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map-card:hover,
.map-card:focus-visible {
  border-color: var(--accent);
  transform: none;
}

.map-card.is-active {
  background: #918b5f;
  transform: none;
  padding: 1em;
  border-color: #343223;
}

.map-card.is-active .map-card__gallery {
  max-height: 600px;
  opacity: 1;
  pointer-events: auto;
}

#openMap {display:none}

@media(min-width:48em) {
  #openMap {display:block;}
}

@media (max-width: 960px) {
  .map-panel__body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {

  .map-stage {
    min-height: 40vh;
  }

  .map-sidebar {
    padding-right: 0;
    padding-block: clamp(2rem, 12vh, 3.5rem);
    scroll-snap-type: y mandatory;
    scroll-padding-block: clamp(2rem, 12vh, 3.5rem);
  }

  .map-card {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
}

@media (max-width: 560px) {
  .map-panel__inner {
    width: 100vw;
  }

  .map-card {
    border-radius: 16px;
  }
}

@media (prefers-contrast: more) {
  #openMap {
    background-color: rgba(0,0,0,0.75);
    color: #fff;
  }
}
