/* Practical Freight — landing page
   Colors live here. To change the hover color, edit --accent (and --accent-dark).
   Brand kit accents for reference:
     safety orange  #FF5A1F (same on white and black)
     signal yellow  #FFC400 (same on white and black)
     steel blue     #1F5FA8 on white  /  #3D8BFF on black
     freight green  #0B7A4B on white  /  #22B573 on black
*/
:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6f74;
  --hairline: #e4e6e8;
  --logo: #0a0a0a;
  --sheen: #ffffff;          /* glint color that sweeps across the logo */
  --accent: #FF5A1F;         /* PLACEHOLDER hover color for the bars (light mode) */
  --word-hover: var(--fg);   /* wordmark color on hover; set to var(--accent) to color the whole logo */
  --focus: #1f5fa8;
  --sun: none;
  --moon: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0a0b;
    --fg: #f2f2f0;
    --muted: #8f949a;
    --hairline: #232527;
    --logo: #e9e9e6;
    --sheen: #ffffff;
    --accent: #FF5A1F;       /* PLACEHOLDER hover color for the bars (dark mode) */
    --focus: #3d8bff;
    --sun: block;
    --moon: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b;
  --fg: #f2f2f0;
  --muted: #8f949a;
  --hairline: #232527;
  --logo: #e9e9e6;
  --sheen: #ffffff;
  --accent: #FF5A1F;         /* PLACEHOLDER hover color for the bars (dark mode) */
  --focus: #3d8bff;
  --sun: block;
  --moon: none;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Barlow", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-inline: 16px;
  padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px);
  transition: background-color .35s ease, color .35s ease;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 10;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  padding: 0;
  transition: border-color .2s ease, background-color .35s ease, color .35s ease;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-toggle .icon-sun  { display: var(--sun); }
.theme-toggle .icon-moon { display: var(--moon); }

/* Stage */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 56px);
  padding-block: 96px 48px;
}

/* Logo */
.logo {
  margin: 0;
  width: min(100%, 760px);
  line-height: 0;
  color: var(--logo);
}
.logo-svg { width: 100%; height: auto; display: block; overflow: visible; }
.bars, .word { color: var(--logo); transition: color .3s ease; }
.logo:hover .bars, .logo:focus-within .bars { color: var(--accent); }
.logo:hover .word, .logo:focus-within .word { color: var(--word-hover); }

/* Draw-on reveal */
.draw {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  fill-opacity: 0;
  animation: draw .9s cubic-bezier(.4, 0, .2, 1) forwards,
             ink   .6s ease forwards;
}
.draw-bar:nth-child(1) { animation-delay: 0s,   .85s; }
.draw-bar:nth-child(2) { animation-delay: .12s, .97s; }
.draw-bar:nth-child(3) { animation-delay: .24s, 1.09s; }
.draw-word {
  animation-duration: 1.6s, .7s;
  animation-delay: .35s, 1.75s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ink  { to { fill-opacity: 1; stroke-opacity: 0; } }

/* Chrome sheen: starts after the reveal, sweeps every 7s */
.sheen {
  opacity: .55;
  transform: translateX(0);
  animation: sweep 7s cubic-bezier(.45, .05, .55, .95) 2.6s infinite;
  pointer-events: none;
}
@keyframes sweep {
  0%   { transform: translateX(0); }
  38%  { transform: translateX(2700px); }
  100% { transform: translateX(2700px); }
}

/* Copy */
.about {
  max-width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.lede {
  margin: 0;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg);
}
@media (min-width: 720px) { .lede { white-space: nowrap; } }

/* Talk to us */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.cta::after {
  content: "";
  width: 7px; height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.cta:hover { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.cta:hover::after { transform: translateX(3px) rotate(45deg); }
.cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Footer */
.foot {
  display: flex;
  justify-content: center;
  padding-block: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 480px) {
  .stage { padding-block: 80px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .draw { animation: none; stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; }
  .sheen { display: none; }
  body, .theme-toggle, .bars, .word { transition: none; }
}
