/* ============================================================
   PrestaFormance — Design System
   Palette: blue #013A6F (trust) + green #1F9D6B (renewable energy)
   Fonts: Poppins (headings) / Inter (body)
   ============================================================ */

:root {
  --primary: #013A6F;
  --primary-700: #012a4f;
  --primary-600: #0B6E9E;
  --accent: #1F9D6B;
  --accent-600: #17855a;
  --bg: #F7F9FB;
  --surface: #FFFFFF;
  --text: #1A2230;
  --muted: #5B6675;
  --border: #E6EBF0;
  --warning: #E0A200;
  --error: #D64545;
  --success: #1F9D6B;

  --grad-hero: linear-gradient(135deg, #013A6F 0%, #0B6E9E 60%, #1F9D6B 130%);
  --grad-soft: linear-gradient(135deg, #EAF2F9 0%, #EAF6F0 100%);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(1,58,111,.06);
  --shadow: 0 8px 24px rgba(1,58,111,.08);
  --shadow-lg: 0 18px 48px rgba(1,58,111,.14);

  --container: 1200px;
  --gutter: 24px;

  --font-h: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-b: "Inter", "Segoe UI", system-ui, sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-b);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-h); line-height: 1.2; color: var(--primary); margin: 0 0 var(--s-4); font-weight: 700; }
h1 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: clamp(19px, 2.2vw, 23px); }
p { margin: 0 0 var(--s-4); color: var(--text); }
a { color: var(--primary-600); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0 0 var(--s-4); padding-left: 1.1em; }
li { margin-bottom: var(--s-2); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--s-9) 0; }
.section-sm { padding: var(--s-8) 0; }
.section-alt { background: var(--surface); }
.lead { font-size: 19px; color: var(--muted); max-width: 70ch; }
.eyebrow { display: inline-block; font-family: var(--font-h); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-h); font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: var(--radius-sm); cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-700); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--primary); padding: 10px 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-h); font-weight: 800; color: var(--primary); font-size: 20px; }
.logo-img {
  height: 76px; width: auto; border-radius: 10px; object-fit: contain;
}
.site-footer .logo-img { height: 60px; filter: brightness(0) invert(1); }

/* Hero logo */
.hero-logo {
  width: 180px; height: auto; display: block; border-radius: 18px; margin: 0 auto var(--s-5);
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
  background: #fff; padding: 8px;
}

/* Centered hero layout (homepage) */
.hero-center .container { text-align: center; }
.hero-center .hero-actions { justify-content: center; }
.hero-center .hero-badges { justify-content: center; }
.nav-links { display: flex; align-items: center; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 500; color: var(--text); font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-cta { display: flex; align-items: center; gap: var(--s-3); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: var(--s-4) var(--gutter) var(--s-5); background: var(--surface); border-bottom: 1px solid var(--border); }
.mobile-menu a { padding: 12px 0; border-bottom: 1px solid var(--border); font-weight: 500; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background-color: var(--primary-700); overflow: hidden; background-size: cover; background-position: center; }
.hero::before { content:""; position:absolute; inset:0; background: linear-gradient(135deg, rgba(1,42,79,.90) 0%, rgba(11,110,158,.72) 60%, rgba(31,157,107,.55) 130%); z-index: 1; }
.hero::after { content:""; position:absolute; inset:0; background: radial-gradient(circle at 80% 20%, rgba(31,157,107,.35), transparent 45%); z-index: 1; }
.hero .container { position: relative; z-index: 2; padding: var(--s-9) var(--gutter); }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-5); }
.hero .btn-secondary { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-secondary:hover { background: #fff; color: var(--primary); }
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero-badges span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.trustbar .container { display: flex; flex-wrap: wrap; gap: var(--s-5); justify-content: space-between; padding: var(--s-5) var(--gutter); }
.trust-item { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--primary); font-size: 15px; }
.trust-item svg { color: var(--accent); }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-5); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e0ec; }
.card h3 { margin-bottom: var(--s-2); }
.card .icon-badge {
  width: 52px; height: 52px; border-radius: 12px; background: var(--grad-soft);
  display: grid; place-items: center; color: var(--primary); margin-bottom: var(--s-4);
}
.card .tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: #EAF6F0; padding: 4px 10px; border-radius: 999px; margin-bottom: var(--s-3); }
.card p { color: var(--muted); font-size: 15px; }
.card-media { margin: 0 0 16px; border-radius: 12px; overflow: hidden; height: 165px; background: #EAF2F9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover .card-media img { transform: scale(1.05); }

/* ---------- Placeholder image (swap with real photos) ---------- */
.img-ph {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #013A6F, #0B6E9E 55%, #1F9D6B);
  display: grid; place-items: center; color: #fff; text-align: center; min-height: 220px;
}
.img-ph span { font-family: var(--font-h); font-weight: 600; font-size: 14px; opacity: .92; padding: 0 16px; letter-spacing: .02em; }
.img-ph.tall { min-height: 320px; }
.img-ph.short { min-height: 160px; }
.img-ph::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.18), transparent 50%); }
.img-ph.has-img { background-image: none; }
.img-ph.has-img::before { display: none; }
.img-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.img-ph.tall img { min-height: 320px; }
.img-ph.short img { min-height: 160px; }

/* ---------- Section header ---------- */
.section-head { max-width: 760px; margin-bottom: var(--s-7); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); text-align: center; }
.stat .num { font-family: var(--font-h); font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--primary); }
.stat .label { color: var(--muted); font-size: 14px; }

/* ---------- Why choose / features ---------- */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list li svg { color: var(--accent); flex: none; margin-top: 4px; }

/* ---------- Testimonials ---------- */
.quote-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); }
.quote-card .stars { color: var(--warning); letter-spacing: 2px; }
.quote-card .who { font-weight: 600; color: var(--primary); margin-top: var(--s-3); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad-hero); color: #fff; border-radius: var(--radius-lg); padding: var(--s-8) var(--s-6); text-align: center; }
.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.9); margin: 0 auto var(--s-5); }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-b); font-size: 16px; background: #fff; color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.field .err { color: var(--error); font-size: 13px; margin-top: 4px; display: none; }
.field.invalid input { border-color: var(--error); }
.field.invalid .err { display: block; }
.form-note { font-size: 14px; color: var(--muted); }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: var(--s-4); font-weight: 500; }
.alert-success { background: #EAF6F0; color: var(--accent-600); border: 1px solid #bfe6d3; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--s-4); background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: var(--s-5); font-family: var(--font-h); font-weight: 600; font-size: 17px; color: var(--primary); cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-q .chev { transition: transform .25s ease; color: var(--accent); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 var(--s-5) var(--s-5); margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-700); color: rgba(255,255,255,.85); padding: var(--s-8) 0 var(--s-6); }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: var(--s-4); }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--s-6); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: var(--s-6); padding-top: var(--s-5); font-size: 14px; color: rgba(255,255,255,.6); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-contact li { list-style: none; margin-bottom: 8px; }

/* ---------- Sticky mobile call bar ---------- */
.sticky-call { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; gap: 10px; padding: 10px var(--gutter); background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.sticky-call a { flex: 1; justify-content: center; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: 14px; color: var(--muted); padding: var(--s-5) 0 0; }
.crumb a { color: var(--muted); }

/* ---------- Detail page layout ---------- */
.detail-hero { position: relative; background-color: #EAF2F9; overflow: hidden; padding: var(--s-8) 0; background-size: cover; background-position: center; }
.detail-hero::before { content:""; position:absolute; inset:0; background: rgba(247,249,251,.84); z-index: 1; }
.detail-hero .container { position: relative; z-index: 2; }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s-7); align-items: start; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); position: sticky; top: 90px; }
.meta-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.meta-row:last-child { border-bottom: 0; }
.meta-row svg { color: var(--accent); flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .side-card { position: static; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .section { padding: var(--s-8) 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .sticky-call { display: flex; }
  body { padding-bottom: 64px; }
}
@media (min-width: 769px) { .mobile-menu { display: none !important; } }

/* ===== Cool animations ===== */
/* Scroll progress bar (created by JS) */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--primary-600)); z-index: 100; transition: width .1s linear; }

/* Hero entrance (staggered) */
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero .eyebrow { animation: heroIn .7s ease .05s both; }
.hero-logo { animation: heroIn .7s ease .05s both; }
.hero h1 { animation: heroIn .85s ease .15s both; }
.hero .lead { animation: heroIn .85s ease .30s both; }
.hero-actions { animation: heroIn .85s ease .45s both; }
.hero-badges { animation: heroIn .85s ease .60s both; }

/* Floating hero badges */
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.hero-badges span { animation: floatY 5s ease-in-out infinite; }

/* Nav link underline */
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--primary); transition: width .25s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* Button shine sweep */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.btn:hover::after { left: 140%; }

/* CTA glow pulse */
@keyframes ctaGlow { 0%,100% { box-shadow: 0 8px 24px rgba(1,58,111,.10); } 50% { box-shadow: 0 12px 44px rgba(31,157,107,.35); } }
.cta-band { animation: ctaGlow 4.5s ease-in-out infinite; }

/* Stat number pop */
@keyframes popIn { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .eyebrow, .hero-logo, .hero h1, .hero .lead, .hero-actions, .hero-badges { animation: none; opacity: 1; transform: none; }
  .hero-badges span { animation: none; }
  .btn::after { display: none; }
  .cta-band { animation: none; }
  .scroll-progress { display: none; }
  html { scroll-behavior: auto; }
}
