/* ═══════════════════════════════════════════════════════════
   EQVASSET — Shared Design System
   Dark / FPGA-edge aesthetic · green accent · DM Sans + serif
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg: #06080c;
  --bg-2: #080b11;
  --surface: #0c1018;
  --surface-2: #11161f;
  --border: #1a212e;
  --border-bright: #232d3d;
  --accent: #00e5a0;
  --accent-dim: #00e5a022;
  --accent-glow: #00e5a044;
  --accent-bright: #33ffbe;
  --text: #e8edf5;
  --text-dim: #8a99b3;
  --text-soft: #6b7a94;
  --text-muted: #3a4860;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --maxw: 1180px;
  --nav-h: 72px;
}

html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.5;
}

/* ─── Background canvas (gaussian surface) ─── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.85;
}
.bg-vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 35%, var(--bg) 85%);
  z-index: 1; pointer-events: none;
}

/* ─── Intro overlay (short ~2s) ─── */
.intro {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.7s ease;
}
.intro.hidden { opacity: 0; pointer-events: none; }
.intro-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.08em;
  opacity: 0;
  transform: scale(1.08);
  animation: introIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.intro-name .accent-part { color: var(--accent); }
.intro-bar {
  position: absolute;
  bottom: 38%;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: introBar 1.6s ease forwards 0.3s;
}
@keyframes introIn { to { opacity: 1; transform: scale(1); } }
@keyframes introBar { from { width: 0; } to { width: 160px; } }

/* ─── Layout helpers ─── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }
.page { position: relative; z-index: 2; }
section { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--accent); opacity: 0.6;
}

h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; color: var(--text); }
.serif { font-family: var(--serif); font-style: italic; }
.serif em { font-style: normal; color: var(--accent); text-shadow: 0 0 40px var(--accent-glow); }

p { color: var(--text-dim); }
a { color: inherit; text-decoration: none; }

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex; align-items: center;
  background: rgba(6, 8, 12, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  background: rgba(6, 8, 12, 0.92);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(0,229,160,0.18)); }
.brand-mark .hx-out { stroke: var(--accent); stroke-width: 1.4; fill: none; opacity: 0.45; }
.brand-mark .hx-in { stroke: var(--accent); stroke-width: 1; fill: var(--accent); fill-opacity: 0.08; }
.brand-mark .hx-core { fill: var(--accent); opacity: 0.7; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.06em; }
.brand-name .accent-part { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 2.2rem; }
.nav-links a {
  font-size: 0.82rem; font-weight: 400; letter-spacing: 0.04em;
  color: var(--text-dim);
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 1px; background: var(--accent);
}
.nav-cta {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent-dim);
  border-radius: 100px;
  color: var(--accent) !important;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  transition: all 0.25s ease;
}
.nav-cta:hover { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); transition: all 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #03110c;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-bright); box-shadow: 0 0 28px var(--accent-glow); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--border-bright);
  color: var(--text);
  background: rgba(255,255,255,0.01);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── Hero (page-level) ─── */
.hero {
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 4rem) 0 5rem;
}
.hero.short { min-height: 62vh; }
.hero h1 {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.08;
  max-width: 900px;
  margin: 1.6rem 0 1.8rem;
}
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 50px var(--accent-glow); }
.hero .lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.8;
  max-width: 620px;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}
.hero .lede strong { color: var(--text); font-weight: 500; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── Section scaffolding ─── */
.section { padding: 6rem 0; }
.section-head { max-width: 720px; margin-bottom: 3.5rem; }
.section-head h2 {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 1.2rem 0 1.2rem;
}
.section-head h2 em { font-style: normal; color: var(--accent); }
.section-head p { font-size: 1.05rem; line-height: 1.8; }

.divider-line {
  height: 1px; border: none;
  background: linear-gradient(to right, transparent, var(--border-bright), transparent);
  margin: 0;
}

/* ─── Cards ─── */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.8);
}
.card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-dim), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover::after { opacity: 1; }
.card .card-icon {
  width: 42px; height: 42px; margin-bottom: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim);
}
.card .card-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.7rem; font-weight: 500; letter-spacing: 0.01em; }
.card p { font-size: 0.92rem; line-height: 1.75; color: var(--text-soft); }
.card .tag { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 500; }

/* ─── Stat band ─── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
}
.stat { padding: 2.2rem 1.6rem; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.6rem;
}
.stat .num span { font-size: 1.1rem; font-style: normal; color: var(--text-dim); }
.stat .lbl { font-size: 0.78rem; letter-spacing: 0.08em; color: var(--text-soft); text-transform: uppercase; }

/* ─── Feature row (alternating) ─── */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
  padding: 4rem 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--border); }
.feature-row h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-family: var(--serif); font-style: italic; margin: 1rem 0 1.2rem; }
.feature-row h3 em { font-style: normal; color: var(--accent); }
.feature-row p { font-size: 1rem; line-height: 1.85; margin-bottom: 1.4rem; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.feature-list li {
  position: relative; padding-left: 1.6rem;
  font-size: 0.92rem; color: var(--text-dim); line-height: 1.6;
}
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; background: var(--accent); border-radius: 1px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.feature-list li strong { color: var(--text); font-weight: 500; }

/* Visual panel beside features */
.panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.panel-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ─── Reveal animation ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ─── Page header (interior pages) ─── */
.page-header { padding: calc(var(--nav-h) + 5rem) 0 3.5rem; }
.page-header h1 {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  margin: 1.4rem 0 1.4rem; max-width: 850px; line-height: 1.1;
}
.page-header h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 50px var(--accent-glow); }
.page-header p { font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.8; max-width: 640px; }

/* ─── CTA band ─── */
.cta-band {
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-dim), transparent 60%),
    linear-gradient(160deg, var(--surface), var(--bg-2));
  padding: 4rem 3rem;
  text-align: center;
}
.cta-band h2 { font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.cta-band h2 em { font-style: normal; color: var(--accent); }
.cta-band p { max-width: 520px; margin: 0 auto 2rem; font-size: 1.02rem; line-height: 1.7; }
.cta-band .hero-actions { justify-content: center; }

/* ─── Footer ─── */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 4rem 0 2.5rem;
  margin-top: 6rem;
}
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 300px; margin-top: 1rem; color: var(--text-soft); }
.footer-col h4 { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.2rem; font-weight: 500; }
.footer-col a { display: block; font-size: 0.88rem; color: var(--text-dim); margin-bottom: 0.7rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.04em;
}
.footer-bottom .legal { display: flex; gap: 1.5rem; }

/* ─── Forms ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.field input, .field select, .field textarea {
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--sans); font-size: 0.92rem; font-weight: 300;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.8rem; color: var(--text-soft); margin-top: 1rem; }
.form-success {
  display: none; padding: 1rem 1.2rem; border-radius: 10px;
  background: var(--accent-dim); border: 1px solid var(--accent-dim);
  color: var(--accent); font-size: 0.9rem; margin-top: 1.2rem;
}
.form-success.show { display: block; }

/* ─── Misc ─── */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.95rem; border: 1px solid var(--accent-dim);
  border-radius: 100px; background: linear-gradient(135deg, var(--accent-dim), transparent);
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); font-weight: 500;
}
.pill .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent-glow); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.lead-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.4; color: var(--text);
  max-width: 860px;
}
.lead-quote em { font-style: normal; color: var(--accent); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .feature-row { grid-template-columns: 1fr; gap: 2rem; }
  .feature-row.flip .panel { order: -1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 1.3rem; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(8, 11, 17, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.3rem 1.6rem;
    transform: translateY(-150%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
  .nav-links a.active::after { display: none; }
  .nav-links .nav-cta { margin-top: 1rem; width: 100%; justify-content: center; border-bottom: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .section { padding: 4rem 0; }
  .cta-band { padding: 2.5rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
