/* =====================================================================
   Solar Company - Design System
   Palette: deep navy + solar gold on clean whites. One family: Manrope.
   Signature motif: the solar-cell grid (thin busbar lines) used in
   hero/page-hero/footer backgrounds and the gold "busbar" active marker.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy-950: #071A33;
  --navy-900: #0B2545;
  --navy-800: #0F2F57;
  --navy-700: #13315C;
  --navy-300: #8FA3C0;
  --navy-100: #E6ECF5;
  --gold-500: #F2B134;
  --gold-600: #D99A1B;
  --gold-100: #FDF3DC;
  --green-600: #2E8B6B;
  --ink: #18212C;
  --muted: #566274;
  --line: #E3E8EF;
  --mist: #F5F7FA;
  --white: #FFFFFF;
  --danger: #B3261E;
  --success: #1E7A4F;

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(11,37,69,.06), 0 2px 8px rgba(11,37,69,.05);
  --shadow-md: 0 8px 28px rgba(11,37,69,.12);

  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(2.5rem, 5.5vw, 4.5rem);
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 .6em; color: var(--navy-900); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-500); color: var(--navy-950); }

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--gold-500); color: var(--navy-950); padding: .6rem 1rem; border-radius: var(--radius-sm); font-weight: 700; z-index: 200; transition: top .2s; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy-900); color: #D5DEEC; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section-head { max-width: 720px; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); line-height: 1.6; max-width: 62ch; }
.section--navy .lead, .page-hero .lead { color: #B9C7DD; }
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.25rem); align-items: center; }
.stack > * + * { margin-top: 1rem; }
.text-center { text-align: center; }

/* Solar-cell grid motif (use on dark backgrounds) */
.cell-grid {
  background-image:
    linear-gradient(rgba(143,163,192,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,163,192,.10) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.5rem; border: 2px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--gold-500); color: var(--navy-950); }
.btn--gold:hover { background: var(--gold-600); color: var(--navy-950); }
.btn--navy { background: var(--navy-900); color: var(--white); }
.btn--navy:hover { background: var(--navy-700); color: var(--white); }
.btn--outline { border-color: var(--navy-900); color: var(--navy-900); background: transparent; }
.btn--outline:hover { background: var(--navy-900); color: var(--white); }
.btn--outline-light { border-color: rgba(255,255,255,.55); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--navy-900); border-color: var(--white); }
.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn--sm { padding: .5rem 1rem; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.link-arrow::after { content: ""; width: .5em; height: .5em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.link-arrow:hover::after { transform: rotate(45deg) translate(2px,-2px); }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy-900); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand:hover { color: var(--navy-900); }
.brand--light, .brand--light:hover { color: var(--white); }
.brand__mark { flex: none; }
.nav__menu { display: flex; align-items: center; gap: 1.5rem; }
.nav__list { display: flex; align-items: center; gap: .25rem; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link { position: relative; display: block; padding: .6rem .85rem; font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; transition: color .2s; }
.nav__link::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 3px; background: var(--gold-500); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav__link:hover { color: var(--navy-900); }
.nav__link:hover::after, .nav__item.is-active > .nav__link::after { transform: scaleX(1); }
.nav__item.is-active > .nav__link { color: var(--navy-900); font-weight: 800; }

/* Dropdown */
.dropdown-toggle { width: 22px; height: 22px; margin-left: -.5rem; border: 0; background: none; cursor: pointer; position: relative; }
.dropdown-toggle::before { content: ""; position: absolute; inset: 6px 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px,-2px); transition: transform .2s; }
.dropdown { position: absolute; top: 100%; left: 0; min-width: 260px; padding: .5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.dropdown a { display: block; padding: .6rem .85rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none; }
.dropdown a:hover { background: var(--mist); color: var(--navy-900); }
.has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown, .has-dropdown.open > .dropdown { opacity: 1; visibility: visible; transform: none; }

/* Mobile toggle */
.nav__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; padding: 0; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform .25s, opacity .2s, top .25s; }
.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 28px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; background-color: var(--navy-900); color: var(--white); padding-block: clamp(2.25rem, 5vw, 3.75rem); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(242,177,52,.28), transparent 68%); pointer-events: none; }
.page-hero h1 { color: var(--white); max-width: 18ch; margin-bottom: .4em; }
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; font-size: .88rem; color: #B9C7DD; }
.breadcrumb a { color: #D5DEEC; text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-500); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--navy-300); }

/* ---------- Cards / badges ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.5rem; transition: border-color .2s, box-shadow .2s; }
a.card { display: block; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--navy-300); box-shadow: var(--shadow-md); }
.card--flat:hover { border-color: var(--line); box-shadow: none; }
.card__icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 1.1rem; border-radius: var(--radius-sm); background: var(--navy-900); color: var(--gold-500); }
.badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--gold-100); color: #7A5200; }
.badge--navy { background: var(--navy-100); color: var(--navy-800); }
.badge--green { background: #E2F3EC; color: #19634A; }
.badge--grey { background: #ECEFF3; color: var(--muted); }
.check-list li { position: relative; padding-left: 1.75rem; margin-bottom: .55rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 1rem; height: .5rem; border-left: 2.5px solid var(--green-600); border-bottom: 2.5px solid var(--green-600); transform: rotate(-45deg) scale(.85); transform-origin: left; }

/* ---------- Stats ---------- */
.stat__value { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; line-height: 1; color: var(--gold-500); letter-spacing: -.03em; }
.stat__label { margin-top: .5rem; color: #B9C7DD; font-size: .95rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .9rem; color: var(--navy-900); }
.field .req { color: var(--danger); }
.input, .select, .textarea { width: 100%; padding: .8rem 1rem; border: 1.5px solid #C9D2DF; border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: var(--white); transition: border-color .2s, box-shadow .2s; }
.textarea { min-height: 140px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--navy-300); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(19,49,92,.14); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .84rem; font-weight: 600; }
.field-hint { color: var(--muted); font-size: .84rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid; font-weight: 600; margin-bottom: 1.25rem; }
.alert--success { background: #E8F6EF; border-color: #A6D9C0; color: #14573A; }
.alert--error { background: #FDECEA; border-color: #F2B8B5; color: #7A1913; }

/* ---------- Accordion (FAQ) - native <details> ---------- */
.accordion { display: grid; gap: .75rem; }
.accordion details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); }
.accordion details[open] { border-color: var(--navy-300); box-shadow: var(--shadow-sm); }
.accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; font-weight: 700; color: var(--navy-900); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; flex: none; width: .6rem; height: .6rem; border-right: 2.5px solid var(--gold-600); border-bottom: 2.5px solid var(--gold-600); transform: rotate(45deg); transition: transform .25s; }
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion .answer { padding: 0 1.4rem 1.25rem; color: var(--muted); }

/* ---------- Pagination / tables ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 2.5rem; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 .9rem; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; color: var(--navy-900); }
.pagination a:hover { border-color: var(--navy-900); }
.pagination .is-current { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
.pagination .is-disabled { color: #A3ADBB; background: var(--mist); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--mist); color: var(--navy-900); font-weight: 800; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* Rich text from the blog editor */
.prose { max-width: 72ch; font-size: 1.08rem; line-height: 1.8; }
.prose h2 { margin-top: 2em; font-size: 1.7rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.2em; }
.prose ol { list-style: decimal; padding-left: 1.4rem; margin-bottom: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius-md); margin-block: 1.5rem; }
.prose blockquote { margin: 1.5rem 0; padding: .5rem 1.25rem; border-left: 4px solid var(--gold-500); color: var(--muted); font-style: italic; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--navy-900); color: #D5DEEC; border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.75rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band h2 { color: var(--white); margin: 0 0 .4rem; }
.cta-band p { margin: 0; color: #B9C7DD; }
.cta-band__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #A9B8CF; font-size: .95rem; margin-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(143,163,192,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(143,163,192,.06) 1px, transparent 1px); background-size: 56px 56px; pointer-events: none; }
.site-footer a { color: #D5DEEC; text-decoration: none; }
.site-footer a:hover { color: var(--gold-500); }
.footer__grid { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: clamp(1.5rem, 4vw, 3rem); padding-block: clamp(2.25rem, 5vw, 3.25rem); }
.footer__about p { margin-top: 1rem; max-width: 38ch; }
.footer__title { font-size: 1rem; color: var(--white); margin-bottom: 1rem; letter-spacing: 0; }
.footer__col li { margin-bottom: .55rem; }
.footer__col address { font-style: normal; }
.footer__col address p { margin-bottom: .55rem; }
.social { display: flex; gap: .6rem; margin-top: 1.25rem; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; transition: background-color .2s, color .2s, border-color .2s; }
.social a:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-950); }
.footer__bottom { position: relative; border-top: 1px solid rgba(255,255,255,.1); }
.footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; padding-block: 1.25rem; font-size: .88rem; }
.footer__bottom p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

.whatsapp-float { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #25D366; color: var(--white); box-shadow: var(--shadow-md); transition: transform .2s; }
.whatsapp-float:hover { transform: scale(1.07); color: var(--white); }

/* ---------- Reveal (opt-in via data-reveal; JS adds .is-visible) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__link { padding-inline: .6rem; font-size: .9rem; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav__toggle { display: block; }
  .nav__menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem var(--gutter) 1.5rem; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); max-height: calc(100vh - var(--header-h)); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav__link { flex: 1; padding: .95rem .25rem; font-size: 1rem; }
  .nav__link::after { left: .25rem; right: auto; width: 28px; bottom: .55rem; }
  .dropdown-toggle { width: 44px; height: 44px; margin: 0; }
  .dropdown-toggle::before { inset: 17px 16px; }
  .has-dropdown.open > .dropdown-toggle::before { transform: rotate(-135deg); }
  .dropdown { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 .5rem .75rem; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-dropdown:hover > .dropdown { display: none; }
  .has-dropdown.open > .dropdown { display: block; }
  .nav__cta { width: 100%; }
  .split { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4, .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-band { text-align: left; }
  .cta-band__actions, .cta-band__actions .btn { width: 100%; }
  .brand__text { font-size: 1.02rem; }
}
@media (max-width: 360px) { .brand__text { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Logo ---------- */
.brand__logo { height: 48px; width: auto; }
.footer-logo { display: inline-block; padding: .6rem .9rem; background: var(--white); border-radius: var(--radius-md); }
.footer-logo img { height: 52px; width: auto; }
@media (max-width: 900px) { .brand__logo { height: 42px; } }

/* ---------- Lightbox (click an image with [data-lightbox]) ---------- */
[data-lightbox] { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1.5rem; background: rgba(7,26,51,.9); opacity: 0; transition: opacity .2s; }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 3rem); width: auto; height: auto; border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0,0,0,.5); cursor: zoom-out; }
.lightbox__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--white); color: var(--navy-900); font-size: 26px; line-height: 1; cursor: pointer; }
