@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --deep: #0d2529;
  --deep-soft: #12343b;
  --ink: #12343b;
  --paper: #f3f0e8;
  --paper-soft: #e8e4d9;
  --mint: #b8f2dc;
  --mint-strong: #75d8b5;
  --amber: #e5a64b;
  --muted: rgba(243, 240, 232, 0.66);
  --line: rgba(184, 242, 220, 0.2);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { min-width: 320px; background: var(--deep); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--deep);
  color: var(--paper);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--deep) url("/assets/nmchat-login-background.svg") center / cover no-repeat;
  content: "";
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(7, 25, 28, 0.68);
  content: "";
}

button, a { font: inherit; }

a { color: inherit; }

.page-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 28px 5vw 24px;
}

.topbar, .footer, .portal-grid { width: min(1180px, 100%); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand img { border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }

.topbar-tools { display: flex; align-items: center; gap: 18px; }

.network-state, .panel-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.state-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 4px rgba(117, 216, 181, 0.12); }

.network-state.is-offline .state-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(229, 166, 75, 0.14); }

.install-trigger, .secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(184, 242, 220, 0.28);
  border-radius: 5px;
  background: rgba(13, 37, 41, 0.42);
  color: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.install-trigger { padding: 9px 12px; }
.secondary-action { padding: 14px 18px; }

.install-trigger:hover, .secondary-action:hover { border-color: var(--mint); background: rgba(184, 242, 220, 0.12); transform: translateY(-2px); }

.install-symbol { color: var(--mint); font-size: 19px; line-height: 12px; }

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 9vw;
  padding: 8vh 0 10vh;
}

.hero { max-width: 680px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow-rule { width: 38px; height: 1px; background: var(--amber); }

h1 {
  max-width: 700px;
  margin: 0;
  color: var(--paper);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

h1 span { color: var(--mint); }

.lede {
  max-width: 520px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 38px; }

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  min-width: 192px;
  padding: 16px 18px;
  border: 1px solid var(--mint);
  border-radius: 5px;
  background: var(--mint);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.primary-action:hover { border-color: #e0fff1; background: #e0fff1; transform: translateY(-2px); }

.action-arrow { font-size: 20px; font-weight: 500; line-height: 12px; }

.access-note { display: flex; align-items: center; gap: 9px; margin: 30px 0 0; color: rgba(243, 240, 232, 0.5); font-size: 12px; }

.access-mark { display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid rgba(184, 242, 220, 0.35); border-radius: 6px 6px 6px 2px; color: var(--mint); font-size: 10px; font-weight: 800; }

.signal-panel {
  min-height: 410px;
  padding: 22px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  transform: rotate(1.2deg);
}

.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.panel-kicker { color: rgba(18, 52, 59, 0.5); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; }
.panel-live { color: rgba(18, 52, 59, 0.56); }
.panel-live .state-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(229, 166, 75, 0.13); }

.panel-art { position: relative; display: grid; min-height: 190px; margin: 22px 0 24px; overflow: hidden; place-items: center; border-radius: 5px; background: var(--deep-soft); }
.panel-art::before, .panel-art::after { position: absolute; width: 180%; height: 1px; background: rgba(184, 242, 220, 0.2); content: ""; transform: rotate(-28deg); }
.panel-art::after { transform: rotate(28deg); }
.art-letter { position: relative; z-index: 1; color: var(--mint); font-size: 96px; font-weight: 800; letter-spacing: -0.12em; line-height: 1; transform: translateX(-4px); }
.art-line { position: absolute; z-index: 1; height: 1px; background: var(--amber); transform-origin: left center; }
.art-line-one { top: 38px; left: 18%; width: 36%; transform: rotate(18deg); }
.art-line-two { right: 9%; bottom: 42px; width: 32%; transform: rotate(-24deg); }
.art-node { position: absolute; z-index: 2; width: 8px; height: 8px; border: 2px solid var(--mint); border-radius: 50%; background: var(--deep-soft); }
.art-node-one { top: 31px; left: 15%; }
.art-node-two { right: 8%; bottom: 38px; }
.art-node-three { top: 25%; right: 25%; border-color: var(--amber); }

.signal-list { display: grid; gap: 0; margin: 0; }
.signal-list div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid rgba(18, 52, 59, 0.14); }
.signal-list dt { color: rgba(18, 52, 59, 0.52); font-size: 12px; }
.signal-list dd { margin: 0; font-size: 12px; font-weight: 800; }
.panel-caption { max-width: 250px; margin: 24px 0 0; color: rgba(18, 52, 59, 0.65); font-size: 13px; line-height: 1.6; }

.footer { display: flex; align-items: center; gap: 12px; color: rgba(243, 240, 232, 0.45); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-separator { color: var(--amber); }

.install-toast { position: fixed; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 48px); padding: 13px 16px; border: 1px solid rgba(184, 242, 220, 0.26); border-radius: 5px; background: #12343b; box-shadow: var(--shadow); color: var(--paper); font-size: 13px; font-weight: 700; }
.toast-mark { color: var(--mint); font-size: 20px; }

@media (max-width: 820px) {
  .page-shell { padding: 20px 6vw 20px; }
  .portal-grid { grid-template-columns: 1fr; gap: 42px; padding: 8vh 0 8vh; }
  .signal-panel { width: min(100%, 470px); min-height: 0; margin-left: auto; }
  h1 { font-size: 48px; }
  .lede { font-size: 15px; }
}

@media (max-width: 480px) {
  .network-state { display: none; }
  .topbar-tools { gap: 0; }
  .eyebrow { margin-bottom: 24px; font-size: 10px; }
  h1 { font-size: 40px; }
  .actions { align-items: stretch; flex-direction: column; }
  .primary-action, .secondary-action { justify-content: space-between; width: 100%; }
  .signal-panel { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
