/* Sutton Trucks — Fleet Tools landing
   Palette matched to Sutton Fleet Sales / Upfit apps:
   dark navy chrome, light gray workspace, white cards, blue primary. */

:root,
[data-theme='light'] {
  /* Navy chrome (app sidebar/topbar) */
  --color-navy: #212b3b;
  --color-navy-2: #18202e;
  --color-navy-text: #eef2f8;
  --color-navy-muted: #9aa7bb;

  /* Workspace surfaces (app content area) */
  --color-bg: #f1f3f6;
  --color-surface: #ffffff;
  --color-border: #e2e7ee;
  --color-divider: #eaeef3;

  /* Text */
  --color-text: #1f2937;
  --color-text-muted: #64748b;
  --color-text-faint: #94a3b8;

  /* Primary blue (app buttons/links) */
  --color-primary: #2f5fb3;
  --color-primary-hover: #274f96;
  --color-primary-highlight: #e8eefa;
  --color-accent-soft: #8fb4e8;

  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --shadow-md: 0 10px 28px rgb(15 23 42 / 0.1);
  --shadow-lg: 0 18px 44px rgb(15 23 42 / 0.16);
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2.25rem, 1.3rem + 3.2vw, 3.75rem);

  --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem;

  --font-body: 'Inter', 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-navy: #161d29;
  --color-navy-2: #101623;
  --color-navy-text: #e8ecf3;
  --color-navy-muted: #8b98ad;

  --color-bg: #0f1420;
  --color-surface: #1a2130;
  --color-border: #2b3446;
  --color-divider: #232c3d;

  --color-text: #d7dde7;
  --color-text-muted: #8fa0b5;
  --color-text-faint: #5d6b80;

  --color-primary: #6f9ce0;
  --color-primary-hover: #8db1e8;
  --color-primary-highlight: #223045;
  --color-accent-soft: #6f9ce0;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 10px 28px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 18px 44px rgb(0 0 0 / 0.55);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

.chrome { min-height: 100dvh; display: flex; flex-direction: column; }

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
h1, h2 { text-wrap: balance; line-height: 1.1; }
p { text-wrap: pretty; max-width: 60ch; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

a, button {
  transition: color var(--transition-interactive), background var(--transition-interactive),
    border-color var(--transition-interactive), box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

/* ---------- entrance animation ---------- */
.anim {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 640ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
}

/* ---------- header (transparent, floats over the hero) ---------- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  background: transparent;
  color: var(--color-navy-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) clamp(var(--space-4), 5vw, var(--space-12));
}

.brand { display: flex; align-items: center; gap: var(--space-3); }

.brand-text {
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-navy-text);
}

.brand-sub {
  color: var(--color-navy-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-left: var(--space-3);
  border-left: 1px solid rgb(255 255 255 / 0.14);
}

[data-theme-toggle] {
  color: var(--color-navy-muted);
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
}
[data-theme-toggle]:hover { color: var(--color-navy-text); background: rgb(255 255 255 / 0.08); }

/* ---------- hero band (extends the navy chrome) ---------- */
.hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--color-navy-text);
  text-align: center;
  padding: clamp(5rem, 12vw, 7.5rem) clamp(var(--space-4), 5vw, var(--space-12)) clamp(4rem, 8vw, 6rem);
  background:
    radial-gradient(60rem 34rem at 50% -18%, rgb(47 95 179 / 0.42), transparent 60%),
    radial-gradient(44rem 30rem at 92% 108%, rgb(47 95 179 / 0.2), transparent 62%),
    linear-gradient(165deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
}

/* fine engineering grid, brightest behind the headline */
.hero-grid {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(46rem 30rem at 50% 20%, black 25%, transparent 72%);
}

/* soft roving glow behind the address bar */
.hero-glow {
  content: '';
  position: absolute;
  top: -6rem; left: 50%;
  width: 46rem; height: 30rem;
  transform: translateX(-50%);
  z-index: -1;
  background: radial-gradient(closest-side, rgb(91 139 214 / 0.32), transparent 72%);
  filter: blur(6px);
}

/* ---------- announcement bar + key dates (from /api/content) ---------- */
.announce {
  background: linear-gradient(90deg, #f2b93b, #f6cf6b);
  color: #212b3b;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 10px clamp(16px, 4vw, 32px);
  position: relative;
  z-index: 20;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.12);
}
.keydates {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 auto var(--space-8);
  max-width: 1060px;
  padding: 0 clamp(16px, 4vw, 32px);
}
.kd-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid rgb(33 43 59 / 0.10);
  border-radius: 999px;
  font-size: var(--text-sm);
  color: #46505c;
  box-shadow: 0 1px 3px rgb(33 43 59 / 0.06);
}
.kd-chip svg { color: #2f5fb3; flex: none; }
.kd-chip b { font-weight: 700; color: #212b3b; }
.kd-chip i, .kd-chip u { font-style: normal; text-decoration: none; }
.kd-chip u { color: #2f5fb3; font-weight: 700; }
.kd-chip i::before, .kd-chip u::before {
  content: '';
  display: inline-block;
  width: 1px; height: 11px;
  background: rgb(33 43 59 / 0.15);
  margin-right: 8px;
  vertical-align: -1px;
}

/* ---------- order bank board ---------- */
.board {
  max-width: 880px;
  margin: 0 auto var(--space-10);
  padding: 0 clamp(16px, 4vw, 32px);
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: linear-gradient(135deg, #212b3b, #1a2433);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 14px 22px;
}
.board-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dfe6f0;
}
.board-title svg { color: #7da7e8; }
.board-updated {
  font-size: var(--text-xs);
  color: #8fa0b8;
  font-weight: 600;
  white-space: nowrap;
}
.board-rows {
  background: linear-gradient(170deg, #253248, #1d2939);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-top: none;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.board-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: var(--space-4);
  padding: 16px 22px;
  align-items: baseline;
}
.board-row + .board-row { border-top: 1px solid rgb(255 255 255 / 0.07); }
.board-row h3 {
  font-size: var(--text-base);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.board-row h3::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #4d7fd1;
  flex: none;
}
.board-notes p {
  font-size: 0.84rem;
  line-height: 1.65;
  color: #b9c4d6;
  max-width: none;
}
.board-notes p + p { margin-top: 5px; }
.st {
  display: inline-block;
  font-style: normal;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 1.5px 9px;
  border-radius: 999px;
  vertical-align: 1px;
}
.st-closed { color: #ffb3a6; background: rgb(214 69 47 / 0.18); border: 1px solid rgb(214 69 47 / 0.35); }
.st-open { color: #93e2b4; background: rgb(36 160 91 / 0.16); border: 1px solid rgb(36 160 91 / 0.35); }
@media (max-width: 620px) {
  .board-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 18px; }
}

/* ---------- location chips: live time + weather ---------- */
.hero-locrow {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 16px;
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 999px;
  font-size: var(--text-sm);
  color: var(--color-navy-muted);
  backdrop-filter: blur(4px);
}
.loc-chip:empty { display: none; }
.loc-name { font-weight: 700; color: var(--color-navy-text); }
.loc-time { font-variant-numeric: tabular-nums; }
.loc-time::before, .loc-wx:not(:empty)::before {
  content: '';
  display: inline-block;
  width: 1px; height: 12px;
  background: rgb(255 255 255 / 0.18);
  margin-right: var(--space-3);
  vertical-align: -1px;
}
.loc-wx { display: inline-flex; align-items: center; gap: 6px; }
.loc-wx svg { display: block; opacity: 0.85; }

/* smooth hand-off from navy hero into the workspace gray, no hard seam */
.hero-band::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(160px, 22vw, 280px);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgb(244 246 249 / 0.06) 22%,
    rgb(244 246 249 / 0.22) 44%,
    rgb(244 246 249 / 0.52) 66%,
    rgb(244 246 249 / 0.84) 85%,
    var(--color-bg) 100%
  );
  pointer-events: none;
}

/* ---------- aurora: slow-drifting gradient blooms ---------- */
body[data-daypart="morning"] .aurora { filter: blur(58px) hue-rotate(-18deg) saturate(1.15); }
body[data-daypart="evening"] .aurora { filter: blur(58px) hue-rotate(28deg) saturate(1.2); }
body[data-daypart="night"] .aurora { filter: blur(58px) hue-rotate(50deg) saturate(0.85); opacity: 0.75; }

.aurora {
  position: absolute;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  filter: blur(58px);
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  will-change: transform;
}
.aurora span:nth-child(1) {
  width: 44rem; height: 26rem;
  left: 8%; top: -18%;
  background: radial-gradient(closest-side, rgb(47 95 179 / 0.55), transparent 70%);
  animation: aurora-a 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  width: 36rem; height: 22rem;
  right: 2%; top: 22%;
  background: radial-gradient(closest-side, rgb(91 139 214 / 0.4), transparent 70%);
  animation: aurora-b 32s ease-in-out infinite alternate;
}
.aurora span:nth-child(3) {
  width: 30rem; height: 20rem;
  left: 34%; bottom: -26%;
  background: radial-gradient(closest-side, rgb(127 168 226 / 0.28), transparent 70%);
  animation: aurora-c 38s ease-in-out infinite alternate;
}
@keyframes aurora-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9rem, 3rem) scale(1.18); }
}
@keyframes aurora-b {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(-11rem, -2.5rem) scale(0.92); }
}
@keyframes aurora-c {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6rem, -3rem) scale(1.22); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora span { animation: none; }
}

.hero-greeting {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-navy-muted);
  margin-bottom: var(--space-4);
  min-height: 1em;
}

.hero-inner {
  width: min(760px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- browser-chrome address bar ---------- */
.addressbar {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 20px 10px 16px;
  margin: 0 0 var(--space-7);
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  box-shadow: 0 16px 32px rgb(0 0 0 / 0.24);
}
.addressbar-dots { display: inline-flex; gap: 5px; }
.addressbar-dots i {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
  display: block;
}
.addressbar-lock {
  display: inline-flex;
  color: #6bd08a;
  padding-left: var(--space-2);
  border-left: 1px solid rgb(255 255 255 / 0.16);
}
.addressbar-url {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.hero-h1 {
  font-size: clamp(2.1rem, 5.2vw, var(--text-3xl, 3.2rem));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 var(--space-5);
}
.hero-h1 .accent {
  background: linear-gradient(92deg, #8fb4e8 0%, #d4e3f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--color-navy-muted);
  font-size: var(--text-base);
  margin: 0 auto;
  max-width: 46ch;
}




/* ---------- content ---------- */
.content {
  flex: 1;
  width: min(1060px, 100% - 2 * var(--space-5));
  margin: 0 auto;
  padding-bottom: var(--space-12);
}

.section-label {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: 0 0 var(--space-4);
  padding-top: clamp(var(--space-6), 5vw, var(--space-10));
}

.cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

/* medium windows: 2x2 instead of a 3+1 orphan row */
@media (max-width: 1099px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 579px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-md);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 320ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card-index {
  position: absolute;
  top: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
}

.card-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), #7fa8e2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card-topbar { transform: scaleX(1); }

/* ---------- live status pill ---------- */
.status {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-text-faint);
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  padding: 4px 10px;
  line-height: 1;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #b9c2d0;
  flex-shrink: 0;
}
.status.is-online { color: #1a7f4e; border-color: rgb(26 127 78 / 0.25); background: rgb(26 127 78 / 0.06); }
.status.is-online .status-dot {
  background: #22a05f;
  animation: status-pulse 2.4s ease-out infinite;
}
.status.is-offline { color: #b3352c; border-color: rgb(179 53 44 / 0.25); background: rgb(179 53 44 / 0.06); }
.status.is-offline .status-dot { background: #d0453a; }
@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 rgb(34 160 95 / 0.45); }
  70%  { box-shadow: 0 0 0 6px rgb(34 160 95 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(34 160 95 / 0); }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 100%;
  height: 56px;
  margin-bottom: var(--space-2);
}
.card-logo img { max-height: 48px; width: auto; max-width: 200px; }
.card-logo-art { height: 64px; }
.card-logo-art img { max-height: 64px; }
.card-logo-shield { height: 68px; }
.card-logo-shield img { max-height: 68px; }
.card-logo-wide { height: 44px; }
.card-logo-wide img { max-height: 40px; max-width: 240px; }

[data-theme='dark'] .card-logo:not(.card-logo-art) {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  height: auto;
}

/* ---------- coming-soon card ---------- */
.card-soon { cursor: default; }
.card-soon:hover { border-color: var(--color-border); box-shadow: var(--shadow-md); transform: none; }
.card-soon > *:not(.soon-badge) { opacity: 0.75; }

.soon-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  left: auto;
  transform: none;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6410;
  background: #fdf0d3;
  border: 1px solid #f0d894;
  border-radius: 999px;
  padding: 4px 12px;
}
[data-theme='dark'] .soon-badge {
  color: #f0d894;
  background: rgb(240 216 148 / 0.12);
  border-color: rgb(240 216 148 / 0.35);
}

.card-cta-soon { color: var(--color-text-faint); }
.card-cta-soon .cta-chip { border-style: dashed; }

.card h2 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }
.nowrap { white-space: nowrap; }

.card p { color: var(--color-text-muted); font-size: var(--text-sm); flex-grow: 1; }

.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-5);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 700;
}
.cta-chip {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  transition: background var(--transition-interactive), color var(--transition-interactive),
    transform var(--transition-interactive);
}
.card:hover .card-cta { color: var(--color-primary-hover); }
.card:hover .cta-chip {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  transform: translateX(4px);
}

.note {
  display: block;
  max-width: 52ch;
  text-align: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  margin: var(--space-10) auto 0;
}
.note svg { display: inline-block; vertical-align: -2px; margin-right: var(--space-1); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) clamp(var(--space-4), 5vw, var(--space-12));
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}

.site-footer-mid {
  display: none;
}

@media (min-width: 760px) {
  .site-footer-mid { display: inline; }
}

@media (max-width: 680px) {
  .card { padding: var(--space-6); }
}
