@import url('/home-travel-contact.css');

/* CTA 4's staggered photo loop, adapted to the site's editorial travel palette. */
.travel-cta {
  --travel-photo-width: 144px;
  --travel-photo-height: 192px;
  --travel-photo-gap: 16px;
  --travel-photo-rise: 32px;
  padding: clamp(64px, 8vw, 112px) 0 56px;
  overflow: hidden;
  background: var(--canvas, #fff);
  color: var(--ink);
}

.travel-cta-copy {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  scroll-margin-top: 110px;
}

.travel-cta-kicker {
  margin: 0 0 20px;
  font-family: "Fraunces", "Noto Serif SC", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: .005em;
  color: var(--cinnabar);
}

.travel-cta-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.travel-cta-title em { font-weight: inherit; color: var(--cinnabar); }

.travel-cta-description {
  max-width: 590px;
  margin: 24px auto 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.travel-cta-action {
  --travel-cta-motion: 340ms cubic-bezier(.22, 1, .36, 1);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 32px;
  padding: 7px 65px 7px 26px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  transition: transform 150ms ease-out;
}

/* The background folds inward while the link keeps its original hit area. */
.travel-cta-action::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--cinnabar);
  transform: translate(-50%, -50%);
  transition: width var(--travel-cta-motion), height var(--travel-cta-motion),
    transform var(--travel-cta-motion), background-color 230ms ease, box-shadow 240ms ease;
}

.travel-cta-action:active { transform: scale(.96); }
.travel-cta-action:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 5px;
}

.travel-cta-label {
  transition: opacity 150ms ease, transform var(--travel-cta-motion);
}

.travel-cta-arrow {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--cinnabar);
  transform: translateY(-50%);
  transition: right var(--travel-cta-motion), width var(--travel-cta-motion),
    height var(--travel-cta-motion), transform var(--travel-cta-motion),
    background-color 230ms ease, color 230ms ease;
}

.travel-cta-arrow svg {
  width: 17px;
  height: 17px;
  transition: transform var(--travel-cta-motion);
}

/* Hover motion adapted from Saad3092003's Uiverse button. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .travel-cta-action:hover::before {
    width: 56px;
    height: 56px;
    background: var(--cinnabar-deep);
    box-shadow: 0 5px 10px rgb(106 32 21 / .22);
    transform: translate(-50%, calc(-50% - 3px));
  }

  .travel-cta-action:hover .travel-cta-label {
    opacity: 0;
    transform: translateX(12px) scale(.8);
  }

  .travel-cta-action:hover .travel-cta-arrow {
    right: calc(50% - 24px);
    width: 48px;
    height: 48px;
    background: var(--cinnabar);
    color: #fff;
    transform: translateY(calc(-50% - 3px));
  }

  .travel-cta-action:hover .travel-cta-arrow svg { transform: rotate(-45deg) scale(1.42); }
}

.travel-cta-note {
  margin: 18px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.6;
}

.travel-cta-status {
  max-width: 500px;
  margin: 15px auto 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.travel-cta-status a { text-decoration: underline; text-underline-offset: 3px; }
.travel-cta-status[hidden] { display: none; }

.travel-cta-gallery {
  margin-top: 56px;
  padding-top: var(--travel-photo-rise);
  overflow: hidden;
}

.travel-cta-track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: travel-cta-loop 40s linear infinite;
  will-change: transform;
}

.travel-cta-photo {
  flex: 0 0 auto;
  width: calc(var(--travel-photo-width) + var(--travel-photo-gap));
  padding-right: var(--travel-photo-gap);
}

.travel-cta-photo:nth-child(even) { transform: translateY(calc(-1 * var(--travel-photo-rise))); }
.travel-cta-photo img {
  display: block;
  width: var(--travel-photo-width);
  height: var(--travel-photo-height);
  object-fit: cover;
  border-radius: 16px;
  background: var(--surface-muted, #eee);
}

.travel-cta-photo img[src$="yunnan-group.webp"] { object-position: 45% 65%; }
.travel-cta-photo img[src$="great-wall-group.webp"] { object-position: 50% 60%; }
@keyframes travel-cta-loop {
  to { transform: translateX(var(--travel-cta-loop-distance, -50%)); }
}

@media (min-width: 768px) {
  .travel-cta {
    --travel-photo-width: 184px;
    --travel-photo-height: 248px;
    --travel-photo-gap: 24px;
    --travel-photo-rise: 48px;
    padding-bottom: 64px;
  }
  .travel-cta-description { font-size: 17px; }
  .travel-cta-gallery { margin-top: 64px; }
}

@media (min-width: 1024px) {
  .travel-cta {
    --travel-photo-width: 216px;
    --travel-photo-height: 288px;
    --travel-photo-gap: 28px;
    --travel-photo-rise: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .travel-cta-track { animation: none; transform: none; will-change: auto; }
  .travel-cta-photo[aria-hidden="true"] { display: none; }
  .travel-cta-gallery { overflow-x: auto; scrollbar-width: thin; }
  .travel-cta-action, .travel-cta-action::before, .travel-cta-label,
  .travel-cta-arrow, .travel-cta-arrow svg { transition: none; }
  .travel-cta-action:active { transform: none; }
}
