/* ============================================================
   Fiber Router Manager — design tokens
   Palette is sampled from the app mark: near-black backdrop,
   cyan node-glow, steel router linework. Light mode deepens the
   cyan for AA contrast on white rather than inventing a new hue.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #04070C;
  --bg-2: #070D16;
  --surface: #0B1420;
  --surface-2: #101B2B;
  --border: rgba(160, 197, 224, 0.14);
  --border-strong: rgba(160, 197, 224, 0.26);
  --steel: #B7C4D3;
  --cyan: #3ED2FF;
  --cyan-2: #1C8FCB;
  --text: #EAF3FB;
  --text-dim: #8FA1B5;
  --glow: 0 0 32px rgba(62, 210, 255, 0.28);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F3F7FB;
  --bg-2: #EAF1F8;
  --surface: #FFFFFF;
  --surface-2: #F4F9FC;
  --border: rgba(10, 30, 50, 0.10);
  --border-strong: rgba(10, 30, 50, 0.18);
  --steel: #51637A;
  --cyan: #0092CE;
  --cyan-2: #00729F;
  --text: #0A1622;
  --text-dim: #4C5C6E;
  --glow: 0 0 32px rgba(0, 146, 206, 0.16);
  --shadow: 0 20px 50px -24px rgba(10, 30, 50, 0.25);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--glow);
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }

.brand-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.brand-name span {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 2px;
}

.nav-right { display: flex; align-items: center; gap: 0.9rem; }

.nav-link {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--cyan); }

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--cyan); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7.5rem) clamp(1.25rem, 6vw, 3rem) clamp(3.5rem, 8vw, 5rem);
  text-align: center;
  overflow: hidden;
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  mask-image: radial-gradient(ellipse 65% 60% at 50% 32%, black 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 32%, black 15%, transparent 78%);
  opacity: 0.8;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: color-mix(in srgb, var(--cyan) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  color: var(--cyan);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  margin-bottom: 1.75rem;
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px 2px var(--cyan);
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.15rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--cyan), var(--cyan-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto 2.4rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  color: #04141C;
  padding: 0.95rem 1.9rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--cyan) 60%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px color-mix(in srgb, var(--cyan) 70%, transparent); }
.btn-primary svg { width: 17px; height: 17px; }

.link-ghost {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.link-ghost:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- Status panel section ---------- */
.section {
  padding: clamp(3rem, 7vw, 4.5rem) clamp(1.25rem, 6vw, 3rem);
  max-width: 1040px;
  margin: 0 auto;
}

.section-head { text-align: center; max-width: 560px; margin: 0 auto 2.75rem; }
.eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 0.9rem;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700; margin-bottom: 0.75rem; }
.section-head p { color: var(--text-dim); line-height: 1.6; font-size: 0.98rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem 1.6rem 1.5rem;
  text-align: left;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.signal-icon { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.signal-icon span {
  width: 4px;
  background: var(--cyan);
  border-radius: 2px;
  opacity: 0.9;
}
.signal-icon span:nth-child(1) { height: 6px; }
.signal-icon span:nth-child(2) { height: 10px; }
.signal-icon span:nth-child(3) { height: 14px; }
.signal-icon span:nth-child(4) { height: 18px; }

.data-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}
.data-tag.local { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }

.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.45rem; }
.card p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.55; margin: 0; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem clamp(1.25rem, 6vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.65rem; }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 7px; box-shadow: none; }
.footer-copy { font-size: 0.78rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--cyan); }

/* ---------- Privacy policy page ---------- */
.policy-header {
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 6vw, 3rem) 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, color-mix(in srgb, var(--cyan) 8%, transparent), transparent 70%);
}
.policy-header h1 { font-size: clamp(2rem, 4.4vw, 2.6rem); margin-bottom: 0.6rem; }
.policy-header p { color: var(--text-dim); font-size: 0.92rem; }

.policy {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.25rem, 6vw, 3rem) 5rem;
}
.policy-intro { color: var(--text-dim); line-height: 1.7; margin-bottom: 2.5rem; font-size: 1rem; }

.policy-section { padding: 1.9rem 0; border-top: 1px solid var(--border); }
.policy-section:first-of-type { border-top: none; padding-top: 0; }
.policy-section h2 {
  font-size: 1.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.policy-section h2 .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
}
.policy-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.1rem 0 0.5rem;
  color: var(--text);
}
.policy-section p { color: var(--text-dim); line-height: 1.7; font-size: 0.94rem; margin: 0 0 0.7rem; }
.policy-section ul { margin: 0 0 0.7rem; padding-left: 1.15rem; color: var(--text-dim); line-height: 1.7; font-size: 0.94rem; }
.policy-section li { margin-bottom: 0.35rem; }
.policy-section li strong { color: var(--text); font-weight: 600; }

.inline-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  margin-left: 0.4rem;
  vertical-align: middle;
}
.inline-tag.local { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }

.contact-box {
  margin-top: 0.5rem;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contact-box a {
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
