/* GridRamp marketing site — enterprise, deep green, flat.
   Conventional layout, dense sections, restrained scroll motion. */

:root {
  --green: #0A5338;
  --green-deep: #062B1C;
  --green-hover: #084228;
  --green-wash: #EAF1ED;
  --bg: #FFFFFF;
  --bg-tint: #F4F7F5;
  --ink: #0F1F17;
  --ink-2: #3D5246;
  --ink-3: #66796E;
  --line: #DFE7E2;
  --on-dark: #FFFFFF;
  --on-dark-2: #B9D2C5;
  --radius: 8px;
  --shell: 1140px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3 { margin: 0; }

section[id] { scroll-margin-top: 76px; }

/* ---- buttons ---- */

.btn {
  display: inline-block;
  background: var(--green);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 6px;
  letter-spacing: 0.01em;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover { background: var(--green-hover); }

.btn-light { background: #FFFFFF; color: var(--green-deep); }

.btn-light:hover { background: var(--on-dark-2); color: var(--green-deep); }

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.hero a:focus-visible, .close a:focus-visible { outline-color: #FFFFFF; }

/* ---- header: brand and links float free over the hero, then seat
   into a dark glass strip with a hairline rule once the page is in motion ---- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  border-bottom: 1px solid transparent;
  transition: background-color 280ms ease, border-color 280ms ease;
}

.site-header.is-scrolled {
  background: rgba(4, 25, 15, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  transition: height 280ms ease;
}

.is-scrolled .header-row { height: 56px; }

.brand img {
  display: block;
  width: 118px;
  height: auto;
}

.site-nav {
  display: flex;
  gap: 36px;
}

/* quiet states: hover brightens, the selected section simply holds
   full ink with a hairline underline that fades in — no draw animation */
.site-nav a {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  transition: color 180ms ease, text-decoration-color 240ms ease;
}

.site-nav a:hover { color: rgba(255, 255, 255, 0.95); }

.site-nav a.active {
  color: #FFFFFF;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.site-nav a:focus-visible { outline-color: #FFFFFF; }

/* ---- hero: full-viewport deep green gradient ---- */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--on-dark);
  /* the first layer is a faint lamp that trails the cursor (JS drives --hx/--hy) */
  background:
    radial-gradient(560px circle at var(--hx, 75%) var(--hy, 10%), rgba(44, 168, 114, 0.16) 0%, rgba(44, 168, 114, 0) 70%),
    radial-gradient(120% 90% at 75% -10%, rgba(17, 114, 77, 0.55) 0%, rgba(17, 114, 77, 0) 60%),
    radial-gradient(90% 70% at 10% 110%, rgba(10, 83, 56, 0.5) 0%, rgba(10, 83, 56, 0) 55%),
    linear-gradient(165deg, #07351F 0%, #062B1C 45%, #03190F 100%);
}

.hero-inner { padding-top: 36px; padding-bottom: 72px; }

.intro-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 30px;
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--on-dark-2);
}

.intro-line img {
  display: block;
  width: clamp(180px, 22vw, 264px);
  height: auto;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 750;
  max-width: 21ch;
}

/* ---- intro band (page 2): lede card layered over the solar farm photo ---- */

/* ---- statement + photo canvas (pages 2 and 3) ---- */

.statement {
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.022em;
  font-weight: 700;
  max-width: 24ch;
  margin: 0 0 44px;
}

.canvas {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 64px -32px rgba(6, 43, 28, 0.45);
}

.canvas > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

/* a soft light that follows the cursor across the photo (JS drives --mx/--my/--spot) */
.canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--spot, 0);
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
}

/* brand washes */
.canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 29, 18, 0.1) 0%, rgba(4, 29, 18, 0.28) 100%);
}

/* page 2: left scrim behind the structured tool list */
.canvas-left::after {
  background: linear-gradient(95deg, rgba(4, 29, 18, 0.58) 0%, rgba(4, 29, 18, 0.34) 45%, rgba(4, 29, 18, 0.08) 72%, rgba(4, 29, 18, 0) 85%);
}

/* page 3: center vignette that lets the logo blend into the field */
.canvas-focus::after {
  background: radial-gradient(58% 70% at 50% 50%, rgba(4, 29, 18, 0.62) 0%, rgba(4, 29, 18, 0.3) 55%, rgba(4, 29, 18, 0.12) 100%);
}

/* the structured tool list (page 2) */
.tool-list {
  position: absolute;
  left: clamp(28px, 4.5vw, 64px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* left-anchored rows that cascade wider as they descend */
.tool-row {
  display: flex;
  gap: 10px;
}

.tool {
  background: rgba(6, 43, 28, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  /* --glow (0..1, JS-driven) brightens the edge as the cursor nears */
  border: 1px solid rgba(255, 255, 255, calc(0.16 + 0.4 * var(--glow, 0)));
  color: #FFFFFF;
  font-size: clamp(12.5px, 1vw, 14px);
  font-weight: 550;
  letter-spacing: 0.01em;
  padding: 9px 16px;
  border-radius: 8px;
  white-space: nowrap;
}

/* the brand mark blended into the field (page 3) */
.brand-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.brand-mark img {
  display: block;
  width: clamp(200px, 24vw, 300px);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(3, 25, 15, 0.65));
}

.coming-soon {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ---- section bands ---- */

.band { padding: 96px 0; }

.band-light { background: var(--bg); }

h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* ---- close ---- */

.close {
  color: var(--on-dark);
  padding: 110px 0;
  text-align: center;
  background:
    radial-gradient(100% 80% at 50% 120%, rgba(17, 114, 77, 0.45) 0%, rgba(17, 114, 77, 0) 60%),
    linear-gradient(195deg, #07351F 0%, #062B1C 45%, #03190F 100%);
}

.close h2 {
  color: #FFFFFF;
  max-width: 22ch;
  margin: 0 auto 28px;
}

/* ---- contact form: name / company / email, with an optional comment ---- */

.contact-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.field-wide { grid-column: 1 / -1; }

.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}

.field-optional { color: rgba(255, 255, 255, 0.45); }

.field input,
.field textarea {
  appearance: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #FFFFFF;
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  padding: 12px 14px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.45;
}

.field input:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.45); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.contact-form .btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.contact-form .btn[disabled] {
  opacity: 0.7;
  cursor: default;
}

.form-note {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.85);
}

.form-note a {
  color: #FFFFFF;
  font-weight: 600;
}

.contact-form.sent .form-fields,
.contact-form.sent .btn { display: none; }

.contact-form.sent .form-note {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
}

@media (max-width: 860px) {
  .form-fields {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
}

/* ---- footer ---- */

.site-footer {
  background: #03190F;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-row {
  display: flex;
  justify-content: center;
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 13.5px;
  color: var(--on-dark-2);
}

/* ---- scroll reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 550ms cubic-bezier(0.2, 0.6, 0.2, 1), transform 550ms cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: var(--d, 0ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .canvas::before { display: none; }
  .site-header,
  .header-row,
  .site-nav a { transition: none; }
}

/* ---- small screens ---- */

@media (max-width: 860px) {
  .shell { padding: 0 20px; }

  .header-row { height: 56px; justify-content: center; }

  .brand { display: none; }

  .site-nav { gap: 20px; }

  .site-nav a { font-size: 10.5px; letter-spacing: 0.1em; }

  .intro-line { flex-wrap: wrap; gap: 12px; }

  .band { padding: 64px 0; }

  .statement { margin-bottom: 28px; }

  .canvas { overflow: visible; box-shadow: none; }

  .canvas::after { display: none; }

  .canvas-focus { overflow: hidden; }

  .canvas-focus::after { display: block; }

  .canvas > img {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    box-shadow: 0 24px 48px -28px rgba(6, 43, 28, 0.45);
  }

  /* the tool list becomes a wrapped row beneath the photo */
  .tool-list {
    position: static;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
  }

  .tool-row { display: contents; }

  .tool {
    font-size: 13.5px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .brand-mark { gap: 12px; }

  .brand-mark img { width: 160px; }

  .coming-soon { font-size: 11px; }
}
