/* ==========================================================================
   FleetEase site: shared styles (every page loads this file)
   Page-specific styles live in their own file (home.css for the home page).
   ========================================================================== */

/* ---------- Fonts: Barlow + Barlow Condensed (Google Fonts, SIL Open Font
   License), saved in /fonts so the site never depends on Google's servers. ---------- */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }

/* ---------- Brand tokens: change a color here and it changes everywhere ---------- */
:root {
  --orange: #F35F07;        /* buttons, kickers, card accents, the diagonal stripe */
  --orange-deep: #D24F00;   /* button hover */
  --charcoal: #505455;      /* brand charcoal: main dark sections, cards */
  --charcoal-deep: #3D4041; /* darker band */
  --charcoal-ink: #26292A;  /* header, footer, text on orange */
  --steel: #E9ECEC;         /* light section background */
  --line-dark: rgba(255, 255, 255, .14);
  --text-on-dark: #FFFFFF;
  --muted-on-dark: #D3D7D8;
  --text-on-light: #2B2E2F;
  --muted-on-light: #5A5F60;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
  --font-body: "Barlow", "Segoe UI", -apple-system, system-ui, Roboto, Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 80px;
  --slant: clamp(32px, 5vw, 80px);   /* height of the diagonal section edge */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--charcoal);
  color: var(--text-on-dark);
  font: 400 18px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header-h) + 2px); }   /* sections land just below the sticky header (+2px orange border) */

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: var(--charcoal-ink); padding: 10px 16px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Kicker: small orange uppercase label with a thin orange rule ---------- */
.kicker {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 18px;
  font: 600 15px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase;
  color: var(--orange);
}
.kicker::before { content: ""; width: 44px; height: 2px; background: var(--orange); flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 30px;
  border: 2px solid var(--orange); border-radius: 3px;
  background: var(--orange); color: #fff;
  font: 700 20px/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--orange-deep); border-color: var(--orange-deep); transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(243, 95, 7, .7); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .6); }
.btn-ghost:hover { background: #fff; border-color: #fff; color: var(--charcoal-ink); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6); }

/* ---------- Header: sticky at the very top ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(38, 41, 42, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--orange);
}
.header-bar { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.header-logo { flex: none; display: block; transition: opacity .2s; }
.header-logo:hover { opacity: .85; }
.header-logo img { width: 176px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  position: relative; display: block; padding: 12px 14px;
  font: 600 16px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-on-dark); text-decoration: none; transition: color .2s;
}
.site-nav a::after {   /* orange underline that grows on hover */
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.btn-login { min-height: 46px; padding: 0 20px; font-size: 17px; }
.menu-toggle { display: none; }

/* Phones and small tablets: links fold into a menu button */
@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .header-bar { gap: 12px; }
  .header-logo img { width: 136px; }
  .btn-login { margin-left: auto; min-height: 40px; padding: 0 14px; font-size: 15px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-dark); border-radius: 3px;
    background: transparent; color: #fff; cursor: pointer; transition: border-color .2s;
  }
  .menu-toggle:hover { border-color: var(--orange); }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .25s var(--ease), background-color .2s; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
  .menu-open .menu-icon { background: transparent; }
  .menu-open .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; margin: 0;
    background: var(--charcoal-ink); border-bottom: 2px solid var(--orange);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .menu-open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .25s var(--ease); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 6px var(--gutter) 14px; }
  .site-nav a { padding: 16px 0; font-size: 19px; border-bottom: 1px solid var(--line-dark); }
  .site-nav a::after { display: none; }
  .site-nav a:hover { color: var(--orange); }
}
@media (max-width: 400px) {
  .header-logo img { width: 114px; }
  .btn-login { padding: 0 10px; font-size: 14px; letter-spacing: .04em; }
}

/* ---------- Diagonal section edge with a thin orange stripe ----------
   Add "slant-bottom" to a section to cut its bottom edge on an angle.
   The next section tucks up under it. */
.slant-bottom {
  position: relative;
  padding-bottom: calc(var(--slant) + 64px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}
.slant-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--slant) + 8px);
  background: var(--orange);
  clip-path: polygon(0 calc(100% - 8px), 100% 0, 100% 8px, 0 100%);
  pointer-events: none; z-index: 2;
}
.slant-bottom + * { margin-top: calc(-1 * var(--slant)); padding-top: calc(var(--slant) + 64px); }

/* ---------- Scroll-in animation ----------
   Elements with class "reveal" fade up when they scroll into view.
   Only switched on when JavaScript runs (html.js), so nothing is ever hidden
   for someone without it. Turned off for people who ask for less motion. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0s); }
.js .reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01s !important; animation-duration: .01s !important; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal-ink); color: var(--muted-on-dark); font-size: 15px; padding: 26px 0; border-top: 2px solid var(--orange); }
