/* ============================================================
   HYBA — Smart Battery Solutions · pitch experience
   Energy-tech identity: deep charcoal + electric lime + teal
   ============================================================ */

:root {
  --bg: #070b09;
  --bg-soft: #0d1410;
  --panel: #0f1713;
  --panel-2: #131d18;
  --ink: #eef3ec;
  --ink-dim: rgba(238, 243, 236, .62);
  --ink-faint: rgba(238, 243, 236, .36);
  --lime: #b6f23a;
  --lime-soft: #d6ff7a;
  --teal: #38e8b0;
  --amber: #ffce4a;
  --red: #ff6b6b;
  --line: rgba(182, 242, 58, .14);
  --line-soft: rgba(238, 243, 236, .08);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'Sora', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
em { font-style: normal; color: var(--lime); }

/* ---------------- Background ---------------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: .42; will-change: transform; }
.glow-1 { width: 60vmax; height: 60vmax; background: #1d5a32; top: -28%; left: -18%; animation: float-a 26s var(--ease) infinite alternate; }
.glow-2 { width: 50vmax; height: 50vmax; background: #114a4a; bottom: -30%; right: -18%; animation: float-b 32s var(--ease) infinite alternate; }
@keyframes float-a { to { transform: translate(12vmax, 8vmax) scale(1.15); } }
@keyframes float-b { to { transform: translate(-10vmax, -6vmax) scale(1.12); } }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 70%);
  opacity: .7;
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------------- Buttons ---------------- */
.btn {
  --pad: 14px 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad);
  border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: transform .3s var(--ease-spring), background .3s, border-color .3s, box-shadow .3s;
}
.btn-ico { width: 18px; height: 18px; }
.btn-sm { --pad: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(100deg, var(--lime), var(--teal));
  color: #06210e; border-color: transparent;
  box-shadow: 0 10px 30px -10px rgba(182, 242, 58, .6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(182, 242, 58, .8); }
.btn-ghost { background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: rgba(182, 242, 58, .5); color: var(--ink); transform: translateY(-2px); }
.btn:active { transform: scale(.96); }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 16px clamp(20px, 5vw, 48px);
  transition: background .4s, backdrop-filter .4s, border-color .4s, padding .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 11, 9, .72);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 20px; letter-spacing: .14em;
  color: var(--ink); text-decoration: none;
}
.logo-mark { width: 26px; height: 26px; color: var(--lime); filter: drop-shadow(0 0 8px rgba(182, 242, 58, .5)); }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--ink-dim); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .25s; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--lime); transition: width .3s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav > .btn { margin-left: 8px; }

/* ---------------- Shared section ---------------- */
.section { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 11vw, 130px) clamp(20px, 5vw, 48px); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.eyebrow {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 18px;
}
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.06; font-weight: 800; }
.section-head h2 { font-size: clamp(30px, 5vw, 46px); }
.section-sub { margin-top: 18px; font-size: clamp(16px, 2vw, 19px); color: var(--ink-dim); line-height: 1.6; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  min-height: 100dvh;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px;
  padding: 120px clamp(20px, 5vw, 48px) 60px;
}
.headline { font-size: clamp(44px, 8vw, 82px); margin: 18px 0 24px; }
.accent { background: linear-gradient(100deg, var(--lime), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 2.2vw, 21px); color: var(--ink-dim); line-height: 1.6; max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 44px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats dt { font-family: 'Space Grotesk', sans-serif; font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; color: var(--ink); }
.hero-stats dd { font-size: 13.5px; color: var(--ink-faint); margin-top: 2px; }

.hero-visual { display: grid; place-items: center; }
.module-hero { position: relative; width: min(80%, 360px); aspect-ratio: 1; }
.module-svg { width: 100%; height: 100%; overflow: visible; }
.cell {
  fill: rgba(182, 242, 58, .06); stroke: var(--lime); stroke-width: 3;
  transform-box: fill-box; transform-origin: center;
  animation: cell-charge 3.4s var(--ease) infinite;
}
.cell:nth-child(1){animation-delay:0s}.cell:nth-child(2){animation-delay:.16s}.cell:nth-child(3){animation-delay:.32s}
.cell:nth-child(4){animation-delay:.48s}.cell:nth-child(5){animation-delay:.64s}.cell:nth-child(6){animation-delay:.8s}.cell:nth-child(7){animation-delay:.96s}
@keyframes cell-charge { 0%,100%{ fill: rgba(182,242,58,.05); filter:none } 42%{ fill: rgba(182,242,58,.42); filter: drop-shadow(0 0 9px rgba(182,242,58,.75)) } }
.module-pulse { position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(circle, rgba(182,242,58,.2), transparent 65%); animation: pulse 3.4s var(--ease) infinite; z-index: -1; }
@keyframes pulse { 0%,100%{ transform: scale(.85); opacity:.5 } 50%{ transform: scale(1.12); opacity:1 } }

/* ---------------- Trust ---------------- */
.trust { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px,5vw,48px) 20px; text-align: center; }
.trust-label { display: block; font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px; }
.trust-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--ink-dim); font-size: 15px; }
.trust-logos i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }

/* ---------------- Pillars ---------------- */
.pillars { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(50px,8vw,80px) clamp(20px,5vw,48px); display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.pillar { padding: 30px 26px; border-radius: 20px; background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--line-soft); transition: transform .4s var(--ease), border-color .4s; }
.pillar:hover { transform: translateY(-5px); border-color: rgba(182,242,58,.4); }
.pillar-ico { font-size: 26px; color: var(--lime); margin-bottom: 14px; }
.pillar h3 { font-size: 22px; margin-bottom: 10px; }
.pillar p { color: var(--ink-dim); font-size: 15px; line-height: 1.6; }

/* ---------------- Technology ---------------- */
.tech-stack { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.tech-card { position: relative; padding: 32px 28px; border-radius: 22px; background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--line-soft); overflow: hidden; transition: transform .4s var(--ease), border-color .4s; }
.tech-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--lime), var(--teal)); opacity: .5; transition: opacity .4s; }
.tech-card:hover { transform: translateY(-6px); border-color: rgba(182,242,58,.4); }
.tech-card:hover::before { opacity: 1; }
.tech-step { font-family: 'Space Grotesk', sans-serif; font-size: 13px; letter-spacing: .2em; color: var(--ink-faint); }
.tech-card h3 { font-size: 28px; margin: 8px 0 4px; }
.tech-tag { font-size: 14px; color: var(--lime); margin-bottom: 14px; }
.tech-card > p { color: var(--ink-dim); font-size: 15px; line-height: 1.6; }
.spec-list { list-style: none; margin-top: 20px; border-top: 1px solid var(--line-soft); }
.spec-list li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.spec-list span { color: var(--ink-faint); }
.spec-list b { color: var(--ink); font-weight: 600; }

/* ---------------- Configurator ---------------- */
.configurator { position: relative; }
.cfg {
  display: grid;
  grid-template-columns: 320px 1fr 300px;
  gap: 18px;
  align-items: stretch;
}
.cfg-controls, .cfg-spec { background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--line-soft); border-radius: 22px; padding: 22px; }
.cfg-stage { position: relative; background: radial-gradient(120% 100% at 50% 0%, #0f1a14, #06090b); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; min-height: 520px; }
#cfg-3d { position: absolute; inset: 0; }
#cfg-3d canvas { display: block; width: 100% !important; height: 100% !important; }
.cfg-stage-badge { position: absolute; left: 16px; bottom: 16px; z-index: 2; font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: var(--ink-dim); background: rgba(7,11,9,.55); border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; backdrop-filter: blur(8px); }
.cfg-stage-badge span { color: var(--lime); font-weight: 600; }
.cfg-drag-hint { position: absolute; top: 16px; right: 16px; z-index: 2; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); background: rgba(7,11,9,.5); border: 1px solid var(--line-soft); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(8px); transition: opacity .5s; }
.cfg-drag-hint.hide { opacity: 0; }
.cfg-3d-fallback { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 32px; color: var(--ink-dim); font-size: 14px; line-height: 1.6; }

.cfg-controls { display: flex; flex-direction: column; }
.cfg-hint { font-size: 13px; color: var(--ink-faint); line-height: 1.55; margin-bottom: 22px; }
.cfg-hint b { color: var(--ink-dim); font-weight: 600; }

.cfg-slider-block { margin-bottom: 20px; }
.cfg-slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.cfg-slider-head label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cfg-slider-head output { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px; color: var(--lime); }
.cfg-slider-foot { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-faint); }
input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--lime)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 3px solid var(--lime); cursor: pointer; box-shadow: 0 0 12px rgba(182,242,58,.6); transition: transform .15s; }
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--lime); cursor: pointer; }

.cfg-volts, .cfg-quick { margin-top: 8px; }
.cfg-volts-label { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.volt-ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 20px; }
.volt-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-soft); cursor: pointer; transition: border-color .25s, transform .2s var(--ease-spring), background .25s; }
.volt-chip:hover { border-color: rgba(182,242,58,.5); transform: translateY(-2px); }
.volt-chip.is-active { border-color: var(--lime); background: rgba(182,242,58,.1); }
.volt-chip b { font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: var(--ink); }
.volt-chip span { font-size: 10.5px; color: var(--ink-faint); }
.volt-chip.is-active b { color: var(--lime); }

.quick-row { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-dim); background: var(--bg); border: 1px solid var(--line-soft); cursor: pointer; transition: border-color .25s, color .25s, transform .2s var(--ease-spring); }
.quick-chip:hover { border-color: rgba(182,242,58,.5); color: var(--ink); transform: translateY(-2px); }

input[type=text], input[type=email], textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line-soft);
  color: var(--ink); font-family: inherit; font-size: 15px; outline: none; transition: border-color .25s;
}
input:focus, textarea:focus { border-color: var(--lime); }

/* Spec readout */
.cfg-spec { display: flex; flex-direction: column; }
.cfg-spec h3 { font-size: 21px; margin-bottom: 16px; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px; }
.spec-cell { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 13px; }
.spec-cell span { display: block; font-size: 11.5px; color: var(--ink-faint); margin-bottom: 4px; }
.spec-cell b { font-size: 17px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; }
.spec-cell.hero-spec { grid-column: span 2; position: relative; background: linear-gradient(100deg, rgba(182,242,58,.12), rgba(56,232,176,.08)); border-color: rgba(182,242,58,.3); }
.spec-cell.hero-spec b { font-size: 30px; color: var(--lime); }
.spec-cell.hero-spec em { position: absolute; top: 12px; right: 14px; font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; color: var(--teal); }
.spec-topology { font-size: 12.5px; color: var(--ink-dim); line-height: 1.5; padding: 11px 13px; margin-bottom: 14px; border-radius: 11px; background: rgba(56,232,176,.06); border: 1px solid rgba(56,232,176,.18); }
.spec-rec { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-bottom: 18px; display: grid; gap: 10px; }
.spec-rec div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.spec-rec span { font-size: 13px; color: var(--ink-faint); }
.spec-rec b { font-size: 13.5px; font-weight: 600; text-align: right; }
.spec-note { margin-top: 12px; font-size: 11px; color: var(--ink-faint); line-height: 1.5; }
.flash-up { animation: flashup .5s var(--ease); }
@keyframes flashup { 0% { color: var(--lime-soft); } 100% {} }

/* ---------------- Applications ---------------- */
.app-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.app { padding: 28px 24px; border-radius: 20px; background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--line-soft); transition: transform .4s var(--ease), border-color .4s; }
.app:hover { transform: translateY(-5px); border-color: rgba(182,242,58,.4); }
.app-ico { font-size: 32px; display: block; margin-bottom: 14px; }
.app h3 { font-size: 19px; margin-bottom: 8px; }
.app p { color: var(--ink-dim); font-size: 14.5px; line-height: 1.55; }

/* ---------------- About ---------------- */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
.about-grid h2 { font-size: clamp(28px, 4.4vw, 42px); margin: 16px 0 22px; }
.about-lede { font-size: 18px; line-height: 1.6; color: var(--ink); margin-bottom: 18px; }
.about-grid p { color: var(--ink-dim); line-height: 1.65; }
.about-facts { display: grid; gap: 4px; }
.about-facts div { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.about-facts dt { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; color: var(--lime); }
.about-facts dd { font-size: 14.5px; color: var(--ink-dim); margin-top: 4px; }

/* ---------------- Contact ---------------- */
.contact-card { max-width: 720px; margin: 0 auto; text-align: center; padding: clamp(30px,5vw,52px); border-radius: 26px; background: linear-gradient(180deg, var(--panel-2), var(--bg-soft)); border: 1px solid var(--line); }
.contact-card h2 { font-size: clamp(28px,4.5vw,42px); margin-bottom: 12px; }
.contact-card > p { color: var(--ink-dim); margin-bottom: 28px; }
.contact-form { display: grid; gap: 12px; text-align: left; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-config { font-size: 13px; color: var(--ink-faint); padding: 4px 2px; }
.form-config b { color: var(--lime); font-family: 'Space Grotesk', sans-serif; }
.form-status { text-align: center; color: var(--lime); font-size: 14px; padding-top: 6px; }

/* ---------------- Footer ---------------- */
.footer { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 50px clamp(20px,5vw,48px); border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.footer-brand .logo { margin-bottom: 6px; }
.footer-brand p { font-size: 13px; color: var(--ink-faint); }
.footer-meta { margin-left: auto; display: flex; flex-direction: column; gap: 6px; text-align: right; font-size: 13.5px; color: var(--ink-faint); }
.footer-meta a { color: var(--ink-dim); text-decoration: none; transition: color .25s; }
.footer-meta a:hover { color: var(--lime); }
.footer-disclaimer { width: 100%; font-size: 11.5px; color: var(--ink-faint); border-top: 1px solid var(--line-soft); padding-top: 18px; }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 120px; gap: 10px; }
  .hero-visual { order: -1; }
  .module-hero { width: 200px; }
  .cfg { grid-template-columns: 1fr; }
  .cfg-stage { min-height: 440px; order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; }
}
@media (max-width: 720px) {
  .pillars, .tech-stack, .app-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 26px; }
  .nav > .btn { display: none; }
}

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