/* =============================================================
   TROKR DELIVERY SERVICES — Design System
   Brand: Friendly · Local · Trusted
   Strategy: Committed — cobalt blue primary on white, dark nav
   ============================================================= */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Palette — OKLCH */
  /* Brand cobalt — extracted from Trokr logo circle/truck */
  --primary:        oklch(0.42 0.22  264);   /* cobalt blue — logo match */
  --primary-light:  oklch(0.58 0.18  264);   /* hover / lighter variant */
  --primary-dark:   oklch(0.30 0.22  264);   /* pressed / dark variant */
  --primary-wash:   oklch(0.95 0.04  264);   /* pale blue surface tint */

  --accent:         oklch(0.58 0.15  220);   /* sky blue — lighter accent */
  --accent-light:   oklch(0.72 0.12  220);   /* accent hover */
  --accent-wash:    oklch(0.96 0.025 220);   /* accent tinted wash */

  --bg:             oklch(1.000 0.000   0);  /* pure white */
  --surface:        oklch(0.975 0.007 264);  /* near-white, faint blue tint */
  --surface-2:      oklch(0.958 0.012 264);  /* slightly deeper surface */

  --ink:            oklch(0.16 0.025 264);   /* near-black, blue-tinted */
  --ink-2:          oklch(0.28 0.018 264);   /* secondary headings */
  --muted:          oklch(0.47 0.016 264);   /* secondary text — ≥4.5:1 on white */

  --border:         oklch(0.88 0.008 264);   /* subtle dividers */
  --border-strong:  oklch(0.74 0.015 264);   /* visible borders */

  /* Dark nav — charcoal-navy matching original site header */
  --nav-bg:         oklch(0.17 0.04  264);   /* deep charcoal-navy */
  --nav-bg-solid:   oklch(0.14 0.04  264);   /* fully opaque (scrolled) */

  /* Typography */
  --font-display:   'Plus Jakarta Sans', sans-serif;
  --font-body:      'Inter', 'Plus Jakarta Sans', sans-serif;

  /* Type scale — fluid */
  --text-xs:   clamp(0.75rem,  0.72rem + 0.1vw,  0.8125rem);
  --text-sm:   clamp(0.875rem, 0.85rem + 0.1vw,  0.9375rem);
  --text-base: clamp(1rem,     0.95rem + 0.2vw,  1.0625rem);
  --text-lg:   clamp(1.125rem, 1.05rem + 0.3vw,  1.25rem);
  --text-xl:   clamp(1.25rem,  1.1rem  + 0.5vw,  1.5rem);
  --text-2xl:  clamp(1.5rem,   1.25rem + 0.9vw,  2rem);
  --text-3xl:  clamp(1.875rem, 1.5rem  + 1.4vw,  2.5rem);
  --text-4xl:  clamp(2.25rem,  1.75rem + 2vw,    3.25rem);
  --text-5xl:  clamp(2.75rem,  2rem    + 3vw,    4.5rem);
  --text-hero: clamp(3rem,     2rem    + 4.5vw,  6rem);

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --max-content: 1200px;
  --max-text: 68ch;
  --nav-height: 72px;

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  20px;
  --r-pill: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px oklch(0.16 0.025 264 / 0.08), 0 1px 2px oklch(0.16 0.025 264 / 0.06);
  --shadow-md:  0 4px 12px oklch(0.16 0.025 264 / 0.10), 0 2px 4px oklch(0.16 0.025 264 / 0.06);
  --shadow-lg:  0 16px 40px oklch(0.16 0.025 264 / 0.12), 0 4px 8px oklch(0.16 0.025 264 / 0.06);

  /* Z-index scale */
  --z-base:    1;
  --z-sticky:  100;
  --z-modal-bg: 200;
  --z-modal:   210;
  --z-toast:   300;
  --z-tooltip: 400;

  /* Motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:  160ms;
  --duration-base:  260ms;
  --duration-slow:  400ms;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}

p { text-wrap: pretty; max-width: var(--max-text); }

button, input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ── Utility Classes ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: clamp(var(--space-6), 5vw, var(--space-16));
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: oklch(0.17 0.04 264 / 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
  z-index: var(--z-sticky);
  transition: background var(--duration-base) var(--ease-out-quart),
              box-shadow var(--duration-base) var(--ease-out-quart);
}

.nav.scrolled {
  background: oklch(0.14 0.04 264 / 1);
  box-shadow: 0 2px 20px oklch(0 0 0 / 0.35);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: opacity var(--duration-fast) var(--ease-out-quart);
  line-height: 1;
}
.nav__logo:hover { opacity: 0.88; }

.nav__logo-img {
  height: 48px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.nav__wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav__wordmark-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: oklch(1 0 0);
  line-height: 1.1;
}

.nav__wordmark-sub {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(1 0 0 / 0.55);
  line-height: 1.2;
}

@media (max-width: 480px) {
  .nav__wordmark-sub { display: none; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: oklch(1 0 0 / 0.65);
  letter-spacing: 0.01em;
  transition: color var(--duration-fast) var(--ease-out-quart);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  border-radius: var(--r-pill);
  transition: width var(--duration-base) var(--ease-out-quart);
}

.nav__link:hover,
.nav__link.active {
  color: oklch(1 0 0);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--primary);
  color: oklch(1 0 0);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--r-pill);
  transition: background var(--duration-fast) var(--ease-out-quart),
              transform var(--duration-fast) var(--ease-out-quart);
}
.nav__cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: oklch(1 0 0 / 0.85);
  border-radius: var(--r-pill);
  transition: transform var(--duration-base) var(--ease-out-quart),
              opacity var(--duration-base) var(--ease-out-quart);
}

/* Mobile nav open state */
.nav.open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: oklch(0.14 0.04 264);
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
  padding: var(--space-6);
  z-index: calc(var(--z-sticky) - 1);
  flex-direction: column;
  gap: var(--space-4);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform var(--duration-base) var(--ease-out-quart),
              opacity var(--duration-base) var(--ease-out-quart);
}

.nav.open .nav__mobile {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.nav__mobile-link {
  font-size: var(--text-lg);
  font-weight: 600;
  color: oklch(1 0 0 / 0.8);
  padding-block: var(--space-2);
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
  transition: color var(--duration-fast) var(--ease-out-quart);
}
.nav__mobile-link:hover { color: oklch(1 0 0); }
.nav__mobile-link:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out-quart),
              transform var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--primary);
  color: oklch(1 0 0);
  box-shadow: 0 2px 8px oklch(0.42 0.22 264 / 0.35);
}
.btn--primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px oklch(0.42 0.22 264 / 0.45);
}

.btn--secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--secondary:hover {
  background: var(--primary-wash);
}

.btn--dark {
  background: var(--ink);
  color: oklch(1 0 0);
}
.btn--dark:hover {
  background: var(--ink-2);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* ── Page header (all inner pages) ───────────────────────── */
.page-header {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-16);
  background: var(--primary);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    oklch(0.30 0.22 264 / 0.25) 0,
    oklch(0.30 0.22 264 / 0.25) 1px,
    transparent 1px,
    transparent 24px
  );
}

.page-header__content {
  position: relative;
}

.page-header__title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 900;
  color: oklch(1 0 0);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.page-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: oklch(1 0 0 / 0.7);
}

.page-header__breadcrumb a { color: oklch(1 0 0 / 0.9); }
.page-header__breadcrumb a:hover { color: oklch(1 0 0); }

/* ── Section layouts ──────────────────────────────────────── */
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.section--surface {
  background: var(--surface);
}

.section--surface-2 {
  background: var(--surface-2);
}

.section--dark {
  background: var(--ink);
  color: oklch(1 0 0);
}

.section--primary {
  background: var(--primary);
  color: oklch(1 0 0);
}

.section__header {
  margin-bottom: clamp(var(--space-10), 4vw, var(--space-16));
}

.section__overline {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.section--dark .section__overline,
.section--primary .section__overline {
  color: oklch(0.82 0.10 220);
}

.section__title {
  font-size: var(--text-4xl);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section__body {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 60ch;
}

.section--dark .section__body,
.section--primary .section__body {
  color: oklch(1 0 0 / 0.75);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: oklch(1 0 0 / 0.8);
  padding-block: var(--space-16) var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid oklch(1 0 0 / 0.1);
}

.footer__brand-img {
  height: 52px;
  width: auto;
  display: block;
  margin-bottom: var(--space-4);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.55);
  margin-top: var(--space-2);
  max-width: 28ch;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: oklch(1 0 0 / 0.45);
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.7);
  transition: color var(--duration-fast) var(--ease-out-quart);
}
.footer__link:hover { color: oklch(1 0 0); }

.footer__bottom {
  padding-top: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer__copy {
  font-size: var(--text-xs);
  color: oklch(1 0 0 / 0.4);
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Form elements ────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  color: var(--ink);
  transition: border-color var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(0.42 0.22 264 / 0.15);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* ── Scroll reveal animation ──────────────────────────────── */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              transform var(--duration-slow) var(--ease-out-expo);
}

.reveal[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal[data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ── Icon helper ──────────────────────────────────────────── */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
