/* ==========================================================================
   Beyondtours — animated homepage
   Motion is progressive: hidden start-states apply only under html.motion
   (set inline when the visitor allows motion). No JS / reduced motion = static page.
   ========================================================================== */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Floating glass header (home only) ---------- */
.is-home .site-header { position: fixed; left: 0; right: 0; top: 0; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; transition: transform .45s var(--ease); }
.is-home .site-header .header-inner { margin-top: 14px; height: 64px; padding: 0 .5rem 0 1.25rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 10px 40px -12px rgba(11, 26, 54, .35), inset 0 0 0 1px rgba(255, 255, 255, .6); transition: background .3s, box-shadow .3s; }
.is-home .site-header.is-scrolled { box-shadow: none; }
.is-home .site-header.is-scrolled .header-inner { background: rgba(255, 255, 255, .94); }
.is-home .site-header.is-hidden { transform: translateY(-110%); }
.is-home .brand img { height: 38px; }
.is-home main { padding-top: 0; }

/* ---------- HERO ---------- */
.h-hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; background: #1C2A6E; padding: 120px 0 110px; }
.h-scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.h-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-photo, .h-photo picture, .h-photo img { position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; }
.h-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 26, 54, .78) 0%, rgba(11, 26, 54, .35) 48%, rgba(11, 26, 54, 0) 72%), linear-gradient(0deg, rgba(11, 26, 54, .55) 0%, transparent 35%); pointer-events: none; }
.h-grain { position: absolute; inset: 0; opacity: .12; mix-blend-mode: overlay; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (max-aspect-ratio: 1/1) {
  .h-svg { inset: auto; top: 0; bottom: 0; left: 50%; height: 100%; width: auto; aspect-ratio: 16 / 9; transform: translateX(-64%); }
  .h-scene::after { background: linear-gradient(180deg, rgba(11, 26, 54, .65) 0%, rgba(11, 26, 54, .35) 45%, rgba(11, 26, 54, .75) 100%); }
}
.h-stars circle { animation: twinkle 3.2s ease-in-out infinite; }
.h-stars circle:nth-child(3n) { animation-delay: 1.1s; }
.h-stars circle:nth-child(3n+1) { animation-delay: 2.2s; }
@keyframes twinkle { 50% { opacity: .25; } }
.h-glow { transform-origin: 1120px 600px; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .85; } }
.h-waves path { animation: drift 14s linear infinite alternate; }
.h-waves path:nth-child(2) { animation-duration: 10s; animation-direction: alternate-reverse; }
.h-waves path:nth-child(3) { animation-duration: 18s; }
.h-waves path:nth-child(4) { animation-duration: 12s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translateX(-60px); } }
.h-refl { transform-origin: 1120px 700px; animation: shimmer 4s ease-in-out infinite; }
@keyframes shimmer { 50% { transform: scaleX(1.35); opacity: .35; } }
.h-plane { offset-rotate: auto; }

.h-inner { position: relative; }
.h-eyebrow { display: inline-flex; align-items: center; gap: .625rem; padding: .5rem 1rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); font-size: .8125rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.5rem; }
.h-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange-500); box-shadow: 0 0 0 0 rgba(247, 148, 30, .7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(247, 148, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(247, 148, 30, 0); } }
.h-title { color: #fff; font-size: clamp(2.75rem, 6.2vw, 5.75rem); line-height: .98; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 1.5rem; max-width: 13em; }
.h-line { display: block; }
.h-rotator { display: inline-flex; align-items: baseline; height: 1.06em; overflow: hidden; vertical-align: top; padding-bottom: .04em; }
.h-word { display: inline-block; background: linear-gradient(100deg, #FFD887 0%, #F7941E 45%, #F26C5A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .02em; will-change: transform; }
.h-period { color: var(--orange-500); margin-left: -.02em; }
.h-sub { font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); color: rgba(255, 255, 255, .88); max-width: 46ch; margin-bottom: 0; }
.h-search { margin-top: 2.25rem; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.h-scroll { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .625rem; color: rgba(255, 255, 255, .85); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.h-scroll i { width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px; position: relative; }
.h-scroll i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
.h-scroll:hover { color: #fff; }
@media (max-width: 767px) { .h-scroll { display: none; } .h-hero { padding: 104px 0 56px; align-items: flex-end; } .h-title { max-width: none; } }

/* Hero start states (only when motion allowed) */
html.motion [data-hero-in] { opacity: 0; transform: translateY(24px); }
html.motion .h-title .h-line { opacity: 0; }
html.motion .h-plane { opacity: 0; }

/* ---------- MARQUEE ---------- */
.mq-wrap { position: relative; z-index: 2; overflow-x: clip; } /* the tilted ribbon is wider than the screen: clip sideways only */
.mq { position: relative; z-index: 2; background: var(--navy-900); color: #fff; padding: 1.4rem 0; overflow: hidden; transform: rotate(-2deg) scale(1.04); margin: -2.2rem 0 0; box-shadow: 0 20px 40px -20px rgba(11, 26, 54, .6); }
.mq-track { display: flex; width: max-content; will-change: transform; animation: mq 40s linear infinite; }
html.motion .mq-track { animation: none; }
.mq-group { display: flex; align-items: center; gap: 2.25rem; padding-right: 2.25rem; }
.mq span { font: 800 clamp(2rem, 5vw, 4.25rem)/1 var(--font-head); letter-spacing: -0.03em; white-space: nowrap; }
.mq .mq-outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .85); }
.mq-star { width: clamp(18px, 2.4vw, 32px); height: auto; fill: var(--orange-500); flex: none; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- JOURNEYS ---------- */
.j-section { position: relative; background: var(--surface-alt); padding: 7rem 0 4rem; overflow: hidden; }
.j-pin { position: relative; }
.j-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.j-title { font-size: clamp(2rem, 4.6vw, 3.75rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0; }
.j-title em { font-style: normal; background: linear-gradient(100deg, #B45309, #C2410C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.r-head em { font-style: normal; color: var(--orange-700); }
.j-progress { width: 180px; height: 4px; border-radius: 4px; background: rgba(18, 39, 75, .12); overflow: hidden; flex: none; margin-bottom: .75rem; }
.j-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--navy-700), var(--orange-500)); }
.j-track { display: flex; gap: 1.5rem; padding: 0 max(1.25rem, calc((100vw - var(--container)) / 2)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.j-track::-webkit-scrollbar { display: none; }
html.motion.is-desktop .j-track { overflow: visible; scroll-snap-type: none; width: max-content; }
.j-card { position: relative; flex: none; width: min(82vw, 440px); height: min(64vh, 560px); min-height: 440px; border-radius: 28px; overflow: hidden; color: #fff; text-decoration: none; scroll-snap-align: center; background: var(--navy-900); isolation: isolate; box-shadow: 0 30px 60px -30px rgba(11, 26, 54, .55); transition: transform .5s var(--ease); }
.j-card:hover { color: #fff; }
.j-media { position: absolute; inset: 0; z-index: -1; }
.j-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.2s var(--ease); }
.j-card:hover .j-media img { transform: scale(1.02); }
.j-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 26, 54, 0) 25%, rgba(11, 26, 54, .92) 100%); }
.j-body { position: absolute; inset: auto 0 0 0; padding: 1.75rem; display: flex; flex-direction: column; gap: .5rem; }
.j-num { font: 800 1rem var(--font-head); color: var(--sun-300); letter-spacing: .1em; }
.j-card h3 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.1rem); letter-spacing: -0.03em; margin: 0; }
.j-card p { color: rgba(255, 255, 255, .84); font-size: .9688rem; margin: 0; max-width: 34ch; }
.j-meta { display: flex; align-items: center; justify-content: space-between; margin-top: .75rem; padding-top: .875rem; border-top: 1px solid rgba(255, 255, 255, .2); font-weight: 650; font-size: .9375rem; }
.j-arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy-900); transition: transform .4s var(--ease), background .3s; }
.j-card:hover .j-arrow { transform: rotate(-45deg); background: var(--orange-500); }
.j-card-cta { background: linear-gradient(150deg, var(--navy-700), #5A4795 55%, var(--coral-500)); }
.j-card-cta .j-body { inset: 0; justify-content: flex-end; }
.j-card-cta .j-num { font-size: 4rem; line-height: 1; color: rgba(255, 255, 255, .25); }
@media (max-width: 767px) { .j-head { flex-direction: column; align-items: flex-start; } .j-progress { display: none; } .j-section { padding-top: 5rem; } }

/* ---------- STATEMENT ---------- */
.s-section { padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 7rem); background: #fff; }
.s-text { font: 700 clamp(1.6rem, 3.8vw, 3.2rem)/1.22 var(--font-head); letter-spacing: -0.03em; color: var(--navy-900); max-width: 24ch; margin: 0 0 2.5rem; text-wrap: pretty; }
.s-text mark { background: none; color: var(--orange-700); }
html.motion .s-text .s-word { opacity: .18; }
.s-pills { display: flex; flex-wrap: wrap; gap: .75rem; }
.s-pills span { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.125rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-alt); font-weight: 600; color: var(--navy-900); }
.s-pills .icon { color: var(--orange-700); }

/* ---------- FEATURED ---------- */
.f-section { padding: 2rem 0 clamp(5rem, 9vw, 8rem); }
.f-title, .r-head h2, .g-section h2, .c-band h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.035em; line-height: 1.04; }
.f-item { perspective: 1000px; }
.f-item .tour-card { transform-style: preserve-3d; transition: transform .35s var(--ease), box-shadow .35s; will-change: transform; }
.f-item .tour-card:hover { transform: none; }
html.motion [data-reveal-group] > * { opacity: 0; transform: translateY(40px); }

/* ---------- ROUTE ---------- */
.r-section { padding: clamp(5rem, 9vw, 8rem) 0; background: linear-gradient(180deg, var(--surface-alt), #fff); overflow: hidden; }
.r-head { max-width: 760px; margin-bottom: 2rem; }
.r-wrap { position: relative; }
.r-svg { width: 100%; height: 220px; overflow: visible; }
.r-base { stroke: rgba(18, 39, 75, .15); stroke-width: 3; stroke-dasharray: 3 12; stroke-linecap: round; }
.r-line { stroke: var(--navy-700); stroke-width: 4; stroke-linecap: round; }
.r-plane { opacity: 0; }
.r-plane path { fill: var(--orange-500); stroke: var(--navy-900); stroke-width: 1.5; }
.r-stops { list-style: none; padding: 0; margin: -1rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.r-stops li { position: relative; padding: 1.75rem; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .4s, box-shadow .4s, transform .4s var(--ease); }
.r-stops li.is-lit { border-color: var(--navy-700); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.r-pin { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 800 1.125rem var(--font-head); background: var(--navy-50); color: var(--navy-700); margin-bottom: 1rem; transition: background .4s, color .4s; }
.r-stops li.is-lit .r-pin { background: var(--orange-500); color: var(--navy-950); }
.r-stops h3 { font-size: 1.25rem; }
.r-stops p { color: var(--ink-600); margin: 0; }
@media (max-width: 899px) { .r-svg { display: none; } .r-stops { grid-template-columns: 1fr; margin: 0; gap: 1rem; } }
html.motion.is-desktop .r-line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }

/* ---------- GUIDES ---------- */
.g-section { padding: clamp(4rem, 8vw, 7rem) 0; }
.g-list { border-top: 1px solid var(--line); }
.g-row { position: relative; display: grid; grid-template-columns: 64px 1fr 200px 56px; gap: 1.5rem; align-items: center; padding: 1.75rem .5rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-900); overflow: hidden; isolation: isolate; }
.g-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--navy-900); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); }
.g-row:hover { color: #fff; }
.g-row:hover::before { transform: scaleY(1); }
.g-idx { font: 800 1rem var(--font-head); color: var(--orange-700); padding-left: .5rem; transition: color .3s; }
.g-row:hover .g-idx { color: var(--sun-300); }
.g-main strong { display: block; font: 750 clamp(1.25rem, 2.2vw, 1.75rem)/1.15 var(--font-head); letter-spacing: -0.02em; margin-bottom: .375rem; transition: transform .5s var(--ease); }
.g-main span { color: var(--ink-600); font-size: .9688rem; transition: color .3s; }
.g-row:hover .g-main strong { transform: translateX(10px); }
.g-row:hover .g-main span { color: rgba(255, 255, 255, .75); }
.g-thumb { border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 2; transform: scale(.85) rotate(-3deg); opacity: .0; transition: transform .6s var(--ease), opacity .4s; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-row:hover .g-thumb { transform: none; opacity: 1; }
.g-go { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; transition: transform .4s var(--ease), background .3s, border-color .3s; }
.g-row:hover .g-go { background: var(--orange-500); border-color: var(--orange-500); color: var(--navy-950); transform: rotate(-45deg); }
@media (max-width: 767px) { .g-row { grid-template-columns: 1fr 44px; } .g-idx, .g-thumb { display: none; } .g-go { width: 44px; height: 44px; } }
@media (hover: none) { .g-thumb { opacity: 1; transform: none; } }

/* ---------- CTA ---------- */
.c-section { padding: 0 0 clamp(4rem, 8vw, 6rem); }
.c-band { --mx: 70%; --my: 80%; position: relative; overflow: hidden; isolation: isolate; border-radius: 32px; padding: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 6vw, 5rem); color: #fff; background: var(--navy-950); text-align: center; }
.c-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px circle at var(--mx) var(--my), rgba(253, 188, 76, .55), rgba(242, 108, 90, .35) 30%, rgba(90, 71, 149, .35) 55%, transparent 75%); transition: background .1s; }
.c-band h2 { color: #fff; max-width: 18ch; margin: 0 auto 1rem; }
.c-band > p:not(.eyebrow) { color: rgba(255, 255, 255, .85); font-size: 1.125rem; max-width: 52ch; margin: 0 auto 2rem; }
.c-band .eyebrow { justify-content: center; }
.c-band .eyebrow::before { background: var(--sun-300); }
.c-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Split heading words */
.split-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split-word { display: inline-block; will-change: transform; }

/* ---------- Cursor (fine pointers only) ---------- */
.cursor-dot { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--orange-500); opacity: 0; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s, background .3s; display: grid; place-items: center; mix-blend-mode: normal; }
.cursor-dot span { font: 700 .8125rem var(--font-body); color: var(--navy-950); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor-dot.is-on { opacity: 1; }
.cursor-dot.is-label { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
.cursor-dot.is-label span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

/* Magnetic buttons */
[data-magnetic] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .mq-track, .h-stars circle, .h-glow, .h-waves path, .h-refl, .h-dot, .h-scroll i::after { animation: none !important; }
  .cursor-dot { display: none; }
}
