/* ============================================================
   PANMOX / AltNet  —  design system
   Dark, cinematic, high-contrast serif + mono. Apple-minimal spacing.
   ============================================================ */

:root {
  /* palette */
  --bg:        #05070d;
  --bg-2:      #080b13;
  --ink:       #ede7d7;   /* cream serif text */
  --ink-soft:  #b9b4a8;
  --ink-dim:   #6f6c66;
  --line:      rgba(237, 231, 215, 0.10);

  --magenta:   #ff2d78;
  --cyan:      #43d4e8;
  --mint:      #34f5a0;
  --violet:    #b285ff;

  /* type */
  --serif: "Fraunces", "Times New Roman", serif;
  --mono:  "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* spacing rhythm */
  --pad: clamp(20px, 5vw, 80px);
  --maxw: 1280px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- ambient background (glows + grid + stars) ---- */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5; }
.blob.cyan    { width: 46vw; height: 46vw; top: -12vw; left: -12vw;  background: #0a3d4a; }
.blob.magenta { width: 42vw; height: 42vw; bottom: -10vw; right: -8vw; background: #3a0d24; }
.blob.mint    { width: 38vw; height: 38vw; bottom: -16vw; left: 28vw; background: #06281c; opacity: 0.4; }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: 0.5;
}
#stars { position: absolute; inset: 0; }

main, .topbar, .modal-root { position: relative; z-index: 1; }

/* ---- shared layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--cyan); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
}
.eyebrow.dim { color: var(--ink-dim); }
.eyebrow.dim::before { background: var(--ink-dim); box-shadow: none; }
.eyebrow.pink { color: var(--magenta); }
.eyebrow.pink::before { background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }

h1, h2, h3 { font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; }
.italic { font-style: italic; font-weight: 400; }
.dot { color: var(--magenta); }

/* ---- topbar ---- */
.topbar {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  backdrop-filter: blur(8px);
  background: linear-gradient(to bottom, rgba(5,7,13,0.85), rgba(5,7,13,0));
}
.brand {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.35em;
  font-weight: 700; color: var(--ink);
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-dim); text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }

/* the hidden trigger — looks like the decorative node in the PANMOX corner */
.node-trigger {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(67,212,232,0.4);
  display: grid; place-items: center; cursor: pointer;
  position: relative; flex: 0 0 auto;
  transition: transform 0.25s ease;
}
.node-trigger::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  transition: all 0.25s ease;
}
.node-trigger:active { transform: scale(0.9); }
.node-trigger.pulse::after { transform: scale(1.6); background: var(--magenta); box-shadow: 0 0 18px var(--magenta); }

/* ---- hero ---- */
.hero { padding: clamp(60px, 12vh, 150px) 0 clamp(60px, 10vh, 120px); }
.hero .eyebrow { margin-bottom: 28px; }
.display {
  font-size: clamp(72px, 16vw, 200px);
  line-height: 0.9; letter-spacing: -0.04em; font-weight: 600;
}
.hero .lede {
  font-style: italic; color: var(--ink-soft);
  font-size: clamp(18px, 2.4vw, 26px); max-width: 22ch; margin-top: 28px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 34px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--mint);
  padding: 9px 16px; border-radius: 100px;
  border: 1px solid rgba(52,245,160,0.35); background: rgba(52,245,160,0.05);
}
.status-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 10px var(--mint);
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.cta-row { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 15px 26px; border-radius: 100px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  transition: all 0.2s; white-space: nowrap;
}
.btn:hover { border-color: rgba(237,231,215,0.4); }
.btn.solid {
  background: var(--mint); color: #04130c; border-color: var(--mint);
  box-shadow: 0 0 30px rgba(52,245,160,0.25);
}
.btn.solid:hover { box-shadow: 0 0 44px rgba(52,245,160,0.45); }
.btn.pink { background: var(--magenta); color: #fff; border-color: var(--magenta); }

/* ---- marquee ---- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: inline-flex; gap: 48px; animation: slide 28s linear infinite; }
.marquee-track span { font-style: italic; font-size: clamp(22px, 3vw, 34px); color: var(--ink-soft); }
.marquee-track i { color: var(--magenta); font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---- generic section ---- */
.section { padding: clamp(70px, 12vh, 140px) 0; }
.section h2 { font-size: clamp(42px, 8vw, 104px); margin-top: 20px; }
.section .sub { font-style: italic; color: var(--ink-soft); margin-top: 18px; font-size: clamp(16px,2vw,20px); }

.split { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.network-vis {
  aspect-ratio: 1; max-width: 360px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #0e7d8c 0%, #0a4450 35%, transparent 70%);
  display: grid; place-items: center; position: relative;
}
.network-vis::before, .network-vis::after {
  content: ""; position: absolute; border: 1px solid rgba(67,212,232,0.18); border-radius: 50%;
}
.network-vis::before { inset: 12%; }
.network-vis::after  { inset: 28%; }
.network-core {
  width: 36%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #6ee6f4, #1aa6bd);
  box-shadow: 0 0 60px rgba(67,212,232,0.6);
  animation: corepulse 4s ease-in-out infinite;
}
@keyframes corepulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
.body-copy { font-style: italic; color: var(--ink-soft); font-size: clamp(17px,2.2vw,22px); max-width: 30ch; line-height: 1.6; }

/* ---- principle / feature cards ---- */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 48px; }
.card {
  border: 1px solid var(--line); border-radius: 16px; padding: 28px;
  background: linear-gradient(160deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: rgba(237,231,215,0.22); transform: translateY(-3px); }
.card .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--cyan); }
.card h3 { font-size: 26px; margin: 16px 0 10px; }
.card p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.card code { font-family: var(--mono); color: var(--magenta); font-size: 0.92em; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 60px 0 80px; margin-top: 40px; }
footer .big { font-size: clamp(26px,5vw,52px); font-style: italic; color: var(--ink-soft); }
footer .meta { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 40px; }
footer .meta span, footer .meta a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--ink-dim); text-decoration: none; text-transform: uppercase; }

/* ============================================================
   MODALS / OVERLAYS  (login, loader, mia)
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  background: rgba(3,4,9,0.82); backdrop-filter: blur(10px);
  padding: 24px;
}
.overlay.show { display: flex; animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* login card */
.login-card {
  width: 100%; max-width: 400px;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(165deg, rgba(20,24,34,0.95), rgba(8,11,19,0.95));
  padding: 36px 30px; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.login-card .eyebrow { margin-bottom: 22px; }
.login-card h3 { font-size: 30px; margin-bottom: 6px; }
.login-card .hint { color: var(--ink-dim); font-style: italic; font-size: 14px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); display: block; margin-bottom: 8px; }
.field input {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0,0,0,0.3);
  color: var(--ink); font-family: var(--mono); font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.field input:focus { border-color: rgba(67,212,232,0.5); }
.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.login-err {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--magenta); margin-top: 14px; min-height: 16px; text-align: center;
  opacity: 0; transition: opacity 0.2s;
}
.login-err.show { opacity: 1; }
.login-close { position: absolute; top: 22px; right: 26px; color: var(--ink-dim); font-family: var(--mono); cursor: pointer; font-size: 20px; background: none; border: none; }

/* loader */
#loader { background: var(--bg); flex-direction: column; gap: 30px; }
.loader-inner { width: 100%; max-width: 480px; text-align: center; }
.loader-title { font-size: clamp(30px, 7vw, 52px); margin-bottom: 10px; }
.loader-sub { font-family: var(--mono); font-size: 12px; letter-spacing: 0.15em; color: var(--cyan); text-transform: uppercase; }
.loader-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,0.08); margin: 34px 0 18px; overflow: hidden; }
.loader-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--mint)); box-shadow: 0 0 16px var(--mint); transition: width 0.4s ease; }
.loader-log { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); min-height: 20px; letter-spacing: 0.04em; }
.loader-log b { color: var(--mint); font-weight: 400; }

/* utility */
.hidden { display: none !important; }
.noscroll { overflow: hidden; height: 100vh; }

/* ============================================================
   RESPONSIVE — desktop enhancements (mobile-first base above)
   ============================================================ */
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.1fr 0.9fr; gap: 60px; }
  .network-vis { max-width: 420px; }
}
@media (max-width: 600px) {
  .nav { gap: 16px; }
  .nav a { display: none; }
  .nav a.keep { display: inline; }
}
