:root {
  color-scheme: dark;
  --bg: #05070a;
  --bg-2: #0b1018;
  --panel: rgba(13, 19, 29, .78);
  --panel-strong: rgba(15, 23, 35, .94);
  --text: #f6f9ff;
  --muted: #9eacc3;
  --line: rgba(148, 173, 207, .18);
  --blue: #10a8ff;
  --blue-2: #006eff;
  --cyan: #63e2ff;
  --silver: #d7e1ef;
  --good: #39d98a;
  --warn: #ffcc66;
  --shadow: 0 28px 90px rgba(0, 0, 0, .45);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fbff;
  --bg-2: #edf4fb;
  --panel: rgba(255, 255, 255, .78);
  --panel-strong: rgba(255, 255, 255, .96);
  --text: #07111f;
  --muted: #536178;
  --line: rgba(22, 43, 70, .15);
  --shadow: 0 28px 90px rgba(21, 53, 91, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(16, 168, 255, .12), transparent 26rem),
    radial-gradient(circle at 70% 10%, rgba(99, 226, 255, .14), transparent 24rem),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 78%);
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  width: min(1180px, calc(100% - 28px));
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-strong) 84%, transparent);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .25);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
  padding-left: 4px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .01em;
}

.brand img {
  width: clamp(190px, 18vw, 245px);
  height: auto;
  max-height: 72px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: none;
  background: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.desktop-nav a {
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 999px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.desktop-nav a:hover {
  color: var(--text);
  background: rgba(16, 168, 255, .1);
  transform: translateY(-1px);
}

.header-actions, .hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 226, 255, .5);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-2) 62%, #3149ff);
  color: #fff;
  border-color: rgba(99, 226, 255, .5);
  box-shadow: 0 18px 42px rgba(0, 110, 255, .28);
}

.btn-ghost { background: rgba(255, 255, 255, .035); }
.btn-glass { background: rgba(255, 255, 255, .07); }
.btn-large { min-height: 50px; padding: 13px 20px; }

.theme-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 82px;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  transition: transform .2s ease;
}

[data-theme="light"] .theme-toggle::before { transform: translateX(40px); }
.theme-toggle span { position: relative; z-index: 1; display: grid; place-items: center; }

.portal-page .site-header {
  width: min(520px, calc(100% - 32px));
  min-height: 132px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 16px 28px;
}

.portal-page .brand {
  min-width: 0;
  padding-left: 0;
  justify-content: center;
}

.portal-page .brand img {
  width: min(335px, 100%);
  max-height: 92px;
}

.portal-page .desktop-nav {
  display: none;
}

.portal-page .desktop-nav a {
  padding: 8px 10px;
  font-size: 13px;
}

.portal-page .header-actions {
  display: none;
}

.portal-page .header-actions .btn {
  min-height: 38px;
  padding: 9px 13px;
}

.portal-page .theme-toggle {
  width: 76px;
  height: 38px;
}

.portal-page .theme-toggle::before {
  width: 34px;
}

.portal-page[data-theme="light"] .theme-toggle::before,
[data-theme="light"] .portal-page .theme-toggle::before {
  transform: translateX(36px);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
  position: relative;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  align-items: center;
  gap: 44px;
  padding-top: 68px;
}

.hero-copy { order: 1; }
.hero-media { order: 2; perspective: 1100px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 900;
}

h1, h2, h3, p { letter-spacing: 0; }
h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  line-height: .9;
  max-width: 760px;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: .98;
}

h3 { margin: 0 0 10px; font-size: 21px; }
p { color: var(--muted); line-height: 1.68; }
.lead { max-width: 650px; font-size: 18px; margin: 24px 0; color: color-mix(in srgb, var(--text) 78%, var(--muted)); }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  max-width: 560px;
}

.hero-metrics div,
.feature-card,
.panel,
.support-card,
.dashboard-shell,
.security-grid,
.cta {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel), rgba(255, 255, 255, .025));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-metrics div {
  border-radius: var(--radius);
  padding: 16px;
}

.hero-metrics strong { display: block; font-size: 26px; }
.hero-metrics span { color: var(--muted); font-size: 13px; font-weight: 750; }

.console-frame {
  position: relative;
  min-height: 560px;
  padding: 18px;
  border: 1px solid rgba(99, 226, 255, .22);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255,255,255,.11), transparent 18%),
    linear-gradient(160deg, rgba(8, 13, 22, .96), rgba(9, 22, 39, .86));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .55), 0 0 80px rgba(16, 168, 255, .12);
  transform-style: preserve-3d;
  animation: floatPanel 7s ease-in-out infinite;
  overflow: hidden;
}

.console-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255,255,255,.09) 42%, transparent 52% 100%);
  transform: translateX(-120%);
  animation: scan 5s ease-in-out infinite;
}

.console-top {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 24px;
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #526072;
}

.console-top span:nth-child(1) { background: #ff5f57; }
.console-top span:nth-child(2) { background: #ffbd2e; }
.console-top span:nth-child(3) { background: #28c840; }
.console-top strong { margin-left: auto; color: var(--silver); }

.node-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.node {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, .045);
  position: relative;
  overflow: hidden;
}

.node::before {
  content: "";
  position: absolute;
  inset: auto 18px 18px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform-origin: left;
  animation: pulseBar 2.8s ease-in-out infinite;
}

.node span { color: var(--muted); font-weight: 800; }
.node strong { display: block; margin-top: 26px; font-size: 46px; }
.node.active { border-color: rgba(99, 226, 255, .45); background: rgba(16, 168, 255, .12); }
.node.warning::before { background: linear-gradient(90deg, var(--warn), #ff7b54); }

.vm-strip {
  display: grid;
  gap: 12px;
}

.vm-strip div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
}

.vm-strip span { color: var(--cyan); font-weight: 800; }

.logo-band {
  width: min(900px, calc(100% - 32px));
  margin: -30px auto 20px;
  padding: 22px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
}

.logo-band img {
  margin: 0 auto;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.section-heading p:last-child {
  font-size: 18px;
}

.feature-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.support-card,
.panel {
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.feature-card::before,
.support-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 226, 255, .62), transparent);
}

.feature-card span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
}

.split,
.security {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 18px;
  align-items: stretch;
}

.command-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.command-cloud span,
.security-grid span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--silver);
  background: rgba(255, 255, 255, .045);
  font-size: 13px;
  font-weight: 850;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
  padding: 22px;
  transition: transform .2s ease, background .2s ease;
}

.timeline div:hover {
  transform: translateX(5px);
  background: rgba(16, 168, 255, .11);
}

.timeline b { color: var(--cyan); }

.dashboard-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.dashboard-shell aside {
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, .22);
  display: grid;
  align-content: start;
  gap: 10px;
}

.dashboard-shell aside b { margin-bottom: 12px; }
.dashboard-shell aside span {
  padding: 11px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 800;
}
.dashboard-shell aside .active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
}

.dash-main { padding: 22px; }
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.dash-kpis div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255,255,255,.045);
}

.dash-kpis span { color: var(--muted); font-weight: 800; }
.dash-kpis strong { display: block; font-size: 38px; margin-top: 8px; }

.vm-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.vm-table > div {
  display: grid;
  grid-template-columns: 1.2fr 1fr .8fr .8fr;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.vm-table > div:last-child { border-bottom: 0; }
.vm-table > div:first-child {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(16, 168, 255, .08);
}

.pill {
  display: inline-flex;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148, 173, 207, .15);
  color: var(--silver);
  font-size: 12px;
  font-weight: 900;
}
.pill.good { background: rgba(57, 217, 138, .15); color: #9ff0c3; }
.pill.warn { background: rgba(255, 204, 102, .16); color: #ffe0a3; }
.pill.bad { background: rgba(255, 92, 122, .16); color: #ff9aac; }

.support-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.security-grid {
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.cta {
  text-align: center;
  border-radius: var(--radius);
  padding: 54px 28px;
  margin-bottom: 60px;
}

.cta p {
  max-width: 720px;
  margin: 18px auto 26px;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.contact-modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(14px);
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid rgba(99, 226, 255, .35);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: 0 38px 140px rgba(0, 0, 0, .64);
  padding: 28px;
}

.modal-panel h2 { font-size: clamp(30px, 5vw, 48px); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
}

.contact-form { display: grid; gap: 13px; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
label { display: grid; gap: 7px; color: var(--silver); font-weight: 850; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

select option { color: #07111f; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(99, 226, 255, .65);
  box-shadow: 0 0 0 4px rgba(16, 168, 255, .14);
}
.honeypot { position: absolute; left: -9999px; }
.form-status { margin: 0; font-weight: 800; }
.form-status.ok { color: var(--good); }
.form-status.bad { color: #ff8a8a; }

.turnstile-feedback {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
  font-weight: 900;
}

.turnstile-feedback.success,
.turnstile-feedback.error {
  display: flex;
  animation: captchaPulse .28s ease;
}

.turnstile-feedback span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #021016;
  font-weight: 1000;
}

.turnstile-feedback.success {
  border-color: rgba(57,217,138,.5);
  background: rgba(57,217,138,.12);
  color: #b7ffd8 !important;
}

.turnstile-feedback.success strong { color: #b7ffd8 !important; }

.turnstile-feedback.success span { background: var(--good); }

.turnstile-feedback.error {
  border-color: rgba(255,92,122,.5);
  background: rgba(255,92,122,.12);
  color: #ffc4d0 !important;
}

.turnstile-feedback.error strong { color: #ffc4d0 !important; }

.turnstile-feedback.error span {
  background: #ff5c7a;
  color: #fff;
}

.turnstile-feedback button {
  margin-left: auto;
  border: 1px solid rgba(255,92,122,.5);
  border-radius: 999px;
  background: rgba(255,92,122,.14);
  color: #fff;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 900;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatPanel {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  50% { transform: translateY(-12px) rotateX(1.5deg) rotateY(-2deg); }
}

@keyframes scan {
  0%, 45% { transform: translateX(-130%); }
  70%, 100% { transform: translateX(130%); }
}

@keyframes pulseBar {
  0%, 100% { transform: scaleX(.54); opacity: .7; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes captchaPulse {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .site-header {
    width: min(760px, calc(100% - 28px));
  }
  .portal-page .site-header {
    width: min(520px, calc(100% - 28px));
    grid-template-columns: 1fr;
  }
  .portal-page .brand img {
    width: min(335px, 100%);
    max-height: 92px;
  }
  .brand img {
    width: clamp(210px, 42vw, 285px);
  }
  .hero, .split, .security { grid-template-columns: 1fr; }
  .hero-copy, .hero-media { order: initial; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-grid { grid-template-columns: 1fr; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .dashboard-shell aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: relative;
    top: auto;
    border-radius: var(--radius);
    align-items: center;
    flex-direction: column;
  }
  .portal-page .site-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 44px;
  }
  .portal-page .brand,
  .portal-page .header-actions {
    justify-self: stretch;
    justify-content: center;
  }
  .portal-page .brand img {
    width: min(320px, 82vw);
    max-height: 88px;
  }
  .portal-page .header-actions {
    flex-wrap: wrap;
  }
  .brand {
    justify-content: center;
    padding-left: 0;
  }
  .brand img {
    width: min(330px, 86vw);
  }
  .header-actions, .hero-actions { flex-wrap: wrap; }
  .btn, .header-actions .btn-primary { width: 100%; }
  .theme-toggle { width: 100%; }
  .hero { padding-top: 38px; min-height: auto; }
  .console-frame { min-height: 0; }
  .node-map, .hero-metrics, .feature-grid, .dash-kpis, .form-row { grid-template-columns: 1fr; }
  .vm-table { overflow-x: auto; }
  .vm-table > div { min-width: 620px; }
}
