/* ===== LTL Desk additions on top of the main site's styles.css ===== */

/* ===== Hero dock: forklift, scan and stamp =====
   The forklift drives in from off the left edge of the screen three times: the far pallet,
   the middle pallet, then class 175. Each trip is 5.3s: 2.6s in, 0.5s forks down, 0.2s wait, 2s back out.
   Trips start at 0.3, 5.6 and 10.9 · 16.2–17.2 scanner sweeps, dimensions count up (ltl.js) ·
   17.3 class tag · 17.8 RECLASS stamp · 18.3 crossed out · 18.8 RIGHT CLASS. Default styles are the final frame.
   The pallets ride in with the same timing curve as the forklift so they move as one. */
.ltl-hero { padding-bottom: 170px; }
.ltl-hero h1 { font-size: clamp(3rem, 9vw, 6.2rem); }
.hero-dock { position: absolute; right: 3%; bottom: 0; width: min(440px, 40vw); height: auto; overflow: visible; pointer-events: none; }
.hero-dock * { transform-box: fill-box; }
.hero-dock .floor { fill: var(--line-dark); }
.hero-dock .box { fill: var(--card-dark); stroke: var(--line-dark); stroke-width: 2; }
.hero-dock .box-accent { fill: var(--accent); stroke: none; }
.hero-dock .tape { stroke: var(--line-dark); stroke-width: 3; fill: none; }
.hero-dock .skid { fill: #8a6a3d; }
.hero-dock .cls { font-family: var(--font-head); font-size: 40px; fill: var(--on-accent); }
.hero-dock .dims { font: 700 12px var(--font-body); fill: var(--on-dark-soft); }
.hero-dock .beam { fill: #ff4d4d; opacity: 0; filter: drop-shadow(0 0 4px #ff4d4d); }
.hero-dock .fork { fill: #a3a3a3; }
.hero-dock .mast { fill: #6b6b6b; }
.hero-dock .lift-body { fill: var(--accent-2); }
.hero-dock .guard { fill: none; stroke: #6b6b6b; stroke-width: 4; stroke-linejoin: round; }
.hero-dock .weight { fill: #3a3a3a; }
.hero-dock .tire { fill: #0d0d0d; stroke: #3a3a3a; stroke-width: 2; }
.hero-dock .hub { fill: #a3a3a3; }
.hero-dock .lift { transform: translateX(-100vw); } /* parked off to the left when it's done */
.hero-dock .stamp { opacity: 0; }
.hero-dock .stamp-box { fill: none; stroke: #e5484d; stroke-width: 4; }
.hero-dock .stamp-text { font-family: var(--font-head); font-size: 30px; letter-spacing: 0.08em; fill: #e5484d; }
.hero-dock .strike { stroke: #e5484d; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 190; }
.hero-dock .stamp, .hero-dock .ok { transform-origin: center; rotate: -6deg; }
.hero-dock .ok-box { fill: #1d8a4c; }
.hero-dock .ok-text { font: 800 17px var(--font-body); letter-spacing: 0.06em; fill: #fff; }

.hero-dock .ca { animation: dock-in-a 2.6s cubic-bezier(0.25, 0.6, 0.35, 1) 0.3s both; }
.hero-dock .cb { animation: dock-in-b 2.6s cubic-bezier(0.25, 0.6, 0.35, 1) 5.6s both; }
.hero-dock .cc { animation: dock-in 2.6s cubic-bezier(0.25, 0.6, 0.35, 1) 10.9s both; }
.hero-dock .carry-y { animation: dock-lower 0.5s ease-in-out both; }
.hero-dock .ca .carry-y { animation-delay: 2.9s; }
.hero-dock .cb .carry-y { animation-delay: 8.2s; }
.hero-dock .cc .carry-y { animation-delay: 13.5s; }
.hero-dock .forks { animation: forks-trips 15.9s linear 0.3s both; }
.hero-dock .lift { animation: lift-trips 15.9s linear 0.3s both; }
.hero-dock .beam { animation: dock-scan 1s ease-in-out 16.2s both; }
.hero-dock .dims { animation: dock-fade 0.3s ease-out 16.2s both; }
.hero-dock .tag { transform-origin: center; animation: dock-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 17.3s both; }
.hero-dock .stamp { animation: dock-stamp 1.3s ease-out 17.8s both; }
.hero-dock .strike { animation: dock-strike 0.35s ease-out 18.3s both; }
.hero-dock .ok { animation: dock-ok 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) 18.8s both; }

/* Each pallet starts as far left of its spot as the forklift starts left of where it stops for it. */
@keyframes dock-in-a { from { transform: translateX(calc(-100vw - 204px)); } to { transform: none; } }
@keyframes dock-in-b { from { transform: translateX(calc(-100vw - 104px)); } to { transform: none; } }
@keyframes dock-in { from { transform: translateX(-100vw); } to { transform: none; } }
@keyframes dock-lower { from { transform: translateY(-14px); } to { transform: none; } }
/* Three trips over 15.9s; it stops 204 and 104 units right of the 175 spot for the first two pallets. */
@keyframes lift-trips {
  0% { transform: translateX(-100vw); animation-timing-function: cubic-bezier(0.25, 0.6, 0.35, 1); }
  16.35% { transform: translateX(204px); }
  20.75% { transform: translateX(204px); animation-timing-function: ease-in-out; }
  33.33% { transform: translateX(-100vw); animation-timing-function: cubic-bezier(0.25, 0.6, 0.35, 1); }
  49.69% { transform: translateX(104px); }
  54.09% { transform: translateX(104px); animation-timing-function: ease-in-out; }
  66.67% { transform: translateX(-100vw); animation-timing-function: cubic-bezier(0.25, 0.6, 0.35, 1); }
  83.02% { transform: none; }
  87.42% { transform: none; animation-timing-function: ease-in-out; }
  100% { transform: translateX(-100vw); }
}
/* Forks up while carrying, down to set the pallet, back up off screen before the next trip. */
@keyframes forks-trips {
  0%, 16.35% { transform: translateY(-14px); }
  19.5%, 33.33% { transform: none; }
  33.34%, 49.69% { transform: translateY(-14px); }
  52.83%, 66.67% { transform: none; }
  66.68%, 83.02% { transform: translateY(-14px); }
  86.16%, 100% { transform: none; }
}
@keyframes dock-scan {
  0% { opacity: 0; transform: none; }
  8% { opacity: 1; transform: translateY(6px); }
  90% { opacity: 1; transform: translateY(106px); }
  100% { opacity: 0; transform: translateY(106px); }
}
@keyframes dock-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dock-pop { from { transform: scale(0); } to { transform: none; } }
@keyframes dock-stamp {
  0% { opacity: 0; scale: 1.8; }
  20% { opacity: 1; scale: 1; }
  80% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 1; }
}
@keyframes dock-strike { from { stroke-dashoffset: 190; } to { stroke-dashoffset: 0; } }
@keyframes dock-ok { from { opacity: 0; scale: 0.6; } to { opacity: 1; scale: 1; } }

/* ===== Footer: LTL doubles heading home (styles.css moves .home-truck in) ===== */
.ltl-doubles { width: 320px; }
.ltl-doubles .pup { fill: #262626; stroke: #3a3a3a; stroke-width: 1.5; }
.ltl-doubles .frame { fill: #3a3a3a; }
.ltl-doubles .cab { fill: var(--accent); }
.ltl-doubles .glass { fill: #0d0d0d; opacity: 0.85; }
.ltl-doubles .pup-text { font: 800 10px var(--font-body); fill: #fff; }
.ltl-doubles .pup-text tspan { fill: #ffc21a; }
.ltl-doubles .pup-badge { fill: #ffc21a; }
.ltl-doubles .pup-badge-text { font-family: var(--font-head); font-size: 14px; fill: #0d0d0d; }

/* Calculator */
.ltl-calc-wrap { align-items: start; }
.calc-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.calc-points li { padding-left: 18px; border-left: 4px solid var(--accent); color: var(--muted); }
.calc-points strong { color: var(--ink); }
.ltl-calc { gap: 14px; }
.units-head, .unit-row { display: grid; grid-template-columns: 0.8fr 1fr 1fr 1fr 1.2fr 32px; gap: 8px; align-items: center; }
.units-head span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }
.units { display: grid; gap: 8px; }
.ltl-calc .unit-row input { padding: 10px 8px; text-align: right; }
.unit-del { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-dark); background: none; color: var(--on-dark-muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.unit-del:hover { color: var(--accent); border-color: var(--accent); }
.unit-btns, .calc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* .btn-ghost was made for links; a <button> would get the browser's grey fill without this. */
.ltl-calc button.btn-ghost { background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.ltl-calc button.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.check-dark { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; cursor: pointer; }
.check-dark input { width: 18px; height: 18px; accent-color: var(--accent); }

.class-result { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.class-big { background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 14px 20px; min-width: 130px; display: flex; flex-direction: column; justify-content: center; }
.cls-num { font-family: var(--font-head); font-size: 3.4rem; line-height: 1; }
.class-stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.class-stats > div { background: var(--card-dark); border: 1px solid var(--line-dark); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.class-stats dt { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }
.class-stats dd { margin: 0; font-weight: 800; font-size: 1rem; line-height: 1.3; color: var(--on-dark); }
.class-stats dd small { font-weight: 600; font-size: 0.8em; color: var(--on-dark-soft); }

.ltl-notes { display: grid; gap: 8px; }
.ltl-notes:empty { display: none; }
.ltl-note { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--card-dark); border-left: 4px solid var(--accent); font-size: 0.92rem; color: var(--on-dark-soft); }
.ltl-note strong { color: var(--on-dark); }
.ltl-note.warn { border-left-color: var(--accent-2); }

.working { background: var(--card-dark); border: 1px solid var(--line-dark); border-radius: 10px; }
.working summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 0.92rem; }
.working > div { padding: 0 14px 12px; font-size: 0.88rem; color: var(--on-dark-soft); }
.working p { margin: 0 0 6px; }
.working code { background: var(--code-bg); }

/* Services: two doors */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.door { background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; }
.door h3 { font-size: 1.5rem; }
.door p { color: var(--muted); }
.door .tag { color: var(--accent-2) !important; }
.door .btn { align-self: flex-start; margin-top: auto; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.35em; width: 7px; height: 12px; border: solid var(--accent); border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* Accessorials */
.acc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.acc-grid > div { background: var(--paper); border-radius: var(--radius); padding: 22px; min-width: 0; }
.acc-grid h3 { color: var(--accent-2); }
.acc-grid p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* Portfolio cards: show the whole screenshot */
#tools .tool-card { margin: 0; }
#tools .tool-card img { height: 320px; }
/* Keep the Freight Command sidebar ("Working as LTL Specialist") in view when the card crops the shot. */
#tools .tool-card img[src^="images/ltl-desk"] { object-position: left top; }

.about-ctas { margin: 28px 0 0; }

/* Contact form textarea, matching the inputs */
.lead-form textarea { font: inherit; padding: 12px 14px; border-radius: 10px; border: 2px solid transparent; width: 100%; min-width: 0; background: var(--paper); border-color: var(--line); color: var(--ink); resize: vertical; }
.lead-form textarea:focus { outline: none; border-color: var(--accent); }

/* Day theme: the outline door button and ghost buttons on the light calculator */
[data-theme="day"] .btn-outline { border-color: var(--accent); color: var(--accent); }
[data-theme="day"] .btn-outline:hover { background: var(--accent); color: var(--on-accent); }
[data-theme="day"] .hero-dock .skid { fill: #b08a55; }

@media (max-width: 980px) {
  .acc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dock *, .hero-dock .lift { animation: none !important; }
}
@media (max-width: 640px) {
  .doors, .acc-grid { grid-template-columns: 1fr; }
  .door { padding: 24px; }
  .ltl-hero { padding-bottom: 190px; }
  .hero-dock { width: calc(100% - 32px); max-width: 340px; right: 16px; }
  .ltl-doubles { width: 210px; }
  .units-head, .unit-row { grid-template-columns: 0.8fr 1fr 1fr 1fr 1.2fr 28px; gap: 4px; }
  .ltl-calc .unit-row input { padding: 9px 4px; font-size: 0.9rem; }
  .units-head span { font-size: 0.6rem; letter-spacing: 0.02em; }
  .unit-del { width: 28px; height: 28px; }
  .class-result { grid-template-columns: 1fr; }
  .calc-actions .btn { width: 100%; }
  #tools .tool-card img { height: 240px; }
}

/* ===== Photo backdrops (Higgsfield stills, moved with CSS) ===== */
/* Hero: cross-dock terminal behind the headline; the left fades to the hero colour
   so the text stays readable, and the photo slowly pushes in. */
.ltl-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("images/cross-dock.webp") 75% 45% / cover no-repeat;
  opacity: 0.85;
  animation: ltl-push 24s ease-in-out infinite alternate;
}
.ltl-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--hero-bg) 0%, color-mix(in srgb, var(--hero-bg) 82%, transparent) 45%, color-mix(in srgb, var(--hero-bg) 35%, transparent) 100%),
    linear-gradient(0deg, var(--hero-bg) 0%, transparent 40%);
}
/* Day: the photo at the same strength as night; the light wash stays strong behind the text
   on the left and thins out on the right so the terminal shows through. */
[data-theme="day"] .ltl-hero::before { opacity: 0.85; }
[data-theme="day"] .ltl-hero::after {
  background:
    linear-gradient(90deg, var(--hero-bg) 0%, color-mix(in srgb, var(--hero-bg) 80%, transparent) 45%, color-mix(in srgb, var(--hero-bg) 12%, transparent) 100%),
    linear-gradient(0deg, var(--hero-bg) 0%, transparent 35%);
}
.ltl-hero .hero-inner, .ltl-hero .hero-dock { z-index: 1; }
@keyframes ltl-push { from { transform: scale(1); } to { transform: scale(1.08) translateX(-1.5%); } }

/* Photo bands: fade in on scroll, then a slow zoom-out. */
.photo-band { margin: 0 0 40px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 8; background: var(--asphalt); }
.photo-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; transform: scale(1.12); transition: transform 6s ease-out; }
.photo-band.in img { transform: scale(1.02); }
.photo-band.photo-inline { aspect-ratio: 16 / 9; margin: 0 0 20px; }
/* The doubles photo is cropped tight to the truck and road, so the band takes the photo's own shape on every screen. */
.photo-band.band-doubles { aspect-ratio: 1920 / 605; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .ltl-hero::before { background-image: url("images/cross-dock-sm.webp"); }
  .ltl-hero::after { background: linear-gradient(0deg, var(--hero-bg) 0%, color-mix(in srgb, var(--hero-bg) 75%, transparent) 60%, color-mix(in srgb, var(--hero-bg) 45%, transparent) 100%); }
  [data-theme="day"] .ltl-hero::after { background: linear-gradient(0deg, var(--hero-bg) 0%, color-mix(in srgb, var(--hero-bg) 78%, transparent) 60%, color-mix(in srgb, var(--hero-bg) 40%, transparent) 100%); }
  .photo-band { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  .ltl-hero::before { animation: none; }
  .reveal, .photo-band img { transition: none; }
}
