/* GLP EnergyLab - landing page styles.
   Hand-authored CSS, no Tailwind build step (unlike scs-website). One theme: dark,
   locked for the whole page. One accent: GLP green. One radius scale: 4px, everywhere. */

@import url('fonts.css');

/* ---------------------------------------------------------------- tokens */
:root {
  /* Base: the deep blue-black of a photovoltaic cell. Never pure #000. */
  --ink: #0b1418;
  --ink-2: #101c22;
  --ink-3: #16252c;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);

  --fg: #eef4f2;
  --fg-soft: #a9bcc0;
  --fg-mute: #7d9298;

  /* Single accent. Used for every interactive and emphasis state on the page. */
  --acc: #8cc63f;
  --acc-deep: #6d9f2b;
  --acc-ink: #0b1418;

  --r: 4px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --maxw: 1220px;

  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

::selection {
  background: var(--acc);
  color: var(--acc-ink);
}

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: var(--r);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad);
  top: 0.75rem;
  z-index: 100;
  background: var(--acc);
  color: var(--acc-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--r);
  font-weight: 600;
}

/* ---------------------------------------------------------------- type */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 1.6rem + 5vw, 5.25rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1.02;
}

h3 {
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  line-height: 1.15;
}

p {
  margin: 0;
  max-width: 62ch;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--fg-soft);
}

.tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc);
}

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  display: flex;
  align-items: center;
  background: rgba(11, 20, 24, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

@media (prefers-reduced-transparency: reduce) {
  .site-head {
    background: var(--ink);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  object-fit: cover;
  background: var(--ink-3);
}

.brand span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.brand em {
  font-style: normal;
  color: var(--acc);
}

#site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.9rem);
}

#site-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--fg-soft);
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}

#site-nav a:hover {
  color: var(--fg);
}

#site-nav a.btn-primary,
#site-nav a.btn-primary:hover {
  color: var(--acc-ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--fg);
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-primary {
  background: var(--acc);
  color: var(--acc-ink); /* 4.5:1+ dark text on green */
}

.btn-primary:hover {
  background: #9bd44b;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
  background: rgba(11, 20, 24, 0.55);
}

.btn-ghost:hover {
  border-color: var(--acc);
  color: var(--acc);
}

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

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: calc(100dvh - 68px);
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 8vh, 6rem) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
  isolation: isolate;
  /* Ground colour behind the photograph. Also the fallback if the photo is missing. */
  background: linear-gradient(160deg, #274a6d 0%, #14283a 55%, #0b1418 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}

/* Scrim. Two layers: a directional wash so the left-hand copy always clears AA, and a
   bottom fade that hands the eye over to the next section. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(11, 20, 24, 0.94) 0%, rgba(11, 20, 24, 0.8) 42%, rgba(11, 20, 24, 0.42) 100%),
    linear-gradient(to bottom, rgba(11, 20, 24, 0.35) 0%, transparent 30%, rgba(11, 20, 24, 0.95) 100%);
}

.hero__inner {
  max-width: 46rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero h1 .accent {
  color: var(--acc);
}

.hero .lead {
  max-width: 34ch;
  color: #cfdcdb;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Hero entrance. Communicates hierarchy: headline, then support, then the action. */
@media (prefers-reduced-motion: no-preference) {
  .hero__inner > * {
    animation: rise 0.8s var(--ease) both;
  }
  .hero__inner > *:nth-child(2) {
    animation-delay: 0.09s;
  }
  .hero__inner > *:nth-child(3) {
    animation-delay: 0.18s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- sections */
section {
  padding-block: clamp(4rem, 10vh, 7.5rem);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.section-head p {
  margin-top: 1rem;
}

/* Split: intro copy beside a supporting photograph. Used exactly once. */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  padding-top: clamp(3rem, 7vh, 5rem);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.split figure {
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-2);
}

.split figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.vision {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--acc);
}

.vision p {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.15;
  color: var(--fg);
  max-width: 26ch;
}

/* Bento: five values, five cells, deliberately unequal. */
.values {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .values {
    grid-template-columns: repeat(6, 1fr);
  }
  .values > *:nth-child(1) {
    grid-column: span 3;
  }
  .values > *:nth-child(2) {
    grid-column: span 3;
  }
  .values > *:nth-child(3) {
    grid-column: span 2;
  }
  .values > *:nth-child(4) {
    grid-column: span 2;
  }
  .values > *:nth-child(5) {
    grid-column: span 2;
  }
}

.value {
  background: var(--ink-2);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background-color 0.25s var(--ease);
}

.value:hover {
  background: var(--ink-3);
}

.value h3 {
  color: var(--fg);
}

.value p {
  color: var(--fg-soft);
  font-size: 0.9375rem;
}

/* Two of the five cells carry a real surface rather than flat colour, so the grid is not
   six identical text boxes. Cell 1 shows the panel photo, cell 2 a cell-grid pattern. */
.value--photo {
  position: relative;
  background-image: linear-gradient(200deg, rgba(11, 20, 24, 0.7), rgba(11, 20, 24, 0.93)),
    url('hero-solar.jpg');
  background-size: cover;
  background-position: center;
}

.value--grid {
  background-image: linear-gradient(rgba(140, 198, 63, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 198, 63, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
}

/* Goals: three clustered rows, sparse dividers, mono index. Not a bulleted list. */
.clusters {
  display: grid;
  gap: 0;
}

.cluster {
  display: grid;
  gap: 1rem clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  padding-block: clamp(1.75rem, 4vh, 2.75rem);
  border-top: 1px solid var(--line);
}

.cluster:last-child {
  border-bottom: 1px solid var(--line);
}

@media (min-width: 860px) {
  .cluster {
    grid-template-columns: 4.5rem 15rem 1fr;
    align-items: start;
  }
}

.cluster__no {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--acc);
  padding-top: 0.45rem;
}

.cluster ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.cluster li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--fg-soft);
  max-width: 58ch;
}

.cluster li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.6rem;
  height: 1px;
  background: var(--acc);
}

/* Closing band. Full-bleed accent, the one place the green fills a surface. */
.band {
  background: var(--acc);
  color: var(--acc-ink);
}

.band h2 {
  max-width: 20ch;
}

.band p {
  color: rgba(11, 20, 24, 0.78);
  margin-top: 1rem;
}

.band__inner {
  display: grid;
  gap: 2rem;
  align-items: end;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .band__inner {
    grid-template-columns: 1.2fr auto;
  }
}

.band .btn-primary {
  background: var(--ink);
  color: var(--fg);
}

.band .btn-primary:hover {
  background: var(--ink-3);
}

.band .btn-ghost {
  background: transparent;
  border-color: rgba(11, 20, 24, 0.35);
  color: var(--acc-ink);
}

.band .btn-ghost:hover {
  border-color: var(--acc-ink);
  color: var(--acc-ink);
  background: rgba(11, 20, 24, 0.07);
}

.band__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------------------------------------------------------------- footer */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.5rem;
  font-size: 0.9375rem;
  color: var(--fg-mute);
}

.site-foot .wrap {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .site-foot .wrap {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.site-foot a {
  color: var(--fg-soft);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--acc);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* ---------------------------------------------------------------- reveal */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------- mobile nav */
@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
  }

  #site-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad) 1.25rem;
    display: none;
  }

  #site-nav.is-open {
    display: flex;
  }

  #site-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  #site-nav .btn {
    margin-top: 1rem;
    border-bottom: 0;
  }
}
