/* ============================================================
   GridMind Energy — landing
   Aesthetic: dark "grid command center" — deep navy, neon energy
   accents, glass surfaces, living grid network. High contrast.
   ============================================================ */

:root {
  /* brand palette (brand/template.json) */
  --bg-1: #0b1a2b;
  --bg-0: #06121f;
  --bg-2: #0e2236;
  --blue: #00a5ff;
  --cyan: #00cfaf;
  --green: #7ed957;
  --yellow: #ffd84d;
  --electric: #a3ff12;
  --highlight: #00e0ff;
  --tx-1: #ffffff;
  --tx-2: #b3c7d6;
  --tx-3: #6b8ca3;
  --line: rgba(123, 167, 199, 0.16);
  --line-2: rgba(123, 167, 199, 0.28);

  --grad-primary: linear-gradient(100deg, #00a5ff, #00cfaf 38%, #7ed957 70%, #ffd84d);
  --grad-electric: linear-gradient(90deg, #00e0ff, #a3ff12);

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --r-xl: 30px;

  --glow-cyan: 0 0 40px rgba(0, 207, 175, 0.35);
  --glow-blue: 0 0 50px rgba(0, 165, 255, 0.28);

  --ff-display: "Clash Display", "Hanken Grotesk", sans-serif;
  --ff-body: "Hanken Grotesk", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

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

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

body {
  font-family: var(--ff-body);
  background: var(--bg-0);
  color: var(--tx-2);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(163, 255, 18, 0.28); color: #fff; }

/* ── atmospheric background ─────────────────────────────── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
    radial-gradient(120% 90% at 50% -10%, #112c44 0%, var(--bg-1) 42%, var(--bg-0) 100%); }

.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 78%);
  opacity: 0.7;
}

.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; }
.orb-1 { width: 540px; height: 540px; top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(0,165,255,0.55), transparent 70%);
  animation: drift1 26s ease-in-out infinite; }
.orb-2 { width: 460px; height: 460px; top: 30%; right: -140px;
  background: radial-gradient(circle, rgba(0,207,175,0.5), transparent 70%);
  animation: drift2 32s ease-in-out infinite; }
.orb-3 { width: 420px; height: 420px; bottom: -120px; left: 30%;
  background: radial-gradient(circle, rgba(163,255,18,0.28), transparent 70%);
  animation: drift1 38s ease-in-out infinite reverse; }

@keyframes drift1 { 50% { transform: translate(60px, 50px) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(-70px, 40px) scale(1.08); } }

.bg-noise { position: absolute; inset: 0; opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ── shared layout ──────────────────────────────────────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(72px, 11vw, 140px) var(--pad); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 6vw, 64px); }
.section-head h2 {
  font-family: var(--ff-display); font-weight: 600; color: var(--tx-1);
  font-size: clamp(28px, 4.6vw, 50px); line-height: 1.06; letter-spacing: -0.02em;
}
.kicker {
  font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--cyan); display: inline-block; margin-bottom: 18px;
}
.lead { margin-top: 18px; font-size: clamp(16px, 2vw, 19px); color: var(--tx-2); max-width: 620px; }

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

/* ── buttons ────────────────────────────────────────────── */
.btn {
  --b: 1px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-body); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 100px; cursor: pointer; border: none;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-solid { background: var(--grad-electric); color: #042418; box-shadow: 0 6px 24px rgba(0,224,255,0.25); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(163,255,18,0.4); }
.btn-line { color: var(--tx-1); background: rgba(255,255,255,0.02); position: relative; border: 1px solid var(--line-2); }
.btn-line:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: var(--glow-cyan); color: #fff; }
.btn-ghost { color: var(--tx-2); padding: 11px 14px; }
.btn-ghost:hover { color: #fff; }

/* ── nav ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--pad); max-width: 1320px; margin: 0 auto;
  transition: padding .3s;
}
.nav.scrolled {
  background: rgba(6,18,31,0.72); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  padding-top: 10px; padding-bottom: 10px;
}
.nav-brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.nav-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(0,207,175,0.45)); }
.nav-word { font-family: var(--ff-display); font-weight: 600; font-size: 19px; color: #fff; letter-spacing: -0.01em; }
.nav-word em { font-style: normal; color: var(--electric); margin-left: 5px; font-weight: 500; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: 15px; color: var(--tx-2); transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang {
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.08em;
  background: transparent; border: 1px solid var(--line-2); color: var(--tx-2);
  border-radius: 100px; padding: 7px 12px; cursor: pointer; transition: border-color .2s, color .2s;
}
.lang:hover { border-color: var(--cyan); color: #fff; }
.lang .lang-on { color: #fff; }
.lang .lang-sep { opacity: 0.5; margin: 0 3px; }
.lang.en .lang-on { color: var(--tx-3); }
.lang.en .lang-off { color: #fff; }
.lang:not(.en) .lang-off { color: var(--tx-3); }

/* ── hero ───────────────────────────────────────────────── */
.hero { position: relative; max-width: 1320px; margin: 0 auto; padding: clamp(40px, 7vw, 90px) var(--pad) 0; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.9; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 880px; padding: clamp(24px,5vw,60px) 0 clamp(40px,6vw,72px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--tx-2); background: rgba(0,207,175,0.07); border: 1px solid var(--line-2);
  padding: 8px 15px; border-radius: 100px; margin-bottom: 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--electric); box-shadow: 0 0 10px var(--electric); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.hero-title {
  font-family: var(--ff-display); font-weight: 600; color: #fff;
  font-size: clamp(40px, 8.2vw, 92px); line-height: 0.98; letter-spacing: -0.03em;
}
.hero-sub { margin-top: 26px; font-size: clamp(17px, 2.4vw, 22px); color: var(--tx-2); max-width: 600px; }
.hero-sub strong { color: #fff; font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 60px); margin-top: clamp(40px, 6vw, 64px); }
.hero-stats div { border-left: 2px solid; border-image: var(--grad-electric) 1; padding-left: 16px; }
.hero-stats dt { font-family: var(--ff-display); font-weight: 600; font-size: clamp(24px,3vw,32px); color: #fff; line-height: 1; }
.hero-stats dd { font-size: 13.5px; color: var(--tx-3); margin-top: 6px; max-width: 180px; }

/* marquee */
.marquee { position: relative; z-index: 1; margin: 0 calc(var(--pad) * -1); padding: 22px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 24px; width: max-content; animation: scroll 38s linear infinite;
  font-family: var(--ff-mono); font-size: 14px; letter-spacing: 0.06em; color: var(--tx-3); text-transform: uppercase; }
.marquee-track span:not(:nth-child(even)) { color: var(--tx-2); }
.marquee-track span:nth-child(even) { color: var(--cyan); opacity: 0.6; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ── cards ──────────────────────────────────────────────── */
.cards-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.cards-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.card {
  position: relative; background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 18px 48px rgba(0,0,0,0.4); }
.card h3 { font-family: var(--ff-display); font-weight: 600; color: #fff; font-size: 20px; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { font-size: 15px; color: var(--tx-2); }
.card-ix { font-family: var(--ff-mono); font-size: 13px; color: var(--cyan); opacity: 0.8; display: block; margin-bottom: 18px; letter-spacing: 0.1em; }
.card-icon { font-size: 26px; margin-bottom: 16px; }
.card--glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad-electric); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s;
}
.card--glow:hover::before { opacity: 0.7; }
.card--glow:hover { box-shadow: var(--glow-cyan), 0 18px 48px rgba(0,0,0,0.4); }

.aside { margin-top: 28px; font-size: 15px; color: var(--tx-3); font-style: italic; max-width: 700px; padding-left: 18px; border-left: 2px solid var(--line-2); }

/* ── solution flow ──────────────────────────────────────── */
.solution { position: relative; }
.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.flow-node {
  flex: 1; min-width: 200px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; display: flex; flex-direction: column; gap: 10px; justify-content: center;
}
.flow-node strong { color: var(--tx-1); font-size: 16px; font-weight: 600; line-height: 1.3; }
.flow-node--core { border-color: transparent; background:
    linear-gradient(var(--bg-1), var(--bg-1)) padding-box,
    var(--grad-primary) border-box; border: 1.5px solid transparent; box-shadow: var(--glow-blue); }
.flow-tag { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tx-3); }
.flow-node--core .flow-tag { color: var(--cyan); }
.flow-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 80px; padding: 0 4px; }
.flow-arrow svg { width: 60px; height: 20px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 5; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.flow-arrow-label { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--electric); }

/* ── planes ─────────────────────────────────────────────── */
.planes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plane {
  background: linear-gradient(180deg, rgba(0,165,255,0.07), rgba(255,255,255,0.012));
  border: 1px solid rgba(0,165,255,0.22); border-radius: var(--r-xl); padding: 32px;
}
.plane--edge { background: linear-gradient(180deg, rgba(163,255,18,0.08), rgba(255,255,255,0.012)); border-color: rgba(163,255,18,0.26); box-shadow: 0 0 60px rgba(163,255,18,0.07); }
.plane-tag { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); display: block; margin-bottom: 14px; }
.plane--edge .plane-tag { color: var(--electric); }
.plane h3 { font-family: var(--ff-display); font-weight: 600; color: #fff; font-size: 22px; margin-bottom: 18px; letter-spacing: -0.01em; }
.plane ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.plane li { position: relative; padding-left: 26px; font-size: 15px; color: var(--tx-2); }
.plane li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.plane--edge li::before { background: var(--electric); box-shadow: 0 0 8px var(--electric); }

.banner { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 18px 24px;
  background: rgba(255,92,92,0.06); border: 1px solid rgba(255,92,92,0.25); border-radius: var(--r-m); font-size: 15.5px; color: var(--tx-1); }
.banner-ic { font-size: 20px; }
.banner strong { color: #fff; }

/* ── data layers ────────────────────────────────────────── */
.layers { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.layer { flex: 1; min-width: 200px; border-radius: var(--r-l); padding: 28px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)); }
.layer-medal { font-size: 28px; display: block; margin-bottom: 14px; }
.layer h3 { font-family: var(--ff-display); font-weight: 600; color: #fff; font-size: 22px; margin-bottom: 8px; }
.layer p { font-size: 14.5px; color: var(--tx-2); }
.layer--bronze { border-color: rgba(205,127,50,0.35); box-shadow: inset 0 0 40px rgba(205,127,50,0.05); }
.layer--silver { border-color: rgba(180,200,215,0.35); box-shadow: inset 0 0 40px rgba(180,200,215,0.05); }
.layer--gold { border-color: rgba(255,216,77,0.4); box-shadow: inset 0 0 40px rgba(255,216,77,0.07); }
.layer-sep { display: flex; align-items: center; font-size: 28px; color: var(--tx-3); }

/* ── modules ────────────────────────────────────────────── */
.mod-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.mod { background: rgba(255,255,255,0.025); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 20px; display: flex; flex-direction: column; gap: 5px; transition: transform .25s, border-color .25s, background .25s, box-shadow .25s; }
.mod:hover { transform: translateY(-4px); border-color: var(--cyan); background: rgba(0,207,175,0.06); box-shadow: var(--glow-cyan); }
.mod-ic { font-size: 22px; margin-bottom: 8px; filter: saturate(1.2); }
.mod b { font-family: var(--ff-display); font-weight: 600; color: #fff; font-size: 16px; }
.mod i { font-style: normal; font-size: 13px; color: var(--tx-3); }

/* ── final cta ──────────────────────────────────────────── */
.cta-final { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) clamp(80px,10vw,130px); }
.cta-card { position: relative; text-align: center; border-radius: var(--r-xl); padding: clamp(48px,8vw,84px) clamp(24px,5vw,64px); overflow: hidden;
  background: radial-gradient(120% 140% at 50% 0%, rgba(0,207,175,0.14), rgba(255,255,255,0.015) 60%);
  border: 1px solid var(--line-2); }
.cta-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: var(--grad-electric); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.4; }
.cta-mark { width: 64px; height: 64px; margin: 0 auto 22px; filter: drop-shadow(0 0 18px rgba(0,207,175,0.5)); }
.cta-card h2 { font-family: var(--ff-display); font-weight: 600; color: #fff; font-size: clamp(28px,4.6vw,48px); line-height: 1.04; letter-spacing: -0.02em; }
.cta-card p { margin: 16px auto 0; max-width: 480px; color: var(--tx-2); }
.cta-card .hero-cta { justify-content: center; margin-top: 32px; }

/* ── footer ─────────────────────────────────────────────── */
.foot { max-width: var(--maxw); margin: 0 auto; padding: 48px var(--pad) 56px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 32px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-mark { width: 30px; height: 30px; }
.foot-tag { color: var(--tx-3); font-size: 14px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { font-size: 14px; color: var(--tx-2); transition: color .2s; }
.foot-links a:hover { color: var(--cyan); }
.foot-copy { grid-column: 1 / -1; font-family: var(--ff-mono); font-size: 12px; color: var(--tx-3); letter-spacing: 0.04em; padding-top: 8px; border-top: 1px solid var(--line); }
.foot-sysco { color: var(--electric); font-weight: 600; transition: color .2s, text-shadow .2s; }
.foot-sysco:hover { color: var(--highlight); text-shadow: 0 0 12px rgba(0, 224, 255, 0.5); }

/* ── reveal animation ───────────────────────────────────── */
/* Content is visible by default (no-JS / SEO safe); only hidden-to-animate
   once the inline bootstrap adds .js to <html>. */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 920px) {
  .cards-4 { grid-template-columns: repeat(2,1fr); }
  .mod-grid { grid-template-columns: repeat(2,1fr); }
  .planes-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .flow { flex-direction: column; }
  .flow-arrow { flex-direction: row; min-width: 0; padding: 4px 0; }
  .flow-arrow svg { transform: rotate(90deg); }
  .layers { flex-direction: column; }
  .layer-sep { transform: rotate(90deg); justify-content: center; }
}
@media (max-width: 620px) {
  .cards-3 { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: 1fr; }
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .nav-actions .btn-ghost { display: none; }
  .foot { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
