/* DanFam Movers Concord — motion & depth (v14). Loaded after styles.css. All of it is disabled under prefers-reduced-motion. */

/* animated road under the hero copy */
.road { position: relative; height: 34px; margin-top: 34px; max-width: 520px; }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 24px; border-top: 2px dashed #B9C6D8; }
.road-lane { position: absolute; top: 0; left: 0; right: 44px; height: 30px; animation: drive 9s cubic-bezier(.45,.02,.35,1) infinite; will-change: transform; }
.road-truck { position: absolute; top: 0; left: 0; width: 44px; height: 30px; }
.road-truck svg { width: 44px; height: 30px; fill: var(--navy); }
.road-truck .wheel { transform-origin: center; transform-box: fill-box; animation: spin 1.1s linear infinite; }
/* lane width = road width - truck width, so translateX(100%) lands exactly at the end of the line on any screen */
@keyframes drive { 0% { transform: translateX(0); } 45% { transform: translateX(100%); } 55% { transform: translateX(100%); } 100% { transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.road-truck.rev svg { transform: scaleX(-1); }

/* hero truck slides in */
.hero-media picture { animation: slideIn 1s cubic-bezier(.2,.7,.2,1) .2s both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }

/* 3d tilt (JS sets transform; CSS gives the easing and the shine) */
.tilt { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; will-change: transform; }
.tilt.is-tilting { transition: transform .08s linear, box-shadow .35s; }
.tilt-shine { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.28), transparent 45%); opacity: 0; transition: opacity .35s; border-radius: inherit; z-index: 2; }
.tilt.is-tilting .tilt-shine { opacity: 1; }

/* icon draw-on when a block reveals */
.reveal .f-ic svg *, .reveal .s-ic svg *, .reveal .why-ic svg * { stroke-dasharray: 90; stroke-dashoffset: 90; }
.reveal.in .f-ic svg *, .reveal.in .s-ic svg *, .reveal.in .why-ic svg * { animation: draw 1.1s ease forwards; animation-delay: calc(var(--d, 0) * .08s + .2s); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* steps: dashed line draws in, number pops on hover */
.steps li:not(:last-child)::before { transform: scaleX(0); transform-origin: left; transition: transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--d, 0) * .18s + .3s); }
.steps li.in:not(:last-child)::before { transform: scaleX(1); }
.step-n { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.steps li:hover .step-n { transform: scale(1.12); box-shadow: 0 10px 24px rgba(11,47,91,.3); }

/* city marquee inside the navy areas panel */
.marquee { overflow: hidden; margin: 28px -8px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { white-space: nowrap; padding: 10px 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.85); display: inline-flex; align-items: center; gap: 10px; }
.marquee-track span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* floating outline shapes on heroes */
.page-hero, .hero { position: relative; overflow: hidden; }
.page-hero > .container, .hero > .container { position: relative; z-index: 1; }
.page-hero::before, .page-hero::after, .hero::before { content: ""; position: absolute; border-radius: 50%; border: 1.5px solid rgba(11,47,91,.10); pointer-events: none; }
.page-hero::before { width: 420px; height: 420px; right: 8%; top: -160px; animation: floatA 14s ease-in-out infinite; }
.page-hero::after { width: 260px; height: 260px; right: 24%; bottom: -120px; border-style: dashed; animation: floatB 18s ease-in-out infinite; }
.hero::before { width: 560px; height: 560px; left: -220px; top: -220px; border-color: rgba(11,47,91,.08); animation: floatA 16s ease-in-out infinite; }
@keyframes floatA { 0%, 100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(-18px, 14px) rotate(8deg); } }
@keyframes floatB { 0%, 100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(16px, -12px) rotate(-30deg); } }

/* buttons and chips */
.btn .ic { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.btn:hover .ic { transform: rotate(45deg); }
.btn:hover .ic svg { transform: none; }
.chips li { transition: transform .25s, background .2s, color .2s, border-color .2s; }
.chips li:hover { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  .road-lane, .road-truck .wheel, .marquee-track, .page-hero::before, .page-hero::after, .hero::before, .hero-media picture { animation: none !important; }
  .tilt { transform: none !important; }
  .reveal .f-ic svg *, .reveal .s-ic svg *, .reveal .why-ic svg * { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .steps li:not(:last-child)::before { transform: none; transition: none; }
}
@media (max-width: 640px) { .road { max-width: none; } }
