/* ===========================================================================
   HAMBY UNITED — shared theme layer
   "Blue hour at the yard": near-black + deep navy ground, deep forest-green
   panels, restrained metallic gold. Loaded AFTER each page's own <style> block
   so the legacy token names below re-skin the older pages (portal, driver
   application, referral program, admin) without touching their markup.
   =========================================================================== */

:root {
  /* ---- Core palette ---- */
  --hu-ink:        #05070b;   /* near-black base                */
  --hu-navy-950:   #070c15;
  --hu-navy-900:   #0a1220;   /* deep navy panel                */
  --hu-navy-800:   #0f1c2e;   /* raised navy panel              */
  --hu-navy-700:   #16283e;
  --hu-forest-900: #081d14;
  --hu-forest-800: #0c2a1c;   /* deep forest-green panel        */
  --hu-forest-700: #123c28;   /* forest panel, raised           */
  --hu-forest-600: #1a5236;   /* forest, "positive" state       */
  --hu-gold:       #c9a227;   /* metallic gold accent           */
  --hu-gold-hi:    #e7cd7d;   /* gold highlight / reflection    */
  --hu-gold-deep:  #a8801c;
  --hu-white:      #ffffff;
  --hu-text:       #eff3f6;   /* body text on dark              */
  --hu-text-dim:   #a8b6c4;   /* secondary text (4.9:1 on ink)  */
  --hu-hairline:   rgba(201,162,39,0.24);   /* thin gold border */
  --hu-hairline-soft: rgba(201,162,39,0.13);
  --hu-glass:      rgba(10,18,32,0.72);
  --hu-shadow:     0 28px 70px -32px rgba(0,0,0,0.95);

  --hu-font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --hu-font-body: 'DM Sans', system-ui, sans-serif;
  --hu-font-mono: 'DM Mono', ui-monospace, monospace;

  /* ---- Legacy token remap: re-skins the pre-existing pages ---- */
  --black: var(--hu-ink);
  --offwhite: var(--hu-text);
  --white: var(--hu-white);
  --gold: var(--hu-gold);
  --gold-dark: var(--hu-gold-deep);
  --gold-glow: rgba(201,162,39,0.16);
  --red: var(--hu-gold);
  --red-dark: var(--hu-gold-deep);
  --red-glow: rgba(201,162,39,0.16);
  --gray: var(--hu-navy-900);
  --gray-mid: var(--hu-navy-800);
  --gray-light: var(--hu-navy-700);
  --muted: #93a4b4;
  --border: var(--hu-hairline);
  --border-soft: rgba(239,243,246,0.10);
  --green: var(--hu-forest-600);
  --green-mid: #22684a;
  --ok: #37a06a;
}

/* Older pages paint a flat near-black body; give them the same blue-hour
   ground plane the redesigned pages use. */
body {
  background-color: var(--hu-ink);
  background-image:
    radial-gradient(115% 70% at 50% -12%, rgba(22,40,62,0.85) 0%, rgba(10,18,32,0.35) 45%, transparent 72%),
    radial-gradient(60% 42% at 88% 8%, rgba(201,162,39,0.075) 0%, transparent 68%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(201,162,39,0.32); color: #fff; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--hu-gold-hi);
  outline-offset: 2px;
}

/* ===========================================================================
   Shared components used by the redesigned pages (home, marketing services)
   =========================================================================== */

.hu-reset *, .hu-reset *::before, .hu-reset *::after { box-sizing: border-box; }

/* ---- Grain: fixed, non-interactive, above content but never clickable ---- */
.hu-grain {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.32; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---- Navigation ---------------------------------------------------------- */
.hu-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 0.55rem clamp(1rem, 4vw, 3.25rem);
  background: rgba(5,7,11,0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--hu-hairline-soft);
  transition: background 0.3s, border-color 0.3s;
}
.hu-nav.is-scrolled {
  background: rgba(5,7,11,0.96);
  border-bottom-color: var(--hu-hairline);
}
.hu-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.hu-brand img { height: 54px; width: auto; object-fit: contain; }
.hu-brand-name {
  display: block;
  font-family: var(--hu-font-display); font-size: 23px; letter-spacing: 3px;
  color: var(--hu-white); line-height: 1;
}
.hu-brand-name span { color: var(--hu-gold); }
.hu-brand-sub {
  display: block;
  font-family: var(--hu-font-mono); font-size: 9.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--hu-text-dim); margin-top: 3px;
}

.hu-navlinks { display: flex; align-items: center; gap: clamp(0.9rem, 1.8vw, 1.9rem); list-style: none; margin: 0; padding: 0; }
.hu-navlinks > li { display: flex; }
.hu-navlinks a {
  position: relative; font-size: 13.5px; font-weight: 500; letter-spacing: 0.055em;
  text-transform: uppercase; text-decoration: none; color: #cbd6e0;
  padding: 6px 2px; transition: color 0.2s; white-space: nowrap;
}
.hu-navlinks a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--hu-gold); transition: right 0.28s ease;
}
.hu-navlinks a:hover { color: var(--hu-white); }
.hu-navlinks a:hover::after { right: 0; }
.hu-navlinks a.is-current { color: var(--hu-white); }
.hu-navlinks a.is-current::after { right: 0; }

.hu-nav-cta {
  border: 1px solid var(--hu-gold); color: var(--hu-gold) !important;
  padding: 11px 20px !important; font-size: 12.5px !important; letter-spacing: 0.1em !important;
  background: rgba(201,162,39,0.06); transition: background 0.22s, color 0.22s, box-shadow 0.22s;
}
.hu-nav-cta::after { display: none; }
.hu-nav-cta:hover {
  background: var(--hu-gold); color: var(--hu-ink) !important;
  box-shadow: 0 8px 26px -12px rgba(201,162,39,0.7);
}

.hu-burger {
  display: none; width: 46px; height: 46px; flex-shrink: 0;
  background: rgba(201,162,39,0.07); border: 1px solid var(--hu-hairline);
  color: var(--hu-gold); cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.hu-burger span { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; transition: transform 0.25s, opacity 0.2s; }
.hu-burger span::before, .hu-burger span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 1.5px; background: currentColor;
  transition: transform 0.25s;
}
.hu-burger span::before { top: -6px; }
.hu-burger span::after { top: 6px; }
.hu-burger[aria-expanded="true"] span { transform: rotate(45deg); }
.hu-burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(-90deg); }
.hu-burger[aria-expanded="true"] span::after { opacity: 0; transform: translateY(-6px); }

.hu-drawer {
  position: fixed; inset: 0; z-index: 190; display: none;
  flex-direction: column; padding: calc(74px + 1rem) 1.25rem 2rem;
  background: linear-gradient(180deg, rgba(5,7,11,0.99) 0%, rgba(8,29,20,0.99) 100%);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.hu-drawer.is-open { display: flex; }
.hu-drawer a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; padding: 0 1.1rem; text-decoration: none;
  font-size: 17px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--hu-text); border: 1px solid var(--hu-hairline-soft);
  background: rgba(15,28,46,0.62); margin-bottom: 9px;
}
.hu-drawer a::after { content: '\2192'; color: var(--hu-gold); font-size: 15px; }
.hu-drawer a:active { background: rgba(18,60,40,0.8); }
.hu-drawer a.is-cta {
  border-color: var(--hu-gold); color: var(--hu-gold);
  background: rgba(201,162,39,0.08); margin-top: 6px;
}
.hu-drawer-heading {
  font-family: var(--hu-font-mono); font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--hu-gold); margin: 1.35rem 0 0.7rem; padding-left: 2px;
}
.hu-drawer-contact {
  margin-top: auto; padding-top: 1.6rem; border-top: 1px solid var(--hu-hairline-soft);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.hu-drawer-contact a {
  min-height: 48px; border: none; background: none; margin: 0; padding: 0 2px;
  font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--hu-text-dim);
}
.hu-drawer-contact a::after { display: none; }

@media (max-width: 1140px) {
  .hu-navlinks { display: none; }
  .hu-burger { display: flex; }
  .hu-brand img { height: 46px; }
  .hu-brand-name { font-size: 20px; letter-spacing: 2.4px; }
}
@media (max-width: 400px) {
  .hu-nav { padding-left: 0.85rem; padding-right: 0.85rem; gap: 0.6rem; }
  .hu-brand img { height: 40px; }
  .hu-brand-name { font-size: 17px; letter-spacing: 1.6px; }
  .hu-brand-sub { display: none; }
}
body.hu-locked { overflow: hidden; }

/* ---- Typography helpers -------------------------------------------------- */
.hu-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--hu-font-mono); font-size: 11.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--hu-gold); margin-bottom: 1.1rem;
}
.hu-eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--hu-gold); opacity: 0.75;
}
.hu-h2 {
  font-family: var(--hu-font-display); font-weight: 400;
  font-size: clamp(2.35rem, 5.2vw, 4.05rem); line-height: 0.96;
  letter-spacing: 0.012em; color: var(--hu-white); text-wrap: balance;
}
.hu-h2 span { color: var(--hu-gold); }
.hu-h3 {
  font-family: var(--hu-font-display); font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  letter-spacing: 0.03em; color: var(--hu-white); line-height: 1.06; font-weight: 400;
}
.hu-lede {
  font-size: clamp(1rem, 1.15vw, 1.12rem); line-height: 1.7; font-weight: 300;
  color: var(--hu-text-dim); max-width: 60ch;
}
.hu-body { font-size: 1rem; line-height: 1.72; font-weight: 300; color: #bfcbd6; }
.hu-fine { font-size: 13px; line-height: 1.65; color: #8c9aa8; }

/* ---- Sections and panels ------------------------------------------------- */
.hu-section { padding: clamp(4rem, 8vw, 7.5rem) clamp(1.15rem, 5vw, 4rem); position: relative; }
.hu-wrap { max-width: 1200px; margin: 0 auto; }
.hu-rule {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--hu-hairline) 18%, var(--hu-hairline) 82%, transparent);
}

.hu-panel {
  background: linear-gradient(160deg, var(--hu-navy-900) 0%, var(--hu-navy-950) 100%);
  border: 1px solid var(--hu-hairline-soft); padding: clamp(1.6rem, 2.6vw, 2.25rem);
  position: relative;
}
.hu-panel--forest {
  background: linear-gradient(160deg, var(--hu-forest-800) 0%, var(--hu-forest-900) 100%);
  border-color: var(--hu-hairline);
}
.hu-panel--gold-edge { border-top: 2px solid var(--hu-gold); }

/* ---- Buttons ------------------------------------------------------------- */
.hu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 1.7rem; font-family: var(--hu-font-body);
  font-size: 14.5px; font-weight: 600; letter-spacing: 0.075em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.18s, box-shadow 0.22s, background 0.22s, color 0.22s;
}
.hu-btn:active { transform: translateY(1px); }
.hu-btn--gold {
  background: linear-gradient(180deg, var(--hu-gold-hi) 0%, var(--hu-gold) 58%, var(--hu-gold-deep) 100%);
  color: #120d02; border-color: var(--hu-gold-hi);
  box-shadow: 0 14px 34px -20px rgba(201,162,39,0.85);
}
.hu-btn--gold:hover { box-shadow: 0 18px 42px -18px rgba(201,162,39,0.95); }
.hu-btn--outline {
  background: rgba(201,162,39,0.05); color: var(--hu-gold); border-color: var(--hu-gold);
}
.hu-btn--outline:hover { background: var(--hu-gold); color: var(--hu-ink); }
.hu-btn--ghost {
  background: rgba(239,243,246,0.03); color: var(--hu-text); border-color: rgba(239,243,246,0.22);
}
.hu-btn--ghost:hover { border-color: var(--hu-white); background: rgba(239,243,246,0.09); }
.hu-btn--forest {
  background: linear-gradient(180deg, var(--hu-forest-600) 0%, var(--hu-forest-700) 100%);
  color: var(--hu-white); border-color: rgba(201,162,39,0.4);
}
.hu-btn--forest:hover { border-color: var(--hu-gold); }
.hu-btn--block { width: 100%; }

/* ---- Forms --------------------------------------------------------------- */
.hu-field { display: flex; flex-direction: column; gap: 7px; }
.hu-label {
  font-family: var(--hu-font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #9fb0c0;
}
.hu-input, .hu-select, .hu-textarea {
  width: 100%; min-height: 50px; padding: 13px 14px;
  background: rgba(5,7,11,0.66); border: 1px solid rgba(239,243,246,0.15);
  color: var(--hu-white); font-family: var(--hu-font-body); font-size: 16px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.hu-textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.hu-input::placeholder, .hu-textarea::placeholder { color: #74838f; }
.hu-input:focus, .hu-select:focus, .hu-textarea:focus {
  outline: none; border-color: var(--hu-gold);
  background: rgba(5,7,11,0.9); box-shadow: 0 0 0 3px rgba(201,162,39,0.14);
}
.hu-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a227' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.hu-select option { background: #0a1220; color: #fff; }
.hu-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 8px; }
.hu-check {
  display: flex; align-items: center; gap: 11px; min-height: 50px; padding: 0 14px;
  border: 1px solid rgba(239,243,246,0.14); background: rgba(5,7,11,0.5);
  font-size: 14.5px; color: var(--hu-text); cursor: pointer; transition: border-color 0.18s, background 0.18s;
}
.hu-check:hover { border-color: var(--hu-hairline); background: rgba(18,60,40,0.35); }
.hu-check input { width: 19px; height: 19px; accent-color: var(--hu-gold); flex-shrink: 0; cursor: pointer; }
.hu-check:has(input:checked) { border-color: var(--hu-gold); background: rgba(201,162,39,0.09); }
.hu-form-note { font-size: 12.5px; line-height: 1.6; color: #8c9aa8; }

/* ---- Reveal on scroll (subtle, one pass) -------------------------------- */
.hu-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,0.61,0.36,1); }
.hu-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hu-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Footer -------------------------------------------------------------- */
.hu-footer {
  border-top: 1px solid var(--hu-hairline);
  background: linear-gradient(180deg, var(--hu-forest-900) 0%, var(--hu-ink) 100%);
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.15rem, 5vw, 4rem) 0;
}
.hu-footer-grid {
  max-width: 1200px; margin: 0 auto; display: grid; gap: 2.5rem;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr));
}
.hu-footer h4 {
  font-family: var(--hu-font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--hu-gold); margin-bottom: 1.1rem; font-weight: 500;
}
.hu-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.hu-footer li, .hu-footer a { font-size: 14.5px; color: #b3c0cc; text-decoration: none; }
.hu-footer a { transition: color 0.18s; display: inline-block; padding: 3px 0; }
.hu-footer a:hover { color: var(--hu-gold); }
.hu-footer-bottom {
  max-width: 1200px; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  border-top: 1px solid var(--hu-hairline-soft); padding: 1.5rem 0;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between;
  font-size: 12.5px; color: #7f8d9a;
}
@media (max-width: 860px) {
  .hu-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .hu-footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .hu-footer-grid { grid-template-columns: 1fr; }
}
