@import "tailwindcss";

@theme {
  --color-brand-primary: #b12028;
  --color-brand-accent: #b12028;
  --color-brand-dark: #121212;
  --color-brand-light: #f8fafc;

  --font-heading: var(--font-heading), "Manrope", sans-serif;
  --font-body: var(--font-body), "Poppins", sans-serif;
  --font-sans: var(--font-body), "Poppins", sans-serif;

  --breakpoint-3xl: 1600px;
}

:root {
  --background: #ffffff;
  --foreground: #121212;
  --accent: #b12028;
  --marquee-speed: 80s;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes marquee2 {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(0%);
  }
}

.animate-marquee {
  animation: marquee var(--marquee-speed) linear infinite;
}

.animate-marquee2 {
  animation: marquee2 var(--marquee-speed) linear infinite;
}

/* Custom Utilities */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.text-gradient {
  background: linear-gradient(135deg, #121212 0%, #4a4a4a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* GSAP Specific */
.gsap-reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* Respect the OS "reduce motion" setting for CSS animations and transitions. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dealer network map (Leaflet) */
.dealer-map {
  font-family: var(--font-body), "Poppins", sans-serif;
}
.dealer-map .leaflet-tile-pane {
  filter: grayscale(1) contrast(1.05) brightness(1.03);
}
.dealer-pin-wrap {
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dealer-pin {
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  transform-origin: 50% 100%;
  transition: transform 0.2s ease;
}
.dealer-pin-wrap:hover .dealer-pin {
  transform: scale(1.12);
}
.user-pin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25), 0 1px 4px rgba(0, 0, 0, 0.4);
}
.user-pin--legend {
  width: 12px;
  height: 12px;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.dealer-map .leaflet-popup-content-wrapper {
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.dealer-map .leaflet-popup-content {
  margin: 14px 16px;
}
.dealer-popup__name {
  margin: 0 0 4px !important;
  font-weight: 700;
  font-size: 14px;
  color: #121212;
  line-height: 1.3;
}
.dealer-popup__business {
  margin: 0 0 4px !important;
  font-size: 12px;
  font-weight: 600;
  color: rgba(18, 18, 18, 0.75);
}
.dealer-popup__loc {
  margin: 0 !important;
  font-size: 12px;
  color: rgba(18, 18, 18, 0.6);
}
.dealer-popup__note {
  margin: 6px 0 0 !important;
  font-size: 11px;
  color: rgba(18, 18, 18, 0.45);
  font-style: italic;
}
.dealer-popup__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b12028 !important;
}
.dealer-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #b12028;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: 3px solid #fff;
  box-shadow: 0 0 0 5px rgba(177, 32, 40, 0.22), 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.dealer-pin-wrap:hover .dealer-cluster {
  transform: scale(1.08);
}

/* Home: 4-layer sheet showcase (components/sections/LayerShowcase.tsx) */
.iroof-layers {
  --layers-ease: cubic-bezier(0.16, 1, 0.3, 1);
}
.iroof-layers .layers-stage-viewport {
  height: 100vh;
  height: 100svh;
  background: #ffffff;
}
.iroof-layers .layers-plate {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  pointer-events: none;
  filter: none;
  transition: filter 0.3s ease;
}
.iroof-layers .layers-plate.is-focus {
  filter: none;
}
.iroof-layers .layers-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 22px, 0) scale(0.98);
  transition: opacity 0.45s var(--layers-ease), transform 0.45s var(--layers-ease), visibility 0s linear 0.45s;
}
.iroof-layers .layers-card.is-above {
  transform: translate3d(0, -22px, 0) scale(0.98);
}
.iroof-layers .layers-card.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}
.iroof-layers .layers-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(18, 18, 18, 0.6);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.iroof-layers .layers-pill:hover {
  color: #121212;
  background: rgba(18, 18, 18, 0.05);
}
.iroof-layers .layers-pill.is-active {
  background: #b12028;
  color: #fff;
}
.iroof-layers .layers-pill:focus-visible {
  outline: 2px solid #b12028;
  outline-offset: 2px;
}
@keyframes iroofLayersDash {
  to {
    stroke-dashoffset: -24;
  }
}
.iroof-layers .layers-connector-dash {
  animation: iroofLayersDash 1.2s linear infinite;
}
@keyframes iroofLayersPulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  70%, 100% { transform: scale(2.1); opacity: 0; }
}
.iroof-layers .layers-pulse-ring {
  transform-origin: center;
  transform-box: fill-box;
  animation: iroofLayersPulse 1.8s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}
