/* ==================================================================
   Rodar landing pages v6 — shared styles for the /apply landing pages
   (new-car-finance, new-car-buying, new-concierge-offer).

   Tokens, typography and components are taken from the v6 design files
   ("Rodar landing pages v6"). Page sections keep the design's own inline
   styles; this file holds the tokens, the design-system components
   (button, input, select, tap options) and everything that changes
   between desktop (>= 960px), stacked (760–959px) and mobile (< 760px).
   ================================================================== */

/* ---- Nolan (self-hosted, from the design files) ---- */
@font-face { font-family: 'Nolan'; src: url('../fonts/nolan/Nolan-Regular.woff2') format('woff2'), url('../fonts/nolan/Nolan-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nolan'; src: url('../fonts/nolan/Nolan-Medium.woff2') format('woff2'), url('../fonts/nolan/Nolan-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nolan'; src: url('../fonts/nolan/Nolan-Bold.woff2') format('woff2'), url('../fonts/nolan/Nolan-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nolan'; src: url('../fonts/nolan/Nolan-Bold.woff2') format('woff2'), url('../fonts/nolan/Nolan-Bold.woff') format('woff'); font-weight: 800 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nolan'; src: url('../fonts/nolan/Nolan-Regular.woff2') format('woff2'), url('../fonts/nolan/Nolan-Regular.woff') format('woff'); font-weight: 300; font-style: normal; font-display: swap; }

/* ---- Design tokens ---- */
:root {
  --rodar-blue: #2F55ED; --rodar-blue-hover: #3E60E8; --rodar-blue-bright: #1F4AF8; --rodar-blue-deep: #0635F1;
  --rodar-blue-50: #EEF2FE; --rodar-blue-100: #DCE4FD; --rodar-blue-200: #B9C8FB;
  --rodar-grey-mid: #8E8E8E; --rodar-grey-soft: #97A0AE; --rodar-white: #FFFFFF;
  --rodar-cyan: #44ADDA; --rodar-green: #28A745; --rodar-green-50: #E7F6EC; --rodar-gold: #FFC107;
  --rodar-red: #D32F2F; --rodar-red-50: #FBEAEA;
  --border-strong: #D4D8DF;
  --color-focus-ring: rgba(47, 85, 237, 0.35);

  --font-sans: 'Nolan', 'Poppins', 'Outfit', 'Montserrat', Arial, sans-serif;

  --radius-xs: 6px; --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 28px; --radius-2xl: 36px; --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(27, 27, 28, 0.06);
  --shadow-sm: 0 2px 8px rgba(27, 27, 28, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 27, 28, 0.08);
  --shadow-lg: 0 18px 48px rgba(27, 27, 28, 0.10);
  --shadow-xl: 0 28px 70px rgba(27, 27, 28, 0.14);
  --shadow-blue: 0 12px 28px rgba(47, 85, 237, 0.28);
  --shadow-focus: 0 0 0 4px var(--color-focus-ring);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 360ms;

  /* Landing-page palette (the design's page wrapper): dark grey #222222, warm beige #F5F3EF */
  --rodar-heading: #222222; --rodar-slate: #222222; --rodar-grey-body: #555A61; --rodar-grey-cool: #555A61;
  --rodar-surface: #F5F3EF; --rodar-surface-2: #ECE9E3; --rodar-line: #ECE9E3; --rodar-line-strong: #ECE9E3;
  --rodar-black: #222222; --border-input: #ECE9E3;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.v6 {
  margin: 0; min-height: 100vh; background: #fff; color: #222222;
  font-family: var(--font-sans); font-size: 18px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
.v6 h1, .v6 h2, .v6 h3, .v6 h4 { margin: 0; color: var(--rodar-heading); }
.v6 p { margin: 0 0 1em; text-wrap: pretty; }
.v6 a { color: var(--rodar-blue); text-decoration: none; }
.v6 a:hover { color: var(--rodar-blue-hover); }
.v6 img { max-width: 100%; }
.v6 button { font-family: var(--font-sans); }
.rodar-eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rodar-blue); }
.v6-hide { display: none !important; }

/* ---- Button (design system: primary | secondary | ghost; sm | md | lg) ---- */
.v6-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; line-height: 1;
  border: 1.5px solid transparent; border-radius: var(--radius-pill); cursor: pointer; width: auto; white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard), transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.v6-btn--sm { gap: 7px; height: 38px; padding: 9px 18px; font-size: 14px; }
.v6-btn--md { gap: 8px; height: 48px; padding: 13px 26px; font-size: 16px; }
.v6-btn--lg { gap: 10px; height: 56px; padding: 16px 34px; font-size: 18px; }
.v6-btn--primary { background: var(--rodar-blue); color: #fff; box-shadow: var(--shadow-blue); }
.v6-btn--primary:hover { background: var(--rodar-blue-hover); color: #fff; }
.v6-btn--secondary { background: #fff; color: var(--rodar-heading); border-color: var(--border-strong); }
.v6-btn--secondary:hover { background: var(--rodar-surface); border-color: var(--rodar-grey-soft); color: var(--rodar-heading); }
.v6-btn--ghost { background: transparent; color: var(--rodar-blue); }
.v6-btn--ghost:hover { background: var(--rodar-blue-50); }
.v6-btn:active { transform: translateY(1px) scale(0.99); }
.v6-btn--full { width: 100%; }
.v6-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Form card fields ---- */
.v6-field { min-width: 0; display: flex; flex-direction: column; gap: 7px; grid-column: 1 / -1; }
.v6-field--half { grid-column: auto; }
.v6-label { font-size: 14px; font-weight: 600; color: var(--rodar-heading); line-height: 1.5; }
.v6-help { margin-top: -4px; font-size: 13px; line-height: 1.45; color: var(--rodar-grey-cool); }
.v6-field[hidden] { display: none !important; }
.v6-input {
  display: flex; align-items: center; gap: 10px; position: relative;
  background: #FAF8F5; border: 1.5px solid var(--border-input); border-radius: var(--radius-md);
  padding: 0 16px; height: 50px;
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.v6-input:focus-within { border-color: var(--rodar-blue); box-shadow: var(--shadow-focus); }
.v6-input.has-error, .v6-input:has(input.error) { border-color: var(--rodar-red); box-shadow: none; }
.v6-input__prefix { display: inline-flex; align-items: center; gap: 6px; color: var(--rodar-grey-cool); flex: none; font-size: 16px; }
.v6-input__prefix--strong { color: var(--rodar-heading); font-weight: 500; }
.v6-input input {
  border: none; outline: none; background: transparent; flex: 1; min-width: 0; height: 100%;
  font-family: inherit; font-size: 16px; color: var(--rodar-slate); padding: 0; margin: 0; box-shadow: none;
}
.v6-input input::placeholder { color: #8E8E8E; opacity: 1; }
.v6-input__hint { flex: none; font-size: 12px; font-weight: 500; }
.v6-select { position: relative; }
.v6-select select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 50px; padding: 0 44px 0 16px; margin: 0;
  font-family: inherit; font-size: 16px; color: var(--rodar-slate); background-color: #FAF8F5;
  border: 1.5px solid var(--border-input); border-radius: var(--radius-md); box-shadow: none; cursor: pointer; outline: none;
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.v6-select select:invalid, .v6-select select.is-empty { color: var(--rodar-grey-cool); }
.v6-select select:focus { border-color: var(--rodar-blue); box-shadow: var(--shadow-focus); }
.v6-select select.error { border-color: var(--rodar-red); box-shadow: none; }
.v6-select svg { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.v6-textarea {
  width: 100%; resize: vertical; min-height: 96px; padding: 14px 16px; margin: 0;
  border: 1.5px solid var(--border-input); border-radius: var(--radius-md); background: #FAF8F5;
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5; color: var(--rodar-slate); outline: none;
}
.v6-textarea:focus { border-color: var(--rodar-blue); box-shadow: var(--shadow-focus); }

/* Tap options (one tap picks; the real <select> beside them keeps the live value) */
.v6-taps { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v6-taps--1 { grid-template-columns: minmax(0, 1fr); }
.v6-taps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v6-tap {
  min-width: 0; min-height: 48px; padding: 10px 12px; border-radius: var(--radius-md);
  border: 1.5px solid #ECE9E3; background: #FAF8F5; color: #222222; box-shadow: none;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; cursor: pointer;
  transition: border-color var(--dur-base), background var(--dur-base), color var(--dur-base);
}
.v6-tap:hover { border-color: var(--rodar-grey-soft); }
.v6-tap.is-on { border-color: var(--rodar-blue); background: var(--rodar-blue-50); color: var(--rodar-blue); box-shadow: 0 0 0 3px rgba(47, 85, 237, 0.15); }
.v6-taps.has-error .v6-tap { border-color: var(--rodar-red); }
/* the live <select> behind tap options: kept in the form, out of sight (not display:none, so validation still sees it) */
.v6-sr-select { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; border: 0 !important; opacity: 0; }

/* Validation messages (jQuery Validate labels and the design's error text) */
.v6 label.error, .v6-err { display: block; font-size: 13px; line-height: 1.4; color: var(--rodar-red); font-weight: 400; margin: 0; }

/* Steps: every step sits in the same grid cell, so the card keeps the tallest step's height */
.v6-steps { display: grid; }
.v6-step { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.v6-step[hidden] { display: flex !important; visibility: hidden; pointer-events: none; }
.v6-step__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.v6-step__actions { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.v6-seg { height: 5px; border-radius: 999px; background: var(--rodar-line); transition: background var(--dur-base) var(--ease-standard); }
.v6-seg.is-on { background: var(--rodar-blue); }

/* Live success / error boxes (shown by the live form script) */
.w-form-done, .w-form-fail { display: none; }
/* booking thank-you: the HubSpot calendar full width inside the card, no frame, never wider than the card */
.v6-booking { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
.v6-booking .meetings-iframe-container { width: 100% !important; max-width: 100% !important; min-width: 0 !important; min-height: 640px; }
.v6-booking .meetings-iframe-container iframe { display: block; width: 100% !important; max-width: 100% !important; min-width: 0 !important; border: 0; }
.w-form-done .form_message-success { width: 100%; min-width: 0; }
/* Phones: the HubSpot booking calendar runs edge to edge (out of the card's side padding),
   with no box of ours around it and nothing wider than the screen. All three /apply pages. */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }
  html body.v6 .v6-booking,
  html body.v6 #get-options .w-form-done .meetings-iframe-container,
  html body.v6 #rodarWizardV2 .rw2-hsbook {
    width: 100vw !important; max-width: 100vw !important; margin-left: calc(50% - 50vw) !important; margin-right: 0 !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important;
  }
  html body.v6 #rodarWizardV2 .rw2-hsbook .meetings-iframe-container { border-radius: 0 !important; }
  html body.v6 .v6-booking .meetings-iframe-container iframe,
  html body.v6 #get-options .w-form-done .meetings-iframe-container iframe,
  html body.v6 #rodarWizardV2 .rw2-hsbook iframe { width: 100% !important; min-width: 0 !important; max-width: 100% !important; border: 0 !important; }
  /* the blue "Lock in your priority call" card no longer frames the calendar */
  html body.v6 #rodarWizardV2 .rw2-bookcard.blue:has(.rw2-hsbook) { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; background: transparent !important; }
}
.v6-fail { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--rodar-red-50); color: var(--rodar-red); font-size: 14px; line-height: 1.5; }

/* ---- Hero layout ---- */
.v6-hero { position: relative; overflow: hidden; background: #F5F3EF; padding: clamp(28px, 6vw, 72px) 0 clamp(48px, calc(13vw - 51px), 136px); }
.v6-hero__bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 72%; display: block; }
.v6-hero__fade { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(245,243,239,0.92) 0%, rgba(245,243,239,0.8) 35%, rgba(245,243,239,0.8) 48%, rgba(245,243,239,0.15) 53%, rgba(245,243,239,0) 62%); }
.v6-hero__grid {
  position: relative; z-index: 1; pointer-events: none; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 32px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); grid-template-rows: auto 1fr;
  grid-template-areas: "head form" "ctas form"; column-gap: 64px; row-gap: clamp(24px, 3vw, 32px); align-items: start;
}
.v6-hero__grid > * { pointer-events: auto; min-width: 0; }
.v6-hero__head { grid-area: head; }
.v6-hero__badge { grid-area: badge; }
.v6-hero__strip { grid-area: strip; }
.v6-hero__ctas { grid-area: ctas; }
.v6-hero__form { grid-area: form; }
.v6-card {
  width: 100%; max-width: none; position: sticky; top: 100px; background: #fff;
  border: 1px solid var(--rodar-line); border-radius: var(--radius-2xl); box-shadow: var(--shadow-xl); padding: 32px;
}
.v6-cta-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; }
.v6-only-mobile, .v6-only-stacked { display: none !important; }
.v6-mbar { display: none; }

/* stacked: 760–959px */
@media (max-width: 959px) {
  .v6-hero__fade { background: linear-gradient(180deg, rgba(245,243,239,0.5) 0%, rgba(245,243,239,0.9) 30%, #F5F3EF 60%); }
  .v6-hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "head" "form" "ctas"; }
  .v6-card { position: static; max-width: 560px; }
  .v6-only-stacked { display: block !important; }
}
/* mobile: < 760px */
@media (max-width: 759px) {
  .v6-not-mobile { display: none !important; }
  .v6-only-mobile { display: flex !important; }
  .v6-only-mobile.v6-block { display: block !important; }
  .v6-only-stacked { display: none !important; }
  .v6-hero__grid { grid-template-areas: "head" "badge" "form" "strip" "ctas"; row-gap: 0; }
  .v6-hero__ctas { margin-top: 16px; }
  .v6-card { max-width: none; padding: 24px 18px; }
  .v6-cta-row { flex-direction: column; }
  .v6-cta-row > div, .v6-cta-row .v6-btn { width: 100%; }
  .v6-btn--wrap-m { padding-left: 16px; padding-right: 16px; font-size: 16px; white-space: normal; height: auto; min-height: 56px; line-height: 1.25; text-align: center; }
  .v6-tap { font-size: 14px; padding-left: 8px; padding-right: 8px; }
  .v6-cta-final { width: 100%; }
  .v6-mbar.is-on {
    display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--rodar-line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    grid-template-columns: minmax(0, 1fr);
  }
  .v6-mbar .v6-btn { height: 52px; }
  .v6-footer-pad { display: block !important; height: 84px; }
}

/* ---- FAQ ---- */
.v6-faq__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(20px, 2.5vw, 26px) 0; background: none; border: none; cursor: pointer; text-align: left; font-family: var(--font-sans); }
.v6-faq__chip { width: 36px; height: 36px; flex: none; border-radius: 999px; background: var(--rodar-surface); display: inline-flex; align-items: center; justify-content: center; transition: background var(--dur-base); }
.v6-faq__chip svg { stroke: #222222; transition: transform var(--dur-base) var(--ease-standard); }
.v6-faq__item.is-open .v6-faq__chip { background: #222222; }
.v6-faq__item.is-open .v6-faq__chip svg { stroke: #fff; transform: rotate(180deg); }
.v6-faq__a { display: none; margin: 0; padding: 0 56px clamp(22px, 2.5vw, 28px) 0; font-size: 17px; line-height: 1.6; color: var(--rodar-grey-body); text-wrap: pretty; }
.v6-faq__item.is-open .v6-faq__a { display: block; }

/* horizontal scrollers without a scrollbar */
.v6-scroller { scrollbar-width: none; }
.v6-scroller::-webkit-scrollbar { display: none; }
