/* ===========================================================
   MESSX — Commercial & Industrial Energy Storage
   Shared stylesheet
   Palette: eco / green + warm "energy" accent
   =========================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --bg: #f6fafc;
  --surface: #ffffff;
  --surface-alt: #eaf3f9;
  --surface-sand: #eef3f7;

  /* Ink / text */
  --ink: #474747;        /* brand dark gray (logo) */
  --ink-soft: #5c5c5c;
  --muted: #7a7b7e;

  /* Brand blue — RAL 5012 family (token names kept for compatibility) */
  --green-900: #06283a;
  --green-800: #0a4257;
  --green-700: #0b5e85;   /* brand primary (deep RAL 5012 blue) */
  --green-600: #0089b6;   /* RAL 5012 light blue */
  --green-500: #1aa0cf;
  --green-400: #57bfe2;
  --green-200: #b9e2f1;
  --green-100: #e2f3fa;

  /* Accent — brand orange #E19120 */
  --accent: #e19120;
  --accent-600: #c67c16;
  --accent-700: #a4660f;
  --accent-soft: #f9e7c9;

  /* Lines & misc */
  --line: #e0e8ee;
  --line-strong: #c9d4dc;

  /* Radii */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(8, 40, 58, .06), 0 1px 3px rgba(8, 40, 58, .05);
  --shadow: 0 10px 30px -12px rgba(8, 40, 58, .18);
  --shadow-lg: 0 28px 60px -24px rgba(8, 40, 58, .28);

  /* Layout */
  --container: 1180px;
  --nav-h: 72px;

  /* Type */
  --font-head: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-sm { padding-block: clamp(40px, 5vw, 64px); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-640 { max-width: 640px; }
.maxw-720 { max-width: 720px; }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-700);
  background: var(--accent-soft);
  padding: 6px 14px; border-radius: var(--r-pill);
}
.eyebrow.on-dark { color: #f3b15a; background: rgba(255,255,255,.10); }

.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-top: 18px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-soft); }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 14px 24px; border-radius: var(--r-pill); border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); color: #2a1c02; box-shadow: 0 8px 20px -8px rgba(196,122,16,.6); }
.btn-accent:hover { background: var(--accent-600); transform: translateY(-2px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--green-800); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--green-600); background: var(--green-100); }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost-light:hover { background: rgba(255,255,255,.2); }
.btn-lg { padding: 16px 30px; font-size: 1.06rem; }
.btn-block { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249, 251, 247, .82);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 800; font-size: 1.32rem; letter-spacing: -.01em; color: var(--green-800); }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand-logo { height: 38px; width: auto; max-width: 300px; display: block; object-fit: contain; }
.footer .brand-logo { height: 34px; background: none; padding: 0; max-width: 240px; }
.brand b { color: var(--green-600); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--font-head); font-weight: 500; font-size: .98rem; color: var(--ink-soft);
  padding: 9px 14px; border-radius: var(--r-pill); transition: background .18s ease, color .18s ease;
}
.nav-links a:hover { color: var(--green-800); background: var(--green-100); }
.nav-links a.active { color: var(--green-800); background: var(--green-100); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line-strong); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; }
.nav-toggle svg { width: 24px; height: 24px; color: var(--green-800); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 520px at 78% -8%, var(--green-100), transparent 60%),
    radial-gradient(760px 440px at -6% 14%, #eef5fb, transparent 55%);
}
.hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 56px; align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.85rem); }
.hero h1 .grad { background: linear-gradient(95deg, var(--accent), var(--accent-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 22px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 34px; color: var(--muted); font-size: .92rem; }
.hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-400); }
.hero-trust span { display: inline-flex; align-items: center; gap: 9px; }

/* Hero visual card */
.hero-visual { position: relative; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 26px; position: relative; overflow: hidden;
}
.hero-card .spark { position: absolute; inset: 0; z-index: 0; opacity: .5; }
.hero-card .inner { position: relative; z-index: 1; }
.hero-stat-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hero-stat-row .big { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: var(--green-700); letter-spacing: -.03em; }
.hero-pill { font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--green-700); background: var(--green-100); padding: 6px 12px; border-radius: var(--r-pill); }
.bar-track { height: 12px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; margin-top: 8px; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.mini { background: var(--surface-alt); border-radius: var(--r); padding: 14px 16px; }
.mini .k { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--ink); }
.mini .l { font-size: .82rem; color: var(--muted); }
.float-badge {
  position: absolute; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: var(--r); padding: 12px 15px; display: flex; align-items: center; gap: 11px;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
}
.float-badge svg { width: 22px; height: 22px; }
.float-badge.b1 { right: -14px; top: 26px; }
.float-badge.b2 { left: 14px; bottom: -48px; }
.float-badge .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); }

/* ---------- Logo / trust strip ---------- */
.trustbar { border-block: 1px solid var(--line); background: var(--surface); }
.trustbar .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 22px; }
.trustbar .label { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--font-head); font-weight: 600; }
.trustbar .logos { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; color: var(--ink-soft); font-family: var(--font-head); font-weight: 700; opacity: .68; }
.trustbar .logos span { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem; }

/* ---------- Stats band ---------- */
.statband { background: var(--green-800); color: #eaf4ee; }
.statband .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.statband .grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; text-align: center; }
@media (max-width: 980px) { .statband .grid5 { grid-template-columns: repeat(3, 1fr); row-gap: 34px; } }
@media (max-width: 760px) { .statband .grid5 { grid-template-columns: 1fr; gap: 30px; } }
.statband .num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4vw, 2.9rem); color: #fff; letter-spacing: -.02em; }
.statband .cap { color: var(--green-200); font-size: .95rem; margin-top: 4px; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 22px; }
.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(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-200); }
.card .ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); margin-bottom: 18px;
}
.card .ic svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.22rem; }
.card p { color: var(--ink-soft); margin-top: 8px; font-size: .98rem; }
.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--green-700); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
.card .more svg { width: 16px; height: 16px; transition: transform .18s ease; }
.card:hover .more svg { transform: translateX(3px); }

/* Feature row (alternating) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.feature.reverse .feature-media { order: 2; }
.feature-media {
  background: linear-gradient(160deg, var(--green-100), var(--surface-alt));
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; min-height: 300px;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.feature h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.checklist { margin-top: 20px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.checklist .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; margin-top: 2px; }
.checklist .tick svg { width: 14px; height: 14px; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.step .n { font-family: var(--font-head); font-weight: 800; font-size: 1rem; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green-700); color: #fff; margin-bottom: 16px; }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-soft); font-size: .95rem; margin-top: 6px; }

/* Industries */
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ind {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s ease, transform .18s ease;
}
.ind:hover { border-color: var(--green-200); transform: translateY(-3px); }
.ind .ic { width: 42px; height: 42px; border-radius: 11px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; flex: none; }
.ind .ic svg { width: 22px; height: 22px; }
.ind b { font-family: var(--font-head); font-size: 1rem; }
.ind small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--green-800), var(--green-600));
  color: #fff; padding: clamp(40px, 5vw, 64px); text-align: center;
}
.cta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(244,165,42,.35), transparent 70%); }
.cta h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); position: relative; }
.cta p { color: #d9ece1; margin-top: 14px; max-width: 600px; margin-inline: auto; position: relative; }
.cta .hero-actions { justify-content: center; position: relative; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: clamp(26px, 4vw, 40px); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--ink); }
.field label .req { color: var(--accent-700); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 13px 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-500); background: #fff; box-shadow: 0 0 0 4px var(--green-100);
}
.field .hint { font-size: .82rem; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.form-success { display: none; align-items: flex-start; gap: 12px; background: var(--green-100); border: 1px solid var(--green-200); border-radius: var(--r); padding: 16px 18px; color: var(--green-800); margin-bottom: 18px; }
.form-success svg { width: 22px; height: 22px; flex: none; color: var(--green-600); }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 22px; box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-family: var(--font-head); font-weight: 600; font-size: 1.06rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; transition: transform .2s ease; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .ans { padding: 0 0 20px; color: var(--ink-soft); }

/* ---------- Article cards ---------- */
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .22s ease; display: flex; flex-direction: column; }
.article:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article .thumb { height: 170px; display: grid; place-items: center; color: #fff; }
.article .body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.article .tag { font-family: var(--font-head); font-weight: 600; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green-600); }
.article h3 { font-size: 1.18rem; margin-top: 8px; }
.article p { color: var(--ink-soft); font-size: .96rem; margin-top: 8px; }
.article .more { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 6px; color: var(--green-700); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }

/* ---------- Page header (interior pages) ---------- */
.page-head { background: linear-gradient(180deg, var(--green-100), var(--bg)); border-bottom: 1px solid var(--line); }
.page-head .container { padding-block: clamp(48px, 6vw, 80px); }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); max-width: 760px; }
.page-head p { margin-top: 16px; max-width: 620px; }
.crumbs { font-size: .88rem; color: var(--muted); font-family: var(--font-head); font-weight: 500; margin-bottom: 14px; }
.crumbs a:hover { color: var(--green-700); }

/* ---------- Footer ---------- */
.footer { background: var(--green-900); color: #c9d8ce; }
.footer a { color: #c9d8ce; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-block: 64px; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .brand b { color: var(--green-400); }
.footer p.about { color: #9fb3a6; max-width: 320px; font-size: .96rem; }
.footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; font-size: .96rem; }
.footer .contact-line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .96rem; }
.footer .contact-line svg { width: 18px; height: 18px; color: var(--green-400); flex: none; margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; color: #8fa498; }
.footer-bottom .socials { display: flex; gap: 10px; }
.footer-bottom .socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.footer-bottom .socials a:hover { background: var(--green-600); }
.footer-bottom .socials svg { width: 18px; height: 18px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: 0; }
.badge-soft { display: inline-flex; align-items: center; gap: 7px; background: var(--accent-soft); color: var(--accent-700); font-family: var(--font-head); font-weight: 600; font-size: .82rem; padding: 6px 13px; border-radius: var(--r-pill); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 480px; }
  .feature { grid-template-columns: 1fr; gap: 30px; }
  .feature.reverse .feature-media { order: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 1120px) {
  .nav-links, .nav-cta .btn-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 24px 22px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open .nav-links a { padding: 13px 14px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta .btn-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 24px 22px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open .nav-links a { padding: 13px 14px; }
  .grid-2, .grid-3, .grid-4, .ind-grid, .statband .grid4 { grid-template-columns: 1fr; }
  .statband .grid4 { gap: 30px; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
