/* =========================================================
   Solar Pal — Main Stylesheet
   Brand language matches decgroup.pro / aitoolkit.decgroup.pro
   Navy: #1d283a | Red: #ef4343 | Solar Amber: #f59e0b | White: #fff | Light: #f1f5f9
   Font: DM Sans
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1d283a;
  --navy2:      #253047;
  --navy3:      #2e3c56;
  --red:        #ef4343;
  --red-dim:    #d63b3b;
  --red-tint:   rgba(239, 67, 67, 0.1);
  --solar:      #f59e0b;
  --solar-dim:  #d97f06;
  --solar-tint: rgba(245, 158, 11, 0.12);
  --check:      #16a34a;
  --white:      #ffffff;
  --light:      #f1f5f9;
  --light2:     #e2e8f0;
  --body-txt:   #65758b;
  --dark-txt:   #1d283a;
  --font:       'DM Sans', sans-serif;
  --max-w:      1200px;
  --radius:     8px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px rgba(29, 40, 58, 0.10);
  --shadow-lg:  0 8px 40px rgba(29, 40, 58, 0.16);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--body-txt);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  color: var(--dark-txt);
  line-height: 1.18;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { line-height: 1.7; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section        { padding: 5rem 0; }
.section--tight { padding: 3rem 0; }
.bg-navy  { background: var(--navy); }
.bg-light { background: var(--light); }
.bg-white { background: var(--white); }

.section-heading { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-heading--left { margin: 0 0 3rem; text-align: left; }
.section-heading__eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.section-heading__rule {
  width: 48px; height: 4px; background: var(--red); border-radius: 4px;
  margin: 1rem auto 0;
}
.section-heading--left .section-heading__rule { margin: 1rem 0 0; }
.section-heading p { margin-top: 1rem; }

/* =========================================================
   SKIP LINK + NAV
   ========================================================= */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--red); color: var(--white);
  padding: 0.5rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid var(--navy3);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 1.5rem;
}
.nav__logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1.15rem; color: var(--white);
}
.nav__logo svg { width: 28px; height: 28px; color: var(--solar); }

.nav__links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav__links a {
  font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.85);
  padding: 0.45rem 0.85rem; border-radius: var(--radius);
  transition: color 0.18s, background 0.18s;
}
.nav__links a:hover, .nav__links a.active {
  color: var(--white); background: rgba(255,255,255,0.08);
}
.nav__links .nav__cta {
  background: var(--red); color: var(--white); padding: 0.45rem 1.1rem; font-weight: 600;
}
.nav__links .nav__cta:hover { background: var(--red-dim); }

.nav__toggle {
  display: none; background: none; border: none; color: var(--white);
  cursor: pointer; padding: 0.25rem; font-size: 1.4rem; line-height: 1;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  padding: 0.75rem 1.6rem; border-radius: var(--radius);
  cursor: pointer; border: 2px solid transparent; transition: all 0.18s ease;
  white-space: nowrap; text-decoration: none;
}
.btn--primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn--primary:hover { background: var(--red-dim); border-color: var(--red-dim); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }
.btn--outline:hover { border-color: var(--white); background: rgba(255,255,255,0.07); }
.btn--outline-dark { background: transparent; color: var(--dark-txt); border-color: var(--light2); }
.btn--outline-dark:hover { border-color: var(--dark-txt); }
.btn--lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* =========================================================
   HERO
   ========================================================= */
.hero { background: var(--navy); padding: 5rem 0 5rem; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; top: -30%; right: -5%; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(245,158,11,0.14) 0%, transparent 60%);
  pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; align-items: center; position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--solar-tint); color: var(--solar);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.35rem 0.8rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero__title { color: var(--white); margin-bottom: 1.1rem; }
.hero__title em { color: var(--solar); font-style: normal; }
.hero__desc { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 540px; margin-bottom: 1.75rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero__stats { display: flex; gap: 2.25rem; flex-wrap: wrap; }
.hero__stats .stat__num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--white); }
.hero__stats .stat__label { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* Phone mockup */
.phone-mockup { width: 280px; margin: 0 auto; background: var(--navy2); border: 1px solid var(--navy3); border-radius: 32px; padding: 0.9rem; box-shadow: var(--shadow-lg); }
.phone-mockup__screen { background: var(--white); border-radius: 22px; overflow: hidden; }
.phone-mockup__bar { display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: var(--white); font-size: 0.7rem; font-weight: 700; padding: 0.6rem 1rem; }
.phone-mockup__body { padding: 1rem; }
.phone-mockup__row { display: flex; align-items: center; justify-content: space-between; padding: 0.55rem 0; border-bottom: 1px solid var(--light2); font-size: 0.85rem; }
.phone-mockup__row:last-child { border-bottom: none; }
.phone-mockup__row span:first-child { color: var(--body-txt); }
.phone-mockup__row strong { color: var(--dark-txt); }
.phone-mockup__chart { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-top: 0.85rem; }
.phone-mockup__chart i { display: block; flex: 1; background: var(--solar); border-radius: 2px 2px 0 0; opacity: 0.85; }
.phone-mockup__chart i:nth-child(12), .phone-mockup__chart i:nth-child(1) { background: var(--red); }
.phone-mockup__caption { text-align: center; font-size: 0.7rem; color: var(--body-txt); margin-top: 0.4rem; }

/* =========================================================
   TRUST STRIP
   ========================================================= */
.trust-strip { background: var(--light); border-bottom: 1px solid var(--light2); }
.trust-strip__grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.75rem 2.5rem;
  padding: 1.5rem 0; text-align: center;
}
.trust-strip__item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--dark-txt); }
.trust-strip__item svg { width: 18px; height: 18px; color: var(--check); flex-shrink: 0; }

/* =========================================================
   CARD GRIDS
   ========================================================= */
.grid { display: grid; gap: 1.75rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.icon-card {
  background: var(--white); border: 1px solid var(--light2); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: 0 2px 8px rgba(29,40,58,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.icon-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.icon-card__icon {
  width: 46px; height: 46px; border-radius: var(--radius); background: var(--red-tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.icon-card__icon svg { width: 24px; height: 24px; color: var(--red); }
.icon-card__icon--solar { background: var(--solar-tint); }
.icon-card__icon--solar svg { color: var(--solar); }
.icon-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.icon-card p { font-size: 0.92rem; }

/* =========================================================
   STEPS (3-step wizard)
   ========================================================= */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
.step {
  background: var(--white); border: 1px solid var(--light2); border-radius: var(--radius-lg);
  padding: 2rem 1.75rem; box-shadow: 0 2px 8px rgba(29,40,58,0.06); position: relative;
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white);
  font-weight: 800; font-size: 1.1rem; margin-bottom: 1.1rem;
}
.step h3 { margin-bottom: 0.6rem; }
.step p { font-size: 0.92rem; }

/* =========================================================
   TABLE (battery chemistry)
   ========================================================= */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--light2); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--white); }
table.data-table th, table.data-table td { padding: 0.95rem 1.25rem; text-align: left; font-size: 0.92rem; border-bottom: 1px solid var(--light2); }
table.data-table th { background: var(--navy); color: var(--white); font-weight: 700; white-space: nowrap; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:nth-child(even) td { background: var(--light); }
table.data-table td strong { color: var(--dark-txt); }

/* =========================================================
   LOSS LIST
   ========================================================= */
.loss-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.loss-item {
  display: flex; align-items: flex-start; gap: 1rem; background: var(--white);
  border: 1px solid var(--light2); border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.loss-item__pct {
  flex-shrink: 0; min-width: 52px; text-align: center; font-weight: 800; font-size: 1.05rem;
  color: var(--red); background: var(--red-tint); border-radius: var(--radius); padding: 0.4rem 0;
}
.loss-item h4 { font-size: 0.95rem; color: var(--dark-txt); margin-bottom: 0.25rem; }
.loss-item p { font-size: 0.85rem; margin: 0; }

/* =========================================================
   WIRING DEMO
   ========================================================= */
.wiring-demo { display: flex; flex-wrap: wrap; gap: 1rem; }
.wiring-demo__string { display: flex; gap: 0.4rem; }
.wiring-demo__cell {
  width: 38px; height: 54px; border-radius: 6px; background: var(--navy);
  display: flex; align-items: center; justify-content: center; color: var(--white);
  font-size: 0.65rem; font-weight: 700;
}

/* =========================================================
   PLATFORM CARDS
   ========================================================= */
.platform-card {
  background: var(--white); border: 1px solid var(--light2); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: 0 2px 8px rgba(29,40,58,0.06);
}
.platform-card__icon { width: 44px; height: 44px; color: var(--navy); margin-bottom: 1rem; }
.platform-card ol { list-style: decimal; padding-left: 1.2rem; margin: 1rem 0; }
.platform-card ol li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.platform-card .req-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--navy);
  background: var(--light); border-radius: 999px; padding: 0.3rem 0.8rem; margin-top: 0.5rem;
}

/* =========================================================
   FAQ ACCORDION
   ========================================================= */
.faq-item { border-bottom: 1px solid var(--light2); }
.faq-item:first-child { border-top: 1px solid var(--light2); }
.faq-item__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 1.25rem 0; font-family: var(--font); font-size: 1rem; font-weight: 700; color: var(--dark-txt);
}
.faq-item__q svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--red); transition: transform 0.2s; }
.faq-item__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item__a p { padding: 0 0 1.25rem; font-size: 0.95rem; }

/* =========================================================
   CTA BANNER
   ========================================================= */
.cta-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); border-radius: var(--radius-lg); padding: 3rem 2.5rem; text-align: center; position: relative; overflow: hidden; }
.cta-banner::after {
  content: ''; position: absolute; bottom: -40%; left: -10%; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,158,11,0.16) 0%, transparent 65%);
}
.cta-banner h2 { color: var(--white); position: relative; z-index: 1; }
.cta-banner p { color: rgba(255,255,255,0.75); max-width: 520px; margin: 0.85rem auto 1.75rem; position: relative; z-index: 1; }
.cta-banner .hero__actions { justify-content: center; position: relative; z-index: 1; margin-bottom: 0; }

/* =========================================================
   CALLOUT / DISCLAIMER BOX
   ========================================================= */
.callout {
  border-left: 4px solid var(--red); background: var(--red-tint); border-radius: var(--radius);
  padding: 1.1rem 1.4rem; font-size: 0.92rem; color: var(--dark-txt);
}
.callout--solar { border-left-color: var(--solar); background: var(--solar-tint); }
.callout strong { color: var(--dark-txt); }

/* =========================================================
   PRICING / LICENSE
   ========================================================= */
.license-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.license-card { background: var(--white); border: 1px solid var(--light2); border-radius: var(--radius-lg); padding: 2rem; }
.license-card h3 { margin-bottom: 1rem; }
.license-card ul li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.92rem; margin-bottom: 0.65rem; }
.license-card ul li svg { width: 16px; height: 16px; color: var(--check); margin-top: 0.2rem; flex-shrink: 0; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: 4.5rem 0 0; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer__logo { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-weight: 800; font-size: 1.1rem; color: var(--white); }
.footer__logo svg { width: 26px; height: 26px; color: var(--solar); }
.footer__tagline { font-size: 0.9rem; line-height: 1.7; }
.footer__col-title { color: var(--white); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.9rem; }
.footer__col ul li { margin-bottom: 0.6rem; }
.footer__col a { font-size: 0.88rem; transition: color 0.18s; }
.footer__col a:hover { color: var(--white); }
.footer__contact-item { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.88rem; margin-bottom: 0.6rem; }
.footer__contact-item span { flex-shrink: 0; color: var(--red); }
.footer__bottom {
  border-top: 1px solid var(--navy3); padding: 1.5rem 0; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem;
}
.footer__bottom a { color: rgba(255,255,255,0.4); }
.footer__bottom a:hover { color: rgba(255,255,255,0.75); }
.footer__bottom-links { display: flex; gap: 1.5rem; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 320px; margin: 0 auto 1rem; }
  .grid--3, .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .loss-list { grid-template-columns: 1fr; }
  .license-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .nav__links { display: none; }
}

@media (max-width: 600px) {
  .section { padding: 3.25rem 0; }
  .grid--3, .grid--4, .grid--5, .grid--2 { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.5rem; }
  .nav__toggle { display: block; }
  .nav__links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--navy); flex-direction: column; align-items: stretch;
    padding: 0.75rem 1.5rem 1.25rem; border-bottom: 1px solid var(--navy3); gap: 0.25rem;
  }
  .nav__links.is-open { display: flex; }
  .nav__links .nav__cta { text-align: center; margin-top: 0.5rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
