/* Destina home — invite band (3D cards) + motion helpers. Loaded by Index.cshtml only. */

/* ---------- invite band ---------- */
.dt-invite__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    perspective: 1200px;
}
.dt-invite__card {
    --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
    position: relative;
    display: block;
    min-height: 420px;
    padding: 36px;
    border-radius: 24px; /* no overflow:hidden: it would flatten the 3D layers */
    text-decoration: none !important;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
    isolation: isolate;
}
.dt-invite__card.is-tilting { transition: transform .08s linear, box-shadow .4s ease; }
.dt-invite__card:hover { box-shadow: 0 30px 70px rgba(15, 23, 42, .28); }
.dt-invite__card:focus-visible { outline: 3px solid #0f172a; outline-offset: 4px; }

.dt-invite__card--agency { background: linear-gradient(150deg, #1e3a5f 0%, #0f2036 100%); color: #f8fafc; }
.dt-invite__card--driver { background: #F38709; color: #111827; }

/* light that follows the pointer */
.dt-invite__glow {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .22), transparent 60%);
    opacity: 0; transition: opacity .3s ease;
}
.dt-invite__card:hover .dt-invite__glow { opacity: 1; }

/* depth layers: each sits at its own Z, so the tilt reads as 3D */
.dt-invite__ring {
    position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
    border: 2px solid currentColor; opacity: .14;
}
.dt-invite__ring--a { width: 260px; height: 260px; right: 16px; top: 16px; transform: translateZ(20px); }
.dt-invite__ring--b { width: 160px; height: 160px; right: 66px; top: 66px; transform: translateZ(40px); opacity: .2; }

.dt-invite__icon {
    position: absolute; right: 44px; top: 44px; z-index: 2;
    width: 104px; height: 104px; border-radius: 26px;
    display: grid; place-items: center; font-size: 42px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
    color: #F38709;
    transform: translateZ(80px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
}
.dt-invite__car {
    position: absolute; right: 16px; top: 14px; z-index: 2;
    width: 44%; max-width: 270px; height: auto;
    mix-blend-mode: multiply; /* the photo has a white ground; multiply keeps only the car */
    transform: translateZ(70px);
    pointer-events: none;
}
.dt-invite__chip {
    position: absolute; left: 36px; top: 36px; z-index: 2;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
    transform: translateZ(50px);
}
.dt-invite__card--driver .dt-invite__chip { background: rgba(17, 24, 39, .1); border-color: rgba(17, 24, 39, .2); }

.dt-invite__body {
    position: absolute; left: 36px; right: 36px; bottom: 36px; z-index: 2;
    display: flex; flex-direction: column; gap: 8px;
    transform: translateZ(40px);
}
.dt-invite__label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.dt-invite__title { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; max-width: 16ch; }
.dt-invite__text { font-size: 16px; line-height: 1.5; opacity: .88; max-width: 40ch; }
.dt-invite__cta { margin-top: 10px; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.dt-invite__cta i { transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.dt-invite__card:hover .dt-invite__cta i { transform: translateX(6px); }

@media (max-width: 860px) {
    .dt-invite__grid { grid-template-columns: 1fr; }
    .dt-invite__card { min-height: 400px; padding: 28px; }
    .dt-invite__body { left: 28px; right: 28px; bottom: 28px; }
    .dt-invite__chip { left: 28px; top: 28px; }
    .dt-invite__icon { width: 84px; height: 84px; font-size: 34px; right: 28px; top: 28px; }
}

/* ---------- route cards: 3D tilt + photo depth ---------- */
.dt-route-card[data-tilt] {
    --rx: 0deg; --ry: 0deg;
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .5s cubic-bezier(.16, 1, .3, 1);
    will-change: transform;
}
.dt-route-card[data-tilt].is-tilting { transition: transform .08s linear; }

/* ---------- how it works: scroll rail (inserted by home-motion.js) ---------- */
.dt-steps { position: relative; }
.dt-steps__rail { position: absolute; left: 0; right: 0; top: -22px; height: 4px; border-radius: 4px; background: rgba(243, 135, 9, .15); }
.dt-steps__rail span { display: block; width: 100%; height: 100%; border-radius: inherit; background: #F38709; transform-origin: left center; }
@media (max-width: 991px) {
    .dt-steps { padding-left: 22px; }
    .dt-steps__rail { left: 0; right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
    .dt-steps__rail span { transform-origin: center top; }
}

/* ---------- reduced motion: everything rests, nothing hidden ---------- */
@media (prefers-reduced-motion: reduce) {
    .dt-invite__card, .dt-route-card[data-tilt] { transform: none !important; transition: none !important; }
    .dt-invite__icon, .dt-invite__car, .dt-invite__chip, .dt-invite__body, .dt-invite__ring { transform: none !important; }
}

/* ---------- arrow buttons: icon centred on the text line ---------- */
.btn-destina-primary, .intl-pane-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-destina-primary i, .intl-pane-btn i { margin: 0 !important; line-height: 1; font-size: .9em; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.btn-destina-primary:hover i, .intl-pane-btn:hover i { transform: translateX(4px); }
.btn-destina-primary:hover .fa-arrow-up { transform: translateY(-3px); }
