/* IBM Plex Sans is self-hosted: one variable file covers every weight used here. */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('assets/fonts/ibm-plex-sans-latin.woff2') format('woff2');
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Colors come from the logo: the blue of the solar panel and the slate of the roof line. */
:root {
  --ink: #13212e;
  --ink-2: #2e3e4d;
  --muted: #586572;
  --paper: #f4f6f7;
  --mist: #e6ecf1;
  --line: #d6dde3;
  --accent: #1d5c99;
  --accent-deep: #164a7c;
  --accent-soft: #d7e5f3;
  --accent-light: #8fbde9;
  --white: #fff;
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h2 { font-size: clamp(32px, 3.4vw, 46px); }
h3 { font-size: 24px; }
[hidden] { display: none !important; }

.skip { position: fixed; left: 10px; top: -100px; z-index: 20; background: var(--white); padding: 12px 16px; }
.skip:focus { top: 10px; }

/* Small label; used only where it adds context. */
.kicker { font-size: 15px; font-weight: 600; color: var(--accent); }

/* Buttons */
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .15s, border-color .15s, color .15s;
}
.primary { background: var(--accent); color: var(--white); }
.primary:hover { background: var(--accent-deep); }
.ghost { border-color: var(--ink); }
.ghost:hover { background: var(--ink); color: var(--white); }
.outline { background: transparent; border-color: var(--ink); }
.outline:hover { background: var(--ink); color: var(--white); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  transition: text-decoration-color .15s;
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link::after { content: '→'; display: inline-block; transition: transform .15s; }
.text-link:hover::after { transform: translateX(3px); }

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  height: 88px;
  margin: auto;
  padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; line-height: 1.1; }
.brand img { width: 62px; height: auto; }
.brand small { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 3px; }
nav { display: flex; gap: 30px; align-items: center; font-size: 15px; font-weight: 500; }
nav a:not(.nav-cta) { padding: 6px 0; border-bottom: 3px solid transparent; transition: border-color .15s; }
nav a:not(.nav-cta):hover { border-color: var(--accent); }
.nav-cta { background: var(--ink); color: var(--white); padding: 11px 22px; border-radius: 3px; }
.nav-cta:hover { background: var(--ink-2); }
.menu-toggle { display: none; }

/* Hero: solid navy on the left for the copy; the video fills the right side and fades into it. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(540px, calc(100svh - 88px), 700px);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}
.hero-loop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 68%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 36%);
  mask-image: linear-gradient(90deg, transparent, #000 36%);
}
.hero-inner {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: auto;
  padding: clamp(48px, 9vh, 96px) var(--gutter);
}
.hero-inner > * { max-width: 600px; }
.hero .kicker { color: var(--accent-light); }
h1 { font-size: clamp(38px, 4.2vw, 58px); margin: 16px 0 22px; line-height: 1.1; }
h1 span { display: block; color: var(--accent-light); }
.hero-description { font-size: 18px; color: #c9d3dc; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 26px; }
.play-film { border-color: #ffffffb3; color: var(--white); }
.play-film:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.play-film svg { width: 18px; height: 18px; fill: currentColor; }
.play-film span { font-weight: 400; opacity: .75; }
.hero-footnote { font-size: 15px; color: #b9c5cf; }
.hero-footnote a { color: var(--white); font-weight: 600; margin: 0 2px; text-decoration: underline; text-decoration-color: var(--accent-light); text-underline-offset: 4px; }

/* Service strip */
.service-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: auto;
  padding: 0 var(--gutter);
}
.service-strip a {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 26px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color .15s;
}
.service-strip a + a { border-left: 1px solid var(--line); }
.service-strip a:hover { background: var(--mist); }
.service-strip svg { width: 34px; height: 34px; flex-shrink: 0; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service-strip a:hover svg { stroke: var(--accent); }
.service-strip span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.service-strip strong { display: block; font-size: 18px; font-weight: 700; color: var(--ink); }

/* Sections */
.section { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: auto; padding: 96px var(--gutter); }
.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 48px;
  align-items: end;
  margin-bottom: 44px;
}
.section-heading > p { color: var(--muted); max-width: 440px; justify-self: end; }

/* Service cards */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.solution { display: flex; flex-direction: column; background: var(--white); border-top: 4px solid var(--ink); scroll-margin-top: 24px; }
.solution:hover { border-top-color: var(--accent); }
.solution-image { aspect-ratio: 4 / 3; overflow: hidden; }
.solution-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.solution:hover .solution-image img { transform: scale(1.03); }
.solution-body { display: flex; flex-direction: column; flex: 1; padding: 28px 28px 30px; }
.tag { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.solution-body > p:not(.tag) { color: var(--ink-2); font-size: 16px; margin: 14px 0 18px; }
.solution ul { list-style: none; padding: 0; margin: 0 0 26px; font-size: 15px; }
.solution li { padding: 8px 0; border-top: 1px solid var(--line); }
.solution li:last-child { border-bottom: 1px solid var(--line); }
.solution .text-link { margin-top: auto; align-self: flex-start; }

/* Solar video band */
.solar-story { background: var(--ink); color: var(--white); }
.solar-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: auto;
  padding: 88px var(--gutter);
}
.solar-story .kicker { color: var(--accent-light); }
.story-copy h2 { font-size: clamp(32px, 3.4vw, 44px); margin: 18px 0 18px; }
.story-copy > p { color: #c3ccd3; max-width: 460px; }
.receipt-note { display: flex; gap: 18px; margin-top: 36px; padding: 24px; background: var(--ink-2); border-radius: 4px; }
.receipt-note svg { width: 34px; height: 34px; flex-shrink: 0; fill: none; stroke: var(--accent-light); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.receipt-note strong { display: block; font-size: 18px; line-height: 1.3; }
.receipt-note p { color: #c3ccd3; font-size: 15px; margin: 6px 0 14px; }
.text-link.light { color: var(--white); }
.story-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.text-link.light { text-decoration-color: var(--accent-light); }

/* Portfolio: a large lead image and a wide one in every batch of eight keep the grid from looking like a template. */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  grid-auto-flow: dense;
  gap: 12px;
}
.gallery button { position: relative; padding: 0; border: 0; overflow: hidden; background: var(--mist); border-radius: 3px; }
.gallery button:nth-child(8n+1) { grid-column: span 2; grid-row: span 2; }
.gallery button:nth-child(8n+6) { grid-column: span 2; }
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .4s; }
.gallery button:hover img { transform: scale(1.03); filter: brightness(.88); }
.gallery-footer { display: flex; justify-content: center; margin-top: 32px; }
.gallery-controls { display: flex; align-items: center; gap: 24px; }
.gallery-controls .text-link { background: transparent; border: 0; padding: 12px 0; min-height: 48px; }
.gallery-controls .text-link::after { content: '↑'; }

/* Process */
.process { position: relative; }
.process::before { content: ''; position: absolute; inset: 0 var(--gutter) auto; border-top: 1px solid var(--line); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 0; margin: 0; }
.steps li { counter-increment: step; background: var(--mist); padding: 30px 28px 32px; border-radius: 3px; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
  background: var(--accent);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
}
.steps h3 { font-size: 24px; margin-bottom: 10px; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; padding-top: 24px; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary { position: relative; cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-size: 18px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}
details[open] summary::after { content: '−'; background: var(--accent); border-color: var(--accent); color: var(--white); }
details p { color: var(--ink-2); padding: 0 44px 24px 0; max-width: 680px; }

/* Contact */
.contact { background: var(--mist); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 88px);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: auto;
  padding: 96px var(--gutter);
}
.contact-copy > p { color: var(--ink-2); margin: 18px 0 34px; max-width: 440px; }
.contact-list { display: grid; gap: 22px; }
.contact-list dt { font-size: 14px; color: var(--muted); }
.phone { font-size: clamp(28px, 3vw, 36px); font-weight: 600; letter-spacing: -.01em; color: var(--accent); }
.contact-email { font-size: 18px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; overflow-wrap: anywhere; }
.phone:hover { color: var(--accent-deep); }
.contact-email:hover { text-decoration-color: currentColor; }
form { background: var(--white); padding: 34px; border-radius: 4px; border: 1px solid var(--line); }
form label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1.5px solid #cbc4b6;
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  min-height: 50px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); background: var(--white); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form .button { width: 100%; margin-top: 6px; }
.form-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
#form-status { font-size: 15px; margin-top: 8px; }
#form-status a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* Footer */
footer { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: auto; padding: 56px var(--gutter) 28px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; align-items: start; padding-bottom: 40px; }
.footer-top > .brand { justify-self: start; }
.footer-col { display: flex; flex-direction: column; gap: 6px; font-size: 15px; align-items: flex-start; }
.footer-col a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.footer-title { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Floating WhatsApp */
.whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 12px;
  background: var(--ink);
  color: var(--white);
  border-radius: 40px;
  box-shadow: 0 6px 24px #1c273133;
  font-size: 15px;
  font-weight: 600;
}
.whatsapp svg { width: 28px; height: 28px; color: #25d366; }
.whatsapp.contact-visible { visibility: hidden; pointer-events: none; }

/* Image viewer */
dialog { border: 0; border-radius: 6px; background: var(--paper); padding: 20px; max-width: 90vw; max-height: 92vh; }
dialog::backdrop { background: #10181fe6; }
dialog img { max-height: 77vh; max-width: 82vw; object-fit: contain; margin: auto; }
dialog p { font-size: 14px; text-align: center; color: var(--muted); }
.lightbox-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.lightbox-controls p { margin: 0; }
.lightbox-controls button, .lightbox-close {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.lightbox-controls button:hover, .lightbox-close:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.lightbox-close { position: absolute; top: 8px; right: 8px; z-index: 2; }
body.image-open { overflow: hidden; }
#film { width: min(1100px, 94vw); max-width: none; padding: 0; background: #000; overflow: visible; }
#film video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 86vh; background: #000; }
#film .lightbox-close { top: -58px; right: 0; }

@media (min-width: 1500px) {
  body { font-size: 18px; }
}

@media (hover: none) {
  .solution:hover .solution-image img, .gallery button:hover img { transform: none; filter: none; }
}

/* Compact navigation also serves tablets where desktop links would crowd. */
@media (max-width: 1000px) {
  html { scroll-padding-top: 88px; }
  .header { position: sticky; top: 0; z-index: 10; height: 72px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .menu-toggle {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--ink);
    border-radius: 3px;
    background: transparent;
  }
  .menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px #1c27311f;
    max-height: calc(100dvh - 72px);
    overflow: auto;
  }
  nav.open { display: flex; }
  nav a:not(.nav-cta) { padding: 14px 0; font-size: 18px; min-height: 48px; border-bottom: 1px solid var(--line); }
  nav a:not(.nav-cta):hover { border-color: var(--line); }
  .nav-cta { margin-top: 16px; padding: 14px; text-align: center; font-size: 17px; }
  .solution { scroll-margin-top: 88px; }
  /* Tablets and phones: the video fills the top and fades down into the copy. */
  .hero { display: block; min-height: 0; }
  .hero-loop {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
    mask-image: linear-gradient(180deg, #000 60%, transparent);
  }
  .hero-inner { margin-top: -56px; padding: 0 var(--gutter) 56px; }
  .solution-grid { grid-template-columns: 1fr; }
  .solution { display: grid; grid-template-columns: .9fr 1.1fr; }
  .solution-image { aspect-ratio: auto; min-height: 300px; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; }
  .steps li::before { grid-row: span 2; margin: 0; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 190px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .header { padding-inline: 20px; }
  .brand { font-size: 18px; gap: 10px; }
  .brand img { width: 54px; }
  .brand small { font-size: 11px; }
  /* On phones the copy sits at the bottom of the video, shaded from below. */
  .hero-loop { aspect-ratio: 4 / 3; }
  .hero-inner { margin-top: -28px; padding: 0 20px 40px; }
  h1 { font-size: clamp(32px, 8.8vw, 44px); margin: 14px 0 16px; }
  h2 { font-size: clamp(30px, 8.4vw, 40px); }
  .hero-description { font-size: 17px; }
  .hero-description { color: #dbe3ea; }
  .hero-actions { display: grid; grid-template-columns: 1fr; margin: 26px 0 20px; gap: 10px; }
  .button { min-height: 52px; font-size: 16px; }
  #film { width: 100%; max-height: none; padding: 0; }
  #film .lightbox-close { top: -60px; right: 8px; }
  .service-strip { grid-template-columns: 1fr; padding: 0 20px; }
  .service-strip a { padding: 18px 4px; border-top: 0; }
  .service-strip a:first-child { border-top: 1px solid var(--line); }
  .service-strip a + a { border-left: 0; }
  .section { padding: 64px 20px; }
  .section-heading { grid-template-columns: 1fr; margin-bottom: 30px; gap: 14px; }
  .section-heading > p { justify-self: start; }
  .solution { display: flex; }
  .solution-image { aspect-ratio: 3 / 2; min-height: 0; }
  .solution-body { padding: 24px 22px 26px; }
  .solar-inner { grid-template-columns: 1fr; padding: 64px 20px; gap: 36px; }
  .receipt-note { padding: 20px; gap: 14px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 42vw; gap: 8px; }
  .gallery-controls { flex-direction: column; width: 100%; gap: 4px; }
  .gallery-controls .button { width: 100%; }
  .steps li { padding: 24px 20px; }
  .faq { grid-template-columns: 1fr; gap: 20px; }
  summary { font-size: 17px; min-height: 60px; line-height: 1.45; }
  details p { padding-right: 8px; }
  .contact-inner { grid-template-columns: 1fr; padding: 64px 20px; gap: 36px; }
  form { padding: 24px 20px; }
  input, select, textarea { min-height: 52px; padding: 14px; }
  textarea { min-height: 132px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  #form-status { overflow-wrap: anywhere; }
  footer { padding: 44px 20px calc(90px + env(safe-area-inset-bottom)); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-top > .brand { grid-column: 1 / -1; }
  .footer-col a { min-height: 40px; display: flex; align-items: center; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .whatsapp { right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; justify-content: center; padding: 0; }
  .whatsapp svg { width: 30px; height: 30px; }
  .whatsapp span { display: none; }
  .whatsapp.hero-visible { visibility: hidden; pointer-events: none; }
  input, select, textarea { scroll-margin-top: 96px; }
  dialog { width: calc(100% - 24px); max-width: 600px; max-height: calc(100dvh - 24px); padding: 64px 12px 16px; }
  dialog img { width: 100%; max-width: 100%; max-height: calc(100dvh - 180px); }
  .lightbox-controls { gap: 8px; }
}

@media (max-width: 360px) {
  .brand { font-size: 16px; }
  .brand small { font-size: 10px; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; min-height: 52px; }
  .button, .text-link { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
