/* Rideway – design tokens
   Palette chosen by client: fresh green + amber. Button green is darkened
   (#15803D) so white text passes WCAG AA; #16A34A stays for accents. */
:root {
  --green: #16A34A;
  --green-strong: #15803D;
  --green-deep: #0E6630;
  --amber: #E8A317;
  --amber-text: #A86B00;
  --ink: #0F1F17;
  --ink-soft: #44544B;
  --mint: #D9F2E3;
  --mint-soft: #F1FAF4;
  --leaf: #8FD3AE;
  --leaf-dark: #3FA873;
  --line: #E1EAE4;
  --bg: #FFFFFF;
  --black: #000000;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-pill: 999px;

  --container: 1120px;
  --gutter: 24px;
  --header-h: 72px;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-pill);
  font: 500 1rem/1 var(--font);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), transform .12s var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .9375rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }

.btn-primary {
  background: var(--green-strong); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(21, 128, 61, .55);
}
.btn-primary:hover { background: var(--green-deep); }

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

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto;
}
.brand-mark { width: 44px; height: auto; fill: var(--ink); }
.brand-name { font-weight: 700; font-size: 1.375rem; letter-spacing: -0.03em; }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  position: relative;
  padding: 10px 12px; border-radius: var(--r-sm);
  text-decoration: none; font-weight: 500; font-size: .9375rem; color: var(--ink-soft);
  transition: color .2s var(--ease-out);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="true"] { color: var(--green-strong); }
.main-nav a[aria-current="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--green);
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
}
.lang-switch button {
  min-width: 40px; min-height: 34px; padding: 0 8px;
  border: 0; border-radius: var(--r-pill); background: transparent;
  font: 500 .8125rem/1 var(--font); color: var(--ink-soft); cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--mint); color: var(--green-deep); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 9vw, 104px); overflow: hidden; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-title {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic; font-weight: 700; color: var(--amber-text);
}
.hero-lead {
  margin-top: 24px; max-width: 34em;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--ink-soft);
}
.hero-actions {
  margin-top: 36px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.partners {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  font-size: .9375rem; color: var(--ink-soft);
}
.partners-label { margin-right: 4px; }
.chip {
  padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--mint-soft); border: 1px solid var(--line);
  font-weight: 600; color: var(--ink); font-size: .875rem;
}

.hero-scene { margin-top: clamp(24px, 4vw, 48px); }
.hero-scene svg { width: 100%; max-width: 1200px; margin-inline: auto; height: auto; }
.hero-scene .sky { fill: var(--mint-soft); }
.hero-scene .leaf { fill: var(--leaf); }
.hero-scene .leaf-light { fill: #BDE7CF; }
.hero-scene .leaf-dark { fill: var(--leaf-dark); }
.hero-scene .trunk { fill: none; stroke: #2F5A43; stroke-width: 5; stroke-linecap: round; }
.hero-scene .road { fill: var(--green); }

.car-body { fill: var(--amber); }
.window { fill: #EAF7FF; }
.driver { fill: #2F5A43; }
.door-text { font: 700 34px var(--font); fill: rgba(15, 31, 23, .55); letter-spacing: -0.5px; }
.tyre { fill: #1F2A24; }
.hub { fill: #C9D3CD; }
.spoke { stroke: #1F2A24; stroke-width: 4; stroke-linecap: round; }
.wheel { transform-box: fill-box; transform-origin: center; }

/* The one orchestrated moment: the car drives in on load */
@media (prefers-reduced-motion: no-preference) {
  .car-wrap { animation: drive-in 1.6s var(--ease-out) .2s both; }
  .wheel { animation: spin 1.6s var(--ease-out) .2s both; }
  @keyframes drive-in {
    from { transform: translateX(-900px); }
    to { transform: translateX(0); }
  }
  @keyframes spin {
    from { transform: rotate(-1440deg); }
    to { transform: rotate(0); }
  }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tint { background: var(--mint-soft); }
.section h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  max-width: 20ch;
  text-wrap: balance;
}
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 48px; }
.section-head p { color: var(--ink-soft); font-size: 1.125rem; max-width: 32ch; }

/* Steps: a real sequence, so numbers carry meaning */
.steps {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0 24px 0 0;
}
.steps li::before {
  content: ""; position: absolute; left: 44px; right: 8px; top: 21px;
  height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.steps li:last-child::before { display: none; }
.step-num {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--mint); color: var(--green-deep);
  font-weight: 700; font-size: 1.125rem;
}
.steps li:last-child .step-num { background: var(--green-strong); color: #fff; }
.steps h3 { margin-top: 20px; font-size: 1.1875rem; }
.steps p { margin-top: 8px; color: var(--ink-soft); max-width: 28ch; }

/* Why */
.why { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.why-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 40px;
}
.why-list li { display: flex; gap: 16px; }
.why-icon {
  width: 28px; height: 28px; flex: none; margin-top: 2px;
  fill: none; stroke: var(--green-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.why-list h3 { font-size: 1.125rem; }
.why-list p { margin-top: 6px; color: var(--ink-soft); }

/* Payouts */
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.pay-copy > p { margin-top: 20px; color: var(--ink-soft); font-size: 1.125rem; max-width: 36em; }
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.checks .icon { color: var(--green-strong); }

.calc {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line); border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 60px -40px rgba(15, 31, 23, .35);
}
.calc h3 { font-size: 1.25rem; }
.field { margin-top: 24px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field label { font-size: .9375rem; color: var(--ink-soft); }
.field-val { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px; margin: 4px 0 0; background: transparent; cursor: pointer;
  --fill: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--green) var(--fill), var(--line) var(--fill));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--green); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--green-strong);
  box-shadow: 0 2px 6px rgba(15, 31, 23, .2);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 2px solid var(--green-strong);
}
input[type="range"]:focus-visible { outline-offset: 0; }

.result {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.result-label { color: var(--ink-soft); }
.result-value {
  font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em;
  color: var(--green-deep); font-variant-numeric: tabular-nums;
}

.bar {
  margin-top: 16px; height: 12px; border-radius: 6px; overflow: hidden;
  display: flex; gap: 2px; background: var(--line);
}
.bar span { display: block; height: 100%; transition: width .3s var(--ease-out); }
.bar-you, .sw-you { background: var(--green); }
.bar-cost, .sw-cost { background: #9AA8A0; }
.bar-fee, .sw-fee { background: var(--amber); }

.legend {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .875rem; color: var(--ink-soft);
}
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.calc-note { margin-top: 16px; font-size: .875rem; color: var(--ink-soft); }

/* Join */
.join-section { background: var(--green-deep); color: #fff; }
.join { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.join-copy > p { margin-top: 20px; font-size: 1.125rem; color: #D5EBDD; max-width: 32em; }
.join-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.join-section .btn-primary { background: var(--amber); color: var(--ink); box-shadow: none; }
.join-section .btn-primary:hover { background: #F4B83A; }
.join-phone { margin-top: 20px; font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.join-section :focus-visible { outline-color: #fff; }

.req {
  padding: clamp(24px, 3vw, 36px);
  border-radius: 24px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
}
.req h3 { font-size: 1.25rem; }
.checks-light .icon { color: var(--amber); }
.req-note { margin-top: 20px; font-size: .9375rem; color: #D5EBDD; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; min-height: 48px;
  font-weight: 500; font-size: 1.0625rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s var(--ease-out);
}
.faq-list details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq-list details p { padding: 0 32px 24px 0; color: var(--ink-soft); max-width: 60ch; }

/* Contact */
.contact-grid {
  margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 32px;
}
.contact-grid dt { font-size: .875rem; color: var(--ink-soft); }
.contact-grid dd { margin: 6px 0 0; font-weight: 600; font-size: 1.0625rem; }
.contact-grid a { text-decoration: none; border-bottom: 1px solid var(--leaf); }
.contact-grid a:hover { border-bottom-color: var(--green-strong); }

/* Footer: pure black so the supplied black logo sits seamlessly */
.site-footer { background: var(--black); color: #fff; padding-block: 32px; }
.footer-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer-logo { width: 320px; height: 190px; object-fit: cover; margin-left: -40px; }
@media (max-width: 600px) { .footer-logo { margin-left: -24px; } }
.footer-text { display: grid; gap: 6px; }
.footer-small { font-size: .875rem; color: #A9B4AE; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .steps li::before { display: none; }
  .why, .faq { grid-template-columns: 1fr; gap: 32px; }
  .pay, .join { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); justify-content: start; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 16px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px -16px rgba(15, 31, 23, .2);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 4px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav a:last-child { border-bottom: 0; }
  .main-nav a[aria-current="true"]::after { display: none; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .brand-mark { width: 38px; }
  .brand-name { font-size: 1.25rem; }
  .header-actions { gap: 8px; }
  .lang-switch button { min-width: 34px; padding: 0 6px; }
  .hero-actions .btn { width: 100%; }
  .steps, .why-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 20px; }
  .join-actions .btn { width: 100%; }
  .hero-scene svg { width: 135%; max-width: none; margin-left: -28%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
