@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&display=swap');

/* ---- Reliable Motors design tokens ---- */
:root {
  --rm-navy-900: #0A1730;
  --rm-navy-800: #0E1F44;

  --rm-red-600: #8E121B;
  --rm-red-500: #B01823;

  --rm-grey-700: #4b5169;
  --rm-grey-500: #8a90a0;
  --rm-grey-100: #f6f7fa;
  --rm-white:    #ffffff;

  --color-text-primary:   var(--rm-navy-800);
  --color-text-secondary: var(--rm-grey-700);
  --color-text-muted:     var(--rm-grey-500);

  --color-border: var(--rm-navy-800);
  --color-border-inverse: rgba(255, 255, 255, 0.2);

  --font-base: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --content-max: 1440px;
  --gutter-x: clamp(20px, 5vw, 56px);

  --color-focus-ring: var(--rm-red-500);
  --focus-ring: 0 0 0 3px rgba(176, 24, 35, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a,
button,
.rm-btn,
.rm-input,
.rm-textarea {
  -webkit-tap-highlight-color: rgba(176, 24, 35, 0.15);
  touch-action: manipulation;
}

:target,
section[id] {
  scroll-margin-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  color: var(--color-text-primary);
  background: var(--rm-white);
  font-family: var(--font-base);
  line-height: 1.55;
  max-width: var(--content-max);
  margin: 0 auto;
  box-shadow: 0 0 120px rgba(10, 23, 48, 0.06);
}

a {
  color: inherit;
}

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* ---- Top accent bar ---- */
.topbar {
  height: 6px;
  background: var(--rm-red-500);
}

/* ---- Header ---- */
.site-header {
  position: relative;
  border-bottom: 2px solid var(--color-border);
}

.site-header .inner {
  padding: 20px var(--gutter-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img {
  display: block;
  height: 104px;
  width: auto;
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav.primary-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav.primary-nav .nav-links a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

nav.primary-nav .nav-links a:hover {
  border-bottom-color: var(--rm-red-500);
}

/* ---- Mobile menu toggle (hidden on desktop) ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--color-border);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--rm-navy-800);
}

/* ---- Buttons ---- */
.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  padding: 13px 22px;
  transition: background-color 180ms ease, transform 120ms ease;
}

.rm-btn:active {
  transform: translateY(1px);
}

.rm-btn--lg {
  padding: 17px 30px;
  font-size: 16px;
}

.rm-btn--primary {
  background: var(--rm-red-500);
  color: var(--rm-white);
}

.rm-btn--primary:hover {
  background: var(--rm-red-600);
}

.rm-btn--secondary {
  background: var(--rm-navy-800);
  color: var(--rm-white);
}

.rm-btn--secondary:hover {
  background: var(--rm-navy-900);
}

.rm-btn--full {
  width: 100%;
}

/* ---- Tag ---- */
.rm-tag {
  display: inline-block;
  background: var(--rm-red-500);
  color: var(--rm-white);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  letter-spacing: 0.02em;
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 2fr 3fr;
}

.hero-copy {
  padding: clamp(48px, 8vw, 92px) var(--gutter-x);
  border-right: 2px solid var(--color-border);
}

.hero-copy h1 {
  margin-top: 26px;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-copy p {
  margin-top: 28px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 38px;
  border: 2px solid var(--color-border);
  width: fit-content;
}

.hero-actions .rm-btn--secondary {
  background: var(--rm-white);
  color: var(--rm-navy-800);
  border-left: 2px solid var(--color-border);
  transition: background-color 180ms ease, transform 120ms ease;
}

.hero-actions .rm-btn--secondary:hover {
  background: var(--rm-grey-100);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 46px;
}

.hero-stats .k {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-stats .v {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.hero-media {
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: 360px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Section shell ---- */
.section-block {
  border-top: 2px solid var(--color-border);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 38px var(--gutter-x) 26px;
}

.section-head h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 16px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ---- Numbered rows (What we do) ---- */
.grid-3 {
  border-top: 2px solid var(--color-border);
}

.numbered-cell {
  display: grid;
  grid-template-columns: minmax(72px, 0.4fr) 1fr;
  gap: clamp(20px, 5vw, 64px);
  align-items: start;
  padding: clamp(30px, 4vw, 46px) var(--gutter-x);
  border-bottom: 2px solid var(--color-border);
}

.numbered-cell:last-child {
  border-bottom: none;
}

.numbered-cell .num {
  grid-column: 1;
  grid-row: 1;
  font-size: clamp(44px, 5.5vw, 68px);
  font-weight: 800;
  color: var(--rm-red-500);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.numbered-cell h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  text-align: right;
}

.numbered-cell p {
  grid-column: 1;
  grid-row: 2;
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 60ch;
}

/* ---- Step grid (How it works) ---- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--color-border);
}

.step-cell {
  padding: 34px 30px;
  border-right: 2px solid var(--color-border);
}

.step-cell:last-child {
  border-right: none;
}

.step-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--rm-red-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.step-cell h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  font-weight: 700;
}

.step-cell p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

/* ---- Trust / Why us ---- */
.trust {
  background: var(--rm-navy-800);
  color: var(--rm-white);
  padding: 80px var(--gutter-x);
  border-top: 2px solid var(--color-border);
}

.trust h2 {
  margin: 0 0 44px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.grid-4--inverse {
  border: 2px solid var(--color-border-inverse);
  border-top: 2px solid var(--color-border-inverse);
}

.trust-cell {
  padding: 28px 26px;
  border-right: 2px solid var(--color-border-inverse);
}

.trust-cell:last-child {
  border-right: none;
}

.trust-cell h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.trust-cell p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Contact ---- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--color-border);
}

.contact-info-panel {
  padding: clamp(48px, 8vw, 76px) var(--gutter-x);
  border-right: 2px solid var(--color-border);
}

.contact-info-panel h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.contact-info-panel p {
  margin: 22px 0 34px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 38ch;
}

.contact-rows {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid rgba(14, 31, 68, 0.16);
}

.contact-row--last {
  border-bottom: 1px solid rgba(14, 31, 68, 0.16);
}

.contact-row .label {
  font-weight: 700;
}

.contact-row .value {
  color: var(--color-text-secondary);
}

a.contact-row .value,
.contact-row a.value {
  text-decoration: none;
  transition: color 160ms ease;
}

.contact-row a.value:hover {
  color: var(--rm-red-500);
}

.contact-form-panel {
  padding: clamp(48px, 8vw, 76px) var(--gutter-x);
  background: var(--rm-grey-100);
}

form.rm-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rm-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rm-field {
  display: flex;
  flex-direction: column;
}

.rm-field label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.rm-input,
.rm-textarea {
  width: 100%;
  font-family: var(--font-base);
  font-size: 16px;
  color: var(--color-text-primary);
  background: var(--rm-white);
  border: 2px solid var(--color-border);
  padding: 0 14px;
  outline: none;
  transition: box-shadow 160ms ease;
}

.rm-input {
  height: 50px;
}

.rm-textarea {
  height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.rm-input:focus,
.rm-textarea:focus {
  box-shadow: var(--focus-ring);
}

form.rm-form .rm-btn--full {
  margin-top: 4px;
}

.form-note {
  margin-top: 14px !important;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ---- Honeypot (hidden from real users, catches bots) ---- */
.rm-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Inline form error ---- */
.form-error {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--rm-red-500);
  background: rgba(176, 24, 35, 0.08);
  border-left: 3px solid var(--rm-red-500);
  padding: 10px 12px;
}

.rm-btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form-success {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 340px;
  justify-content: center;
}

.form-success h3 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.form-success p {
  font-size: 16px;
  color: var(--color-text-secondary);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--rm-navy-900);
  color: rgba(255, 255, 255, 0.7);
  padding: 52px var(--gutter-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border-top: 5px solid var(--rm-red-500);
}

.footer-logo {
  display: block;
  height: 64px;
  width: auto;
}

.site-footer span {
  font-size: 14px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .contact-info-panel {
    border-right: none;
    border-bottom: 2px solid var(--color-border);
  }

  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .step-cell:nth-child(2n) {
    border-right: none;
  }

  .step-cell:nth-child(n+3) {
    border-top: 2px solid var(--color-border);
  }
}

@media (max-width: 760px) {
  nav.primary-nav {
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  nav.primary-nav .rm-btn--primary {
    display: none;
  }

  .brand img {
    height: 64px;
  }

  nav.primary-nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--rm-white);
    border-bottom: 2px solid var(--color-border);
    padding: 4px var(--gutter-x) 14px;
    z-index: 50;
  }

  nav.primary-nav .nav-links.open {
    display: flex;
  }

  nav.primary-nav .nav-links a {
    padding: 15px 0;
    border-top: 1px solid rgba(14, 31, 68, 0.12);
    border-bottom: none;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .rm-btn {
    width: 100%;
  }

  .hero-actions .rm-btn--secondary {
    border-left: none;
    border-top: 2px solid var(--color-border);
  }

  .rm-form .row-2 {
    grid-template-columns: 1fr;
  }

  .numbered-cell {
    grid-template-columns: auto 1fr;
    column-gap: clamp(16px, 5vw, 28px);
    row-gap: 18px;
    align-items: center;
  }

  .numbered-cell h3 {
    text-align: left;
    align-self: center;
  }

  .numbered-cell p {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .step-cell,
  .trust-cell {
    border-right: none !important;
  }

  .step-cell:not(:first-child),
  .trust-cell:not(:first-child) {
    border-top: 2px solid var(--color-border);
  }

  .trust-cell:not(:first-child) {
    border-top: 2px solid var(--color-border-inverse) !important;
  }
}
