:root {
  --bg: #f5f7fb;
  --bg-soft: #eef3f9;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-dark: #0f172a;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);

  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;

  --primary: #2563eb;
  --primary-strong: #1d4ed8;

  --accent: #0f766e;
  --signature-red: #dc2626;
  --signature-red-soft: rgba(220, 38, 38, 0.2);

  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.1);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;

  --max-width: 1380px;
}

html[data-theme="dark"] {
  --bg: #0b1120;
  --bg-soft: #10192d;
  --surface: rgba(15, 23, 42, 0.74);
  --surface-strong: rgba(15, 23, 42, 0.9);
  --surface-dark: #e2e8f0;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #e5edf8;
  --text-soft: rgba(226, 232, 240, 0.82);
  --muted: rgba(226, 232, 240, 0.56);

  --primary: #6ea8ff;
  --primary-strong: #8bb9ff;

  --accent: #4fd1c5;
  --signature-red: #f87171;
  --signature-red-soft: rgba(248, 113, 113, 0.22);

  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 22px 56px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 34px 86px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(15, 118, 110, 0.07), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  transition: background 220ms ease, color 220ms ease;
}

body.menu-open {
  overflow: hidden;
}

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

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

p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.72;
}

h1,
h2,
h3,
strong,
span {
  margin: 0;
}

h1,
h2,
h3,
strong {
  letter-spacing: -0.04em;
  line-height: 1.04;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  isolation: isolate;
  overflow: clip;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
}

html[data-theme="dark"] .bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -2;
  pointer-events: none;
}

.bg-glow-1 {
  width: 360px;
  height: 360px;
  left: -120px;
  top: 60px;
  background: rgba(37, 99, 235, 0.12);
}

.bg-glow-2 {
  width: 300px;
  height: 300px;
  right: -100px;
  top: 160px;
  background: rgba(15, 118, 110, 0.1);
}

html[data-theme="dark"] .bg-glow-1 {
  background: rgba(110, 168, 255, 0.14);
}

html[data-theme="dark"] .bg-glow-2 {
  background: rgba(79, 209, 197, 0.1);
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 16px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .header {
  border-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  font-size: 0.88rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .brand-mark {
  background: linear-gradient(135deg, #dbe7fb 0%, #b8c8e7 100%);
  color: #0f172a;
}

.brand-text {
  font-size: 0.96rem;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.22);
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible {
  border-color: rgba(110, 168, 255, 0.28);
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle-text {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 10px 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary-strong);
  font-weight: 600;
}

html[data-theme="dark"] .nav-cta {
  border-color: rgba(110, 168, 255, 0.22);
  background: rgba(110, 168, 255, 0.09);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-strong);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--surface-dark);
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 40px;
  align-items: center;
}

.hero-copy,
.hero-panel {
  min-width: 0;
}

.hero h1 {
  color: var(--text);
  font-size: clamp(3rem, 6vw, 4.6rem);
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.hero-title-accent {
  display: inline;
}

.accent-underline {
  position: relative;
  display: inline-block;
  z-index: 0;
  white-space: nowrap;
}

.accent-underline::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.08em;
  z-index: -1;
  height: 0.24em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--signature-red) 0%, #ef4444 100%);
  box-shadow: 0 8px 18px var(--signature-red-soft);
  opacity: 0.92;
  transform: rotate(-1.4deg);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--primary-strong);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.lead {
  max-width: 56ch;
  margin-top: 24px;
  font-size: 1.08rem;
}

.supporting-copy {
  max-width: 48ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 0.86rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.2);
}

html[data-theme="dark"] .button-primary {
  border-color: rgba(110, 168, 255, 0.18);
  background: linear-gradient(135deg, #8bb9ff 0%, #6ea8ff 100%);
  color: #07111f;
  box-shadow: 0 18px 40px rgba(110, 168, 255, 0.16);
}

.button-secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.hero-window {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .hero-window {
  border-color: var(--line);
}

.hero-window::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.18),
    rgba(15, 23, 42, 0.06),
    rgba(15, 118, 110, 0.16)
  );
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

html[data-theme="dark"] .hero-window::before {
  background: linear-gradient(
    135deg,
    rgba(110, 168, 255, 0.24),
    rgba(255, 255, 255, 0.05),
    rgba(79, 209, 197, 0.18)
  );
}

.window-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

html[data-theme="dark"] .window-top {
  background: rgba(255, 255, 255, 0.02);
}

.window-dots {
  display: inline-flex;
  gap: 8px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dots span:nth-child(1) {
  background: #f97316;
}

.window-dots span:nth-child(2) {
  background: #facc15;
}

.window-dots span:nth-child(3) {
  background: #22c55e;
}

.window-title {
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-terminal {
  display: grid;
  gap: 12px;
  padding: 22px 22px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94rem;
}

.terminal-line {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 12px;
  align-items: start;
}

.terminal-key {
  color: var(--primary-strong);
}

.terminal-value {
  min-width: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.terminal-live {
  color: var(--accent);
  font-weight: 600;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 22px 22px;
}

.mini-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.mini-card strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.32;
}

.mini-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  main {
    align-items: center;
    padding: 24px 0 32px;
  }

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

@media (max-width: 920px) {
  .theme-toggle {
    width: 46px;
    padding: 0;
    justify-content: center;
  }

  .theme-toggle-text {
    display: none;
  }
}

@media (max-width: 860px) {
  .header {
    padding: 14px 16px;
    border-radius: 24px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav a {
    padding: 12px 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.03);
  }

  html[data-theme="dark"] .nav a {
    background: rgba(255, 255, 255, 0.03);
  }

  .hero-mini-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main,
  .header {
    width: min(calc(100% - 20px), var(--max-width));
  }

  main {
    align-items: center;
    padding: 20px 0 24px;
  }

  .hero {
    gap: 24px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 12vw, 4.25rem);
    text-wrap: pretty;
  }

  .lead,
  .supporting-copy {
    font-size: 1rem;
  }

  .window-top,
  .hero-terminal,
  .hero-mini-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .terminal-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .header-actions {
    gap: 10px;
  }
}