/* ===== USA Solar Supply — design tokens ===== */

:root {
  --navy-50:#eef2fb; --navy-100:#d6dff2; --navy-700:#162F66; --navy-800:#0F2451; --navy-900:#0B1B3F;
  --gold-400:#FFD700; --gold-500:#FFC700; --gold-600:#FFA500; --gold-700:#E89400;
  --surface:#FAFAF7;
  --ink:#0B1B3F;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter','DM Sans',system-ui,sans-serif; -webkit-font-smoothing: antialiased; }

/* Typographic rhythm */
h1,h2,h3,h4 { letter-spacing: -0.022em; font-weight: 700; }
h1 { font-weight: 800; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 15px;
  padding: 14px 22px;
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  color: #0B1B3F;
  box-shadow: 0 10px 30px -10px rgba(255,167,0,0.55), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -10px rgba(255,167,0,0.7), inset 0 1px 0 rgba(255,255,255,0.6); }
.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.45); }
.btn-ghost { color: var(--navy-900); background: transparent; border: 1px solid rgba(11,27,63,0.18); }
.btn-ghost:hover { background: rgba(11,27,63,0.05); border-color: rgba(11,27,63,0.4); }

/* ===== Glass panel ===== */
.glass {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 14px 40px -8px rgba(11,27,63,0.18);
}
.glass-dark {
  background: rgba(11,27,63,0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.12);
}

/* ===== Header brand bar — integrated treatment ===== */
/* Horizontal gradient: white on the left (logo-safe zone) easing into navy   */
/* earlier so the nav links sit on solid navy with full white-text contrast. */
.brand-bar {
  background:
    linear-gradient(
      90deg,
      #FFFFFF 0%,
      #FFFFFF 14%,
      #F2F5FB 20%,
      #D8E0F0 26%,
      #8FA3C8 32%,
      #4F6FB0 38%,
      #28498F 44%,
      #15336F 50%,
      #0F2451 58%,
      #0B1B3F 100%
    );
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-bar.scrolled { box-shadow: 0 8px 24px -12px rgba(0,0,0,0.4); }
.brand-bar a { color: rgba(255,255,255,0.9); }
.brand-bar a:hover { color: white; }
.brand-bar .nav-link { position: relative; padding: 8px 2px; font-weight: 500; font-size: 14.5px; }
.brand-bar .nav-link::after {
  content:''; position:absolute; left:0; right:0; bottom:-4px; height:2px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
  border-radius: 2px;
}
.brand-bar .nav-link:hover::after { transform: scaleX(1); }
.brand-bar .nav-link.active { color: white; }
.brand-bar .nav-link.active::after { transform: scaleX(1); }

/* Logo container — flagship-scale brand presence */
/* Container height stays compact; logo image overflows the bar slightly  */
/* for a tighter, more premium header crop without shrinking the mark.    */
.brand-logo {
  display: inline-flex; align-items: center; gap: 12px;
  height: 100%;
  position: relative;
  z-index: 2;
}
.brand-logo img {
  height: 168px; width: auto;
  filter: drop-shadow(0 1px 2px rgba(11,27,63,0.15));
}
@media (max-width: 1024px) {
  .brand-logo img { height: 120px; }
}
@media (max-width: 768px) {
  .brand-logo img { height: 88px; }
}
@media (max-width: 480px) {
  .brand-logo img { height: 68px; }
}

/* Allow logo to overflow the header bar without clipping */
#site-header { overflow: visible; }

/* ===== Hero scrim ===== */
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,27,63,0.55) 0%, rgba(11,27,63,0.20) 35%, rgba(11,27,63,0.78) 100%),
    radial-gradient(1200px 600px at 25% 35%, rgba(11,27,63,0.0), rgba(11,27,63,0.45));
}

/* ===== Section utilities ===== */
.section { padding: 96px 0; }
@media (max-width: 768px) { .section { padding: 64px 0; } }
.container-x { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Pattern overlay (subtle dot grid) */
.pattern-grid {
  background-image: radial-gradient(rgba(11,27,63,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.pattern-grid-dark {
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ===== Marquee (financing ribbon) ===== */
.marquee { overflow: hidden; position: relative; }
.marquee-track {
  display: flex; gap: 56px; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.fin-logo {
  height: 56px; min-width: 168px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 12px; padding: 0 24px;
  background: white; border: 1px solid rgba(11,27,63,0.08);
  font-weight: 700; color: var(--navy-900); letter-spacing: -0.01em;
}

/* ===== Cards ===== */
.card { background: white; border: 1px solid rgba(11,27,63,0.07); border-radius: 14px; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.card:hover { box-shadow: 0 18px 40px -16px rgba(11,27,63,0.15); transform: translateY(-2px); border-color: rgba(11,27,63,0.16); }

/* ===== Form controls ===== */
.input, .select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(11,27,63,0.18); background: white;
  font-size: 15px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { outline: none; border-color: var(--gold-600); box-shadow: 0 0 0 4px rgba(255,167,0,0.18); }
.label { font-size: 13px; font-weight: 600; color: rgba(11,27,63,0.75); margin-bottom: 6px; display: block; letter-spacing: 0.01em; }

/* ===== Toggles & checkboxes ===== */
.checkbox {
  appearance: none; width: 20px; height: 20px;
  border: 1.5px solid rgba(11,27,63,0.4); border-radius: 5px;
  display: inline-grid; place-content: center; cursor: pointer;
  transition: all .15s;
}
.checkbox:checked { background: var(--gold-500); border-color: var(--gold-600); }
.checkbox:checked::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--navy-900); font-size: 12px; }

/* ===== Step pill ===== */
.step-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.08); color: white; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
}
.step-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 4px rgba(255,199,0,0.18); }

/* ===== Cart badge ===== */
.cart-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--gold-500); color: var(--navy-900);
  border-radius: 999px; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; display: inline-grid; place-content: center; padding: 0 5px;
}

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy-900); color: white; padding: 14px 22px; border-radius: 12px;
  box-shadow: 0 18px 40px -10px rgba(0,0,0,0.35); z-index: 999; opacity: 0; transition: all .25s;
  font-weight: 500; display: flex; gap: 10px; align-items: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(7,15,37,0.6); backdrop-filter: blur(6px);
  display: none; place-items: center; z-index: 100; padding: 16px;
}
.modal-backdrop.show { display: grid; }
.modal {
  background: white; border-radius: 16px; max-width: 580px; width: 100%;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4);
  max-height: 90vh; overflow-y: auto;
}

/* ===== Mobile nav drawer ===== */
.mnav { position: fixed; inset: 0 0 0 auto; width: 86%; max-width: 360px;
        background: var(--navy-900); transform: translateX(100%); transition: transform .25s ease;
        z-index: 90; display: flex; flex-direction: column; padding: 80px 24px 24px; }
.mnav.show { transform: translateX(0); }
.mnav a { color: rgba(255,255,255,0.9); padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-weight: 500; }

/* ===== Tiny utilities ===== */
.text-balance { text-wrap: balance; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.divider-gold { height: 3px; width: 64px; background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); border-radius: 2px; }

/* Star accent (matches logo) */
.star-accent { color: var(--star); }

/* Section label */
.section-label { display:inline-flex; align-items:center; gap:10px; font-size:12px; font-weight:600; letter-spacing:.18em; text-transform:uppercase; color: var(--navy-700); }
.section-label::before { content:''; width:24px; height:2px; background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); border-radius: 2px; }

/* Trust badge */
.trust-badge {
  display:inline-flex; align-items:center; gap:8px; padding:6px 12px;
  border-radius:999px; background: rgba(11,27,63,0.05); color: var(--navy-900);
  font-size:12px; font-weight:600; border:1px solid rgba(11,27,63,0.1);
}

/* Ticker-style countdown */
.countdown { font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }

/* Specs table dark block */
.specs-dark {
  background: linear-gradient(180deg, #0F2451 0%, #0B1B3F 100%);
  color: rgba(255,255,255,0.9);
  border-radius: 14px; padding: 24px;
}
.specs-dark dt { color: rgba(255,255,255,0.55); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.specs-dark dd { font-weight: 600; font-size: 16px; margin-top: 2px; }
