/* Zephlon — landing. Instrument / dual-trace-scope identity.
   Arc = cyan trace (traffic it generates); Snoopy = amber trace (RF it reads). */

:root {
  --bg:      #0a0e12;
  --bg-2:    #0c1117;
  --panel:   #10161d;
  --panel-2: #0d131a;
  --line:    #1b232d;   /* hairlines + instrument grid */
  --line-2:  #263140;
  --ink:     #e9eff3;
  --muted:   #8a97a3;
  --dim:     #57626d;
  --arc:     #2fd6c6;   /* CH1 cyan  */
  --snoopy:  #f6b44c;   /* CH2 amber */
  --ok:      #5ec27a;
  --maxw:    1140px;
  --ff-sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint instrument-grid wash behind everything */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
  background-position: -1px -1px;
  background-attachment: fixed;
  background-blend-mode: normal;
}
body::before {
  /* dim the grid so it reads as texture, plus a top glow */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(47,214,198,0.10), transparent 60%),
    radial-gradient(900px 500px at 8% 4%, rgba(246,180,76,0.06), transparent 55%),
    linear-gradient(var(--bg) 0%, rgba(10,14,18,0.72) 100%);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 20;
  background: var(--arc); color: #04110f; padding: 10px 16px; border-radius: 6px;
  font-family: var(--ff-mono); font-size: 13px;
}
.skip:focus { left: 12px; top: 12px; }

/* ---- type ---- */
.eyebrow {
  font-family: var(--ff-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--arc);
  margin: 0 0 18px;
}
.display {
  font-family: var(--ff-sans); font-weight: 600; letter-spacing: -0.022em;
  line-height: 1.04; margin: 0;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
}
.display.sm { font-size: clamp(1.7rem, 3.2vw, 2.35rem); line-height: 1.12; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: 46ch; margin: 22px 0 0; }

/* ---- buttons ---- */
.btn {
  --pad: 13px 20px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.04em; text-decoration: none; padding: var(--pad);
  border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--arc); outline-offset: 2px; }
.btn-solid { background: var(--arc); color: #04110f; box-shadow: 0 0 0 rgba(47,214,198,0); }
.btn-solid:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(47,214,198,0.22); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: rgba(255,255,255,0.01); }
.btn-line:hover { border-color: var(--arc); color: var(--arc); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn.big { padding: 18px 26px; font-size: 15px; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10,14,18,0.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-word { font-family: var(--ff-mono); font-weight: 600; letter-spacing: 0.28em; font-size: 15px; }
.brand-mark {
  width: 17px; height: 17px; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--arc) 0 30%, var(--snoopy) 30% 44%, #2a3541 44% 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 56%, #000 59%);
          mask: radial-gradient(closest-side, transparent 56%, #000 59%);
  box-shadow: 0 0 12px rgba(47,214,198,0.35);
  flex: none;
}
.nav-links { margin-left: auto; display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--ff-mono); font-size: 13px; letter-spacing: 0.05em;
  color: var(--muted); text-decoration: none; padding: 6px 0; position: relative;
}
.nav-links a:hover { color: var(--ink); }

/* ---- hero ---- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---- signature scope ---- */
.scope {
  margin: 0; border: 1px solid var(--line-2); border-radius: 14px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}
.scope-head, .scope-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 16px; font-family: var(--ff-mono); font-size: 11.5px;
  letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase;
}
.scope-head { border-bottom: 1px solid var(--line); }
.scope-title { color: var(--muted); }
.scope-foot { border-top: 1px solid var(--line); gap: 18px; justify-content: flex-start; }
.scope-foot span { display: inline-flex; align-items: center; gap: 8px; }
.scope-foot i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.dot-arc { background: var(--arc); box-shadow: 0 0 8px var(--arc); }
.dot-snoopy { background: var(--snoopy); box-shadow: 0 0 8px var(--snoopy); }

.scope-screen { position: relative; aspect-ratio: 2 / 1; }
.readout {
  position: absolute; z-index: 2; top: 14px;
  font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--ink); background: rgba(6,10,14,0.66); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(4px);
}
.readout i { width: 7px; height: 7px; border-radius: 50%; }
.r-arc { left: 14px; }
.r-arc i { background: var(--arc); box-shadow: 0 0 8px var(--arc); }
.r-snoopy { right: 14px; }
.r-snoopy i { background: var(--snoopy); box-shadow: 0 0 8px var(--snoopy); }

.trace { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.trace .grid { color: var(--line); }
.trace .axis { stroke: var(--line-2); stroke-width: 1; }
.line-arc, .line-snoopy { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.line-arc { stroke: var(--arc); stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(47,214,198,0.5)); }
.fill-arc { fill: url(#arcfill); }
.line-snoopy { stroke: var(--snoopy); stroke-width: 2; opacity: 0.92; filter: drop-shadow(0 0 5px rgba(246,180,76,0.4)); }
.cursor { stroke: rgba(233,239,243,0.5); stroke-width: 1; }

/* trace draw-in + sweep (one orchestrated boot moment) */
.line-arc { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.6s ease .25s forwards; }
.line-snoopy { stroke-dasharray: 1700; stroke-dashoffset: 1700; animation: draw 1.8s ease .5s forwards; }
.fill-arc { opacity: 0; animation: fade 1s ease 1.3s forwards; }
.cursor { animation: sweep 5.5s linear 1.9s infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes sweep { 0% { transform: translateX(0); opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { transform: translateX(640px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .line-arc, .line-snoopy { stroke-dashoffset: 0; animation: none; }
  .fill-arc { opacity: 1; animation: none; }
  .cursor { display: none; }
}

/* ---- section rhythm ---- */
.products, .loop, .cta { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 58ch; margin-bottom: 44px; }

/* ---- products ---- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card {
  position: relative; border: 1px solid var(--line-2); border-radius: 14px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: 28px 28px 30px; display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  border-radius: 14px 14px 0 0;
}
.card-arc::before { background: linear-gradient(90deg, var(--arc), transparent 70%); }
.card-snoopy::before { background: linear-gradient(90deg, var(--snoopy), transparent 70%); }
.card-arc:hover { border-color: rgba(47,214,198,0.5); transform: translateY(-3px); }
.card-snoopy:hover { border-color: rgba(246,180,76,0.5); transform: translateY(-3px); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.chan { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.status { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; }
.status-ok i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-dev i { background: var(--snoopy); box-shadow: 0 0 8px var(--snoopy); }
.card-name { font-family: var(--ff-sans); font-weight: 600; font-size: 2rem; letter-spacing: -0.02em; margin: 0; }
.card-arc .card-name { color: var(--arc); }
.card-snoopy .card-name { color: var(--snoopy); }
.card-tag { font-family: var(--ff-mono); font-size: 13px; color: var(--ink); margin: 4px 0 16px; letter-spacing: 0.02em; }
.card-body { color: var(--muted); font-size: 15.5px; margin: 0 0 20px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 26px; }
.chips li {
  font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px; background: rgba(255,255,255,0.015);
}
.card .btn { margin-top: auto; align-self: flex-start; }

/* ---- the loop ---- */
.path { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.stage { padding: 26px 24px; border-right: 1px solid var(--line); position: relative; }
.stage:last-child { border-right: none; }
.stage-k { font-family: var(--ff-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--arc); display: block; margin-bottom: 10px; }
.stage:nth-child(2) .stage-k { color: var(--ink); }
.stage:nth-child(3) .stage-k { color: var(--snoopy); }
.stage p { margin: 0; color: var(--muted); font-size: 14.5px; }
/* signal-path connectors between stages */
.stage:not(:last-child)::after {
  content: "▸"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%);
  color: var(--dim); background: var(--bg-2); z-index: 2; font-size: 13px; line-height: 1;
}
.caprow { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 0; margin: 0; }
.caprow li { font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.caprow li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--arc); box-shadow: 0 0 7px var(--arc); }

/* ---- cta ---- */
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta .lede { margin-top: 16px; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); padding: 34px 0; }
.foot-inner { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 11px; }
.foot-note { font-family: var(--ff-mono); font-size: 12px; color: var(--dim); letter-spacing: 0.04em; margin-left: 6px; }
.foot-links { margin-left: auto; display: flex; gap: 24px; }
.foot-links a { font-family: var(--ff-mono); font-size: 13px; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--arc); }
.foot-copy { font-family: var(--ff-mono); font-size: 12.5px; color: var(--dim); margin: 0; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .path { grid-template-columns: 1fr; }
  .stage { border-right: none; border-bottom: 1px solid var(--line); }
  .stage:last-child { border-bottom: none; }
  .stage:not(:last-child)::after { content: "▾"; right: 50%; top: auto; bottom: -9px; transform: translateX(50%); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .foot-links { margin-left: 0; width: 100%; }
  .cta-inner .btn.big { width: 100%; justify-content: center; }
}
