/* =============================================================
   Haul & Handy LLC — Main Stylesheet
   Mobile-first, component-driven, design-token-powered
   ============================================================= */

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

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* bottom padding to clear mobile call bar */
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

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

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

ul, ol {
  list-style: none;
}

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

/* ─────────────────────────────────────────
   HEADINGS & TYPOGRAPHY
───────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5, h6 { font-size: var(--step-0); }

p {
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--muted);
  max-width: 65ch;
}

strong { font-weight: 700; color: var(--ink); }

/* ─────────────────────────────────────────
   LAYOUT UTILITIES
───────────────────────────────────────── */

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: clamp(3rem, 6vw, 6rem);
}

.section--alt {
  background-color: var(--paper-2);
}

/* Fixed-header offset for non-hero pages */
.has-fixed-header main {
  padding-top: 72px;
}

/* ─────────────────────────────────────────
   EYEBROW
───────────────────────────────────────── */

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
  line-height: 1;
}

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

/* Primary — solid green */
.btn--primary {
  background-color: var(--green);
  color: #fff;
  border-color: var(--green);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--green-bright);
  border-color: var(--green-bright);
  box-shadow: 0 4px 16px rgba(31, 90, 46, 0.35);
}

/* Outline — transparent with green border */
.btn--outline {
  background-color: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: var(--green);
  color: #fff;
}

/* On-dark — white border + text for dark/hero backgrounds */
.btn--on-dark {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}

.btn--on-dark:hover,
.btn--on-dark:focus-visible {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* Focus ring */
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */

.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ─────────────────────────────────────────
   GRID HELPER
───────────────────────────────────────── */

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ─────────────────────────────────────────
   TRUST CHIPS
───────────────────────────────────────── */

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: var(--step--1);
  font-weight: 600;
  background-color: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
  line-height: 1;
  white-space: nowrap;
}

/* Chip variant for use on dark/hero backgrounds */
.chip--on-dark {
  background-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ─────────────────────────────────────────
   SITE HEADER
───────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

/* Transparent state — over hero */
.site-header--transparent {
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

/* Solid state — on scroll */
.site-header--solid {
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 1.5rem;
}

/* Logo */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo img {
  height: 44px;
  width: auto;
  display: block;
  transition: opacity 0.25s ease;
}

/* Logo visibility by header state:
   - transparent (default): show white, hide dark
   - solid: show dark, hide white */
.site-header--transparent .logo-dark  { display: none; }
.site-header--transparent .logo-white { display: block; }

.site-header--solid .logo-white { display: none; }
.site-header--solid .logo-dark  { display: block; }

/* Default fallback (neither class yet) — show dark */
.logo-white { display: none; }
.logo-dark  { display: block; }

/* Nav links — desktop only */
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: var(--step--1);
  font-weight: 600;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* Nav link colors by header state */
.site-header--transparent .nav-links a {
  color: rgba(255, 255, 255, 0.9);
}

.site-header--transparent .nav-links a:hover {
  color: #fff;
}

.site-header--solid .nav-links a {
  color: var(--ink);
}

.site-header--solid .nav-links a:hover {
  color: var(--green);
}

/* Default nav color */
.nav-links a {
  color: var(--ink);
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* CTA button in header — hide on mobile */
.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .header-cta {
    display: inline-flex;
  }
}

/* Transparent header CTA override */
.site-header--transparent .header-cta.btn--primary {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.site-header--transparent .header-cta.btn--primary:hover {
  background-color: #fff;
  border-color: #fff;
  color: var(--green);
}

/* Hamburger toggle — mobile only */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  transition: background-color 0.25s ease;
}

.site-header--transparent .menu-toggle span {
  background-color: rgba(255, 255, 255, 0.9);
}

.site-header--solid .menu-toggle span {
  background-color: var(--ink);
}

/* Default hamburger bars */
.menu-toggle span {
  background-color: var(--ink);
}

.menu-toggle:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.menu-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Keyboard focus rings */
.nav-links a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.site-footer a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
#mobile-menu a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ─────────────────────────────────────────
   MOBILE MENU DRAWER
───────────────────────────────────────── */

#mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 72px;
  inset-inline: 0;
  bottom: 64px; /* above callbar */
  background: var(--paper);
  padding: 1.5rem var(--pad);
  gap: 0;
  z-index: 49;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

#mobile-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
}

#mobile-menu .nav-links-mobile {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}

#mobile-menu a.nav-link-item {
  display: block;
  font-size: var(--step-1);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

#mobile-menu a.nav-link-item:hover {
  color: var(--green);
  padding-left: 0.5rem;
}

#mobile-menu .btn {
  width: 100%;
  justify-content: center;
  font-size: var(--step-0);
  min-height: 52px;
}

@media (min-width: 768px) {
  #mobile-menu {
    visibility: hidden;
    pointer-events: none;
  }
}

/* ─────────────────────────────────────────
   MOBILE CALL BAR
───────────────────────────────────────── */

.callbar {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  height: 64px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.callbar .btn {
  flex: 1;
  border-radius: 0;
  border: none;
  font-size: var(--step--1);
  min-height: unset;
  height: 100%;
}

.callbar .btn--primary {
  border-radius: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.callbar .btn--outline {
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--line);
  background: var(--paper-2);
}

.callbar .btn--outline:hover {
  background: var(--green);
  color: #fff;
}

@media (min-width: 768px) {
  .callbar {
    display: none;
  }
}

/* ─────────────────────────────────────────
   SITE FOOTER
───────────────────────────────────────── */

.site-footer {
  background-color: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding-block: clamp(3rem, 6vw, 5rem) 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 480px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

/* Footer column headings */
.footer-col h3 {
  font-family: var(--font-head);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 1rem;
}

/* Footer brand column */
.footer-brand .footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer-brand .tagline {
  font-family: var(--font-head);
  font-size: var(--step-1);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  max-width: 22ch;
}

/* Footer contact list */
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: var(--step--1);
  line-height: 1.5;
}

.footer-contact-list .label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.15rem;
}

/* Footer nav list */
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: var(--step--1);
}

/* Footer social list */
.footer-social-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: var(--step--1);
}

.footer-social-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* Footer legal bar */
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 1.125rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ─────────────────────────────────────────
   FORMS
───────────────────────────────────────── */

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 90, 46, 0.12);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(17, 17, 17, 0.35);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23566' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Form status messages */
.form-status {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 600;
  margin-top: 1rem;
}

.form-status:not(:empty) {
  display: block;
}

.form-status--ok {
  background-color: rgba(31, 90, 46, 0.08);
  color: var(--green);
  border: 1px solid rgba(31, 90, 46, 0.2);
}

.form-status--err {
  background-color: rgba(200, 16, 46, 0.06);
  color: var(--red);
  border: 1px solid rgba(200, 16, 46, 0.18);
}

/* Visually-hidden helper (honeypot + a11y) */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────────────────
   REVEAL MOTION
───────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
