/* Amman Drive — components and animations layered on top of Tailwind.
   Design tokens follow STITCH_DESIGN_BRIEF.md (section 2). */

:root {
  --night: #000222;
  --night-2: #0a0f2c;
  --royal: #1e3a8a;
  --mist: #93c5fd;
  --sand: #e9d8b8;
  --petra: #c8826a;
  --gold: #f2b66d;
  --ivory: #faf7f2;
  --ink: #0f172a;
  --muted: #64748b;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

/* Off-screen reveal offsets must not widen the page. On <main>, not <body>
   (body overflow propagates to the viewport); clip keeps position: sticky working. */
main {
  overflow-x: clip;
}

body {
  background: var(--ivory);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--gold);
  color: var(--night);
}

:focus-visible {
  outline: 2px solid var(--mist);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Shared pieces                                                       */
/* ------------------------------------------------------------------ */

.text-gradient {
  background: linear-gradient(100deg, var(--petra), var(--gold) 60%, #ffe2b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent);
}

.glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.glass-strong {
  background: rgba(0, 2, 34, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.grain {
  position: relative;
  isolation: isolate;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.dunes {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='120' viewBox='0 0 600 120'><path d='M0 80 C 100 40, 200 120, 300 70 S 500 30, 600 80' fill='none' stroke='white' stroke-opacity='.05' stroke-width='1.5'/><path d='M0 105 C 120 70, 220 130, 330 95 S 520 60, 600 100' fill='none' stroke='white' stroke-opacity='.04' stroke-width='1.5'/></svg>");
  background-size: 600px 120px;
}

/* Buttons ----------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.35s var(--ease),
    background-position 0.6s var(--ease), background-color 0.25s, color 0.25s,
    border-color 0.25s;
}

/* Light sheen that sweeps across on hover */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  background-size: 250% 100%;
  background-position: 150% 0;
  background-repeat: no-repeat;
  opacity: 0;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:hover:not(:disabled)::after {
  opacity: 1;
  animation: btn-sheen 0.9s var(--ease) forwards;
}

@keyframes btn-sheen {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}

.btn .bi-compass {
  transition: transform 0.6s var(--ease);
}

.btn:hover .bi-compass {
  transform: rotate(180deg);
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover:not(:disabled) { transform: none; }
  .btn:hover:not(:disabled)::after { animation: none; opacity: 0; }
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn .bi-arrow-right {
  transition: transform 0.3s var(--ease);
}

.btn:hover .bi-arrow-right {
  transform: translateX(4px);
}

.btn-primary {
  color: var(--night);
  background-image: linear-gradient(110deg, var(--petra), var(--gold) 50%, var(--petra));
  background-size: 200% 100%;
  background-position: 0% 0;
  box-shadow: 0 10px 30px -10px rgba(242, 182, 109, 0.6);
}

.btn-primary:hover:not(:disabled) {
  background-position: 100% 0;
  box-shadow: 0 16px 40px -10px rgba(242, 182, 109, 0.85);
}

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(242, 182, 109, 0.7);
  box-shadow: 0 12px 32px -12px rgba(242, 182, 109, 0.55);
}

.btn-dark {
  color: #fff;
  background: var(--night);
}

.btn-dark:hover:not(:disabled) {
  background: var(--royal);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid #d9dee8;
  background: #fff;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--ink);
}

/* Flat, high-contrast gold (quick booking bar) */
.btn-solid-gold {
  color: var(--night);
  background: var(--gold);
  font-size: 16px;
  font-weight: 700;
}

.btn-solid-gold:hover:not(:disabled) {
  background: #f6c789;
  box-shadow: 0 14px 32px -12px rgba(242, 182, 109, 0.7);
}

.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

/* Form controls ----------------------------------------------------- */

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.field {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #dfe3ea;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.35);
}

.field[readonly] {
  background: #f4f5f8;
  color: var(--muted);
}

select.field {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.field-dark {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
  color-scheme: dark;
}

.field-dark::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.field-dark option {
  color: var(--ink);
}

/* Light, solid field for dark panels where readability matters most */
.field-solid {
  min-height: 56px;
  border-color: transparent;
  border-radius: 14px;
  background-color: #eeeeee;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  color-scheme: light;
}

.field-solid::placeholder {
  color: #475569;
}

.field-solid:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(242, 182, 109, 0.4);
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  z-index: 1;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d5dae3;
  transition: background 0.25s;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s var(--ease);
}

.switch input:checked + span {
  background: linear-gradient(110deg, var(--petra), var(--gold));
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--mist);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Navigation                                                          */
/* ------------------------------------------------------------------ */

.site-nav {
  transition: transform 0.45s var(--ease), padding 0.35s var(--ease);
}

.site-nav.is-hidden {
  transform: translateY(-130%);
}

.nav-pill {
  transition: background 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.site-nav.is-scrolled .nav-pill {
  background: rgba(0, 2, 34, 0.82);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}

.nav-link {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-indicator {
  position: absolute;
  z-index: 0;
  top: 50%;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
  opacity: 0;
  transition: left 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s;
  pointer-events: none;
}

.mobile-menu {
  clip-path: circle(0 at calc(100% - 44px) 44px);
  transition: clip-path 0.7s var(--ease);
  pointer-events: none;
}

.mobile-menu.is-open {
  clip-path: circle(150% at calc(100% - 44px) 44px);
  pointer-events: auto;
}

.mobile-menu a {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.mobile-menu.is-open a {
  opacity: 1;
  transform: none;
}

.scroll-progress {
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero-video {
  position: absolute;
  z-index: 2;
  bottom: -22vh;
  left: 50%;
  width: 125%;
  max-width: 2400px;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 0.6s;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.6s var(--ease), transform 8s linear;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transform: none; transition: opacity 1s; }
}

.hero-video-player {
  opacity: 0;
}

.hero-video-player.is-ready {
  opacity: 1;
}

.hero-fallback.is-hidden {
  opacity: 0;
}

.hero-reveal {
  transition: clip-path 0.24s linear;
}

.hero-intro > * {
  opacity: 0;
  transform: translateY(26px);
  animation: rise 1s var(--ease) forwards;
}

.hero-intro > *:nth-child(2) { animation-delay: 0.12s; }
.hero-intro > *:nth-child(3) { animation-delay: 0.24s; }
.hero-intro > *:nth-child(4) { animation-delay: 0.36s; }

.scroll-cue span {
  animation: cue 1.8s var(--ease) infinite;
}

@media (max-width: 767px) {
  .hero-video {
    bottom: -4vh;
    width: 210%;
  }
}

/* ------------------------------------------------------------------ */
/* Scroll reveals                                                      */
/* ------------------------------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="zoom"] { transform: scale(0.94); }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
}

.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-split].is-visible .split-word > span {
  transform: none;
}

/* ------------------------------------------------------------------ */
/* About: route map                                                    */
/* ------------------------------------------------------------------ */

.route-line {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  transition: stroke-dashoffset 2.6s var(--ease) 0.2s;
}

.is-visible .route-line {
  stroke-dashoffset: 0;
}

.route-pin {
  opacity: 0;
  transform: translateY(-14px);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.5s, transform 0.6s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.is-visible .route-pin {
  opacity: 1;
  transform: none;
}

.route-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s ease-out infinite;
}

.route-car {
  offset-rotate: auto 90deg;
  animation: drive 9s linear infinite;
}

/* ------------------------------------------------------------------ */
/* Destinations                                                        */
/* ------------------------------------------------------------------ */

.dest-track {
  /* Line the first card up with the page container; scroll-padding keeps snapping aligned to it. */
  --pad: 20px;
  padding-inline: var(--pad);
  scroll-padding-inline: var(--pad);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}

@media (min-width: 640px) {
  .dest-track { --pad: 32px; }
}

@media (min-width: 1280px) {
  .dest-track { --pad: calc((100vw - 1280px) / 2 + 32px); }
}

.dest-track::-webkit-scrollbar {
  display: none;
}

.dest-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.dest-card {
  scroll-snap-align: start;
}

.dest-card img {
  transition: transform 6s var(--ease);
}

.dest-card:hover img {
  transform: scale(1.12) translateX(-2%);
}

.dest-card .dest-cta {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.dest-card:hover .dest-cta,
.dest-card:focus-within .dest-cta {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ */
/* Fleet / vehicle cards                                               */
/* ------------------------------------------------------------------ */

[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}

.vehicle-card {
  transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}

.vehicle-card:hover {
  box-shadow: 0 30px 60px -24px rgba(0, 2, 34, 0.4);
}

.vehicle-card .vehicle-img {
  transition: transform 0.7s var(--ease);
}

.vehicle-card:hover .vehicle-img {
  transform: translateX(10px) scale(1.05);
}

.vehicle-card .vehicle-photo {
  transition: transform 0.9s var(--ease);
}

.vehicle-card:hover .vehicle-photo {
  transform: scale(1.06);
}

.vehicle-card .sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 236, 200, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}

.vehicle-card:hover .sweep {
  transition: transform 1.1s var(--ease);
  transform: translateX(120%);
}

.vehicle-card.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 24px 50px -16px rgba(242, 182, 109, 0.55);
}

.platform {
  background: radial-gradient(ellipse at center, rgba(0, 2, 34, 0.28) 0%, rgba(0, 2, 34, 0) 70%);
}

.featured-platform {
  background: radial-gradient(ellipse at center, rgba(242, 182, 109, 0.45) 0%, rgba(200, 130, 106, 0.18) 40%, transparent 70%);
  animation: glow 4s ease-in-out infinite;
}

.card-enter {
  animation: cardIn 0.6s var(--ease) backwards; /* not "both": that would block the tilt transform */
  animation-delay: var(--delay, 0ms);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #dfe3ea;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
}

.chip:hover {
  border-color: var(--ink);
}

.chip.is-active {
  border-color: var(--night);
  background: var(--night);
  color: #fff;
}

/* ------------------------------------------------------------------ */
/* Booking wizard                                                      */
/* ------------------------------------------------------------------ */

.booking-flow.is-gated .booking-progress,
.booking-flow.is-gated .booking-aside,
.booking-flow.is-gated #booking-actions {
  display: none;
}

.booking-flow.is-gated .booking-grid {
  grid-template-columns: minmax(0, 1fr);
}

.booking-flow.is-gated .booking-panel {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.road {
  background: #e3e6ee;
}

.road::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, #fff 0 10px, transparent 10px 20px);
  opacity: 0.9;
}

.road-fill {
  background: linear-gradient(90deg, var(--petra), var(--gold));
  transition: width 0.9s var(--ease);
}

.step-dot {
  transition: all 0.4s var(--ease);
}

.step-enter {
  animation: stepIn 0.55s var(--ease) both;
}

.step-enter-back {
  animation: stepInBack 0.55s var(--ease) both;
}

.shake {
  animation: shake 0.45s ease both;
}

.option-card {
  transition: transform 0.3s var(--ease), border-color 0.25s, box-shadow 0.3s;
}

.option-card:hover {
  transform: translateY(-3px);
}

.option-card.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 18px 36px -18px rgba(242, 182, 109, 0.7);
}

.option-card .check {
  transform: scale(0);
  transition: transform 0.4s var(--ease);
}

.option-card.is-selected .check {
  transform: scale(1);
}

.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #dfe3ea;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s;
}

.stepper button:hover:not(:disabled) {
  border-color: var(--night);
  background: var(--night);
  color: #fff;
}

.stepper button:disabled {
  opacity: 0.35;
}

.dropzone {
  transition: border-color 0.25s, background 0.25s;
}

.dropzone.is-over {
  border-color: var(--gold);
  background: #fff8ee;
}

.success-check circle {
  stroke-dasharray: 230;
  stroke-dashoffset: 230;
  animation: draw 0.8s var(--ease) forwards;
}

.success-check path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw 0.5s var(--ease) 0.7s forwards;
}

.confetti {
  position: fixed;
  top: -20px;
  z-index: 80;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti var(--dur, 2.6s) cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}

/* ------------------------------------------------------------------ */
/* Reviews marquee                                                     */
/* ------------------------------------------------------------------ */

.marquee {
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee var(--speed, 50s) linear infinite;
}

.marquee-track.reverse {
  animation-direction: reverse;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ------------------------------------------------------------------ */
/* FAQ                                                                 */
/* ------------------------------------------------------------------ */

.faq-item {
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.faq-item.is-open {
  border-left-color: var(--petra);
  background: #fff;
  box-shadow: 0 18px 40px -26px rgba(0, 2, 34, 0.35);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}

.faq-answer > div {
  overflow: hidden;
}

.faq-answer p {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-item.is-open .faq-answer p {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}

.faq-icon {
  transition: transform 0.45s var(--ease), background 0.3s, color 0.3s;
}

.faq-item.is-open .faq-icon {
  transform: rotate(135deg);
  background: var(--night);
  color: #fff;
}

/* ------------------------------------------------------------------ */
/* Terms drawer                                                        */
/* ------------------------------------------------------------------ */

/* The closed drawer is a transparent full-screen layer: let clicks and scrolls pass through it. */
.drawer {
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s 0.6s;
}

.drawer.is-open {
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.drawer-panel {
  transform: translateX(100%);
  transition: transform 0.6s var(--ease);
}

.drawer.is-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.drawer.is-open .drawer-panel {
  transform: none;
}

.term-tile {
  transition: transform 0.4s var(--ease), background 0.3s, border-color 0.3s;
}

.term-tile:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(242, 182, 109, 0.5);
}

/* ------------------------------------------------------------------ */
/* Misc                                                                */
/* ------------------------------------------------------------------ */

.toast {
  animation: toastIn 0.5s var(--ease) both;
}

.float-slow {
  animation: float 6s ease-in-out infinite;
}

.lift {
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -24px rgba(0, 2, 34, 0.35);
}

.back-top {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.back-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.no-scrollbar {
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Keyframes                                                           */
/* ------------------------------------------------------------------ */

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.6); opacity: 0; }
}

@keyframes drive {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

@keyframes glow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes stepIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}

@keyframes stepInBack {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: none; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes confetti {
  to {
    transform: translate3d(var(--x, 0), 105vh, 0) rotate(var(--r, 540deg));
    opacity: 0.9;
  }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal],
  .split-word > span,
  .hero-intro > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .marquee-track,
  .route-car {
    animation: none !important;
  }
}

/* ------------------------------------------------------------------ */
/* Arabic (set by js/i18n.js through lingoweave: lang="ar" dir="rtl") */
/* ------------------------------------------------------------------ */

html[lang="ar"] body,
html[lang="ar"] .font-sans {
  font-family: "Cairo", Poppins, system-ui, sans-serif;
}

html[lang="ar"] .font-display {
  font-family: "Cairo", "Playfair Display", Georgia, serif;
}

/* Arabic letters join up: no letter spacing, no faux italics. */
html[lang="ar"] * {
  letter-spacing: 0 !important;
}

html[lang="ar"] em {
  font-style: normal;
}

/* Arabic letters reach further below the line; the tight English heading
   leading and the clipped word reveal would cut them off. */
html[lang="ar"] :is(h1, h2) {
  line-height: 1.35 !important;
}

html[lang="ar"] .split-word {
  padding-bottom: 0.3em;
  margin-bottom: -0.22em;
}

[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .bi-arrow-right,
[dir="rtl"] .bi-arrow-left {
  display: inline-block;
  transform: scaleX(-1);
}

[dir="rtl"] #road-fill {
  left: auto;
  right: 0;
}

/* The marquee loops by sliding left, so keep it left-to-right. */
[dir="rtl"] .marquee {
  direction: ltr;
}

[dir="rtl"] .marquee-track > * {
  direction: rtl;
}
