/* ==========================================================
   HelioWorks — helioworks.net
   ========================================================== */

:root {
  --bg: #060c18;
  --bg-2: #0b1728;
  --panel: rgba(14, 28, 50, 0.72);
  --panel-solid: #0f1e36;
  --border: rgba(120, 160, 220, 0.16);
  --text: #e6edf7;
  --muted: #9aabc4;
  --orange: #ff8a2a;
  --orange-2: #ffb15c;
  --cyan: #3fd8ff;
  --navy: #1f2d55;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg) url("assets/stars-bg.webp") center top / cover fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--orange-2); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: 0.02em; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(720px, 100% - 32px); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em;
  text-decoration: none; text-transform: uppercase; font-size: 0.9rem;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #1a0d00;
  box-shadow: 0 8px 24px rgba(255, 138, 42, 0.35), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255, 138, 42, 0.5), inset 0 1px 0 rgba(255,255,255,.35); }
.btn--ghost { background: rgba(10, 20, 38, 0.55); color: var(--text); border-color: rgba(63, 216, 255, 0.45); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--cyan); box-shadow: 0 0 22px rgba(63, 216, 255, 0.3); transform: translateY(-2px); }
.btn--large { padding: 16px 28px; font-size: 0.95rem; }
.btn--small { padding: 8px 16px; font-size: 0.75rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(6, 12, 24, 0.85); backdrop-filter: blur(10px); border-color: var(--border); }
.nav__inner { width: min(1140px, 100% - 32px); margin-inline: auto; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; }
.brand b { color: var(--orange); font-weight: 800; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 110px 16px 80px; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("assets/hero-bg.webp") center / cover no-repeat;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.2s ease;
}
.hero__video.is-playing { opacity: 1; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(6,12,24,0.25) 0%, rgba(6,12,24,0.65) 70%),
    linear-gradient(to bottom, rgba(6,12,24,0) 60%, var(--bg) 100%);
}
.hero__content { position: relative; max-width: 760px; }
.hero__logo { width: 120px; height: auto; margin: 0 auto 18px; filter: drop-shadow(0 0 30px rgba(255, 138, 42, 0.45)); animation: float 6s ease-in-out infinite; }
.hero__title {
  font-size: clamp(2.8rem, 9vw, 6rem); font-weight: 800; letter-spacing: 0.06em;
  text-shadow: 0 6px 40px rgba(0,0,0,.6);
}
.hero__title span { color: var(--orange); text-shadow: 0 0 40px rgba(255, 138, 42, 0.45); }
.hero__tagline { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #c9d6ea; margin: 18px auto 34px; max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero__scroll { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(230,237,247,.4); border-radius: 14px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: scroll 1.8s ease-in-out infinite; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, rgba(11,23,40,0) 0%, rgba(11,23,40,.85) 15%, rgba(11,23,40,.85) 85%, rgba(11,23,40,0) 100%); }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; }
.section__lead { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 0 48px; }
.container--narrow .section__lead { margin-bottom: 36px; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; backdrop-filter: blur(8px); transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: rgba(255,138,42,.45); transform: translateY(-3px); }
.feature__icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255,138,42,.2), rgba(255,138,42,.05)); border: 1px solid rgba(255,138,42,.35);
}
.feature__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.05rem; margin-bottom: 10px; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Machines ---------- */
.machines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.machine { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.machine:hover { transform: translateY(-6px); border-color: rgba(63,216,255,.45); box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 30px rgba(63,216,255,.12); }
.machine__art {
  aspect-ratio: 1; padding: 26px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 60%, rgba(63,216,255,.14), transparent 65%), linear-gradient(180deg, #13254a, #0b1728);
  border-bottom: 1px solid var(--border);
}
.machine__art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); transition: transform .3s; }
.machine:hover .machine__art img { transform: scale(1.05); }
.machine figcaption { padding: 18px 20px 22px; }
.machine h3 { font-size: 0.95rem; margin-bottom: 6px; }
.machine p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Download ---------- */
.download { position: relative; padding: 130px 0; overflow: hidden; }
.download__bg { position: absolute; inset: 0; background: url("assets/download-bg.webp") center / cover no-repeat; }
.download__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,12,24,.1) 0%, rgba(6,12,24,.55) 55%, rgba(6,12,24,.85) 100%), linear-gradient(to bottom, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%); }
.download__inner { position: relative; display: flex; justify-content: flex-end; }
.download__card {
  max-width: 480px; background: rgba(8, 16, 30, 0.82); border: 1px solid var(--border);
  border-radius: 18px; padding: 40px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.download__card > p { color: var(--muted); margin: 0 0 26px; }
.download__meta { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 8px; font-size: 0.92rem; color: var(--muted); }
.download__meta b { display: inline-block; min-width: 86px; color: var(--text); font-weight: 600; }
.download__note { margin: 18px 0 0 !important; font-size: 0.92rem; }

/* ---------- Beta form ---------- */
.beta-form {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 36px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 8px; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(4, 10, 20, 0.7); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63,216,255,.18); }
.field.has-error input { border-color: #ff6b6b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 16px 0 0; min-height: 1.5em; text-align: center; font-weight: 500; }
.form-status.is-success { color: #5be3a0; }
.form-status.is-error { color: #ff8a8a; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: rgba(6,12,24,.9); padding: 30px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .machines { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .features { grid-template-columns: 1fr; }
  .download__inner { justify-content: center; }
  .download__bg::after { background: rgba(6,12,24,.65); }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(6,12,24,.97); border-bottom: 1px solid var(--border);
    padding: 8px 16px 20px; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 14px 0; width: 100%; text-align: center; }
  .nav__links .btn { margin-top: 8px; width: 100%; }
  .nav.menu-open { background: rgba(6,12,24,.97); }
  .nav.menu-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 560px) {
  .section { padding: 80px 0; }
  .download { padding: 90px 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .beta-form, .download__card { padding: 26px 20px; }
  .machines { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  body { background-attachment: scroll; background-size: 900px auto; background-repeat: repeat; }
  .hero__bg { background-position: 18% center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
