/* ============================================================
   MRW MOBILITY V2 — COMPONENTS
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  font-size: var(--text-base);
  color: var(--fg1);
  background: var(--bg);
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Utility ── */
.eyebrow {
  font-family: var(--font-b);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--accent-dk);
}
.eyebrow-warm { color: var(--warm); }

.chamfer {
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-b);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  padding: 13px var(--sp-6);
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { transform: translateY(1px); }

.btn-prim {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-prim:hover { background: var(--accent-dk); color: #fff; }

.btn-warm {
  background: var(--warm);
  color: #fff;
}
.btn-warm:hover { background: var(--warm-dk); }

.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover { background: var(--ink-soft); }

.btn-ghost {
  background: transparent;
  color: var(--fg1);
  border: 1.5px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(26,23,20,.04); }

.btn-ghost-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
}
.btn-ghost-white:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.btn-lg {
  font-size: var(--text-base);
  padding: 16px var(--sp-8);
  gap: var(--sp-3);
}

/* Hero primary CTA gets chamfer */
.btn-hero {
  font-size: var(--text-base);
  padding: 16px var(--sp-8);
  gap: var(--sp-3);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.btn-hero:hover { background: var(--accent-dk); color: #fff; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(26,23,20,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background var(--dur-slow) var(--ease-out);
}
.nav.scrolled {
  background: rgba(26,23,20,.98);
  box-shadow: var(--shadow-md);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}
.nav__logo { height: 28px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  list-style: none;
}
.nav__links a {
  font-family: var(--font-b);
  font-weight: 500;
  font-size: var(--text-sm);
  color: rgba(255,255,255,.75);
  transition: color var(--dur-base);
}
.nav__links a:hover { color: #fff; }
.nav__cta { display: flex; align-items: center; gap: var(--sp-3); }

/* ── Section wrapper ── */
.section {
  padding: var(--sp-24) 0;
}
.section-sm { padding: var(--sp-16) 0; }
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}
.section-head {
  margin-bottom: var(--sp-12);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.section-head--center {
  align-items: center;
  text-align: center;
}
.section-title {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--track-tight);
  color: var(--fg1);
  text-wrap: balance;
}
.section-lead {
  font-size: var(--text-md);
  color: var(--fg2);
  line-height: var(--leading-relaxed);
  max-width: 52ch;
}

/* ── Vehicle card ── */
.vehicle-card {
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.vehicle-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.vehicle-card__img {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--sand);
  overflow: hidden;
}
.vehicle-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.vehicle-card:hover .vehicle-card__img img { transform: scale(1.04); }
.vehicle-card__badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  font-family: var(--font-b);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
}
.vehicle-card__badge--acc  { background: var(--accent); color: var(--on-accent); }
.vehicle-card__badge--sold { background: rgba(255,255,255,.15); color: rgba(255,255,255,.7); backdrop-filter: blur(4px); }

.vehicle-card--sold .vehicle-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26,23,20,.45);
  pointer-events: none;
}
.vehicle-card--sold .vehicle-card__img img { filter: saturate(.55); }
.vehicle-card--sold .vehicle-card__price {
  text-decoration: line-through;
  opacity: .45;
  font-size: var(--text-sm);
}
.vehicle-card__sold-label {
  font-family: var(--font-b);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--warm);
  letter-spacing: .04em;
}
.vehicle-card__body {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.vehicle-card__name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--fg1);
}
.vehicle-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
}
.vehicle-card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  color: var(--fg3);
}
.vehicle-card__meta-item svg { flex-shrink: 0; }
.vehicle-card__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-1) 0;
  margin-top: auto;
}
.vehicle-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.vehicle-card__price {
  font-family: var(--font-c);
  font-weight: 800;
  font-size: var(--text-2xl);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--track-tight);
  color: var(--fg1);
}

/* ── Pillars ── */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: box-shadow var(--dur-base);
}
.pillar-card:hover { box-shadow: var(--shadow-md); }
.pillar-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dk);
  flex-shrink: 0;
}
.pillar-icon-warm {
  background: var(--warm-tint);
  color: var(--warm);
}
.pillar-title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--fg1);
}
.pillar-text {
  font-size: var(--text-sm);
  color: var(--fg2);
  line-height: var(--leading-relaxed);
}

/* ── Advisor card ── */
.advisor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  box-shadow: var(--shadow-md);
}
.advisor-card__photo {
  background: var(--sand);
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.advisor-card__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.advisor-card__photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--sand) 0%, var(--warm-tint) 100%);
  color: var(--gray-400);
}
.advisor-card__body {
  padding: var(--sp-12) var(--sp-10);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  justify-content: center;
}
.advisor-card__quote {
  font-family: var(--font-b);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--fg1);
  border-left: 3px solid var(--warm);
  padding-left: var(--sp-6);
}
.advisor-card__name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--fg1);
}
.advisor-card__role {
  font-size: var(--text-sm);
  color: var(--fg3);
  margin-top: 2px;
}
.advisor-card__contact {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.advisor-card__contact a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--accent-dk);
  font-weight: 500;
}
.advisor-card__contact a:hover { text-decoration: underline; }

/* ── Testimonials ── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.testimonial-card {
  background: var(--warm-tint);
  border: 1px solid rgba(196,131,42,.15);
  border-radius: var(--r-md);
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.stars {
  display: flex;
  gap: 3px;
  color: var(--warm);
}
.testimonial-quote {
  font-size: var(--text-base);
  color: var(--fg1);
  line-height: var(--leading-relaxed);
  flex: 1;
}
.testimonial-author {
  font-family: var(--font-m);
  font-size: var(--text-xs);
  color: var(--fg3);
}
.testimonial-vehicle {
  color: var(--accent-dk);
  font-weight: 600;
}

/* ── Trust bar ── */
.trust-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-6) 0;
}
.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-12);
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg2);
}
.trust-item svg { color: var(--accent); }

/* ── Contact section ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg1);
}
.form-input, .form-textarea, .form-select {
  font-family: var(--font-b);
  font-size: var(--text-base);
  color: var(--fg1);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 11px var(--sp-4);
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
  outline: none;
  width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--gray-400); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: var(--leading-relaxed); }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}
.contact-info-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dk);
  flex-shrink: 0;
}
.contact-info-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg1);
  margin-bottom: 2px;
}
.contact-info-value {
  font-size: var(--text-sm);
  color: var(--fg2);
  line-height: var(--leading-normal);
}

/* ── Footer ── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: var(--sp-12) 0 var(--sp-8);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-10);
}
.footer__logo { height: 24px; margin-bottom: var(--sp-4); }
.footer__tagline { font-size: var(--text-sm); line-height: var(--leading-relaxed); max-width: 30ch; }
.footer__heading {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: var(--text-sm);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--sp-4);
}
.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.6);
  transition: color var(--dur-base);
}
.footer__links a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255,255,255,.4);
}

/* ── Vehicle grid — horizontal scroll track ── */
.vehicle-grid-wrap {
  /* negative margins let the track bleed to viewport edge */
  margin-left:  calc(-1 * var(--sp-8));
  margin-right: calc(-1 * var(--sp-8));
}
.vehicle-grid {
  display: flex;
  gap: var(--sp-5);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;           /* Firefox */
  padding: var(--sp-4) var(--sp-8) var(--sp-6);
  /* allow cards to breathe vertically during scale-in animation */
  padding-top: var(--sp-6);
  cursor: grab;
}
.vehicle-grid::-webkit-scrollbar { display: none; }
.vehicle-grid:active              { cursor: grabbing; }

.vehicle-grid .vehicle-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  /* keep hover lift working inside scroll container */
  position: relative;
}

/* Fade-out hint at right edge so users know there's more */
.vehicle-grid-wrap::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 80px;
  background: linear-gradient(to right, transparent, var(--ink) 85%);
  pointer-events: none;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.vehicle-grid-wrap {
  position: relative;
}

/* Scroll hint arrows */
.vehicle-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding-right: var(--sp-8);
  color: rgba(255,255,255,.45);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.vehicle-scroll-hint svg {
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(5px); }
}

/* ── Cinematic scroll reveals ── */
/* Rule: only animate transform + opacity (GPU layers, no layout/paint).
   Literal cubic-bezier values — CSS vars unreliable in transition timing. */

/* ── Shared resolved state ── */
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible,
.reveal-clip.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Fade-up — dramatic 80px lift */
.reveal {
  opacity: 0;
  transform: translateY(80px);
  will-change: transform, opacity;
  transition:
    opacity   0.9s cubic-bezier(.16,1,.3,1),
    transform 0.9s cubic-bezier(.16,1,.3,1);
}

/* Slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  will-change: transform, opacity;
  transition:
    opacity   0.9s cubic-bezier(.16,1,.3,1),
    transform 0.9s cubic-bezier(.16,1,.3,1);
}

/* Slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(80px);
  will-change: transform, opacity;
  transition:
    opacity   0.9s cubic-bezier(.16,1,.3,1),
    transform 0.9s cubic-bezier(.16,1,.3,1);
}

/* Scale-in — cards pop into view */
.reveal-scale {
  opacity: 0;
  transform: scale(0.88) translateY(40px);
  will-change: transform, opacity;
  transition:
    opacity   1.0s cubic-bezier(.16,1,.3,1),
    transform 1.0s cubic-bezier(.16,1,.3,1);
}

/* Clip-wipe — eyebrows/labels */
.reveal-clip {
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
  transition:
    opacity   0.7s cubic-bezier(.16,1,.3,1),
    transform 0.7s cubic-bezier(.16,1,.3,1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }

/* ── Section entrance line ── */
.section[data-cin] {
  position: relative;
}
.section[data-cin]::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(.16,1,.3,1);
  border-radius: 999px;
}
.section[data-cin].section-visible::before {
  transform: scaleX(1);
}
.section-dark[data-cin]::before {
  background: var(--accent-lt);
}

/* ── Reduced motion — respect user preference ── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-clip {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .section[data-cin]::before {
    transition: none;
    transform: scaleX(1);
  }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .advisor-card { grid-template-columns: 1fr; }
  .advisor-card__photo { min-height: 280px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .testimonial-grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .section { padding: var(--sp-16) 0; }
  .section-title { font-size: var(--text-2xl); }
  .form-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: var(--sp-8); }
  .trust-items { gap: var(--sp-6); }
}
@media (max-width: 480px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .container { padding: 0 var(--sp-5); }
}
