/* ============================================================
   Black Foot Logistics — Design Tokens
   ============================================================ */
:root {
  /* Color */
  --ink: #0A0A0B;
  --ink-2: #16171A;
  --ink-3: #1F2023;
  --paper: #F6F5F2;
  --paper-2: #FFFFFF;
  --steel: #B9BEC6;
  --steel-bright: #EDEEF0;
  --steel-dim: #6E727A;
  --line-on-dark: rgba(185, 190, 198, 0.18);
  --line-on-light: rgba(16, 17, 20, 0.10);
  --text-on-dark: #F3F2EE;
  --text-on-dark-muted: #9CA0AA;
  --text-on-light: #101114;
  --text-on-light-muted: #55585F;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  --radius: 2px;
  --header-h: 84px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-on-light);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; }
p { margin: 0; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
input, textarea { font: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--paper-2); color: var(--text-on-light);
  padding: var(--space-1) var(--space-2); z-index: 200;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

:focus-visible { outline: 2px solid var(--steel-bright); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Type helpers
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-dim);
  margin: 0 0 var(--space-2);
}
.hero .eyebrow { color: var(--steel); }
.approach .eyebrow, .cta-band .eyebrow { color: var(--steel); }

h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; line-height: 1.3; }

.section-head { max-width: 640px; margin: 0 auto var(--space-6); text-align: center; }
.section-head h2 { color: var(--text-on-light); }

#top, #services, #approach, #values, #contact { scroll-margin-top: var(--header-h); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 150ms var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--paper-2);
}
.btn-primary:hover { background: var(--steel-bright); border-color: var(--steel-bright); }
.btn-ghost {
  background: transparent;
  color: var(--text-on-dark);
  border-color: var(--line-on-dark);
}
.btn-ghost:hover { border-color: var(--steel); background: rgba(255,255,255,0.06); }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(10,10,11,0.65), rgba(10,10,11,0));
  border-bottom: 1px solid transparent;
  transition: background-color 250ms var(--ease), border-color 250ms var(--ease), backdrop-filter 250ms var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line-on-dark);
}
.header-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.brand-mark { height: 42px; width: auto; filter: invert(1) brightness(1.35); }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-on-dark);
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}
.brand-name-sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  color: var(--steel);
  font-weight: 500;
}

.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav > ul { display: flex; align-items: center; gap: var(--space-4); }
.nav-link {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.9375rem; font-weight: 500;
  color: var(--text-on-dark);
  padding: 0.5rem 0;
}
.nav-link .chevron { width: 14px; height: 14px; transition: transform 200ms var(--ease); }
.has-dropdown[data-open="true"] .chevron { transform: rotate(180deg); }
.nav-link:hover, .nav-link:focus-visible { color: var(--steel-bright); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 340px;
  background: var(--ink-2);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.has-dropdown[data-open="true"] .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  transition: background-color 150ms var(--ease);
}
.dropdown-item:hover, .dropdown-item:focus-visible { background: var(--ink-3); }
.dropdown-item svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--steel); }
.dropdown-item span { display: flex; flex-direction: column; gap: 0.15rem; }
.dropdown-item strong { font-size: 0.9375rem; font-weight: 600; color: var(--text-on-dark); }
.dropdown-item small { font-size: 0.8125rem; color: var(--text-on-dark-muted); }
.dropdown--simple { min-width: 200px; }
.dropdown-item--simple { font-size: 0.9375rem; font-weight: 500; color: var(--text-on-dark); padding: 0.65rem 0.75rem; }

.nav-cta { display: none; }
.header-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.menu-toggle { display: none; color: var(--text-on-dark); padding: 0.25rem; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle svg { width: 24px; height: 24px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink);
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero-chart { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.chart-grid { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--line-on-dark); opacity: 0.7; }
.route-line { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--steel-dim); }
.route-line path { stroke-dasharray: 2 10; animation: dash-flow 6s linear infinite; }
.route-dot { fill: var(--steel-bright); animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes dash-flow { to { stroke-dashoffset: -120; } }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; r: 5; }
  50% { opacity: 0.4; r: 7; }
}

.tanker-art {
  position: absolute;
  right: -2%;
  bottom: 14%;
  width: min(46vw, 620px);
  height: auto;
  color: var(--steel);
  animation: float-boat 7s ease-in-out infinite;
}
@keyframes float-boat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.tanker-art .hull { color: var(--steel); }
.tanker-art .hull-lines { color: var(--ink); }
.tanker-art .deck, .tanker-art .bridge { color: var(--steel-bright); }
.tanker-art .ripples { color: var(--steel-dim); }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-4);
  color: var(--text-on-dark);
}
.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-on-dark);
  max-width: 16ch;
  margin-bottom: var(--space-3);
}
.hero-sub {
  font-size: 1.125rem;
  color: var(--text-on-dark-muted);
  max-width: 46ch;
  margin-bottom: var(--space-4);
}
.hero-ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }

.manifest-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-on-dark);
  background: rgba(0,0,0,0.35);
  overflow: hidden;
  padding: 0.85rem 0;
}
.manifest-track {
  display: inline-flex;
  gap: var(--space-2);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  animation: marquee 32s linear infinite;
}
.manifest-track .dot { color: var(--steel-dim); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.manifest-strip:hover .manifest-track { animation-play-state: paused; }

/* ============================================================
   Capabilities strip
   ============================================================ */
.capabilities { background: var(--paper-2); border-bottom: 1px solid var(--line-on-light); }
.capabilities-inner {
  max-width: 1320px; margin: 0 auto; padding: var(--space-4);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3);
}
.capability { display: flex; align-items: center; gap: 0.65rem; font-size: 0.9375rem; font-weight: 500; color: var(--text-on-light); }
.capability svg { width: 22px; height: 22px; color: var(--steel-dim); flex-shrink: 0; }

/* ============================================================
   Services
   ============================================================ */
.services { padding: var(--space-7) var(--space-4); background: var(--paper); }
.service-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4);
}
.service-card {
  background: var(--paper-2);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.service-card svg { width: 32px; height: 32px; color: var(--text-on-light); margin-bottom: var(--space-3); }
.service-card h3 { margin-bottom: var(--space-2); }
.service-card > p { color: var(--text-on-light-muted); margin-bottom: var(--space-3); }
.service-points { display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid var(--line-on-light); padding-top: var(--space-3); }
.service-points li {
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-on-light-muted);
  padding-left: 1.1rem; position: relative;
}
.service-points li::before {
  content: ''; position: absolute; left: 0; top: 0.5em;
  width: 6px; height: 1px; background: var(--steel-dim);
}

/* ============================================================
   Approach
   ============================================================ */
.approach {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: var(--space-7) var(--space-4);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-6);
  max-width: 1320px;
  margin: 0 auto;
}
.approach-copy h2 { color: var(--text-on-dark); margin-bottom: var(--space-3); }
.approach-copy p { color: var(--text-on-dark-muted); max-width: 42ch; }
.approach-list { display: flex; flex-direction: column; }
.approach-list li {
  display: flex; gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line-on-dark);
}
.approach-list li:last-child { border-bottom: 1px solid var(--line-on-dark); }
.approach-list svg { width: 26px; height: 26px; color: var(--steel); flex-shrink: 0; margin-top: 2px; }
.approach-list strong { display: block; color: var(--text-on-dark); margin-bottom: 0.25rem; font-size: 1rem; }
.approach-list p { color: var(--text-on-dark-muted); font-size: 0.9375rem; }

/* ============================================================
   Values
   ============================================================ */
.values { padding: var(--space-7) var(--space-4); background: var(--paper); }
.values-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4);
}
.value-card { padding: var(--space-3) 0; border-top: 1px solid var(--line-on-light); }
.value-card svg { width: 26px; height: 26px; color: var(--steel-dim); margin-bottom: var(--space-2); }
.value-card h3 { margin-bottom: 0.4rem; }
.value-card p { color: var(--text-on-light-muted); font-size: 0.9375rem; }

/* ============================================================
   CTA / Contact
   ============================================================ */
.cta-band { background: var(--ink); color: var(--text-on-dark); padding: var(--space-7) var(--space-4); }
.cta-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6);
  align-items: start;
}
.cta-copy h2 { color: var(--text-on-dark); margin-bottom: var(--space-2); }
.cta-copy > p { color: var(--text-on-dark-muted); max-width: 40ch; margin-bottom: var(--space-4); }
.contact-details { display: flex; flex-direction: column; gap: var(--space-2); }
.contact-details a { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9375rem; color: var(--text-on-dark); }
.contact-details svg { width: 18px; height: 18px; color: var(--steel); }
.contact-details a:hover { color: var(--steel-bright); }

.cta-form { display: flex; flex-direction: column; gap: var(--space-2); }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-size: 0.8125rem; color: var(--text-on-dark-muted); font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.form-row input, .form-row textarea {
  background: var(--ink-2);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  color: var(--text-on-dark);
  resize: vertical;
  transition: border-color 150ms var(--ease);
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--steel); outline: none; }
.form-note { font-size: 0.875rem; color: var(--steel-bright); min-height: 1.2em; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink-2); color: var(--text-on-dark); padding: var(--space-6) var(--space-4) var(--space-4); }
.footer-inner {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-mark { height: 56px; width: auto; align-self: flex-start; flex-shrink: 0; filter: invert(1) brightness(1.35); opacity: 0.95; margin-bottom: 0.5rem; }
.footer-brand p { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; color: var(--text-on-dark); }
.footer-brand span { font-size: 0.875rem; color: var(--text-on-dark-muted); }
.footer-col { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel-dim); margin-bottom: 0.25rem; font-weight: 500; }
.footer-col a { font-size: 0.9375rem; color: var(--text-on-dark-muted); }
.footer-col a:hover { color: var(--text-on-dark); }
.footer-bottom { max-width: 1320px; margin: 0 auto; padding-top: var(--space-3); font-size: 0.8125rem; color: var(--text-on-dark-muted); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .header-actions .btn-primary { display: none; }
  .nav-cta { display: flex; margin-top: var(--space-3); }

  .site-header.nav-open .main-nav {
    display: flex;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--ink);
    flex-direction: column;
    padding: var(--space-3) var(--space-4);
    overflow-y: auto;
  }
  .site-header.nav-open .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .site-header.nav-open .has-dropdown { border-bottom: 1px solid var(--line-on-dark); }
  .site-header.nav-open .nav-link { width: 100%; justify-content: space-between; padding: var(--space-2) 0; }
  .site-header.nav-open .dropdown {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    display: none; min-width: 0; box-shadow: none; border: none; background: transparent; padding: 0 0 var(--space-2);
    max-height: none;
  }
  .site-header.nav-open .has-dropdown[data-open="true"] .dropdown { display: flex; flex-direction: column; }

  .approach { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .capabilities-inner { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .service-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-4); }
  .tanker-art { width: 70vw; bottom: 14%; opacity: 0.7; }
}

@media (max-width: 480px) {
  .capabilities-inner { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .header-actions .btn-sm { padding: 0.55rem 0.85rem; font-size: 0.8125rem; }
}
