/* ============================================================
   CALGARY TOWING v3 — SYSTEM.CSS
   Anchor (#1) palette + Ironline (#2) caution tape accents.
   Navy + yellow + red, Manrope 800 display, soft tinted shadows.
   ============================================================ */

/* ============== TOKENS ============== */
:root {
  /* Navy / dark */
  --navy:        #0B2545;
  --navy-2:      #13315C;
  --navy-3:      #1E4178;

  /* Neutrals */
  --ink:         #1F2937;
  --steel:       #5A7282;
  --slate:       #6B7682;
  --mist:        #E5E7EB;
  --cloud:       #F9FAFB;
  --paper:       #FFFFFF;
  --cream:       #F4F1EA;
  --cream-2:     #EBE3D2;

  /* Brand accents */
  --hi-vis:      #FFC107;
  --hi-vis-deep: #E5A906;
  --hi-vis-soft: rgba(255, 193, 7, 0.18);
  --hi-vis-bg:   #FFF7DB;

  --signal:      #DC2626;
  --signal-deep: #B91C1C;
  --signal-soft: #FEE2E2;
  --signal-bg:   #FEF2F2;

  --trust:       #16A34A;
  --trust-soft:  #DCFCE7;

  /* Typography */
  --font-display: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Soft tinted shadows (Anchor Towing style) */
  --shadow-sm:   0 4px 12px -4px rgba(11, 37, 69, 0.10);
  --shadow-md:   0 12px 30px -8px rgba(11, 37, 69, 0.18);
  --shadow-lg:   0 24px 48px -12px rgba(11, 37, 69, 0.24);
  --shadow-card: 0 1px 3px rgba(11, 37, 69, 0.06), 0 4px 12px -4px rgba(11, 37, 69, 0.08);
  --shadow-glow-hi-vis: 0 0 0 3px rgba(255, 193, 7, 0.4);
  --shadow-glow-signal: 0 0 0 3px rgba(220, 38, 38, 0.35);

  /* Motion */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-both: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:  120ms;
  --dur-base:  220ms;
  --dur-slow:  400ms;

  /* Layout */
  --container-max: 1280px;
  --container-pad: 24px;
  --alert-bar-h:   60px;
  --nav-h:         76px;
}

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--signal); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--signal-deep); }
:focus-visible { outline: none; box-shadow: var(--shadow-glow-hi-vis); border-radius: var(--radius-sm); }

/* ============== TYPOGRAPHY ============== */
.tow-text-display {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.tow-text-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.tow-text-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.tow-text-h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.tow-text-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--steel);
}
.tow-text-body  { font-size: 1rem; line-height: 1.65; color: var(--steel); }
.tow-text-small { font-size: 0.875rem; line-height: 1.55; color: var(--slate); }
.tow-text-stat {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.tow-text-mono {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tow-text-overline {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tow-text-overline--hi-vis { color: var(--hi-vis-deep); }
.tow-text-overline--signal { color: var(--signal); }
.tow-text-overline--navy   { color: var(--navy); }

/* Yellow inline highlight */
.tow-hl-hi-vis { color: var(--hi-vis); }
/* Red signal inline */
.tow-hl-signal { color: var(--signal); }

/* ============== LAYOUT ============== */
.tow-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
@media (min-width: 960px)  { .tow-container { padding: 0 40px; } }
@media (min-width: 1280px) { .tow-container { padding: 0 64px; } }

.tow-section { padding: var(--space-9) 0; }
.tow-section--tight { padding: var(--space-7) 0; }
.tow-section--navy  { background: var(--navy);  color: var(--paper); }
.tow-section--cloud { background: var(--cloud); color: var(--ink); }
.tow-section--paper { background: var(--paper); color: var(--ink); }
.tow-section--cream { background: var(--cream); color: var(--ink); }

.tow-main { padding-top: calc(var(--alert-bar-h) + var(--nav-h)); background: var(--paper); }

/* Desktop: alert-bar and nav drop into normal document flow (no sticky chrome) */
@media (min-width: 1024px) {
  .tow-main { padding-top: 0; }
}

/* ============== CAUTION TAPE STRIP ============== */
.tow-caution-tape {
  height: 18px;
  background-image: repeating-linear-gradient(
    135deg,
    var(--hi-vis) 0,
    var(--hi-vis) 18px,
    var(--navy) 18px,
    var(--navy) 36px
  );
  border-top: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
}
.tow-caution-tape--thin  { height: 12px; }
.tow-caution-tape--thick { height: 28px; }

/* ============== BUTTONS ============== */
.tow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.tow-btn:hover { transform: translateY(-2px); text-decoration: none; }

/* Primary = signal red (the big call CTA) */
.tow-btn--primary {
  background: var(--signal);
  color: var(--paper);
  box-shadow: 0 4px 14px -2px rgba(220, 38, 38, 0.36);
}
.tow-btn--primary:hover {
  background: var(--signal-deep);
  color: var(--paper);
  box-shadow: 0 8px 22px -4px rgba(220, 38, 38, 0.48);
}

/* Hi-vis = yellow secondary (Text For Quote) */
.tow-btn--hi-vis {
  background: var(--hi-vis);
  color: var(--navy);
  box-shadow: 0 4px 14px -2px rgba(255, 193, 7, 0.36);
}
.tow-btn--hi-vis:hover {
  background: var(--hi-vis-deep);
  color: var(--navy);
  box-shadow: 0 8px 22px -4px rgba(255, 193, 7, 0.48);
}

/* Ghost on dark backgrounds */
.tow-btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.3);
}
.tow-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--paper);
  color: var(--paper);
}

/* Outline on light */
.tow-btn--outline {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--mist);
  box-shadow: var(--shadow-sm);
}
.tow-btn--outline:hover {
  background: var(--cloud);
  color: var(--navy);
  border-color: var(--navy);
}

.tow-btn--xl { padding: 18px 32px; font-size: 1.05rem; }
.tow-btn--sm { padding: 10px 18px; font-size: 0.85rem; }

/* ============== ICON ============== */
.tow-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.tow-icon--sm { width: 16px; height: 16px; }
.tow-icon--md { width: 24px; height: 24px; }
.tow-icon--lg { width: 36px; height: 36px; }
.tow-icon--xl { width: 56px; height: 56px; }

/* ============== BADGE ============== */
.tow-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}
.tow-badge--hi-vis  { background: var(--hi-vis-bg); color: var(--hi-vis-deep); border: 1px solid var(--hi-vis); }
.tow-badge--signal  { background: var(--signal-bg); color: var(--signal-deep); border: 1px solid var(--signal); }
.tow-badge--navy    { background: var(--navy);      color: var(--paper); }
.tow-badge--paper   { background: var(--paper);     color: var(--navy); border: 1px solid var(--mist); }
.tow-badge--trust   { background: var(--trust-soft); color: var(--trust); border: 1px solid var(--trust); }

.tow-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--trust);
  box-shadow: 0 0 0 0 var(--trust);
  animation: tow-pulse-trust 1.8s cubic-bezier(0.66, 0, 0, 1) infinite;
}
@keyframes tow-pulse-trust {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ============== UTILITIES ============== */
.u-skip-link { position: absolute; left: -9999px; }
.u-skip-link:focus {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--navy);
  color: var(--hi-vis);
  border-radius: var(--radius-sm);
  z-index: 9999;
}

.u-text-mono { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; }
.u-text-center { text-align: center; }

.u-bg-navy   { background: var(--navy); }
.u-bg-paper  { background: var(--paper); }
.u-bg-cream  { background: var(--cream); }
.u-color-hi-vis { color: var(--hi-vis-deep); }
.u-color-signal { color: var(--signal); }
.u-color-navy   { color: var(--navy); }

.u-mt-4 { margin-top: var(--space-4); }
.u-mt-6 { margin-top: var(--space-6); }
.u-mt-8 { margin-top: var(--space-8); }
.u-mb-4 { margin-bottom: var(--space-4); }
.u-mb-6 { margin-bottom: var(--space-6); }

.u-grid { display: grid; gap: var(--space-5); }
.u-grid-2, .u-grid-3, .u-grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .u-grid-2, .u-grid-3, .u-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .u-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .u-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.u-flex { display: flex; }
.u-flex-center { display: flex; align-items: center; justify-content: center; }
.u-gap-2 { gap: var(--space-2); }
.u-gap-3 { gap: var(--space-3); }
.u-gap-4 { gap: var(--space-4); }

.u-hidden { display: none !important; }
@media (max-width: 959px) { .u-hidden-mobile  { display: none !important; } }
@media (min-width: 960px) { .u-hidden-desktop { display: none !important; } }

.u-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
.u-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .u-reveal { opacity: 1; transform: none; }
}
