/* ============================================================
   Supermotori.it — Premium Visual Enhancement Layer
   Direction: Industrial Luxury — engineered precision + refinement
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --sm-accent: #F97316;
  --sm-accent-hover: #EA580C;
  --sm-accent-glow: rgba(249, 115, 22, 0.30);
  --sm-accent-soft: rgba(249, 115, 22, 0.08);
  --sm-body: #0F172A;
  --sm-surface: #1E293B;
  --sm-elevated: #334155;
  --sm-border: rgba(148, 163, 184, 0.15);
  --sm-text: #F8FAFC;
  --sm-muted: #94A3B8;
  --sm-radius: 16px;
  --sm-ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --sm-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ==========================================================
   1. AMBIENT BACKGROUND ATMOSPHERE
   Floating gradient orbs add depth and life to the dark bg
   ========================================================== */

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -220px;
  right: -160px;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle,
      rgba(249, 115, 22, 0.06) 0%,
      rgba(249, 115, 22, 0.02) 40%,
      transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: sm-float 22s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  bottom: -180px;
  left: -200px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle,
      rgba(56, 189, 248, 0.04) 0%,
      rgba(56, 189, 248, 0.015) 40%,
      transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: sm-float 28s ease-in-out infinite reverse;
}

@keyframes sm-float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(35px, -25px) scale(1.06);
  }

  66% {
    transform: translate(-25px, 18px) scale(0.94);
  }
}


/* ==========================================================
   2. FILM GRAIN OVERLAY — adds materiality & depth
   ========================================================== */

#root::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}


/* ==========================================================
   3. PAGE-LOAD ANIMATIONS
   ========================================================== */

@keyframes sm-fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sm-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes sm-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes sm-shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes sm-glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.08);
  }

  50% {
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.16);
  }
}

/* App container entrance */
#root>div {
  animation: sm-fade-in 0.55s var(--sm-ease) both;
}


/* ==========================================================
   4. TYPOGRAPHY — Sora for headings, tight tracking
   ========================================================== */

h1,
h2,
h3 {
  font-family: 'Sora', 'Plus Jakarta Sans', sans-serif !important;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h1 {
  font-weight: 800 !important;
}

h2 {
  font-weight: 700 !important;
}

h3 {
  font-weight: 600 !important;
  letter-spacing: -0.02em;
}

/* Premium text shadow for hero headlines */
.text-shadow-premium {
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.55),
    0 8px 28px rgba(0, 0, 0, 0.30),
    0 0 100px rgba(249, 115, 22, 0.06);
}


/* ==========================================================
   5. MICRO-PILL SECTION HEADER
   ========================================================== */

.micro-pill-header {
  font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(249, 115, 22, 0.05);
  color: var(--sm-accent);
  box-shadow:
    0 0 24px rgba(249, 115, 22, 0.06),
    0 4px 8px -2px rgba(0, 0, 0, 0.12);
  transition: all 0.3s var(--sm-ease);
}


/* ==========================================================
   6. GLASS CARD PREMIUM — enhanced depth & glow hover
   ========================================================== */

.glass-card-premium {
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sm-border);
  transition:
    transform 0.45s var(--sm-ease),
    box-shadow 0.45s var(--sm-ease),
    border-color 0.45s var(--sm-ease);
}

.glass-card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.03) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.glass-card-premium:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(249, 115, 22, 0.18),
    0 0 40px rgba(249, 115, 22, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(249, 115, 22, 0.28) !important;
}


/* ==========================================================
   7. GLASS PILL PREMIUM — fuel type pills
   ========================================================== */

.glass-pill-premium {
  transition: all 0.3s var(--sm-ease);
  position: relative;
  overflow: hidden;
}

.glass-pill-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.04) 0%,
      transparent 50%);
  pointer-events: none;
}

.glass-pill-premium:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  border-color: rgba(148, 163, 184, 0.25) !important;
}

/* Active pill with accent glow ring */
.glass-pill-premium[class*="border-accent"],
.glass-pill-premium[class*="ring-"] {
  background: rgba(249, 115, 22, 0.08) !important;
  box-shadow:
    0 0 0 2px rgba(249, 115, 22, 0.12),
    0 4px 20px rgba(249, 115, 22, 0.10);
}


/* ==========================================================
   8. CTA BUTTONS — gradient glow + shimmer sweep
   ========================================================== */

#root button[class*="bg-accent"],
#root a[class*="bg-accent"],
#root button[class*="bg-orange"],
#root a[class*="bg-orange"] {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 14px rgba(249, 115, 22, 0.32),
    0 1px 3px rgba(0, 0, 0, 0.25);
  transition: all 0.3s var(--sm-ease);
}

#root button[class*="bg-accent"]:hover,
#root a[class*="bg-accent"]:hover,
#root button[class*="bg-orange"]:hover,
#root a[class*="bg-orange"]:hover {
  box-shadow:
    0 8px 28px rgba(249, 115, 22, 0.42),
    0 2px 8px rgba(0, 0, 0, 0.20);
  transform: translateY(-2px);
}

#root button[class*="bg-accent"]:active,
#root a[class*="bg-accent"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.28);
  transition-duration: 0.1s;
}

/* Shimmer sweep effect */
#root button[class*="bg-accent"]::before,
#root a[class*="bg-accent"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.18) 50%,
      transparent 100%);
  transition: left 0.55s ease;
  pointer-events: none;
}

#root button[class*="bg-accent"]:hover::before,
#root a[class*="bg-accent"]:hover::before {
  left: 100%;
}

/* Secondary / outline buttons */
#root button[class*="border-accent"],
#root a[class*="border-accent"] {
  transition: all 0.3s var(--sm-ease);
}

#root button[class*="border-accent"]:hover,
#root a[class*="border-accent"]:hover {
  background: rgba(249, 115, 22, 0.08) !important;
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.10);
}


/* ==========================================================
   9. CARD IMAGE HOVER ZOOM
   ========================================================== */

#root .group [class*="aspect-"] img,
#root [class*="overflow-hidden"]>img,
#root [class*="cursor-pointer"] [class*="overflow-hidden"] img {
  transition: transform 0.65s var(--sm-ease), filter 0.65s var(--sm-ease);
  will-change: transform;
}

#root .group:hover [class*="aspect-"] img,
#root [class*="cursor-pointer"]:hover [class*="overflow-hidden"] img {
  transform: translateZ(0) scale(1.07);
}


/* ==========================================================
   10. NAVBAR ENHANCEMENT
   ========================================================== */

#root>div>nav,
#root>div>header,
#root>div>div:first-child[class*="fixed"],
#root>div>div:first-child[class*="sticky"] {
  backdrop-filter: blur(16px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.6) !important;
}


/* ==========================================================
   11. SEPARATOR & DIVIDER LINES
   ========================================================== */

#root hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(148, 163, 184, 0.18) 30%,
      rgba(148, 163, 184, 0.18) 70%,
      transparent 100%);
}


/* ==========================================================
   12. FOOTER — gradient accent top border
   ========================================================== */

#root footer {
  position: relative;
}

#root footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(249, 115, 22, 0.28) 30%,
      rgba(148, 163, 184, 0.12) 70%,
      transparent);
}


/* ==========================================================
   13. LINK UNDERLINE ANIMATIONS
   ========================================================== */

#root a[class*="text-accent"]:not([class*="bg-"]) {
  text-decoration: none;
  background-image: linear-gradient(var(--sm-accent), var(--sm-accent));
  background-size: 0 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--sm-ease);
  padding-bottom: 2px;
}

#root a[class*="text-accent"]:not([class*="bg-"]):hover {
  background-size: 100% 2px;
}


/* ==========================================================
   14. INPUT FIELDS — accent focus ring
   ========================================================== */

#root input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
#root textarea,
#root select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#root input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
#root textarea:focus,
#root select:focus {
  border-color: var(--sm-accent) !important;
  box-shadow:
    0 0 0 3px var(--sm-accent-glow),
    0 0 24px rgba(249, 115, 22, 0.06) !important;
  outline: none;
}


/* ==========================================================
   15. BADGES & TAGS — frosted glass
   ========================================================== */

#root [class*="rounded-full"][class*="text-xs"][class*="px-"],
#root [class*="rounded-full"][class*="text-sm"][class*="px-"] {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}


/* ==========================================================
   16. MODAL ENHANCEMENT
   ========================================================== */

[role="dialog"] {
  animation: sm-scale-in 0.28s var(--sm-ease) both;
}

[role="dialog"][aria-modal="true"]>div,
[role="dialog"]>[class*="relative"] {
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.50),
    0 0 0 1px rgba(148, 163, 184, 0.08);
}

/* Modal backdrop */
[role="dialog"][aria-modal="true"]::before {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}


/* ==========================================================
   17. SKELETON / LOADING SHIMMER
   ========================================================== */

#root [class*="animate-pulse"] {
  animation: none !important;
  background: linear-gradient(90deg,
      #1E293B 25%,
      #2D3B4F 37%,
      #1E293B 63%) !important;
  background-size: 200% 100% !important;
  animation: sm-shimmer 1.6s ease-in-out infinite !important;
}


/* ==========================================================
   18. SCROLLBAR — dark premium
   ========================================================== */

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--sm-body);
}

::-webkit-scrollbar-thumb {
  background: var(--sm-elevated);
  border-radius: 9999px;
  border: 2px solid var(--sm-body);
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--sm-elevated) var(--sm-body);
}


/* ==========================================================
   19. SELECTION COLOR
   ========================================================== */

::selection {
  background: rgba(249, 115, 22, 0.35);
  color: var(--sm-text);
}


/* ==========================================================
   20. FOCUS VISIBLE — keyboard accessibility
   ========================================================== */

:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}


/* ==========================================================
   21. EMPTY IMAGE FALLBACK
   ========================================================== */

img[src=""],
img:not([src]) {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  min-height: 80px;
}


/* ==========================================================
   22. HERO SECTION — enhanced overlay
   ========================================================== */

.hero-overlay-gradient {
  background:
    linear-gradient(180deg,
      rgba(15, 23, 42, 0.45) 0%,
      rgba(15, 23, 42, 0.20) 35%,
      rgba(15, 23, 42, 0.55) 75%,
      rgba(15, 23, 42, 0.92) 100%),
    radial-gradient(ellipse at 50% 120%,
      rgba(249, 115, 22, 0.08) 0%,
      transparent 60%) !important;
}


/* ==========================================================
   23. CAROUSEL FADE MASK — smoother edge fade
   ========================================================== */

.fade-mask-x {
  -webkit-mask-image: linear-gradient(to right,
      transparent 0%,
      black 4%,
      black 96%,
      transparent 100%);
  mask-image: linear-gradient(to right,
      transparent 0%,
      black 4%,
      black 96%,
      transparent 100%);
}


/* ==========================================================
   24. PRINT STYLES
   ========================================================== */

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  body::before,
  body::after,
  #root::after {
    display: none !important;
  }

  .glass-card-premium,
  .glass-pill-premium {
    background: #f8f8f8 !important;
    border: 1px solid #ddd !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }
}


/* ==========================================================
   25. REDUCED MOTION — accessibility
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  body::before,
  body::after {
    animation: none !important;
  }

  #root>div {
    animation: none !important;
  }

  [role="dialog"] {
    animation: none !important;
  }

  .glass-card-premium,
  .glass-pill-premium,
  #root button,
  #root a {
    transition-duration: 0.01ms !important;
  }

  #root button[class*="bg-accent"]::before,
  #root a[class*="bg-accent"]::before {
    display: none !important;
  }
}