/* Responsive refinement and motion layer */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

/* Stronger name presence in the fixed header and closing signature. */
.wordmark-name {
  font-size: 0.88rem !important;
}

.footer-brand {
  font-size: 0.82rem !important;
  letter-spacing: 0.16em !important;
}

/* Direct route from the personal site to Ernesto's Atacama tours. */
.locaventuras-monogram {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
}

@media (max-width: 580px) {
  .wordmark-name {
    font-size: 0.76rem !important;
  }
}

/* Stronger project identity: built, dimensional, intentional */
.venture-card h3 {
  width: fit-content;
  color: transparent;
  background: linear-gradient(105deg, var(--ink, #111318) 8%, var(--copper, #b86f45) 52%, #111318 92%);
  background-clip: text;
  -webkit-background-clip: text;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  filter: drop-shadow(0 10px 18px rgba(30, 22, 16, 0.12));
}

.venture-card h3::after {
  content: "";
  display: block;
  width: 46%;
  height: 3px;
  margin-top: 0.45rem;
  background: linear-gradient(90deg, var(--copper, #b86f45), transparent);
  transition: width 0.45s cubic-bezier(.2, .7, .2, 1);
}

.venture-card:hover h3::after {
  width: 100%;
}

/* Centered formal signature */
.letter-copy img {
  object-position: center !important;
  margin: 2.5rem auto 0 !important;
}

.letter-name {
  text-align: center;
}

/* Instagram contact card */
.instagram-link .instagram-monogram {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid currentColor;
  border-radius: 0.75rem;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.instagram-arrow {
  margin-left: auto;
  font-size: 1.2rem;
}

/* Fine photographic edge treatment and a consistent zoom language */
.portrait-frame,
.origin-image,
.gallery-card,
.cosmos-image,
.mentorship-image {
  border-radius: 4px;
  box-shadow: 0 22px 60px rgba(10, 12, 15, 0.13);
}

.portrait-frame img,
.origin-image img,
.dimension-card > img,
.gallery-card > img,
.cosmos-image img,
.mentorship-image img {
  transition: transform 1s cubic-bezier(.2, .7, .2, 1), filter 0.6s ease !important;
}

@media (hover: hover) {
  .portrait-frame:hover img,
  .origin-image:hover img,
  .gallery-card:hover > img,
  .cosmos-image:hover img,
  .mentorship-image:hover img {
    transform: scale(1.045);
  }
}

/* Progressive movement while the page is explored */
.motion-ready {
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(0.985);
  transition:
    opacity 0.75s ease,
    transform 0.95s cubic-bezier(.2, .72, .2, 1);
  transition-delay: var(--motion-delay, 0ms);
}

.motion-ready.motion-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Professional mobile navigation */
@media (max-width: 860px) {
  .mobile-menu summary {
    min-width: 5.3rem;
    padding: 0.72rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(8, 10, 13, 0.7);
    text-align: center;
    backdrop-filter: blur(14px);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  }

  .mobile-menu summary:hover,
  .mobile-menu[open] summary {
    border-color: var(--copper-bright, #d89368);
    background: rgba(184, 111, 69, 0.18);
    transform: translateY(-1px);
  }

  .mobile-menu nav {
    position: fixed;
    z-index: 1001;
    top: 5.25rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-height: calc(100svh - 6.5rem);
    padding: 0.8rem;
    border-color: rgba(255, 255, 255, 0.18);
    border-radius: 1.25rem;
    background: rgba(7, 9, 12, 0.94);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(24px);
    overflow-y: auto;
    animation: menu-arrival 0.32s cubic-bezier(.2, .75, .2, 1) both;
  }

  .mobile-menu nav a {
    margin-top: 0.18rem;
    border: 0;
    border-radius: 0.75rem;
    padding: 0.95rem 1rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  }

  .mobile-menu nav a:hover,
  .mobile-menu nav a:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    z-index: 89;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(3px);
  }
}

@keyframes menu-arrival {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile-first text fit corrections */
@media (max-width: 580px) {
  .origin .page-shell {
    width: min(100% - 2.5rem, 1440px);
  }

  .origin-grid {
    gap: 2.5rem;
  }

  .origin-title,
  .origin-copy {
    width: 100%;
    max-width: 34rem;
    margin-inline: auto;
    text-align: center;
  }

  .origin-title h2 {
    font-size: clamp(2.45rem, 11.5vw, 3.75rem);
    letter-spacing: -0.062em;
    line-height: 0.9;
  }

  .origin-copy .lead {
    max-width: 19rem;
    margin: 0 auto 1.35rem;
    font-size: clamp(1.2rem, 5.6vw, 1.45rem);
    line-height: 1.38;
  }

  .origin-copy > p:not(.lead) {
    max-width: 31rem;
    margin-right: auto;
    margin-left: auto;
    font-size: 1rem;
    line-height: 1.75;
    overflow-wrap: break-word;
  }

  .origin-facts {
    width: min(100%, 22rem);
    margin: 2rem auto 0;
  }

  .origin-facts div {
    min-height: 84px;
    padding: 0.75rem;
    justify-content: center;
    gap: 0.35rem;
  }

  .origin-facts strong {
    font-size: 2rem;
    line-height: 1;
  }

  .origin-facts span {
    font-size: 0.62rem;
    line-height: 1.35;
  }

  .dimension-content h3 {
    font-size: clamp(1.75rem, 8.2vw, 2.45rem);
    letter-spacing: -0.045em;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .venture-card h3 {
    font-size: clamp(1.8rem, 9.2vw, 2.75rem);
  }

  .letter-copy {
    text-align: center;
  }
}

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

  .motion-ready {
    opacity: 1;
    transform: none;
  }
}
