/* ==========================================================================
   elecrostack — placeholder / coming-soon
   ========================================================================== */

:root {
  --bg: #0a0f14;
  --bg-2: #0e1620;
  --panel: rgba(18, 27, 38, 0.72);
  --line: rgba(120, 180, 200, 0.16);
  --line-strong: rgba(120, 200, 220, 0.35);
  --text: #dbe7ee;
  --muted: #8ba0b1;
  --accent: #35e0b0;
  --accent-2: #38bdf8;
  --warn: #fbbf24;
  --radius: 16px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(53, 224, 176, 0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 12%, rgba(56, 189, 248, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.accent { color: var(--accent); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- background layers ---------- */
#traces {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: .55; pointer-events: none;
}
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 50% 0%, rgba(53, 224, 176, .06), transparent 70%);
}
.scanlines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  max-width: var(--maxw); margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(10,15,20,.86), rgba(10,15,20,.28));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; fill: var(--accent); filter: drop-shadow(0 0 10px rgba(53,224,176,.45)); }
.brand__mark circle { fill: var(--bg); }
.brand__text em { font-style: normal; color: var(--accent); }

.site-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: .95rem; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.lang { display: flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.lang__btn {
  background: transparent; border: 0; color: var(--muted);
  font-family: var(--mono); font-size: .8rem; font-weight: 600;
  padding: .4rem .75rem; cursor: pointer;
}
.lang__btn.is-active { background: var(--accent); color: #04110d; }
.lang__btn:not(.is-active):hover { color: var(--text); }

/* ---------- layout ---------- */
main { position: relative; z-index: 10; }
.section, .hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem);
}
.hero { padding-top: clamp(3.5rem, 10vw, 7rem); }

/* ---------- hero ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .35rem .8rem; margin-bottom: 1.4rem;
  background: rgba(53,224,176,.05);
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(53,224,176,.6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53,224,176,.55); }
  70% { box-shadow: 0 0 0 12px rgba(53,224,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(53,224,176,0); }
}

.hero__title { font-size: clamp(2.3rem, 6.4vw, 4.4rem); max-width: 16ch; margin-bottom: 1rem; }
.hero__title span { display: block; }
.hero__lead { max-width: 62ch; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: .95rem; font-weight: 600;
  padding: .8rem 1.5rem; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #04110d; box-shadow: 0 8px 30px -10px rgba(53,224,176,.7); }
.btn--primary:hover { box-shadow: 0 12px 34px -8px rgba(53,224,176,.85); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(120,200,220,.08); }

/* ---------- featured teaser ---------- */
.feature {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border: 1px solid var(--line-strong); border-radius: 22px;
  background:
    radial-gradient(600px 320px at 0% 0%, rgba(53,224,176,.10), transparent 60%),
    var(--bg-2);
}
.feature__tag { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.feature h3 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin: .5rem 0 .6rem; }
.feature p { color: var(--muted); }
.feature__list { list-style: none; margin: 1rem 0 1.4rem; padding: 0; display: grid; gap: .4rem; }
.feature__list li { padding-left: 1.3rem; position: relative; color: var(--text); font-size: .95rem; }
.feature__list li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.feature__art { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #060a0e; }
.feature__art svg { display: block; width: 100%; height: auto; }

@media (max-width: 780px) { .feature { grid-template-columns: 1fr; } }

/* ---------- sections ---------- */
.section__head { max-width: 60ch; margin-bottom: 2.4rem; }
.kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; color: var(--accent-2); }
.section__head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-top: .3rem; }
.section__intro { color: var(--muted); margin: 0; }

/* ---------- topic grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.card {
  position: relative; overflow: hidden;
  padding: 1.5rem 1.4rem 1.4rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto auto 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .35s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 20px 40px -26px rgba(53,224,176,.6); }
.card:hover::before { width: 100%; }
.card__num { font-family: var(--mono); font-size: .78rem; color: var(--accent); opacity: .8; }
.card h3 { margin: .5rem 0 .4rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- progress ---------- */
.progress { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; max-width: 720px; }
.progress__item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.progress__dot { flex: 0 0 auto; width: 14px; height: 14px; margin-top: .35rem; border-radius: 50%; border: 2px solid var(--line-strong); }
.progress__item.is-done .progress__dot { background: var(--accent); border-color: var(--accent); }
.progress__item.is-active .progress__dot { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(251,191,36,.15); animation: pulse 2s infinite; }
.progress__item strong { display: block; font-weight: 600; }
.progress__item span { color: var(--muted); font-size: .92rem; }
.progress__item.is-active { border-color: rgba(251,191,36,.35); }

/* ---------- CTA / signup ---------- */
.cta {
  padding: clamp(2rem, 5vw, 3.2rem);
  border: 1px solid var(--line-strong); border-radius: 22px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(56,189,248,.10), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(53,224,176,.10), transparent 60%),
    var(--bg-2);
}
.cta h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
.cta > p { color: var(--muted); }
.signup { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; position: relative; }
.signup input {
  flex: 1 1 260px; min-width: 0;
  padding: .8rem 1rem; font-family: var(--sans); font-size: .95rem;
  color: var(--text); background: rgba(4,10,14,.7);
  border: 1px solid var(--line-strong); border-radius: 10px;
}
.signup input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53,224,176,.18); }
.signup__msg { flex: 1 0 100%; margin: 0; font-size: .88rem; min-height: 1.2em; }
.signup__msg.is-ok { color: var(--accent); }
.signup__msg.is-err { color: #f87171; }
.cta__alt { margin: 1.4rem 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- footer ---------- */
.site-footer {
  position: relative; z-index: 10;
  max-width: var(--maxw); margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
}
.footer__row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.footer__brand { font-weight: 700; }
.footer__brand span { color: var(--accent); }
.footer__copy { color: var(--muted); font-size: .9rem; }
.footer__nav { display: flex; gap: 1.2rem; margin-left: auto; }
.footer__nav a { color: var(--muted); font-size: .9rem; }

/* ---------- article / reference design ---------- */
.article { max-width: 900px; }
.article__head { margin-bottom: 2rem; }
.article__head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.article__meta { font-family: var(--mono); font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.article__meta a { color: var(--accent-2); }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--text); }

.prose h2 { margin-top: 2.4rem; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.prose h3 { margin-top: 1.6rem; font-size: 1.15rem; color: var(--accent); }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose code { font-family: var(--mono); font-size: .88em; background: rgba(120,200,220,.1); padding: .1em .4em; border-radius: 5px; color: var(--text); }

.schematic {
  margin: 2rem 0; padding: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #060a0e; overflow-x: auto;
}
.schematic svg { display: block; width: 100%; min-width: 640px; height: auto; }
.schematic figcaption { margin-top: .8rem; font-size: .82rem; color: var(--muted); font-family: var(--mono); }

.specs { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .92rem; }
.specs th, .specs td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--accent); font-weight: 600; white-space: nowrap; font-family: var(--mono); font-size: .82rem; }
.specs td { color: var(--muted); }
.specs tr:hover td { color: var(--text); }

.callout {
  margin: 1.6rem 0; padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
  background: rgba(53,224,176,.06); color: var(--text); font-size: .95rem;
}
.callout strong { display: block; margin-bottom: .2rem; }

/* ---------- legal pages ---------- */
.legal { max-width: 780px; }
.legal h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.legal h2 { margin-top: 2rem; font-size: 1.25rem; }
.legal h3 { margin-top: 1.2rem; font-size: 1rem; color: var(--accent); }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--accent-2); }
.notice {
  margin: 1.2rem 0 2rem; padding: .9rem 1.1rem;
  border: 1px dashed rgba(251,191,36,.5); border-radius: 10px;
  background: rgba(251,191,36,.06); color: var(--text); font-size: .9rem;
}

/* long-form bilingual blocks: only the active language is shown */
[data-lang-block] { display: none; }
[data-lang-block].is-on { display: block; }

/* inner page header tweak */
.page-header { padding-bottom: .5rem; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .site-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
