/* ==========================================================================
   Extreme Squad, business website
   Structure: tokens > base > layout > components > sections > responsive
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --ink: #14211F;          /* body text */
  --ink-soft: #4A5B58;     /* secondary text */
  --forest: #0C3B37;       /* primary brand, dark surfaces */
  --forest-deep: #08302D;
  --teal: #0E4F4A;         /* links, icons */
  --bone: #F5F4F0;         /* page background */
  --mist: #E6ECE9;         /* tinted sections */
  --line: #D3DCD8;         /* borders */
  --signal: #E8B923;       /* accent, calls to action */
  --signal-dark: #CFA010;
  --white: #FFFFFF;
  --danger: #B3261E;
  --success: #1F6B3A;

  --font-head: "Archivo", "Segoe UI", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(12, 59, 55, 0.06), 0 8px 24px rgba(12, 59, 55, 0.08);
  --header-h: 72px;
  --container: 1120px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--forest);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
address { font-style: normal; }
dl, dd { margin: 0; }

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--forest); }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--forest);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tint { background: var(--mist); }
.section-dark { background: var(--forest); color: #D7E3E0; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section-head-light h2 { color: var(--white); }
.section-head-light p { color: #B9CBC7; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--signal); color: var(--forest-deep); }
.btn-primary:hover { background: var(--signal-dark); color: var(--forest-deep); }

.btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); color: var(--white); }

.btn-small { padding: 10px 18px; font-size: 0.95rem; }
.btn-block { width: 100%; }

.text-link {
  font-weight: 700;
  color: var(--teal);
  text-decoration-thickness: 2px;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--forest); }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245, 244, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 16px rgba(12, 59, 55, 0.06);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--forest);
}
.brand-mark { color: var(--forest); display: inline-flex; }
.brand-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--forest); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; gap: 6px; }
.nav-list a {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-list a:hover::after,
.nav-list a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--forest);
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero {
  background: var(--forest);
  color: #D7E3E0;
  padding-block: clamp(56px, 8vw, 104px) clamp(48px, 7vw, 88px);
  overflow: hidden;
}
.hero h1 { color: var(--white); max-width: 14ch; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-lead {
  font-size: 1.2rem;
  max-width: 52ch;
  color: #C5D5D1;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.95rem;
}
.hero-facts dt { color: #8FA9A4; font-size: 0.85rem; margin-bottom: 2px; }
.hero-facts dd { color: var(--white); font-weight: 600; overflow-wrap: anywhere; }

.hero-visual { margin: 0; }
.truck-svg { width: 100%; height: auto; }

/* The one intentional motion on the page: the truck drives in on load, the road dashes drift. */
.truck-body { animation: drive-in 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.road-dashes { animation: road-move 2.4s linear infinite; }

@keyframes drive-in {
  from { transform: translateX(-120px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes road-move {
  from { transform: translateX(0); }
  to   { transform: translateX(-120px); }
}

/* ---------- 7. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-copy p { color: var(--ink-soft); max-width: 60ch; }

.company-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.company-card h3 { font-size: 1.2rem; margin-bottom: 20px; }
.company-card dl > div { padding-block: 14px; border-top: 1px solid var(--line); }
.company-card dl > div:first-child { border-top: 0; padding-top: 0; }
.company-card dt { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 2px; }
.company-card dd { font-weight: 600; font-size: 0.98rem; overflow-wrap: anywhere; }

/* ---------- 8. Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--teal);
}
.service-card p { color: var(--ink-soft); margin: 0; }

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  background: var(--forest);
  border-radius: var(--radius-sm);
}
.icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-small { width: 44px; height: 44px; margin-bottom: 0; flex-shrink: 0; }
.icon-small svg { width: 22px; height: 22px; }

/* ---------- 9. Benefits ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.benefits-intro p { color: var(--ink-soft); max-width: 52ch; }

.placeholder-photo { margin: 32px 0 0; }
.placeholder-photo svg { width: 100%; height: auto; border-radius: var(--radius); }
.placeholder-photo figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--ink-soft); }

.benefits-list li {
  padding: 22px 0 22px 24px;
  border-left: 3px solid var(--line);
  transition: border-color 0.25s;
}
.benefits-list li:hover { border-left-color: var(--signal); }
.benefits-list h3 { margin-bottom: 4px; }
.benefits-list p { margin: 0; color: var(--ink-soft); max-width: 56ch; }

/* ---------- 10. Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: none;
}
.steps li { position: relative; padding-top: 8px; }
.steps h3 { color: var(--white); margin-bottom: 6px; }
.steps p { color: #B9CBC7; margin: 0; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--signal);
  color: var(--forest-deep);
  font-family: var(--font-head);
  font-weight: 800;
}

/* ---------- 11. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-info > p { color: var(--ink-soft); max-width: 46ch; }

.contact-list { margin-top: 32px; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list strong { display: block; font-family: var(--font-head); color: var(--forest); }
.contact-list a, .contact-list span, .contact-list address { color: var(--ink-soft); }
.contact-list a { color: var(--teal); font-weight: 600; overflow-wrap: anywhere; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--ink-soft); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--bone);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background-color 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9DB0AB; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(14, 79, 74, 0.18);
}

.field [aria-invalid="true"] { border-color: var(--danger); }

.hint { font-size: 0.85rem; color: var(--ink-soft); margin: 6px 0 0; }
.error { font-size: 0.88rem; color: var(--danger); margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }

.field-check { display: grid; grid-template-columns: 22px 1fr; gap: 0 12px; align-items: start; }
.field-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--forest); }
.field-check label { font-weight: 400; font-size: 0.92rem; margin: 0; color: var(--ink-soft); }
.field-check .error { grid-column: 2; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 16px 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--forest-deep);
  color: #B9CBC7;
  padding-top: 64px;
  font-size: 0.95rem;
}
.site-footer a { color: #D7E3E0; }
.site-footer a:hover { color: var(--signal); }
.site-footer .link-button { color: #D7E3E0; }
.site-footer .link-button:hover { color: var(--signal); }

.brand-light, .brand-light .brand-mark, .brand-light:hover { color: var(--white); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand p { margin-top: 16px; max-width: 32ch; }

.footer-col h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 14px;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-col address a { text-decoration: underline; overflow-wrap: anywhere; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 22px;
}
.footer-bottom p { margin: 0; font-size: 0.88rem; }

/* ---------- 13. Dialogs ---------- */
.modal {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(8, 48, 45, 0.35);
}
.modal::backdrop { background: rgba(8, 48, 45, 0.6); }
.modal-inner { padding: 32px; }
.modal-inner h2 { font-size: 1.5rem; }
.modal-body { max-height: 52vh; overflow-y: auto; margin-bottom: 20px; padding-right: 8px; color: var(--ink-soft); }

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

  .hero h1 { max-width: 20ch; }
  .hero-visual { order: -1; max-width: 520px; }

  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px 24px 24px;
    background: var(--bone);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(12, 59, 55, 0.08);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: translateY(0); }

  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-list a::after { display: none; }
  .nav-list a.is-active { color: var(--forest); }
  .nav-cta { width: 100%; }
}

@media (max-width: 620px) {
  .container { padding-inline: 20px; }
  .hero-facts { grid-template-columns: 1fr; gap: 14px; }
  .hero-actions .btn { width: 100%; }
  .services-grid,
  .steps,
  .field-row,
  .footer-grid { grid-template-columns: 1fr; }
  .company-card { padding: 24px; }
  .modal-inner { padding: 24px; }
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
