/* ============================================================
   ZQAS — zqas.io
   ============================================================ */

:root {
  --bg: #0b0b10;
  --bg-2: #101018;
  --ink: #f2f2ec;
  --ink-dim: #9b9ba6;
  --accent: #c8ff4d;
  --accent-dim: rgba(200, 255, 77, 0.14);
  --line: rgba(242, 242, 236, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; scrollbar-color: #2c2c38 #0b0b10; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0b0b10; }
::-webkit-scrollbar-thumb { background: #2c2c38; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a48; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
sup { font-size: 0.45em; vertical-align: super; color: var(--accent); }

/* ============ Brand mark — isometric dot-cube (reusable element) ============ */
.brand-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.brandmark {
  color: var(--accent);
  width: 0.6em; height: 0.6em;
  display: inline-block; vertical-align: 0.52em;
  margin-left: 0.2em; overflow: visible;
}
.brandmark--tag {
  width: 1em; height: 1em;
  vertical-align: middle; margin: 0 0.6em 0 0; flex: 0 0 auto;
}
.brandmark--marquee {
  width: 0.8em; height: 0.8em;
  vertical-align: -0.08em; margin: 0;
}

/* ============ Preloader — LED digital readout ============ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background:
    radial-gradient(120% 80% at 50% 40%, rgba(200, 255, 77, 0.04), transparent 60%),
    var(--bg);
  display: flex; justify-content: center; align-items: center;
}
.preloader__core {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(1.6rem, 4.5vh, 2.6rem);
}
.preloader__logo {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  letter-spacing: 0.04em; line-height: 1;
}

/* The LED panel */
.readout {
  position: relative;
  display: inline-flex; align-items: flex-start; gap: clamp(4px, 1vw, 10px);
  padding: clamp(0.7rem, 2vw, 1.1rem) clamp(1rem, 2.6vw, 1.6rem);
  border: 1px solid rgba(200, 255, 77, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(200, 255, 77, 0.06), rgba(0, 0, 0, 0.5));
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(200, 255, 77, 0.08);
  transform: skewX(-6deg);
}
.readout::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 4px);
  mix-blend-mode: multiply;
}
.readout__digits {
  display: flex; gap: clamp(5px, 1.3vw, 11px);
  animation: ledFlicker 5s infinite;
}
@keyframes ledFlicker {
  0%, 100% { opacity: 1; }
  91% { opacity: 1; } 92% { opacity: 0.82; } 93% { opacity: 1; }
  97% { opacity: 1; } 97.5% { opacity: 0.88; } 98% { opacity: 1; }
}
.seg-digit { width: clamp(30px, 7.4vw, 60px); height: auto; display: block; }
.seg {
  fill: var(--accent); opacity: 0.07;
  transition: opacity 0.1s ease, filter 0.1s ease;
}
.seg.on {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(200, 255, 77, 0.85))
          drop-shadow(0 0 11px rgba(200, 255, 77, 0.4));
}
.readout__pct {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  color: var(--accent); align-self: flex-start; margin-top: 0.15em;
  filter: drop-shadow(0 0 8px rgba(200, 255, 77, 0.5));
}
.readout__label {
  font-family: var(--font-body); font-size: 0.72rem;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; align-items: center; gap: 0.55rem;
}
.blink { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ============ Cursor ============ */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 999;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor {
  width: 36px; height: 36px;
  border: 1px solid rgba(242, 242, 236, 0.4);
  transition: width 0.3s, height 0.3s, background 0.3s, border-color 0.3s;
}
.cursor.is-hover {
  width: 64px; height: 64px;
  background: var(--accent-dim);
  border-color: var(--accent);
}
.cursor-dot { width: 4px; height: 4px; background: var(--accent); }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 11, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 0.8rem; padding-bottom: 0.8rem;
}
.nav.is-menu-open {
  z-index: 102;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem; letter-spacing: 0.04em;
}
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-dim); position: relative;
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative; z-index: 102;
}
.nav__burger span {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--ink); transition: transform 0.35s, top 0.35s;
}
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 23px; }
.nav__burger.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* ============ Mobile menu ============ */
.menu {
  position: fixed; inset: 0; z-index: 101;
  background: var(--bg-2);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6rem var(--pad) 2.5rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  visibility: hidden;
}
.menu.is-open { clip-path: inset(0 0 0% 0); visibility: visible; }
.menu__links { display: flex; flex-direction: column; gap: 0.4rem; }
.menu__links a {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.menu__links a em {
  font-family: var(--font-body); font-style: normal;
  font-size: 0.8rem; color: var(--accent);
}
.menu__foot {
  display: flex; flex-direction: column; gap: 0.4rem;
  color: var(--ink-dim); font-size: 0.9rem;
}
.menu__foot a { color: var(--accent); }

/* ============ Buttons ============ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 2.2rem;
  border: 1px solid var(--ink);
  border-radius: 100px;
  font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
  overflow: hidden;
  transition: color 0.4s, border-color 0.4s;
  background: transparent;
  isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  border-radius: 100px;
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.btn:hover { color: var(--bg); border-color: var(--accent); }
.btn:hover::before { transform: translateY(0); }
.btn--ghost { border-color: var(--line); color: var(--ink-dim); }
.btn--small { padding: 0.7rem 1.5rem; font-size: 0.78rem; }
.btn--big {
  padding: 1.4rem 3.2rem;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  border-color: var(--accent); color: var(--accent);
}
.btn--big:hover { color: var(--bg); }

/* ============ Sections (shared) ============ */
.section { padding: clamp(6rem, 12vw, 11rem) var(--pad); position: relative; }
.section__tag {
  display: flex; align-items: center;
  font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 2rem;
}
.section__head { margin-bottom: clamp(3rem, 7vw, 6rem); }
.section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  line-height: 1.02; letter-spacing: -0.02em;
}
.section__title .reveal-mask { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.section__title .reveal-mask > span { display: block; }
.accent { color: var(--accent); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--pad) clamp(3rem, 7vh, 5.5rem);
  overflow: hidden;
}
#webgl {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero__inner { position: relative; z-index: 2; }
.hero__eyebrow {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: clamp(1.2rem, 3vh, 2.2rem);
}
.tick {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: 0 0 auto;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
/* Terminal typewriter line */
.typeline {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", "Courier New", monospace;
  text-transform: none; letter-spacing: 0;
  display: inline-flex; align-items: baseline;
  gap: 0; white-space: nowrap;
}
.typeline__word { color: var(--accent); }
.typeline__caret {
  display: inline-block; width: 0.55em; height: 1.05em;
  background: var(--accent); margin-right: 0.45em;
  transform: translateY(0.16em);
  animation: blink 1.05s steps(1) infinite;
}
.hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 9.2vw, 9rem);
  line-height: 0.98; letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}
.hero__line { display: block; overflow: hidden; white-space: nowrap; }
.hero__line .char { display: inline-block; will-change: transform; }
.hero__line--accent { color: var(--accent); }
.hero__bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2.5rem; flex-wrap: wrap;
}
.hero__sub { max-width: 34rem; color: var(--ink-dim); font-size: clamp(0.95rem, 1.6vw, 1.15rem); }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; right: var(--pad); bottom: clamp(3rem, 7vh, 5.5rem);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--ink-dim); z-index: 2;
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px; height: 56px; background: var(--line);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--accent);
  animation: scrollHint 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes scrollHint {
  0% { top: -50%; } 100% { top: 110%; }
}

/* ============ Marquee ============ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  overflow: hidden;
  background: var(--bg-2);
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap; padding-right: 0.6em;
}
.marquee__track i { font-style: normal; color: var(--accent); padding: 0 0.45em; }
@keyframes marquee {
  from { transform: translateX(0); } to { transform: translateX(-50%); }
}

/* ============ Manifesto ============ */
.manifesto { max-width: 70rem; }
.manifesto__text {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.55rem, 4vw, 3.2rem);
  line-height: 1.34; letter-spacing: -0.005em;
  max-width: 22ch;
}
@media (min-width: 861px) { .manifesto__text { max-width: 28ch; } }
.manifesto__text .word { opacity: 0.14; transition: none; }

/* ============ Sectors ============ */
.sector-stack { display: flex; flex-direction: column; }
.sector-card {
  position: sticky;
  top: clamp(5.5rem, 12vh, 8rem);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  margin-bottom: 1.2rem;
  transition: border-color 0.4s, background 0.4s;
}
.sector-card:hover { border-color: rgba(200, 255, 77, 0.45); }
.sector-card__head {
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  padding-bottom: 1.4rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.sector-card__num {
  font-size: 0.85rem; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.sector-card__head h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  letter-spacing: -0.01em; line-height: 1;
  flex: 1 1 auto;
}
.sector-card__chip {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(200, 255, 77, 0.35);
  border-radius: 100px; padding: 0.45rem 1rem;
  white-space: nowrap;
}
.sector-card__body {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}
.sector-card__body p { color: var(--ink-dim); font-size: clamp(0.95rem, 1.5vw, 1.15rem); max-width: 30rem; }
.sector-card__body ul { display: flex; flex-direction: column; }
.sector-card__body li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  position: relative; padding-left: 1.4rem;
}
.sector-card__body li:last-child { border-bottom: 0; }
.sector-card__body li::before {
  content: "→"; position: absolute; left: 0; color: var(--accent);
}

/* ============ Process ============ */
.process { padding-bottom: 0; }
.process__viewport { overflow: hidden; }
.process__track {
  display: flex; gap: 1.2rem;
  width: max-content;
  padding-bottom: clamp(6rem, 12vw, 11rem);
  will-change: transform;
}
.step {
  width: clamp(280px, 38vw, 480px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex; flex-direction: column; gap: 1.1rem;
  min-height: clamp(320px, 44vh, 420px);
  transition: border-color 0.4s;
}
.step:hover { border-color: rgba(200, 255, 77, 0.45); }
.step__num { color: var(--accent); font-size: 0.85rem; letter-spacing: 0.1em; }
.step h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}
.step p { color: var(--ink-dim); flex: 1; }
.step__meta {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
  border-top: 1px solid var(--line); padding-top: 1rem;
}

/* ============ Results ============ */
.results { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}
.stat {
  background: var(--bg);
  padding: clamp(1.8rem, 3.5vw, 3rem) clamp(1.4rem, 3vw, 2.4rem);
  display: flex; flex-direction: column; gap: 0.8rem;
}
.stat__value {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--ink-dim); font-size: 0.92rem; }
.quote { max-width: 56rem; }
.quote p {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 3.2vw, 2.3rem); line-height: 1.3;
  margin-bottom: 1.5rem;
}
.quote cite { font-style: normal; color: var(--ink-dim); font-size: 0.92rem; }

/* ============ CTA ============ */
.cta { text-align: center; padding-top: clamp(7rem, 14vw, 13rem); padding-bottom: clamp(7rem, 14vw, 13rem); }
.cta .section__tag { margin-bottom: 1.6rem; justify-content: center; }
.cta__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 1; letter-spacing: -0.02em; text-transform: uppercase;
  margin-bottom: 1.8rem;
}
.cta__title .reveal-mask { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.cta__title .reveal-mask > span { display: block; }
.cta__sub { color: var(--ink-dim); margin-bottom: 3rem; font-size: clamp(0.95rem, 1.6vw, 1.15rem); }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 3rem var(--pad) 2rem; }
.footer__top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.5rem;
}
.footer__logo { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.footer__links { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.footer__links a { color: var(--ink-dim); font-size: 0.88rem; transition: color 0.3s; }
.footer__links a:hover { color: var(--accent); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--ink-dim); font-size: 0.8rem;
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}
.footer__bottom a:hover { color: var(--accent); }

/* ============ Reveal helpers ============ */
.reveal-line { opacity: 0; transform: translateY(28px); }

/* ============ Responsive ============ */
@media (max-width: 1200px) {
  .hero__scroll { display: none; }
}

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .sector-card__body { grid-template-columns: 1fr; }
  .sector-card { position: relative; top: auto; }
  .process__viewport { overflow: visible; }
  .process__track {
    flex-direction: column; width: 100%;
    transform: none !important;
  }
  .step { width: 100%; min-height: 0; }
}
