/* =========================================================
   Legacy Car Hire — editorial / motion-led car rental site
   Inspired by the look & feel of b-egg.farm (cream + ink + amber)
   ========================================================= */

:root {
  --cream: #fbf9f1;
  --cream-2: #f1ecdc;
  --ink: #1a1407;
  --ink-2: #251d0c;
  --amber: #f4b30c;
  --amber-deep: #e0a000;
  --white: #ffffff;
  --muted: rgba(26, 20, 7, 0.6);
  --muted-on-dark: rgba(251, 249, 241, 0.62);
  --line: rgba(26, 20, 7, 0.14);
  --line-on-dark: rgba(251, 249, 241, 0.16);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-script: "Caveat", cursive;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 5vw, 90px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--amber); color: var(--ink); }

/* ---------- Shared type ---------- */
.mono-label {
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 0.8vw, 0.74rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-size: clamp(2.4rem, 6.4vw, 6rem);
  margin: 0;
}
.display em, .contact__title em, .hero__title em { font-style: normal; color: var(--amber); }

.script {
  font-family: var(--font-script);
  font-weight: 700;
  color: var(--amber-deep);
  font-size: 1.5em;
  line-height: 1;
}

/* ---------- Mask reveal (text slides up) ---------- */
.mask .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.js .mask .line > span { display: block; transform: translateY(110%); will-change: transform; }
.js [data-reveal] { opacity: 0; transform: translateY(38px); will-change: transform, opacity; }

/* Watchdog fallback — if JS/CDN fails to run, force everything visible */
html.fallback-show .loader { display: none !important; }
html.fallback-show [data-reveal] { opacity: 1 !important; transform: none !important; }
html.fallback-show .mask .line > span { transform: none !important; }

/* =========================================================
   Preloader
   ========================================================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6vh;
}
html:not(.js) .loader { display: none; }

.loader__brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.92;
  text-align: center;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
}
.loader__line { display: block; overflow: hidden; }
.loader__line > span { display: block; transform: translateY(110%); }

.loader__bar {
  width: min(46vw, 420px);
  height: 2px;
  background: var(--line-on-dark);
  overflow: hidden;
}
.loader__bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
}
.loader__count {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(22px, 4vh, 48px);
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1;
  display: flex;
  align-items: baseline;
}
.loader__pct { font-size: 0.4em; color: var(--amber); margin-left: 0.15em; }

/* =========================================================
   Custom cursor
   ========================================================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 250; pointer-events: none; mix-blend-mode: difference; display: none; }
.cursor__dot {
  position: absolute;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--cream);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease);
}
.cursor.is-hover .cursor__dot { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
@media (hover: hover) and (pointer: fine) { .cursor.ready { display: block; } }

/* =========================================================
   Scroll progress
   ========================================================= */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left; }

/* =========================================================
   Header
   ========================================================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(16px, 2.4vw, 30px) var(--gutter);
  color: var(--cream);
  transition: color 0.35s ease;
}
.header--dark { color: var(--ink); }
.burger { justify-self: start; display: flex; flex-direction: column; gap: 6px; width: 34px; padding: 6px 0; }
.burger span { display: block; height: 2px; width: 30px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.brand { justify-self: center; display: inline-flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--amber); color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
}
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.25rem); letter-spacing: -0.01em; }
.brand__name em { font-style: normal; font-weight: 400; opacity: 0.85; }
.header__cta {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.header__cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .header__cta span { display: none; } }

/* =========================================================
   Overlay menu
   ========================================================= */
.menu { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.menu__bg { position: absolute; inset: 0; background: var(--amber); transform: scaleY(0); transform-origin: top; transition: transform 0.7s var(--ease); }
.menu.is-open { visibility: visible; }
.menu.is-open .menu__bg { transform: scaleY(1); }
.menu__inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(80px, 12vh, 140px) var(--gutter) clamp(28px, 6vh, 56px);
  color: var(--ink);
}
.menu__close { position: absolute; top: clamp(20px, 3vw, 36px); right: var(--gutter); width: 42px; height: 42px; }
.menu__close span { position: absolute; top: 50%; left: 50%; width: 30px; height: 2px; background: var(--ink); }
.menu__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.menu__close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }

.menu__nav { display: flex; flex-direction: column; gap: clamp(2px, 0.6vh, 8px); margin-bottom: auto; }
.menu__nav a {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 9vw, 7rem); line-height: 1.02; letter-spacing: -0.03em;
  width: max-content; max-width: 100%; overflow: hidden;
}
.menu__nav a span { display: inline-block; transform: translateY(115%); }
.menu.is-open .menu__nav a span { transform: translateY(0); transition: transform 0.6s var(--ease); }
.menu__nav a:nth-child(1) span { transition-delay: 0.18s; }
.menu__nav a:nth-child(2) span { transition-delay: 0.24s; }
.menu__nav a:nth-child(3) span { transition-delay: 0.30s; }
.menu__nav a:nth-child(4) span { transition-delay: 0.36s; }
.menu__nav a:nth-child(5) span { transition-delay: 0.42s; }
@media (hover: hover) { .menu__nav a:hover { font-style: italic; -webkit-text-stroke: 1px var(--ink); color: transparent; } }

.menu__meta { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 60px); padding-top: 28px; border-top: 1px solid rgba(26,20,7,0.25); opacity: 0; transition: opacity 0.5s ease 0.5s; }
.menu.is-open .menu__meta { opacity: 1; }
.menu__col { display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }
.menu__col .mono-label { color: rgba(26,20,7,0.6); margin-bottom: 4px; }
.menu__col a:hover { text-decoration: underline; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: 100px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  transition: transform 0.4s var(--ease), background 0.3s ease, color 0.3s ease;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(5px); }
.btn--solid { background: var(--ink); color: var(--cream); }
.btn--solid:hover { background: var(--amber); color: var(--ink); }
.btn--ghost { border: 1.5px solid currentColor; }
.btn--ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--block { width: 100%; justify-content: center; padding: 20px; }
.section--dark .btn--solid { background: var(--amber); color: var(--ink); }
.section--dark .btn--solid:hover { background: var(--cream); }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: var(--gutter); padding-bottom: clamp(36px, 6vh, 80px); }
.hero__media { position: absolute; inset: -12% 0 0 0; z-index: -1; }
.hero__media img { width: 100%; height: 112%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,20,7,0.32) 0%, rgba(26,20,7,0) 30%, rgba(26,20,7,0.15) 55%, rgba(26,20,7,0.78) 100%); }

.hero__inner { position: relative; color: var(--cream); max-width: 1500px; }
.hero__eyebrow { color: var(--cream); margin-bottom: clamp(16px, 2.4vh, 28px); }
.hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.2rem, 13vw, 13rem); line-height: 0.88; letter-spacing: -0.035em;
  margin: 0;
}
.hero__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; margin-top: clamp(22px, 3.5vh, 44px); }
.hero__copy { max-width: 42ch; font-size: clamp(1rem, 1.3vw, 1.2rem); color: rgba(251,249,241,0.86); margin: 0; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__cue { position: absolute; right: var(--gutter); bottom: clamp(36px, 6vh, 80px); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--cream); }
.hero__cue .mono-label { writing-mode: vertical-rl; }
.hero__cue-line { width: 1px; height: 54px; background: var(--cream); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(0.4); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* =========================================================
   Marquee
   ========================================================= */
.marquee { background: var(--amber); color: var(--ink); padding: clamp(14px, 1.8vw, 22px) 0; overflow: hidden; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.marquee__track { display: inline-flex; align-items: center; gap: 32px; white-space: nowrap; will-change: transform; animation: marquee 26s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.6rem); letter-spacing: -0.01em; text-transform: uppercase; }
.marquee__track i { font-style: normal; font-size: clamp(0.9rem, 1.6vw, 1.4rem); opacity: 0.7; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* =========================================================
   Section scaffolding
   ========================================================= */
section { padding: clamp(70px, 11vw, 170px) var(--gutter); position: relative; }
.section--dark { background: var(--ink); color: var(--cream); }
.section--dark .mono-label { color: var(--amber); }

.section-head { max-width: 980px; margin-bottom: clamp(40px, 6vw, 90px); }
.section-head .mono-label { margin-bottom: 18px; }
.section-head__lead { margin: 22px 0 0; max-width: 52ch; color: var(--muted-on-dark); font-size: clamp(1rem, 1.2vw, 1.15rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .display { margin-inline: auto; }

/* ---------- Fleet ---------- */
.fleet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 1.6vw, 26px); }
.card {
  position: relative; border-radius: 26px; padding: clamp(22px, 2vw, 34px);
  min-height: clamp(360px, 34vw, 480px); display: flex; flex-direction: column;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  overflow: hidden;
}
.card:hover { transform: translateY(-10px); }
.card--amber { background: var(--amber); color: var(--ink); }
.card--cream { background: var(--cream); color: var(--ink); }
.card--outline { background: transparent; color: var(--cream); border: 1.5px solid var(--line-on-dark); }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.card__price { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700; }
.card__price i { font-style: normal; opacity: 0.6; font-weight: 400; }
.card__art { flex: 1; display: grid; place-items: center; padding: 10px 0; }
.card .car { width: min(78%, 240px); height: auto; transition: transform 0.6s var(--ease); }
.card:hover .car { transform: translateX(8px); }
.card--amber .car, .card--cream .car { color: var(--ink); }
.card--outline .car { color: var(--amber); }
.card__name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 2.4vw, 2.4rem); margin: 0 0 6px; letter-spacing: -0.02em; }
.card__desc { margin: 0 0 18px; font-size: 0.96rem; opacity: 0.78; }
.card__link { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; }
.card__link span { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.fleet__note { margin: clamp(34px, 4vw, 56px) 0 0; font-size: 1.05rem; color: var(--muted-on-dark); }
.fleet__note strong { color: var(--cream); font-weight: 600; }

/* ---------- Booking ---------- */
.booking { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(34px, 6vw, 100px); align-items: start; background: var(--cream-2); }
.booking__note { margin: 22px 0 0; max-width: 40ch; color: var(--muted); font-size: 1.05rem; }
.booking__form { background: var(--white); border-radius: 28px; padding: clamp(24px, 2.6vw, 42px); display: grid; gap: 20px; box-shadow: 0 30px 60px -40px rgba(26,20,7,0.5); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field .mono-label { color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 14px 4px; border: 0; border-bottom: 1.5px solid var(--line);
  background: transparent; font-size: 1.05rem; border-radius: 0;
  transition: border-color 0.3s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--amber-deep); }
.field input::placeholder { color: rgba(26,20,7,0.35); }
.form-status { color: var(--amber-deep); margin: 4px 0 0; min-height: 1em; letter-spacing: 0.08em; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 6vw, 90px); align-items: start; }
.pricing__lead { margin: 22px 0 0; max-width: 46ch; color: var(--muted); }
.pricing__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pricing__list li { display: grid; gap: 8px; padding: clamp(22px, 2.4vw, 32px) 0; border-top: 1px solid var(--line); }
.pricing__list li:last-child { border-bottom: 1px solid var(--line); }
.pricing__list .mono-label { color: var(--muted); }
.pricing__list strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 1.8vw, 1.6rem); letter-spacing: -0.01em; }

/* ---------- Process ---------- */
.process__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); }
.process__grid article { border-top: 2px solid var(--line-on-dark); padding-top: 24px; }
.process__num { font-family: var(--font-mono); font-size: clamp(2.2rem, 5vw, 4rem); color: var(--amber); display: block; line-height: 1; margin-bottom: 22px; }
.process__grid h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.9rem); margin: 0 0 10px; letter-spacing: -0.01em; }
.process__grid p { margin: 0; color: var(--muted-on-dark); }

/* ---------- Contact ---------- */
.contact { text-align: center; background: var(--cream); }
.contact .mono-label { margin-bottom: 20px; }
.contact__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 12vw, 11rem); line-height: 0.9; letter-spacing: -0.035em; margin: 0; }
.contact__links { display: flex; flex-direction: column; align-items: center; gap: 26px; margin-top: clamp(34px, 5vw, 64px); }
.contact__mail { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 3.4vw, 2.6rem); letter-spacing: -0.02em; border-bottom: 2px solid var(--amber); padding-bottom: 6px; }
.contact__mail:hover { color: var(--amber-deep); }
.contact__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: clamp(34px, 5vw, 60px); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: clamp(28px, 4vw, 48px) var(--gutter); background: var(--ink); color: var(--cream); }
.footer__brand { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.footer__brand em { font-style: normal; font-weight: 400; opacity: 0.8; }
.footer__legal, .footer__year { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted-on-dark); align-self: center; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .fleet__grid { grid-template-columns: 1fr; }
  .card { min-height: 320px; }
  .booking, .pricing { grid-template-columns: 1fr; }
  .process__grid { grid-template-columns: 1fr; gap: 4px; }
  .process__grid article { padding: 24px 0; }
  .hero__row { flex-direction: column; align-items: flex-start; }
  .hero__cue { display: none; }
}
@media (max-width: 540px) {
  .brand__name { display: none; }
  .menu__meta { flex-direction: column; gap: 18px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .js .mask .line > span,
  .js [data-reveal],
  .loader__line > span,
  .menu__nav a span { transform: none !important; opacity: 1 !important; }
  .loader { display: none !important; }
  .marquee__track { animation: none; }
  .hero__cue-line { animation: none; }
  * { scroll-behavior: auto !important; }
}
