:root {
  --bg: #0b1020;
  --panel: #111827;
  --panel-soft: #172033;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-warm: #f59e0b;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.14), transparent 30rem),
    radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.10), transparent 26rem),
    linear-gradient(180deg, #0b1020 0%, #101827 48%, #0b1020 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  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);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 72%);
}

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

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

code {
  color: #dbeafe;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.brand span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a {
  transition: color 160ms ease;
}

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

.section-shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 56px;
  align-items: center;
  padding-top: 82px;
  padding-bottom: 72px;
}

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

.hero h1 {
  max-width: 100%;
  margin: 0;
  font-size: 5.55rem;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 700px;
  margin: 28px 0 0;
  color: #f8fafc;
  font-size: 1.95rem;
  font-weight: 760;
  line-height: 1.12;
}

.hero-text {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

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

.button-primary {
  color: #06111f;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  box-shadow: 0 16px 42px rgba(56, 189, 248, 0.24);
}

.button-secondary {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(56, 189, 248, 0.46);
  background: rgba(56, 189, 248, 0.11);
}

.button-ghost {
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.09);
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.86rem;
}

.hero-visual {
  min-width: 0;
  overflow: hidden;
}

.document-stack {
  position: relative;
  min-height: 570px;
  isolation: isolate;
}

.document-stack::before {
  position: absolute;
  inset: 9% 10% 6% 4%;
  z-index: -1;
  content: "";
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.82), rgba(23, 32, 51, 0.44));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.doc-preview {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: white;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
  object-fit: cover;
  object-position: top center;
}

.doc-preview-main {
  top: 36px;
  left: 15%;
  z-index: 3;
  width: min(68%, 370px);
  aspect-ratio: 0.707 / 1;
}

.doc-preview-side {
  width: min(48%, 265px);
  aspect-ratio: 0.707 / 1;
  opacity: 0.88;
}

.doc-preview-top {
  top: 0;
  right: 0;
  z-index: 2;
  transform: rotate(4deg);
}

.doc-preview-bottom {
  right: 7%;
  bottom: 12px;
  z-index: 1;
  transform: rotate(-3deg);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  border-top: 1px solid var(--border);
}

.section-label {
  margin: 0 0 12px;
  color: var(--accent-warm);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  max-width: 760px;
  margin: 0;
  font-size: 3rem;
  line-height: 1.04;
  letter-spacing: 0;
}

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

.section-heading p:last-child,
.section-copy {
  color: var(--muted);
  font-size: 1.02rem;
}

.section-copy p {
  margin: 0 0 16px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.example-card,
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(23, 32, 51, 0.82));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.20);
}

.example-card {
  display: flex;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
}

.example-preview {
  display: grid;
  min-height: 310px;
  padding: 18px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(245, 158, 11, 0.14), transparent 48%),
    #0f172a;
}

.example-preview img {
  width: min(78%, 260px);
  max-height: 285px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: white;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.34);
  object-fit: contain;
}

.example-preview-missing {
  color: var(--muted);
  font-weight: 720;
}

.example-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.example-body h3,
.feature-card h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.example-body p,
.feature-card p,
.architecture-copy {
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.08);
  font-size: 0.75rem;
  font-weight: 760;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.gallery-fallback {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(17, 24, 39, 0.86);
}

.architecture {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  position: relative;
  min-height: 104px;
  padding: 20px 16px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius);
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.88));
  font-weight: 800;
}

.pipeline li::after {
  position: absolute;
  top: 50%;
  right: -15px;
  z-index: 2;
  color: var(--accent);
  content: "->";
  font-weight: 900;
  transform: translateY(-50%);
}

.pipeline li:last-child::after {
  content: "";
}

.architecture-copy {
  max-width: 820px;
  margin-top: 24px;
  font-size: 1.03rem;
}

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

.feature-card {
  padding: 22px;
}

.feature-card p {
  margin-top: 10px;
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.code-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #07111f;
  box-shadow: var(--shadow);
}

.code-panel::before {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: #93a4b8;
  content: attr(data-label);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(7, 17, 31, 0.92));
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 760;
}

.code-panel pre {
  padding: 22px 24px 24px;
}

.code-panel code {
  color: #dbeafe;
  font-size: 0.9rem;
  line-height: 1.7;
  tab-size: 4;
}

.token.keyword {
  color: #c792ea;
}

.token.type {
  color: #82aaff;
}

.token.method {
  color: #7fdbca;
}

.token.string {
  color: #ecc48d;
}

.token.number {
  color: #f78c6c;
}

.token.comment {
  color: #637777;
  font-style: italic;
}

.token.annotation {
  color: #ffcb6b;
}

.token.operator,
.token.punctuation {
  color: #89ddff;
}

.token.tag {
  color: #ffcb6b;
}

.token.attr {
  color: #c3e88d;
}

.token.plain {
  color: #dbeafe;
}

.code-example {
  padding-top: 26px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  padding: 28px 20px 38px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer span:first-child {
  color: var(--text);
  font-weight: 820;
}

.site-footer a {
  color: #bfdbfe;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.72);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .section-grid,
  .install-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-top: 56px;
  }

  .hero h1 {
    font-size: 4.75rem;
  }

  .hero-lead {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 2.55rem;
  }

  .document-stack {
    min-height: 480px;
  }

  .examples-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline li:nth-child(3)::after {
    content: "";
  }
}

@media (max-width: 640px) {
  .section-shell {
    width: min(100% - 28px, var(--max-width));
    padding: 64px 0;
  }

  .site-header {
    padding: 12px 14px;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.86rem;
  }

  .hero {
    padding-top: 42px;
  }

  .hero h1 {
    font-size: 2.85rem;
  }

  .hero-lead {
    font-size: 1.34rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .button {
    width: 100%;
  }

  .document-stack {
    min-height: 390px;
  }

  .doc-preview-main {
    left: 7%;
    width: 66%;
  }

  .doc-preview-side {
    width: 45%;
  }

  .examples-grid,
  .feature-grid,
  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline li {
    min-height: auto;
  }

  .pipeline li::after,
  .pipeline li:nth-child(3)::after {
    top: auto;
    right: 50%;
    bottom: -19px;
    content: "v";
    transform: translateX(50%);
  }

  .pipeline li:last-child::after {
    content: "";
  }

  .example-preview {
    min-height: 260px;
  }

  .example-body {
    padding: 18px;
  }
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-lead {
    font-size: 1.22rem;
  }
}

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

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