:root {
  --primary: #223148;
  --accent: #00bca0;
  --soft-bg: #f4f6fb;
  --text: #223148;
  --white: #ffffff;
  --line: #d8dee9;
  --hero-overlay: rgba(15, 23, 42, 0.54);
  --card-shadow: 0 20px 45px rgba(10, 15, 30, 0.16);
  --radius: 14px;
  --container: min(1200px, 92vw);
}

* {
  box-sizing: border-box;
  font-family: "Manrope", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--soft-bg);
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.top-banner {
  background: linear-gradient(100deg, #1a2640 0%, #2f4466 100%);
  color: #dce6ff;
  text-align: center;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(34, 49, 72, 0.95);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header .container {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo img {
  height: 64px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #ebf0ff;
  font-weight: 600;
  font-size: 0.94rem;
}

.nav a {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 1;
}

.menu-btn {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9px;
  background: transparent;
  color: #fff;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

.hero {
  min-height: 78vh;
  position: relative;
  display: grid;
  place-items: center;
  color: #fff;
  background-image:
    linear-gradient(var(--hero-overlay), var(--hero-overlay)),
    url("https://macwatts.pt/wp-content/uploads/2025/03/solar-panels-roof-solar-cell-1-1.jpg");
  background-size: cover;
  background-position: center;
}

.hero-content {
  width: var(--container);
  text-align: center;
  display: grid;
  gap: 18px;
  padding: 88px 0;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.84rem;
  font-weight: 700;
  color: #99f4e4;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.08;
  font-weight: 800;
}

.hero p {
  margin: 0 auto;
  width: min(760px, 100%);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
  color: #d7e2f7;
}

.hero-actions {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 184px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #043f3a;
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 26px;
  display: grid;
  gap: 8px;
}

.section-head p {
  margin: 0;
  color: #5a6a86;
  max-width: 760px;
  line-height: 1.6;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-transform: uppercase;
  line-height: 1.15;
}

.solutions-grid,
.news-grid,
.numbers-grid {
  display: grid;
  gap: 18px;
}

.solutions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.numbers-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 280px;
  color: #fff;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 16, 28, 0.88), rgba(11, 16, 28, 0.2));
}

.card-body {
  position: relative;
  z-index: 1;
  padding: 20px;
  display: grid;
  gap: 8px;
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.card p {
  margin: 0;
  color: #d8def0;
  font-size: 0.94rem;
}

.card a {
  margin-top: 6px;
  color: #88ffe6;
  font-weight: 700;
  font-size: 0.88rem;
}

.mission-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.mission-text,
.simulator-box {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 24px;
}

.mission-text p {
  margin: 0;
  line-height: 1.7;
  color: #4f5f7b;
}

.numbers {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(160deg, #f5f8ff 0%, #ffffff 100%);
}

.metric strong {
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--primary);
  margin-bottom: 6px;
}

.metric span {
  color: #5c6b87;
  font-weight: 600;
  font-size: 0.93rem;
}

.simulator-box {
  background: linear-gradient(135deg, #0c1526 0%, #243654 100%);
  color: #f4f9ff;
  border: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.simulator-box p {
  margin: 0;
  color: #d8e5ff;
  line-height: 1.6;
}

.simulator-box .btn-primary {
  width: fit-content;
}

.news {
  background: linear-gradient(180deg, #f4f6fb 0%, #eef2f8 100%);
}

.news-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  grid-template-rows: 220px 1fr;
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card .content {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.news-card h3 {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.3;
}

.news-card p {
  margin: 0;
  color: #546480;
  font-size: 0.94rem;
  line-height: 1.55;
}

.footer {
  background: #111b2f;
  color: #d9e7ff;
  padding: 46px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}

.footer h4 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1rem;
}

.footer p,
.footer a {
  margin: 0;
  color: #bed2f6;
  line-height: 1.6;
  font-size: 0.92rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding-top: 15px;
  font-size: 0.84rem;
  color: #9db5de;
}

.mobile-nav {
  display: none;
  background: #17253c;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.mobile-nav.open {
  display: grid;
  padding: 8px 0 12px;
}

.mobile-nav a {
  padding: 11px 4vw;
  color: #ecf3ff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-weight: 600;
  font-size: 0.93rem;
}

@media (max-width: 1024px) {
  .solutions-grid {
    grid-template-columns: 1fr;
  }

  .mission-wrap,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .numbers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .header .container {
    min-height: 76px;
  }

  .logo img {
    height: 44px;
  }
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }

  .top-banner {
    font-size: 0.76rem;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content {
    padding: 66px 0;
  }

  .numbers-grid {
    grid-template-columns: 1fr;
  }
}
