:root {
  --brand-base: #0b1f2a;
  --brand-panel: #162d3b;
  --brand-panel-soft: #1e3a4c;
  --brand-blue: #1565a9;
  --brand-orange: #f57c00;
  --brand-text: #ffffff;
  --brand-muted: #b0bec5;
  --brand-muted-strong: #78909c;
  --brand-border: rgba(176, 190, 197, 0.18);
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: #f8fafc;
  color: #1f2937;
  overflow-x: hidden;
}

/* ────────────── Scroll Animations ────────────── */
.float-in-left,
.float-in-left-slow,
.float-in-right {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity 0.8s cubic-bezier(0.21, 0.45, 0.32, 0.9),
    transform 0.8s cubic-bezier(0.21, 0.45, 0.32, 0.9);
  backface-visibility: hidden;
  perspective: 1000px;
}

.float-in-left {
  transform: translateX(-30px);
}
.float-in-left-slow {
  transform: translateX(-40px);
  transition-duration: 1.2s;
}
.float-in-right {
  transform: translateX(30px);
}

.in-view,
.in-view-left,
.in-view-right {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

[data-card-reveal-item] {
  opacity: 0;
  transform: translateX(-18px);
  transition:
    opacity 0.65s cubic-bezier(0.21, 0.45, 0.32, 0.9),
    transform 0.65s cubic-bezier(0.21, 0.45, 0.32, 0.9);
  will-change: transform, opacity;
}

[data-card-reveal].is-visible [data-card-reveal-item] {
  opacity: 1;
  transform: translateX(0);
}

[data-card-grid-item] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.21, 0.45, 0.32, 0.9),
    transform 0.75s cubic-bezier(0.21, 0.45, 0.32, 0.9);
  will-change: transform, opacity;
}

[data-card-grid-reveal].is-visible [data-card-grid-item] {
  opacity: 1;
  transform: translateY(0);
}

.site-atmosphere {
  background:
    radial-gradient(
      circle at 8% -10%,
      rgba(21, 101, 169, 0.12),
      transparent 36%
    ),
    radial-gradient(circle at 92% 14%, rgba(245, 124, 0, 0.1), transparent 34%),
    linear-gradient(180deg, #f8fbfd 0%, #f1f5f8 48%, #eef3f7 100%);
  background-attachment: scroll;
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .site-atmosphere {
    background-attachment: fixed;
  }
}

@media (hover: none), (pointer: coarse) {
  .bg-fixed {
    background-attachment: scroll !important;
  }
}
.brand-shell {
  background: linear-gradient(
    135deg,
    rgba(11, 31, 42, 0.96),
    rgba(22, 45, 59, 0.93)
  );
  border-color: var(--brand-border);
}

.brand-panel {
  background: rgba(22, 45, 59, 0.9);
  border: 1px solid var(--brand-border);
}

.brand-panel-soft {
  background: rgba(30, 58, 76, 0.9);
  border: 1px solid rgba(176, 190, 197, 0.12);
}

.brand-hairline {
  border-color: var(--brand-border);
}

.brand-muted {
  color: var(--brand-muted);
}

.brand-muted-strong {
  color: var(--brand-muted-strong);
}

.brand-link {
  color: var(--brand-muted);
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: var(--brand-orange);
}

.nav-link {
  display: inline-block;
  transform-origin: center;
}

.nav-link:hover,
.nav-link:focus-visible {
  animation: nav-link-wiggle 0.45s ease-in-out infinite;
  transform: scale(1.1);
}

.brand-link-active {
  color: var(--brand-text);
}

.brand-link-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-orange), #ff9a3d);
}

@keyframes nav-link-wiggle {
  0%,
  100% {
    transform: scale(1.1) rotate(0deg);
  }

  25% {
    transform: scale(1.1) rotate(-2deg);
  }

  50% {
    transform: scale(1.1) rotate(2deg);
  }

  75% {
    transform: scale(1.1) rotate(-1deg);
  }
}

/* ────────────── Admin Navigation ────────────── */
.admin-nav-link {
  color: #d1d5db;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
}

.admin-nav-link:hover {
  color: #ffffff;
  background-color: #1f2937;
}

.admin-nav-link[aria-current="page"] {
  color: #ffffff;
  background-color: #1f2937;
}

/* ────────────── Global Interactive Touch ────────────── */
button,
[role="button"],
a.btn,
input[type="submit"],
input[type="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ────────────── Unified Button System ────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-radius: 9999px;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  transform: translateZ(0);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.08s ease;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px) scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--brand-orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 124, 0, 0.25);
}

.btn-primary:hover {
  background-color: #e56d00;
  box-shadow: 0 6px 20px rgba(245, 124, 0, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: #d46200;
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.2);
  transform: translateY(1px) scale(0.97);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  border-color: var(--brand-orange);
  color: #ffcc80;
}

.btn-secondary:active {
  transform: translateY(1px) scale(0.97);
  opacity: 0.85;
}

.btn-outline {
  background: transparent;
  color: var(--brand-orange);
  border: 2px solid var(--brand-orange);
}

.btn-outline:hover {
  background: var(--brand-orange);
  color: #fff;
}

.btn-outline:active {
  transform: translateY(1px) scale(0.97);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 0.9375rem;
}

/* ────────────── Admin / Inline Buttons ────────────── */
button[type="submit"],
button[type="button"] {
  cursor: pointer;
  transform: translateZ(0);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.08s ease,
    color 0.15s ease;
}

button[type="submit"]:active,
button[type="button"]:active {
  transform: translateY(1px) scale(0.97);
}

/* ────────────── Icon Buttons (menu, close, social) ────────────── */
.brand-panel[aria-label],
button[aria-label] {
  transform: translateZ(0);
  transition:
    background-color 0.15s ease,
    transform 0.08s ease,
    color 0.15s ease;
}

.brand-panel[aria-label]:active,
button[aria-label]:active {
  transform: scale(0.92);
}

/* ────────────── Back To Top Interaction ────────────── */
#back-to-top {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  will-change: opacity, transform, box-shadow;
  transition:
    opacity 0.15s ease,
    transform 0.08s ease,
    box-shadow 0.12s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

#back-to-top.is-pressed {
  transform: translateY(1px) scale(0.94);
  box-shadow: 0 4px 12px rgba(11, 31, 42, 0.35);
}

#back-to-top:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

/* ────────────── Mobile Floating RFQ Cart ────────────── */
.mobile-rfq-bar {
  position: fixed;
  right: 1.25rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-panel), #1e3a4c);
  border: 1px solid rgba(176, 190, 197, 0.18);
  color: #fff;
  text-decoration: none;
  box-shadow:
    0 8px 24px rgba(11, 31, 42, 0.28),
    0 2px 6px rgba(11, 31, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.72) translateY(0.5rem);
  transform-origin: bottom right;
  transition:
    opacity 0.2s ease,
    transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-rfq-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.mobile-rfq-bar:active {
  transform: scale(0.93);
  box-shadow:
    0 4px 12px rgba(11, 31, 42, 0.22),
    0 1px 4px rgba(11, 31, 42, 0.14);
}

.mobile-rfq-bar:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

.mobile-rfq-bar__svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.mobile-rfq-bar__badge {
  position: absolute;
  top: -0.18rem;
  right: -0.18rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  border: 2px solid var(--brand-panel);
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.4);
}

/* ────────────── Typography Scale ────────────── */
.heading-xl {
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 800;
}

.heading-lg {
  font-size: clamp(
    1.75rem,
    6vw,
    2.5rem
  ); /* Fluid typography for better mobile scaling */
  line-height: 1.2;
  font-weight: 700;
}

.heading-md {
  font-size: clamp(
    1.25rem,
    4vw,
    1.75rem
  ); /* Fluid typography for better mobile scaling */
  line-height: 1.2;
  font-weight: 700;
}

.heading-sm {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
}

.label-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--brand-orange);
}

@media (min-width: 768px) {
  .heading-xl {
    font-size: 3.5rem;
  }

  .heading-lg {
    font-size: 2.5rem;
  }

  .heading-md {
    font-size: 1.75rem;
  }
}

/* ────────────── Consistent Section Spacing ────────────── */
.section-pad {
  padding-top: clamp(3rem, 10vw, 6rem); /* Fluid vertical padding */
  padding-bottom: clamp(3rem, 10vw, 6rem);
}

.section-pad-sm {
  padding-top: clamp(2rem, 5vw, 3.5rem); /* Fluid vertical padding */
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* ────────────── Focus Visible Global ────────────── */
:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* ────────────── Card System ────────────── */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  transition:
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* ────────────── Form Field Consistent ────────────── */
.form-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
  outline: none;
}

.form-input.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.form-error {
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

/* ────────────── Screen reader only ────────────── */
.sr-only-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ────────────── Hero Carousel Crossfade ────────────── */
.hero-slide {
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide--active {
  opacity: 1;
}

.hero-info-slide {
  transition: opacity 0.5s ease;
}

/* ────────────── Logo Marquee ────────────── */
.logo-marquee {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.logo-marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
  will-change: transform;
}

.logo-marquee:hover .logo-marquee__track {
  animation-play-state: paused;
}

[data-parallax] {
  will-change: transform;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ────────────── Scrollbar Hide (for horizontal scrolling cards) ────────────── */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ────────────── Image Reveal — blur-up fade on scroll-in ────────────── */
/*
 * Usage: add class="img-reveal" to any <img> below the fold.
 * JS watches for load + IntersectionObserver and adds .img-loaded.
 * Blur transitions from 6px → 0 while opacity 0 → 1 for a smooth "focus-pull"
 * that eliminates the jarring pop-in when lazy images arrive.
 */
.img-reveal {
  opacity: 0;
  filter: blur(6px);
  transition:
    opacity 0.5s ease,
    filter 0.5s ease;
  will-change: opacity, filter;
}

.img-reveal.img-loaded {
  opacity: 1;
  filter: blur(0);
}

/* Shimmer placeholder — add to the *wrapper* element of an img-reveal image.
   Gives a branded skeleton while the image bytes are in flight. */
.img-shell {
  position: relative;
  overflow: hidden;
  background-color: #e5e7eb;
}

.img-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(229, 231, 235, 0) 0%,
    rgba(243, 244, 246, 0.9) 50%,
    rgba(229, 231, 235, 0) 100%
  );
  background-size: 200% 100%;
  animation: img-shimmer 1.4s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

.img-shell.img-shell--loaded::before {
  display: none;
}

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

.shop-catalog-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.shop-catalog-skeleton {
  opacity: 1;
  transition: opacity 220ms ease;
}

.shop-catalog-shell--ready .shop-catalog-content {
  opacity: 1;
  pointer-events: auto;
}

.shop-catalog-shell--ready .shop-catalog-skeleton {
  opacity: 0;
  pointer-events: none;
}

.shop-skeleton-shimmer {
  position: relative;
  overflow: hidden;
  background-color: #e5e7eb;
}

.shop-skeleton-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(229, 231, 235, 0) 0%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(229, 231, 235, 0) 100%
  );
  background-size: 200% 100%;
  animation: shop-skeleton-shimmer 1.2s ease-in-out infinite;
}

/* ────────────── Admin Live Activity Pro UI ────────────── */
.live-activity-shell {
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.06),
    0 2px 8px rgba(15, 23, 42, 0.04);
}

.live-activity-item {
  position: relative;
  overflow: hidden;
}

.live-activity-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  transition: background-color 0.18s ease;
}

.live-activity-item:hover {
  transform: translateY(-1px);
}

.live-activity-item--critical::before {
  background: linear-gradient(180deg, #ef4444, #f97316);
}

.live-activity-item--positive::before {
  background: linear-gradient(180deg, #22c55e, #14b8a6);
}

.live-activity-item--auth::before {
  background: linear-gradient(180deg, #3b82f6, #6366f1);
}

.live-activity-action {
  color: var(--brand-orange);
}

.live-activity-item--critical .live-activity-action {
  color: #dc2626;
}

.live-activity-item--positive .live-activity-action {
  color: #0f766e;
}

.live-activity-item--auth .live-activity-action {
  color: #1d4ed8;
}

@media (max-width: 640px) {
  .live-activity-shell {
    border-radius: 1rem;
  }

  .live-activity-item {
    padding: 0.75rem;
  }
}

@keyframes shop-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.submit-inline-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 9999px;
  animation: submit-inline-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes submit-inline-spin {
  to {
    transform: rotate(360deg);
  }
}

.checkout-main--submitting {
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .shop-catalog-content,
  .shop-catalog-skeleton,
  .checkout-main--submitting {
    transition-duration: 0.01ms;
  }

  .shop-skeleton-shimmer::after,
  .submit-inline-spinner {
    animation: none;
  }
}

/* ── Shop micro-interactions ─────────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .shop-card:hover {
    transform: scale(1.013);
  }
}
.shop-card:active {
  transform: scale(0.988);
}
.shop-select-btn:active {
  transform: scale(0.97);
}

@keyframes shop-step-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 124, 0, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(245, 124, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 124, 0, 0);
  }
}
.shop-step2-pulse {
  animation: shop-step-pulse 1s ease-out;
}

/* Prevent Map Scroll Trap */
.map-container iframe {
  pointer-events: none;
}
.map-container.is-active iframe {
  pointer-events: auto;
}
