
/* Shared responsive and cross-browser optimization layer.
   This file intentionally preserves the existing Solargation® colors and visual theme. */
:root {
  --mobile-gutter: clamp(16px, 5vw, 28px);
  --tap-size: 44px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  min-width: 320px;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

img {
  object-position: center;
}

a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  padding-top: env(safe-area-inset-top, 0px);
}

.nav {
  min-height: 72px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--tap-size);
  height: var(--tap-size);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .10);
  cursor: pointer;
}

.nav-toggle:focus-visible,
.nav-links a:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(246, 197, 61, .85);
  outline-offset: 3px;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle-lines {
  position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-lines::before {
  transform: translateY(-7px);
}

.nav-toggle-lines::after {
  transform: translateY(7px);
}

.site-header[data-menu-open="true"] .nav-toggle-lines {
  background: transparent;
}

.site-header[data-menu-open="true"] .nav-toggle-lines::before {
  transform: rotate(45deg);
}

.site-header[data-menu-open="true"] .nav-toggle-lines::after {
  transform: rotate(-45deg);
}

@supports not (height: 100svh) {
  .hero,
  .contact-hero,
  .page-hero {
    min-height: 100vh;
  }
}

@media (max-width: 1180px) {
  .nav-links {
    gap: .75rem;
    font-size: .88rem;
  }
}

@media (max-width: 1040px) {
  .site-header {
    position: fixed;
  }

  .nav {
    min-height: 66px;
    height: auto;
    position: relative;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    gap: .45rem;
    max-height: calc(100svh - 96px);
    overflow-y: auto;
    padding: .75rem;
    color: #fff;
    background: rgba(6, 31, 60, .98);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(4, 21, 38, .32);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .site-header[data-menu-open="true"] .nav-links {
    display: flex !important;
  }

  .site-header[data-menu-open="true"] .nav-links a,
  .site-header[data-menu-open="true"] .nav-links a:not(.btn) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--tap-size);
    padding: .74rem 1rem;
    border-radius: 16px;
  }

  .site-header[data-menu-open="true"] .nav-links a:not(.btn) {
    background: rgba(255, 255, 255, .06);
  }

  .site-header[data-menu-open="true"] .nav-links a[aria-current="page"] {
    background: rgba(246, 197, 61, .14);
  }

  .site-header[data-menu-open="true"] .nav-links .btn {
    margin-top: .2rem;
  }
}

@media (max-width: 900px) {
  .wrap {
    width: min(calc(100% - (var(--mobile-gutter) * 2)), var(--max)) !important;
  }

  section {
    padding-block: clamp(48px, 12vw, 86px);
  }

  .hero,
  .contact-hero,
  .page-hero,
  .detail-hero {
    padding-top: 108px !important;
  }

  .hero-inner,
  .intro-grid,
  .tech-grid,
  .contact-layout,
  .download-panel,
  .density,
  .cta .wrap,
  .two-col,
  .split,
  .comparison-grid,
  .benefit-grid,
  .feature-grid,
  .story-grid,
  .news-layout,
  .team-grid,
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .cards,
  .proofs,
  .gallery-grid,
  .metric-grid,
  .density-metrics,
  .stats-grid,
  .tiles,
  .download-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-head,
  .footer-inner,
  .download-actions,
  .hero-actions,
  .contact-actions {
    align-items: stretch;
  }

  .download-actions .btn,
  .hero-actions .btn,
  .contact-actions .btn {
    width: 100%;
  }

  .tile,
  .tile.large {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .float-card {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --radius: 22px;
  }

  .brand {
    gap: .65rem;
  }

  .brand span {
    font-size: .95rem;
    line-height: 1.1;
  }

  .brand small {
    display: none !important;
  }

  .eyebrow {
    gap: 1.1rem;
    letter-spacing: .12em;
  }

  .hero h1,
  .section-title,
  h1,
  h2 {
    overflow-wrap: anywhere;
  }

  .hero-panel,
  .contact-card,
  .side-box,
  .download-panel,
  .feature,
  .card,
  .proof,
  .density,
  .next-card {
    border-radius: var(--radius) !important;
  }

  .hero-panel-top,
  .metric,
  .card-body,
  .feature,
  .contact-card,
  .side-box,
  .download-panel,
  .next-card {
    padding: clamp(1rem, 5vw, 1.35rem) !important;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: var(--tap-size);
    font-size: 16px;
  }
}

@media (hover: none) {
  .btn:hover,
  .tile:hover img {
    transform: none !important;
  }
}

@media print {
  .site-header,
  .nav-toggle,
  .scroll-cue,
  .site-footer {
    display: none !important;
  }

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

  a {
    text-decoration: underline;
  }

  section,
  .hero,
  .contact-hero,
  .page-hero {
    padding: 24px 0 !important;
    min-height: auto !important;
  }
}
