/* ============================================================
   Energy Objects, Inc. — single-page site
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-alt: #0b1120;
  --surface: #101a2e;
  --surface-edge: #1c2a45;
  --text: #e8eef7;
  --text-dim: #9fb0c7;
  --accent-1: #3fd0ff;   /* electric cyan */
  --accent-2: #7dff8a;   /* energy green */
  --accent-grad: linear-gradient(100deg, var(--accent-1), var(--accent-2));
  --radius: 14px;
  --nav-h: 64px;
  --ribbon-w: clamp(48px, 7.2vw, 108px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-dur: 0.8s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-inline: var(--ribbon-w); /* keep content clear of the edge ribbons */
}

img, svg { max-width: 100%; }

/* ---------- edge ribbons ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--ribbon-w);
  /* light ice-cyan fading to pale mint, echoing the accent gradient */
  background: linear-gradient(180deg, #d7effb 0%, #cfe9f6 55%, #d8f5e2 100%);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
  z-index: 1002;
  pointer-events: none;
}
body::before { left: 0; }
body::after { right: 0; }

/* no edge ribbons on phones — reclaim the horizontal space
   (nav overrides live at the end of this file so they win the cascade) */
@media (max-width: 700px) {
  :root { --ribbon-w: 0px; --nav-h: 100px; }
  body::before,
  body::after { display: none; }
}

/* ---------- typography ---------- */
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 0.6em; }
h3 { font-size: 1.2rem; margin-bottom: 0.4em; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 0.9rem;
}

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--text-dim); max-width: 40rem; }
.section-lede { color: var(--text-dim); max-width: 44rem; margin-bottom: 2.2rem; }

/* ---------- layout ---------- */
.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: clamp(4.5rem, 10vw, 7.5rem) 0; position: relative; }
.section-alt { background: var(--bg-alt); }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; inset: 0 var(--ribbon-w) auto var(--ribbon-w); height: 3px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 1001;
}
#progress-bar {
  display: block; height: 100%; width: 0;
  background: var(--accent-grad);
  transition: width 80ms linear;
}

/* ---------- nav ---------- */
.site-nav {
  position: fixed; inset: 3px var(--ribbon-w) auto var(--ribbon-w); height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  z-index: 1000;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.site-nav.scrolled {
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em;
  color: var(--text); text-decoration: none;
}
.brand-mark { width: 26px; height: 26px; }
.site-nav nav { display: flex; align-items: center; gap: clamp(0.8rem, 2.4vw, 1.8rem); }
.site-nav nav a {
  color: var(--text-dim); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: color 0.25s ease;
}
.site-nav nav a:hover, .site-nav nav a.active { color: var(--text); }
.nav-cta {
  padding: 0.45em 1.05em; border-radius: 999px;
  border: 1px solid var(--surface-edge);
  color: var(--text) !important;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav-cta:hover { border-color: var(--accent-1); background: rgba(63, 208, 255, 0.08); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 0.8em 1.7em; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
  background: var(--accent-grad); color: #04121a;
  box-shadow: 0 8px 28px rgba(63, 208, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(63, 208, 255, 0.4); }
.btn-ghost {
  color: var(--text); border: 2px solid rgba(232, 238, 247, 0.7);
  padding: calc(0.8em - 1px) calc(1.7em - 1px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent-1); }
.btn-lg { font-size: 1.05rem; padding: 0.95em 2.1em; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 75% -10%, rgba(63, 208, 255, 0.14), transparent 65%),
    radial-gradient(900px 480px at 15% 110%, rgba(125, 255, 138, 0.1), transparent 65%),
    var(--bg);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner {
  position: relative; z-index: 2; text-align: center;
  width: min(860px, 92%); padding-top: var(--nav-h);
  will-change: transform;
}
/* soft scrim so the copy stays readable over the canvas art */
.hero-inner::before {
  content: ""; position: absolute; inset: -16% -22%;
  z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse closest-side,
    rgba(7, 11, 20, 0.92) 0%,
    rgba(7, 11, 20, 0.6) 55%,
    transparent 100%);
}
.hero-inner .lede { margin: 1.4rem auto 2.2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--text-dim); border-radius: 14px;
  z-index: 2; opacity: 0.7;
}
.scroll-hint span {
  position: absolute; top: 7px; left: 50%; width: 4px; height: 8px;
  margin-left: -2px; border-radius: 2px; background: var(--accent-1);
  animation: scroll-nudge 1.8s ease-in-out infinite;
}
@keyframes scroll-nudge {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60%      { transform: translateY(12px); opacity: 0.2; }
}

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity var(--reveal-dur) var(--ease-out),
    transform var(--reveal-dur) var(--ease-out);
  transition-delay: calc(var(--d, 0) * 120ms);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }
[data-reveal-delay="1"] { --d: 1; }
[data-reveal-delay="2"] { --d: 2; }
[data-reveal-delay="3"] { --d: 3; }
[data-reveal-delay="4"] { --d: 4; }

/* staggered children (chips) */
.reveal-stagger > * {
  opacity: 0; transform: translateY(18px) scale(0.96);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal-stagger.in-view > * { opacity: 1; transform: none; }
.reveal-stagger.in-view > *:nth-child(n)  { transition-delay: calc(var(--i, 0) * 45ms); }

/* ---------- service cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem; margin-top: 2.4rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease, box-shadow 0.35s ease,
              opacity var(--reveal-dur) var(--ease-out);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(63, 208, 255, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.card p { color: var(--text-dim); font-size: 0.95rem; }
.card-icon {
  width: 52px; height: 52px; margin-bottom: 1.1rem;
  color: var(--accent-1);
  background: rgba(63, 208, 255, 0.09);
  border-radius: 12px;
  display: grid; place-items: center;
}
.card-icon svg { width: 32px; height: 32px; }
.card-list { list-style: none; margin-top: 1.1rem; }
.card-list li {
  font-size: 0.88rem; color: var(--text-dim);
  padding: 0.3em 0 0.3em 1.4em; position: relative;
}
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-grad);
}

/* ---------- value split ---------- */
.split {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-copy p { color: var(--text-dim); margin-bottom: 1rem; }

.check-list { list-style: none; margin-top: 1.4rem; }
.check-list li { padding: 0.35em 0 0.35em 2em; position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 1.1em; height: 1.1em; border-radius: 50%;
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    var(--accent-grad) border-box;
  border: 2px solid transparent;
}
.check-list li::after {
  content: ""; position: absolute; left: 0.3em; top: 0.78em;
  width: 0.5em; height: 0.28em;
  border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2);
  transform: rotate(-45deg);
}

/* ---------- performance chart ---------- */
.perf-chart {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
}
.perf-chart figcaption {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 1.3rem;
}
.perf-row {
  display: grid; grid-template-columns: 5.2em 1fr 4.2em;
  gap: 0.8em; align-items: center; margin-bottom: 1rem;
}
.perf-label { font-size: 0.88rem; color: var(--text-dim); }
.perf-value { font-size: 0.88rem; font-variant-numeric: tabular-nums; text-align: right; }
.perf-track {
  height: 14px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.06); overflow: hidden;
}
.perf-bar {
  display: block; height: 100%; width: 0; border-radius: 7px;
  transition: width 1.2s var(--ease-out);
}
.in-view .perf-bar { transition-delay: 0.25s; }
.perf-before { background: #ff7a6b; }
.perf-mid    { background: #ffc857; }
.perf-after  { background: var(--accent-grad); }
.perf-note { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.6rem; opacity: 0.75; }

/* ---------- chips ---------- */
.chip-cloud { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip {
  padding: 0.5em 1.1em; border-radius: 999px;
  font-size: 0.88rem; font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  color: var(--text-dim);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease-out);
}
.chip:hover { border-color: var(--accent-1); color: var(--text); transform: translateY(-2px); }

/* ---------- timeline ---------- */
.timeline {
  list-style: none; position: relative;
  margin-top: 3rem; padding-left: 3.2rem;
  display: grid; gap: 2.6rem;
}
.timeline-line {
  position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px;
  background: rgba(255, 255, 255, 0.08); border-radius: 1px;
}
#timeline-fill {
  display: block; width: 100%; height: 0;
  background: var(--accent-grad); border-radius: 1px;
}
.timeline-item { position: relative; max-width: 40rem; }
.timeline-item p { color: var(--text-dim); font-size: 0.95rem; }
.timeline-dot {
  position: absolute; left: -3.2rem; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem; color: var(--accent-1);
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.timeline-item.in-view .timeline-dot {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 5px rgba(63, 208, 255, 0.12);
}

/* ---------- stats band ---------- */
.stats-band {
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(63, 208, 255, 0.1), transparent 70%),
    var(--bg-alt);
  border-block: 1px solid var(--surface-edge);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem; text-align: center;
}
.stat-value {
  display: block; font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- contact ---------- */
.contact-inner { text-align: center; }
.contact .section-lede { margin-inline: auto; }
.contact .btn { margin-top: 0.6rem; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--surface-edge);
  padding: 1.6rem 0; font-size: 0.85rem; color: var(--text-dim);
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .perf-bar { transition: none; }
  .scroll-hint span { animation: none; }
  [data-parallax] { transform: none !important; }
}

/* ---------- phone nav: two rows, brand on top, section links below ---------- */
@media (max-width: 700px) {
  .site-nav {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 0.45rem;
    padding: 0.55rem 0.75rem;
  }
  .site-nav nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.4rem;
  }
  .site-nav nav a { font-size: 0.8rem; white-space: nowrap; }
  .nav-cta { padding: 0.3em 0.7em; }
}
