/* =============================================================
   FRONTEND DEVELOPER ENHANCEMENTS
   Performance · Accessibility · Reduced Motion · Focus styles
   ============================================================= */
/* ── 1. Focus-visible ring (keyboard nav, WCAG 2.1 AA) ──────── */
:focus-visible {
  outline: 2px solid var(--accent, #4B6FE8);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Remove outline for mouse clicks only */
:focus:not(:focus-visible) { outline: none; }
/* ── 2. Skip-to-content link (screen reader / keyboard) ──────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent, #4B6FE8);
  color: #0a0a0a;
  font-weight: 700;
  border-radius: 0 0 6px 6px;
  z-index: 9999;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 0; }
/* ── 3. prefers-reduced-motion: disable ALL animations ───────── */
@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;
  }
  /* Keep canvas hidden — particle animation is JS; JS checks this too */
  #particle-canvas { display: none; }
}
/* ── 4. High-contrast mode support ───────────────────────────── */
@media (forced-colors: active) {
  .btn-primary { border: 2px solid ButtonText; }
  .nav-link { color: LinkText; }
}
/* ── 5. Min touch target 44×44px (WCAG 2.5.5) ───────────────── */
.nav-link,
.hamburger,
.btn,
.social-btn,
.gallery-item,
.quote-step-btn,
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  min-height: 44px;
  min-width: 44px;
}
/* Social icon buttons specifically need centering */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* ── 6. Image lazy-load fade-in (progressive enhancement) ──────── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded { opacity: 1; }
/* ── 7. Visible form error states ────────────────────────────── */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
  border-color: #e55; !important
  box-shadow: 0 0 0 2px rgba(238, 85, 85, 0.25);
}
.field-error {
  color: #ff6b6b;
  font-size: 0.78rem;
  margin-top: 4px;
  display: block;
}
/* ── 8. Quote wizard progress bar (accessibility enhancement) ── */
.quote-progress-bar {
  height: 4px;
  background: rgba(75,111,232,0.2);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.quote-progress-fill {
  height: 100%;
  background: var(--accent, #4B6FE8);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
/* ── 9. Print styles ─────────────────────────────────────────── */
@media print {
  #particle-canvas,
  .hamburger,
  .mobile-menu,
  .lightbox,
  .hero-actions { display: none; }
  body { background: #fff; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 0.75em; }
}
/* ── 10. Scroll-margin for anchors (accounts for sticky nav) ─── */
section[id] {
  scroll-margin-top: 72px;
}
/* =============================================================
   OMNICHANNEL RESPONSIVE REFINEMENTS
   Covers: Ultra-wide (1400px+), Laptop (1024-1280px),
   Tablet (768-1024px), Mobile Landscape & Small Phones (<=480px, <=360px)
   ============================================================= */
/* Global Layout Resets & Overflow Protection */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after {
  box-sizing: border-box;
}
img, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}
/* Fluid Container & Spacing */
.container {
  width: 100%;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
  margin-left: auto;
  margin-right: auto;
}
/* Tablet Optimization (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-content {
    max-width: 90%;
  }
  .about-visual {
    max-width: 100%;
  }
  .capabilities-features {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px;
  }
  .quote-layout {
    grid-template-columns: 1fr !important;
    gap: 36px;
  }
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px;
  }
}
/* Mobile & Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
  .hero-content {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .hero-title {
    font-size: clamp(2rem, 7.5vw, 3rem) !important;
    line-height: 1.15;
  }
  .hero-tagline {
    font-size: 1.1rem;
    margin-bottom: 16px;
  }
  .hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .hero-stats-inner {
    grid-template-columns: 1fr 1fr !important;
  }
  .about-visual {
    margin-top: 24px;
  }
  .about-float-card {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    margin-top: 16px;
    width: 100%;
  }
  .quote-steps-inner {
    padding: 20px 16px !important;
  }
  .quote-step-title {
    font-size: 1.35rem;
  }
  .product-type-grid {
    grid-template-columns: 1fr !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .quote-step-nav {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
  }
  .quote-step-nav .btn {
    width: 100%;
    justify-content: center;
  }
  .contact-form-wrap {
    padding: 24px 18px !important;
  }
  .contact-info-items {
    gap: 18px;
  }
}
/* Small Mobile Screens (max-width: 480px) */
@media (max-width: 480px) {
  .section-title {
    font-size: clamp(1.8rem, 6vw, 2.3rem) !important;
  }
  .section-subtitle {
    font-size: 0.9rem !important;
  }
  .hero-stats-inner {
    grid-template-columns: 1fr !important;
  }
  .hero-stat-item {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    padding: 16px 12px;
  }
  .hero-stat-item:last-child {
    border-bottom: none;
  }
  .gallery-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 200px;
  }
  .nav-inner {
    padding: 12px 0;
  }
  .logo-main {
    font-size: 1.35rem;
  }
  .logo-sub {
    font-size: 0.65rem;
    letter-spacing: 1px;
  }
  .footer-links {
    gap: 10px;
  }
  .footer-copy {
    font-size: 0.78rem;
  }
}
/* Ultra-Compact / Foldable devices (max-width: 360px) */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.75rem !important;
  }
  .btn {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }
  .quote-steps-inner {
    padding: 16px 12px !important;
  }
}
/* Large Desktop & Ultrawide (min-width: 1440px) */
@media (min-width: 1440px) {
  .container {
    max-width: 1360px;
  }
  .hero-title {
    font-size: 4.2rem;
  }
}
/* =============================================================
   FIX FOR 13-15 INCH LAPTOPS & DENSE HEIGHT VIEWPORTS (1080p @ 125%/150%)
   ============================================================= */
/* 1. Ensure navbar background is consistently legible and opaque */
#navbar {
  background: rgba(7,8,15,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(75,111,232,0.15);
}
/* 2. Hero Section Height & Vertical Alignment */
#hero {
  min-height: 100vh;
  height: auto !important;
  padding-top: calc(var(--nav-height, 70px) + 36px);
  padding-bottom: 110px; /* space for hero stats bar */
  box-sizing: border-box;
}
.hero-content {
  margin-top: 10px;
}
/* 3. Hero Title & Spacing Scale for Laptops & Medium Screens */
@media (max-width: 1400px) {
  .hero-title {
    font-size: clamp(2.4rem, 4.6vw, 4rem) !important;
    line-height: 1.1;
    margin-bottom: 10px;
  }
  .hero-badge {
    margin-bottom: 14px;
    padding: 5px 14px;
    font-size: 0.72rem;
  }
  .hero-tagline {
    font-size: clamp(1rem, 1.8vw, 1.3rem) !important;
    margin-bottom: 14px;
  }
  .hero-desc {
    font-size: 0.95rem !important;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 520px;
  }
}
/* 4. When viewport height is compact (common on 14" screen at 125% or 150% scaling, height <= 850px) */
@media (max-height: 850px) {
  #hero {
    min-height: auto;
    padding-top: calc(var(--nav-height, 70px) + 24px);
    padding-bottom: 90px;
  }
  .hero-title {
    font-size: clamp(2.2rem, 4.2vw, 3.4rem) !important;
    line-height: 1.1;
    margin-bottom: 8px;
  }
  .hero-badge {
    margin-bottom: 10px;
  }
  .hero-tagline {
    margin-bottom: 12px;
  }
  .hero-desc {
    margin-bottom: 20px;
    font-size: 0.9rem;
  }
  .hero-stats {
    position: relative !important;
    margin-top: 36px;
    bottom: auto !important;
  }
}
/* ── 5. Language Switcher Component ────────────────────────── */
.lang-switch-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-accent, #4a3e1a);
  border-radius: 20px;
  padding: 3px 6px;
  gap: 3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #888);
  font-family: var(--font-heading, sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--tr-fast, 0.2s ease);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lang-btn:hover {
  color: var(--text-primary, #fff);
}
.lang-btn.active {
  background: var(--accent, #4B6FE8);
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(75,111,232,0.35);
}
.lang-divider {
  color: rgba(201, 168, 76, 0.3);
  font-size: 0.75rem;
  user-select: none;
}
/* Mobile navbar controls wrapper */
.nav-mobile-controls {
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 1002;
}
@media (max-width: 768px) {
  .nav-mobile-controls {
    display: flex;
  }
  .mobile-lang-switch {
    padding: 2px 5px;
  }
  .mobile-lang-switch .lang-btn {
    padding: 3px 8px;
    font-size: 0.75rem;
    min-height: 30px;
  }
}
/* Product card footer alignment when price removed */
.product-card-footer {
  justify-content: flex-end;
}
.product-type-price {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.76rem;
}
