/* Yosas Car Rentals: thin layer on top of Bootstrap 5.3
   1. Tokens & base  2. Shared pieces  3. Nav & hero  4. Home sections
   5. Contact band  6. Footer  7. Motion */

/* 1. Tokens & base */
:root {
  --gold: #c9a24a;
  --gold-dark: #a8832f;
  --gold-wash: #f6efdc;
  --ink: #16191d;
  --font-head: "Geom", "Segoe UI", system-ui, sans-serif;
  --bs-body-font-family: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --bs-body-color: var(--ink);
}
h1, h2, h3, h4, .display-3, .display-5, .display-6 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
section[id] { scroll-margin-top: 1rem; }

/* 2. Shared pieces */
.text-gold { color: var(--gold) !important; }
.btn-gold {
  --bs-btn-bg: var(--gold);
  --bs-btn-border-color: var(--gold);
  --bs-btn-color: var(--ink);
  --bs-btn-hover-bg: var(--gold-dark);
  --bs-btn-hover-border-color: var(--gold-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--gold-dark);
  --bs-btn-active-border-color: var(--gold-dark);
  --bs-btn-active-color: #fff;
}
.nav-pills { --bs-nav-pills-link-active-bg: var(--ink); --bs-nav-link-color: var(--ink); --bs-nav-link-hover-color: var(--gold-dark); }
.car-ph {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: 4rem;
  color: #c4c8ce;
}
.car-ph img { max-height: 100%; object-fit: contain; }

/* 3. Nav & hero */
.nav-pill { border-radius: 2rem; background: #fff; --bs-navbar-nav-link-padding-x: 1rem; }
.nav-pill .nav-link { border-radius: 2rem; transition: background-color .25s, box-shadow .25s, color .25s; }
.nav-pill .nav-link:hover,
.nav-pill .nav-link:focus-visible {
  color: var(--ink);
  background: rgba(201, 162, 74, .14);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .35), 0 4px 14px rgba(22, 25, 29, .08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.nav-pill .nav-link.active { color: var(--gold-dark); }
.hero { background: linear-gradient(160deg, #3a3f47, var(--ink) 65%); overflow: hidden; }
.hero-lg { min-height: 100vh; min-height: 100svh; }
.hero-sm { min-height: 50vh; }
.hero-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .15); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
/* Home hero: film on wide screens, end-frame still on phones/fallback, under a scrim that keeps the text legible */
.hero-lg, .hero-sm { background: #000; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; } /* inner pages: car front */
.hero-media, .hero-media::after { position: absolute; inset: 0; }
.hero-media::after { content: ""; background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35) 40%, rgba(0, 0, 0, .1) 70%); }
.hero-still, .hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-still { transition: opacity .8s ease; }
.hero-film { opacity: 0; transition: opacity .6s ease; }
.hero-film.is-playing { opacity: 1; }
.hero-toggle {
  position: absolute; top: 6rem; right: 1.5rem; z-index: 2;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .35);
}
.hero-toggle:hover { background: rgba(0, 0, 0, .6); }
@media (min-width: 992px) {
  .film .hero-still { opacity: 0; } /* the film opens from black instead; shown again if the film can't play */
}
@media (max-width: 991.98px) {
  .hero-film { display: none; }
  /* Car sits in the upper half, fading into the black background above the headline and booking bar */
  .hero-still {
    inset: 0 0 auto; height: auto; max-height: 75%;
    -webkit-mask-image: linear-gradient(#000 55%, transparent 95%);
    mask-image: linear-gradient(#000 55%, transparent 95%);
  }
}
.booking-bar { max-width: 960px; }
.booking-tab { display: inline-block; background: #fff; padding: .75rem 1.5rem; }
.booking-bar .form-control::placeholder { font-size: .8rem; }
/* Quick-booking brand picker */
.brand-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; padding: 0; border: 0; background: none;
  font-size: .875rem; color: var(--ink); text-align: left;
}
.brand-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }
.brand-toggle .bi { font-size: .75rem; transition: transform .25s ease; }
.brand-toggle[aria-expanded="true"] .bi { transform: rotate(180deg); }
.brand-menu {
  --bs-dropdown-min-width: 12rem;
  --bs-dropdown-padding-x: .4rem;
  --bs-dropdown-padding-y: .4rem;
  --bs-dropdown-border-width: 0;
  --bs-dropdown-border-radius: .9rem;
  --bs-dropdown-font-size: .875rem;
  --bs-dropdown-link-hover-bg: var(--gold-wash);
  --bs-dropdown-link-active-bg: var(--gold-wash);
  --bs-dropdown-link-active-color: var(--ink);
  box-shadow: 0 18px 40px rgba(22, 25, 29, .22);
}
.brand-menu .dropdown-item { display: flex; justify-content: space-between; align-items: center; border-radius: .6rem; padding: .55rem .8rem; }
.brand-menu .dropdown-item .bi { color: var(--gold-dark); visibility: hidden; }
.brand-menu .dropdown-item.active { font-weight: 600; }
.brand-menu .dropdown-item.active .bi { visibility: visible; }

/* 4. Home sections */
.marquee {
  display: flex;
  gap: 1.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 1.5rem; flex-shrink: 0; min-width: 100%; margin: 0; animation: marquee 80s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.t-card { width: min(340px, 78vw); flex-shrink: 0; }
.t-avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--gold-wash); color: var(--gold-dark); }
/* Car category cards: --fx/--fy = where the logo sits in each photo, --spot = spotlight radius around it */
@property --r { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --a { syntax: "<number>"; inherits: false; initial-value: 0; }
.cat-card { height: 360px; background: #1f2328; overflow: hidden; transition: transform .25s; }
.cat-card:hover { transform: translateY(-4px); }
.cat-card[data-brand="Toyota"]   { --fx: 50%; --fy: 50%; --spot: 2.25rem; }
.cat-card[data-brand="Mercedes"] { --fx: 50%; --fy: 47%; --spot: 1.25rem; }
.cat-card[data-brand="Lexus"]    { --fx: 50%; --fy: 59%; --spot: 1.75rem; }
.cat-card[data-brand="Geely"]    { --fx: 50%; --fy: 50%; --spot: 2rem; }
.cat-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--fx, 50%) var(--fy, 50%);
  transition: transform 1.8s ease;
}
/* Mask: lighter dim (--a) over the logo, near-black elsewhere; the reveal grows the spotlight (--r) and clears the dim */
.cat-card::after {
  content: "";
  position: absolute; inset: 0;
  --r: calc(var(--spot, 2rem) * var(--k, 1));
  --a: .45;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 30%),
    radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgb(10 11 13 / var(--a)) var(--r), rgb(10 11 13 / .96) calc(var(--r) + 3rem));
  transition: --r 1.8s cubic-bezier(.25, .6, .3, 1), --a 1.8s ease;
}
.cat-card:hover::after, .cat-card:focus-visible::after { --r: 28rem; --a: 0; }
.cat-card:hover .cat-img, .cat-card:focus-visible .cat-img { transform: scale(1.05); }
.arrow-btn {
  position: absolute; right: 1rem; bottom: 1rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--ink);
}
/* "Ignition" turn: arrow twists clockwise (↗ to →) with a little overshoot, then lights up gold */
.arrow-btn { transition: background-color .3s ease .25s, box-shadow .4s ease .25s; }
.arrow-btn i { display: inline-block; transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.cat-card:hover .arrow-btn, .cat-card:focus-visible .arrow-btn {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, .3), 0 0 18px rgba(201, 162, 74, .7);
}
.cat-card:hover .arrow-btn i, .cat-card:focus-visible .arrow-btn i { transform: rotate(45deg); }
/* Mobile / touch: each category fills the screen and reveals as it scrolls into view (site.js toggles .is-revealed) */
@media (max-width: 991.98px) {
  .cat-card { height: 100vh; height: 100svh; --k: 2.3; }
}
@media (max-width: 991.98px), (hover: none) {
  .cat-card.is-revealed::after { --r: 60rem; --a: 0; }
  .cat-card.is-revealed .cat-img { transform: scale(1.05); }
  .cat-card.is-revealed .arrow-btn {
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 162, 74, .3), 0 0 18px rgba(201, 162, 74, .7);
  }
  .cat-card.is-revealed .arrow-btn i { transform: rotate(45deg); }
}
.car-row .car-card:first-child { background: var(--gold-wash); }
.features, .features .row > div { background: #0e1013; }
.features .row > div:nth-child(2) { background: #1c1f24; }
.features i { color: var(--gold); }

/* 5. Contact band: headlight photo sits behind the heading, masked into the gradient */
.contact-band { background: linear-gradient(160deg, #24282e, var(--ink) 60%); overflow: hidden; }
.contact-band::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -8%;
  width: 50%;
  background: url("https://res.cloudinary.com/r0966fae/image/upload/f_auto,q_auto,w_1400/car-parked.jpg") 61% 88% / cover no-repeat;
  filter: brightness(.7);
  -webkit-mask-image: radial-gradient(ellipse 39% 60% at 61% 42%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 39% 60% at 61% 42%, #000 30%, transparent 100%);
}
.contact-band h2, .contact-band h2 + p { text-shadow: 0 2px 4px rgba(0, 0, 0, .8), 0 0 24px rgba(0, 0, 0, .9); }
.contact-band h2 + p { color: rgba(255, 255, 255, .8) !important; }
@media (max-width: 991.98px) {
  .contact-band::before {
    width: 100%;
    bottom: auto;
    height: 24rem;
    background-position: 61% 100%;
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 61% 34%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 50% at 61% 34%, #000 35%, transparent 100%);
  }
}
.form-dark .form-control { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); color: #fff; color-scheme: dark; }
.form-dark .form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(201, 162, 74, .25); }
.form-dark .form-control::placeholder { color: rgba(255, 255, 255, .35); }
.step-num { display: inline-grid; place-items: center; width: 3rem; height: 3rem; background: var(--gold-wash); color: var(--gold-dark); font-family: var(--font-head); font-weight: 700; }

/* 6. Footer */
.social-btn { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; padding: 0; }

/* 7. Motion */
/* Scroll reveal: site.js adds .is-visible; .js is set in <head> so no-JS visitors see everything */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="zoom"] { transform: translateY(60px) scale(.92); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes marquee { to { transform: translateX(calc(-100% - 1.5rem)); } }

@media (prefers-reduced-motion: reduce) {
  .cat-card, .cat-card::after, .cat-img, .arrow-btn, .arrow-btn i, .nav-pill .nav-link { transition: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; padding-inline: 1rem; }
  .marquee-track[aria-hidden] { display: none; }
}
