/* ==========================================================================
   Global — reset, base typography, body
   ========================================================================== */

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

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

body.page-visible {
  opacity: 1;
}
body.page-leaving {
  opacity: 0.5;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text-heading);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  opacity: 0.5;
  transition: opacity 0.05s ease;
}

/* Prevent scroll when nav menu is open */
body.nav--open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Shared page layout --- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-main {
  flex: 1;
}

/* --- Container --- */
.container {
  width: 100%;
  padding-left: var(--page-x-mobile);
  padding-right: var(--page-x-mobile);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--page-x-tablet);
    padding-right: var(--page-x-tablet);
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1440px;
    padding-left: var(--page-x-desktop);
    padding-right: var(--page-x-desktop);
  }
}

/* --- Section spacing --- */
.section {
  padding-top: var(--section-y-mobile);
  padding-bottom: var(--section-y-mobile);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--section-y-tablet);
    padding-bottom: var(--section-y-tablet);
  }
}

/* Section background modifiers */
.section--surface { background: var(--color-surface); }
.section--navy    { background: var(--color-navy); }

/* --- Section header (eyebrow + heading) --- */
.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-3xl);
}

.section-header--center {
  text-align: center;
  align-items: center;
}

.section-header__body {
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-body);
  max-width: 36rem;
}

@media (min-width: 768px) {
  .section-header { margin-bottom: var(--space-4xl); }
  .section-header__body { font-size: var(--text-lg); }
}

/* Header with a trailing action (e.g. "Read all reviews") */
.section-header--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.section-header--row .section-header__titles {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* --- Eyebrow label --- */
.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-orange);
}

/* --- Headings --- */
.h1 {
  font-size: var(--text-5xl);
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text-heading);
}

.h2 {
  font-size: var(--text-4xl);
  font-weight: 900;
  line-height: 1.15;
  color: var(--color-text-heading);
}

.h3 {
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text-heading);
}

@media (min-width: 768px) {
  .h1 { font-size: 3rem; }      /* 48px */
  .h2 { font-size: 2.25rem; }   /* 36px */
}

@media (min-width: 1200px) {
  .h1 { font-size: 5rem; }      /* 80px */
  .h2 { font-size: 3.75rem; }   /* 60px */
  .h3 { font-size: 1.5rem; }    /* 24px */
}

/* --- Accent colour in headings --- */
.text-navy { color: var(--color-navy); }

/* --- Body text --- */
.body-text {
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-body);
}

@media (min-width: 768px) {
  .body-text { font-size: var(--text-xl); }
}

/* --- Trust / hero badge (home pill) --- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-badge);
  background: var(--color-badge-bg);
  border: 1px solid var(--color-badge-border);
  font-size: var(--text-eyebrow);
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- Green trust badge (for-riders / for-drivers) --- */
.trust-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-badge);
  background: var(--color-green-bg);
  border: 1px solid var(--color-green-border);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  color: var(--color-green);
  white-space: nowrap;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* --- Screen-reader only --- */
.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;
}
