:root {
  --bg: #f5f7fb;
  --bg-soft: #eef2f8;
  --surface: #ffffff;
  --ink: #0b1729;
  --ink-2: #24344d;
  --muted: #5b6b82;
  --line: #dfe6f0;
  --brand: #4338ca;
  --brand-2: #6366f1;
  --mint: #06b6d4;
  --dark: #091322;
  --dark-2: #0f1e33;
  --radius: 18px;
  --shadow: 0 18px 50px -24px rgba(11, 23, 41, 0.28);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(67, 56, 202, 0.2);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 247, 251, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 230, 240, 0.85);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--brand);
  flex: none;
}

.brand .accent {
  margin-left: 0.32em;
  color: var(--muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.94rem;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.18s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
}

.nav-cta:hover {
  background: var(--brand);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 92px 0 68px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 760px;
  background:
    radial-gradient(600px 420px at 18% 22%, rgba(99, 102, 241, 0.16), transparent 65%),
    radial-gradient(520px 400px at 88% 8%, rgba(6, 182, 212, 0.14), transparent 62%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
  flex: none;
}

h1 {
  margin: 20px 0 22px;
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.grad {
  background: linear-gradient(96deg, var(--brand) 8%, var(--mint) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 0.94rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 12px 28px -12px rgba(67, 56, 202, 0.55);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -14px rgba(67, 56, 202, 0.6);
}

.btn.ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.btn.ghost:hover {
  transform: translateY(-2px);
  border-color: #c8d5e5;
  box-shadow: var(--shadow);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-meta strong {
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- Status card ---------- */

.status-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(160deg, #0e1d32 0%, #091322 62%);
  color: #dfe9f7;
  box-shadow: 0 30px 70px -30px rgba(9, 19, 34, 0.65);
}

.status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.88rem;
  font-weight: 600;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d39a;
  animation: pulse 2.2s infinite;
  flex: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 154, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(34, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 154, 0); }
}

.status-time {
  margin-left: auto;
  color: #7f93ad;
  font-size: 0.72rem;
  font-weight: 500;
}

.status-body {
  padding: 10px 0 4px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  color: #a9b9cd;
  font-size: 0.85rem;
}

.ok {
  color: #38dba4;
  font-weight: 600;
}

.status-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #7f93ad;
  font-size: 0.77rem;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stats > div {
  padding: 24px 26px;
  border-right: 1px solid var(--line);
}

.stats > div:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 660px;
  margin-bottom: 42px;
}

.section-head.narrow {
  max-width: 620px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.section-head p,
.split p,
.contact p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #ccd8e8;
  box-shadow: var(--shadow);
}

.card svg {
  width: 26px;
  height: 26px;
  margin-bottom: 16px;
  color: var(--brand);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Dark band ---------- */

.section.alt {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: #e8eef8;
}

.section.alt::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 620px;
  background:
    radial-gradient(520px 360px at 12% 30%, rgba(99, 102, 241, 0.18), transparent 65%),
    radial-gradient(460px 340px at 92% 70%, rgba(6, 182, 212, 0.12), transparent 65%);
  pointer-events: none;
}

.split {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.section.alt h2 {
  color: #ffffff;
}

.section.alt p {
  color: #9fb0c6;
}

.section.alt .kicker {
  color: #67e8f9;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: #c3d0e2;
  font-size: 0.94rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 14px;
  height: 8px;
  border-bottom: 2px solid #38dba4;
  border-left: 2px solid #38dba4;
  transform: rotate(-45deg);
}

.text-link {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 600;
  transition: border-color 0.18s ease;
}

.text-link:hover {
  border-color: #22d3ee;
}

.text-link span {
  margin-left: 4px;
  color: #22d3ee;
}

/* ---------- Terminal ---------- */

.terminal {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #060d18;
  box-shadow: 0 30px 80px -30px #000000;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a3a52;
}

.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }

.terminal-bar em {
  margin-left: 10px;
  color: #7286a1;
  font-size: 0.73rem;
  font-style: normal;
  letter-spacing: 0.02em;
}

.terminal pre {
  margin: 0;
  padding: 20px;
  overflow: auto;
}

.terminal code {
  color: #a8bdd6;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.75;
  white-space: pre;
}

/* ---------- Principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 8px;
}

.principles > div {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.principles span {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.principles h3 {
  margin: 10px 0 8px;
  font-size: 1.05rem;
}

.principles p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-card {
  padding: 10px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-card > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.contact-card > div:last-child {
  border-bottom: 0;
}

.contact-card span:first-child {
  color: var(--muted);
}

.contact-card a {
  color: var(--brand);
  font-weight: 600;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-card .contact-foot {
  justify-content: center;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- 404 ---------- */

.notfound {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 173px);
  padding: 80px 0;
}

.notfound-panel {
  max-width: 560px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notfound-code {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.notfound h1 {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.notfound p {
  margin: 0 0 26px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero {
    padding: 64px 0 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .split,
  .contact {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats > div:nth-child(2) {
    border-right: 0;
  }

  .stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .cards,
  .principles {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    flex-direction: column;
    gap: 8px;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-cta {
    display: none;
  }

  .contact-card > div {
    flex-direction: column;
    gap: 4px;
  }

  .notfound-panel {
    padding: 32px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
