/* =========================================================
   THE ZERO STATE — styles.css
   "Binary Terminal / Code Block" — pitch black + electric azure.
   Vanilla CSS. No frameworks.
   ========================================================= */

:root {
  --bg:        #0D0E11;   /* cool near-black */
  --bg-2:      #121419;   /* terminal / panels */
  --bg-3:      #171A20;   /* raised */
  --divider:   #242830;   /* charcoal dividers */
  --text:      #EEF1F4;   /* stark white */
  --muted:     #8B929B;   /* secondary grey */

  --accent:        #2AA8F0;              /* electric azure (brand) */
  --accent-bright: #86D2FF;              /* light core */
  --accent-deep:   #1580C4;              /* deep azure */
  --accent-ink:    #04121C;              /* text on accent */
  --glow-soft: rgba(42, 168, 240, 0.55);
  --glow-dim:  rgba(42, 168, 240, 0.26);

  --maxw: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Exo 2", system-ui, sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; font-family: var(--mono); font-size: 0.8rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Brand mark ---------- */
.mark {
  color: var(--accent);
  height: 28px; width: auto;
  filter: drop-shadow(0 0 3px var(--glow-soft)) drop-shadow(0 0 10px var(--glow-dim));
}

/* ---------- Shared labels / type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  text-shadow: 0 0 12px var(--glow-dim);
}
.marker {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em;
  color: var(--accent); text-shadow: 0 0 10px var(--glow-dim);
}
.marker__name {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
}
.section__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.85rem);
  line-height: 1.04; letter-spacing: -0.01em;
}
.prose {
  color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65; max-width: 62ch;
}

/* ---------- Icons ---------- */
.ico { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.9rem 1.5rem;
  border: 1px solid transparent; border-radius: 0; cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn > span:last-child { transition: transform 0.18s var(--ease); }
.btn--accent { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.btn--accent:hover {
  background: transparent; color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 18px var(--glow-dim);
}
.btn--accent:hover > span:last-child { transform: translateX(4px); }
.btn--ghost { color: var(--text); border-color: var(--divider); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 16px var(--glow-dim); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 14, 17, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}
.nav__inner {
  display: flex; align-items: center; gap: 1.5rem;
  height: 68px;
}
.nav__logo { display: inline-flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.nav__word { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em; }
.nav__links {
  display: flex; gap: clamp(1rem, 2.4vw, 2.2rem);
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.nav__links a { position: relative; padding-bottom: 2px; transition: color 0.18s var(--ease); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--accent); box-shadow: 0 0 8px var(--glow-soft);
  transform: scaleX(0); transform-origin: left; transition: transform 0.2s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

.nav__status {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  color: var(--muted); white-space: nowrap;
}
.nav__status .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--glow-soft); animation: pulse 2s infinite;
}
.nav__status time { color: var(--accent); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.nav__toggle { display: none; width: 34px; height: 34px; position: relative; }
.nav__toggle span {
  position: absolute; left: 6px; right: 6px; height: 2px; background: var(--text);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 11px; }
.nav__toggle span:nth-child(2) { top: 16px; }
.nav__toggle span:nth-child(3) { top: 21px; }
.nav.open .nav__toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav.open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav__toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--divider);
  padding-block: clamp(3.5rem, 10vh, 7rem) 0;
  background-image:
    radial-gradient(55% 50% at 72% 40%, rgba(42, 168, 240, 0.12), transparent 70%),
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}
.hero__ghost {
  position: absolute; right: -3%; top: 46%; transform: translateY(-50%);
  height: 120%; width: auto; color: var(--accent); opacity: 0.06;
  pointer-events: none; filter: drop-shadow(0 0 34px var(--glow-dim));
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding-bottom: clamp(2.5rem, 6vh, 4rem);
}
.hero__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  line-height: 1.0; letter-spacing: -0.015em; max-width: 15ch;
  margin-block: 1.4rem 1.6rem;
}
.hero__sub { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.6; max-width: 52ch; }
.hero__actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* terminal */
.terminal {
  background: var(--bg-2); border: 1px solid var(--divider); border-radius: 0;
  box-shadow: 0 0 0 1px rgba(42,168,240,0.06), 0 30px 80px -40px rgba(0,0,0,0.8),
              0 0 60px -20px var(--glow-dim);
  overflow: hidden;
}
.terminal__bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--divider); background: var(--bg-3);
}
.tdot { width: 10px; height: 10px; border-radius: 50%; background: var(--divider); }
.tdot:first-child { background: var(--accent); box-shadow: 0 0 8px var(--glow-dim); }
.terminal__name {
  margin-left: auto; font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase;
}
.terminal__body {
  padding: 1.15rem 1.2rem; min-height: 208px;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.75;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.terminal__body .t-cmd { color: var(--accent); }
.terminal__body .t-ok { color: var(--accent-bright); }
.terminal__body .t-dim { color: var(--muted); }
.caret {
  display: inline-block; color: var(--accent); transform: translateY(1px);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* status line */
.statusline {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.65rem;
  align-items: center; padding-block: 1rem; border-top: 1px solid var(--divider);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--muted);
}
.statusline span:first-child { color: var(--accent); text-shadow: 0 0 10px var(--glow-dim); }
.statusline__dot { color: var(--divider); }

/* ---------- Section scaffolding ---------- */
.section { border-bottom: 1px solid var(--divider); padding-block: clamp(3.5rem, 9vh, 6rem); }
.section__grid {
  display: grid; grid-template-columns: 200px 1fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.section__label { display: flex; flex-direction: column; gap: 0.4rem; position: sticky; top: 100px; }
.section__label--top {
  flex-direction: row; align-items: baseline; gap: 0.9rem;
  position: static; margin-bottom: 2.5rem;
}
.section__body { min-width: 0; }

/* code block (philosophy) */
.codeblock {
  margin-top: 1.6rem; border-left: 2px solid var(--accent);
  padding: 1.2rem 1.5rem; background:
    linear-gradient(90deg, rgba(42,168,240,0.05), transparent 60%);
}
.codeblock__comment {
  display: block; font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.75rem;
}

/* ---------- Services / module selector ---------- */
.modules {
  display: grid; grid-template-columns: minmax(240px, 320px) 1fr;
  border: 1px solid var(--divider);
}
.modules__nav { display: flex; flex-direction: column; border-right: 1px solid var(--divider); }
.module-tab {
  display: flex; align-items: baseline; gap: 0.9rem; text-align: left;
  padding: 1.25rem 1.4rem; border-bottom: 1px solid var(--divider);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
  position: relative;
}
.module-tab:last-child { border-bottom: none; }
.module-tab__idx { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); transition: color 0.18s; }
.module-tab__name { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--muted); transition: color 0.18s; }
.module-tab:hover { background: var(--bg-2); }
.module-tab:hover .module-tab__name { color: var(--text); }
.module-tab.is-active { background: var(--bg-2); }
.module-tab.is-active::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); box-shadow: 0 0 12px var(--glow-soft);
}
.module-tab.is-active .module-tab__idx { color: var(--accent); }
.module-tab.is-active .module-tab__name { color: var(--text); }

.modules__panel { padding: clamp(1.75rem, 3vw, 2.75rem); background: var(--bg); }
.module-panel__title { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.01em; }
.module-panel__desc { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin-top: 0.9rem; max-width: 46ch; }
.module-panel__tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.module-panel__tags li {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--accent); border: 1px solid var(--divider); padding: 0.4rem 0.7rem;
}

/* ---------- Metrics ---------- */
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--divider); }
.stat { padding: clamp(1.5rem, 3vw, 2.25rem); border-right: 1px solid var(--divider); }
.stat:last-child { border-right: none; }
.stat__num {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1; color: var(--accent);
  text-shadow: 0 0 22px var(--glow-dim);
}
.stat__label {
  display: block; margin-top: 0.7rem; font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Contact ---------- */
.initiate__cols { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(2rem, 4vw, 3.5rem); margin-top: 2.4rem; }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.75rem; }
.hp { position: absolute; left: -9999px; }
.field { display: flex; flex-direction: column; }
.field--wide { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem;
}
.field__opt { color: var(--divider); text-transform: none; letter-spacing: 0.05em; }
.field input, .field textarea {
  background: transparent; border: none; border-bottom: 1px solid var(--divider);
  color: var(--text); font-family: var(--sans); font-size: 1rem; padding: 0.55rem 0;
  border-radius: 0; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--divider); }
.field input:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--glow-soft);
}
.form__submit { grid-column: 1 / -1; justify-self: start; margin-top: 0.4rem; }
.form__note {
  grid-column: 1 / -1; font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.04em; color: var(--muted); min-height: 1.2em;
}
.form__note.is-error { color: #FF5C5C; }
.form__note.is-ok { color: var(--accent-bright); }

/* direct channels */
.channels { display: flex; flex-direction: column; gap: 0.9rem; }
.channels__label { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.3rem; }
.channel {
  display: flex; align-items: center; gap: 0.9rem;
  border: 1px solid var(--divider); padding: 0.95rem 1.1rem;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.channel .ico { width: 22px; height: 22px; color: var(--accent); }
.channel span { display: flex; flex-direction: column; line-height: 1.35; }
.channel strong { font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.channel em { font-style: normal; font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.channel:not(.channel--soon):hover {
  border-color: var(--accent); background: var(--bg-2); box-shadow: 0 0 18px var(--glow-dim);
}
.channel--soon { opacity: 0.5; cursor: not-allowed; }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(2.5rem, 6vh, 3.5rem); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; text-align: center; }
.footer__terminal { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; color: var(--muted); }
.footer__accent { color: var(--accent); text-shadow: 0 0 10px var(--glow-dim); }
.footer__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 2rem; font-family: var(--mono); font-size: 0.9rem; }
.footer__contact a { border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color 0.18s, border-color 0.18s; }
.footer__contact a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer__meta { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--muted); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__terminal { order: 2; }
  .metrics__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--divider); }
  .stat:nth-child(odd) { border-right: 1px solid var(--divider); }
  .stat:nth-child(even) { border-right: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
  .initiate__cols { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .section__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .section__label { position: static; flex-direction: row; align-items: baseline; gap: 0.9rem; }
  .modules { grid-template-columns: 1fr; }
  .modules__nav { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--divider); }
  .module-tab { border-bottom: none; border-right: 1px solid var(--divider); white-space: nowrap; }
  .module-tab.is-active::before { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 3px; }
}

@media (max-width: 760px) {
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-2);
    border-bottom: 1px solid var(--divider);
    max-height: 0; overflow: hidden; transition: max-height 0.28s var(--ease);
  }
  .nav.open .nav__links { max-height: 280px; }
  .nav__links a { padding: 1rem var(--gutter); border-top: 1px solid var(--divider); }
  .nav__links a::after { display: none; }
  .nav__status { display: none; }
  .nav__toggle { display: block; }
  .form { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .metrics__grid { grid-template-columns: 1fr; }
  .stat { border-right: none !important; border-bottom: 1px solid var(--divider); }
  .stat:last-child { border-bottom: none; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
