/* SarvDrik corporate site — "Network Fabric" (2026-09-05).
 *
 * Built around the product's actual shape: a Hub with connected Endpoints.
 * Violet accent (#7C3AED light / #A78BFA dark) paired with a grounded
 * "online" green pulled from real endpoint status, not decoration.
 * Bricolage Grotesque carries headlines, Public Sans carries body copy,
 * JetBrains Mono marks technical values (hub names, endpoint ids, seat
 * counts) — all three self-hosted locally, see fonts.css.
 *
 * Surfaces are flat and bordered rather than shadow-heavy: a surface
 * color one step off the page background, a hairline border, and lift
 * reserved for hover — not a Material elevation system.
 *
 * Built on Bootstrap 5.3's native data-bs-theme mechanism (see
 * _Layout.cshtml for the toggle) — these overrides redefine the same CSS
 * custom properties Bootstrap's own components already read.
 */

:root {
  --sd-bg: #ffffff;
  --sd-surface: #f7f6fb;
  --sd-ink: #1f2430;
  --sd-ink-dim: #5f6577;
  --sd-accent: #7c3aed;
  --sd-accent-ink: #ffffff;
  --sd-online: #16a34a;
  --sd-border: #e7e7ef;

  --bs-body-bg: var(--sd-bg);
  --bs-body-color: var(--sd-ink);
  --bs-primary: var(--sd-accent);
  --bs-primary-rgb: 124, 58, 237;
  --bs-primary-text-emphasis: #5b21b6;
  --bs-primary-bg-subtle: #efe9fd;
  --bs-primary-border-subtle: #d9caf8;
  --bs-link-color: var(--sd-accent);
  --bs-link-color-rgb: var(--bs-primary-rgb);
  --bs-link-hover-color: var(--bs-primary-text-emphasis);
  --bs-link-hover-color-rgb: 91, 33, 182;

  /* Pricing-tier identity colors — Netra/Drik/Drishti, each distinct from
   * both the brand accent and the "online" status green. SarvDrik (the
   * flagship, product-namesake tier) deliberately reuses --sd-accent
   * rather than getting a fifth color. */
  --tier-netra: #0d9488;
  --tier-drik: #2563eb;
  --tier-drishti: #b45309;
}

[data-bs-theme="dark"] {
  --sd-bg: #0a0a0f;
  --sd-surface: #131320;
  --sd-ink: #edeef2;
  --sd-ink-dim: #9a9bb0;
  --sd-accent: #a78bfa;
  --sd-accent-ink: #0a0a0f;
  --sd-online: #4ade80;
  --sd-border: #232333;

  --bs-body-bg: var(--sd-bg);
  --bs-body-color: var(--sd-ink);
  --bs-primary: var(--sd-accent);
  --bs-primary-rgb: 167, 139, 250;
  --bs-primary-text-emphasis: #c4b5fd;
  --bs-primary-bg-subtle: #241c3d;
  --bs-primary-border-subtle: #382a5e;
  --bs-link-color: var(--sd-accent);
  --bs-link-hover-color: var(--bs-primary-text-emphasis);
  --bs-link-hover-color-rgb: 196, 181, 253;

  --tier-netra: #2dd4bf;
  --tier-drik: #60a5fa;
  --tier-drishti: #fbbf24;
}

body {
  font-family: 'Public Sans', -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .navbar-brand, .btn {
  font-family: 'Bricolage Grotesque', sans-serif;
}

html { font-size: 15px; }
@media (min-width: 768px) {
  html { font-size: 16px; }
}

a { color: var(--bs-link-color); }
a:hover { color: var(--bs-link-hover-color); }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Pill-shaped everywhere, nav CTA included — one consistent button
 * language rather than a marketing/nav split. */
.btn {
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-outline-secondary {
  --bs-btn-color: var(--sd-ink);
  --bs-btn-border-color: var(--sd-border);
  --bs-btn-hover-bg: var(--sd-surface);
  --bs-btn-hover-border-color: var(--sd-border);
  --bs-btn-hover-color: var(--sd-ink);
}

.navbar-brand {
  letter-spacing: -0.01em;
  font-weight: 800;
}

.navbar.bg-body-tertiary {
  background-color: var(--sd-bg) !important;
  border-bottom: 1px solid var(--sd-border) !important;
}

#theme-toggle {
  line-height: 1;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Flat, bordered surfaces — Bootstrap's .card picks this up automatically
 * (login/register/pricing all use it). */
.card {
  background-color: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 1rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

/* ---------- Hero ---------- */
.sd-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-items: center;
  padding: 3rem 0 2.5rem;
}
@media (min-width: 992px) {
  .sd-hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 4.5rem 0 3.5rem;
  }
}
.sd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--sd-accent);
  background: rgba(var(--bs-primary-rgb), 0.12);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.15rem;
}
.sd-hero h1 {
  font-weight: 800;
  font-size: 2.35rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 1.1rem;
}
@media (min-width: 768px) {
  .sd-hero h1 { font-size: 3.1rem; }
}
.sd-hero .lead {
  color: var(--sd-ink-dim);
  max-width: 46ch;
  font-size: 1.05rem;
  font-weight: 400;
}

/* ---------- Topology graphic ---------- */
.sd-topo {
  width: 100%;
  height: auto;
  max-height: 320px;
}
.sd-topo .hub-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  fill: var(--sd-accent-ink);
}
.sd-topo .node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  fill: var(--sd-ink-dim);
}
.sd-topo circle.hub { fill: var(--sd-accent); }
.sd-topo circle.node { fill: var(--sd-surface); stroke: var(--sd-border); stroke-width: 1.5; }
.sd-topo circle.pulse { fill: var(--sd-online); }
.sd-topo line { stroke: var(--sd-border); stroke-width: 1.5; }
.sd-topo .flow {
  stroke: var(--sd-accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
  animation: sd-dash 1.6s linear infinite;
}
@keyframes sd-dash {
  to { stroke-dashoffset: -18; }
}
@media (prefers-reduced-motion: reduce) {
  .sd-topo .flow { animation: none; }
}

/* ---------- Feature cards: surface + one-edge accent bar ---------- */
.sd-feature-card {
  background-color: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 1rem;
  padding: 1.6rem 1.5rem;
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.sd-feature-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--sd-accent);
}
.sd-feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--bs-primary-border-subtle);
}
.sd-feature-card h3 {
  font-size: 1.06rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.sd-feature-card p {
  color: var(--sd-ink-dim);
  margin-bottom: 0;
  font-size: 0.92rem;
  font-family: 'Public Sans', sans-serif;
}

/* ---------- Status pill (hero stat card, account page) ---------- */
.sd-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sd-online);
}
.sd-status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sd-online);
}

/* ---------- Pricing tiers ---------- */
.sd-tier-card {
  background-color: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-top: 4px solid var(--tier-color, var(--sd-accent));
  border-radius: 1rem;
  padding: 1.5rem 1.35rem;
  height: 100%;
  text-align: center;
}
.sd-tier-card .tier-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--tier-color, var(--sd-accent));
  margin-bottom: 0.15rem;
}
.sd-tier-card .tier-meaning {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--sd-ink-dim);
  margin-bottom: 0.9rem;
}
.sd-tier-card .tier-price {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}
.sd-tier-card .tier-price small {
  font-family: 'Public Sans', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--sd-ink-dim);
}
.sd-tier-card .tier-fact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--sd-ink-dim);
  margin-bottom: 0.15rem;
}
.sd-tier-card .tier-fact.hosts {
  color: var(--sd-ink);
  font-weight: 600;
}

.sd-tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 1rem;
  overflow: hidden;
}
.sd-tier-table th, .sd-tier-table td {
  padding: 0.65rem 0.85rem;
  text-align: center;
  border-bottom: 1px solid var(--sd-border);
}
.sd-tier-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sd-tier-table th:first-child, .sd-tier-table td:first-child {
  text-align: left;
  font-family: 'Public Sans', sans-serif;
  text-transform: none;
  letter-spacing: normal;
}
.sd-tier-table thead th:first-child { background: var(--sd-surface); color: var(--sd-ink-dim); }
.sd-tier-table .th-netra { background: color-mix(in srgb, var(--tier-netra) 16%, transparent); color: var(--tier-netra); }
.sd-tier-table .th-drik { background: color-mix(in srgb, var(--tier-drik) 16%, transparent); color: var(--tier-drik); }
.sd-tier-table .th-drishti { background: color-mix(in srgb, var(--tier-drishti) 18%, transparent); color: var(--tier-drishti); }
.sd-tier-table .th-sarvdrik { background: color-mix(in srgb, var(--sd-accent) 16%, transparent); color: var(--sd-accent); }
.sd-tier-table tr:last-child td { border-bottom: none; }
.sd-tier-table .section-row td {
  background: var(--sd-bg);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sd-ink-dim);
  text-align: left;
}
.sd-tier-table td:first-child { color: var(--sd-ink); }
.sd-tier-table td { color: var(--sd-ink-dim); }
.sd-tier-table .yes { color: var(--sd-online); font-weight: 700; }
.sd-tier-table .no { color: var(--sd-ink-dim); opacity: 0.45; }
.sd-tier-table .partial { color: var(--tier-drishti); font-weight: 600; font-size: 0.78em; }
.sd-tier-table .extra { color: var(--sd-accent); font-weight: 600; font-size: 0.78em; }

footer.footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--sd-border);
  color: var(--sd-ink-dim);
}
footer.footer a {
  color: var(--sd-ink-dim);
  text-decoration: underline;
}

.form-control, .form-select {
  border-radius: 0.6rem;
  border-color: var(--sd-border);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--sd-ink-dim);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
