/* FahrTrack · shared UX/motion layer (website + shop). Everything is progressive: no JS / reduced motion = plain, fully readable page. */
:root { --ft-red: #E5332A; --ft-ease: cubic-bezier(.22, 1, .36, 1); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body { overflow-x: clip; }
img, video, svg { max-width: 100%; }
img { height: auto; }
img[width][height] { height: auto; }

/* accessibility */
.ft-skip { position: fixed; left: 12px; top: -60px; z-index: 10000; background: var(--ft-red); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; transition: top .2s var(--ft-ease); }
.ft-skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ft-red); outline-offset: 3px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }
@media (pointer: coarse) { a.nav-link, .nav-link, button, .btn, [role=button], select, input:not([type=checkbox]):not([type=radio]) { min-height: 44px; } }
@media (forced-colors: active) { .ft-spot, .ft-aurora, #ft-progress { display: none; } }

/* scroll progress */
#ft-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 9999; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #E5332A, #ff7a4d); box-shadow: 0 0 12px rgba(229, 51, 42, .7); pointer-events: none; }

/* cursor spotlight + tilt on cards */
.ft-fx { position: relative; transform-style: preserve-3d; transition: transform .5s var(--ft-ease), box-shadow .5s var(--ft-ease); will-change: transform; }
.ft-fx.ft-tilting { transition: transform .08s linear, box-shadow .5s var(--ft-ease); }
.ft-spot { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 2;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(229, 51, 42, .16), transparent 55%); mix-blend-mode: normal; }
.ft-fx:hover > .ft-spot { opacity: 1; }
.ft-fx:hover { box-shadow: 0 30px 70px -30px rgba(229, 51, 42, .45), 0 18px 40px -24px rgba(0, 0, 0, .5); }

/* hero aurora */
.ft-aurora { position: absolute; inset: -10% -10% auto -10%; height: 90%; pointer-events: none; z-index: 0; overflow: hidden; filter: blur(60px); opacity: .55; }
.ft-aurora::before, .ft-aurora::after { content: ""; position: absolute; width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; border-radius: 50%; animation: ft-drift 18s ease-in-out infinite alternate; }
.ft-aurora::before { left: 8%; top: -10%; background: radial-gradient(circle, rgba(229, 51, 42, .55), transparent 65%); }
.ft-aurora::after { right: 6%; top: 8%; background: radial-gradient(circle, rgba(0, 191, 255, .28), transparent 65%); animation-delay: -9s; }
@keyframes ft-drift { from { transform: translate3d(-4%, -2%, 0) scale(1); } to { transform: translate3d(8%, 6%, 0) scale(1.15); } }

/* buttons: press + sheen */
.btn, button[class*="bg-brand"], a[class*="bg-brand"] { transition: transform .25s var(--ft-ease), box-shadow .25s var(--ft-ease), filter .2s; }
.btn:active, button:active { transform: scale(.97); }
.btn-red:hover, a[class*="bg-brand"]:hover, button[class*="bg-brand"]:hover { box-shadow: 0 12px 34px -10px rgba(229, 51, 42, .7); }

/* animated gradient text for accent words */
.ft-grad { background: linear-gradient(100deg, #ff4d3d, #E5332A 40%, #ff9a5c 80%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ft-shine 6s linear infinite; }
@keyframes ft-shine { to { background-position: 200% center; } }

/* mobile dock (website, small screens) */
.ft-dock { display: none; }
@media (max-width: 768px) {
  .ft-dock { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 190; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; border-radius: 20px;
    background: rgba(12, 12, 12, .78); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); transform: translateY(0); transition: transform .4s var(--ft-ease); }
  .ft-dock.ft-hide { transform: translateY(140%); }
  .ft-dock a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; border-radius: 14px; color: #f2f2f2; font-size: .7rem; font-weight: 600; text-decoration: none; }
  .ft-dock a i { font-size: 1.25rem; }
  .ft-dock a.ft-primary { background: var(--ft-red); }
  body.has-ft-dock { padding-bottom: 84px; }
  body.has-ft-dock #ft-chat-wrap { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); right: 14px; }
  body.has-ft-dock #ft-scrolltop { display: none; }
}

/* page-to-page cross-fade between website and shop (same origin) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: ft-vt-out .25s ease both; }
::view-transition-new(root) { animation: ft-vt-in .35s var(--ft-ease) both; }
@keyframes ft-vt-out { to { opacity: 0; } }
@keyframes ft-vt-in { from { opacity: 0; transform: translateY(8px); } }

/* reduced motion: show everything, stop everything */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].visible { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  #ft-progress, .ft-aurora { display: none; }
  .ft-fx { transform: none !important; }
}

/* header actions (account / cart) */
.ft-act { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #f2f2f2; font-size: 1.15rem; text-decoration: none; transition: background .2s; margin-right: 4px; }
.ft-act:hover { background: rgba(255, 255, 255, .1); }
.ft-act:last-of-type { background: var(--ft-red); }
.ft-act b { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; color: #000; font-size: .65rem; line-height: 18px; text-align: center; }
@media (max-width: 480px) { .ft-act:first-of-type { display: none; } }
