:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: #f8fafc;
  background: #07080d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(99, 102, 241, .16), transparent 34rem),
    radial-gradient(circle at 85% 24%, rgba(34, 211, 238, .09), transparent 30rem),
    #07080d;
}

a { color: inherit; }

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand img { border-radius: 9px; }

.back-link {
  color: #a5b4fc;
  font-size: 14px;
  text-underline-offset: 4px;
}

.intro {
  padding: 76px 0 44px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: #818cf8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 940px;
  margin: 0 auto;
  font-size: clamp(42px, 7vw, 74px);
  line-height: .98;
  letter-spacing: -.06em;
}

.lede {
  max-width: 720px;
  margin: 26px auto 0;
  color: #aeb7c6;
  font-size: 18px;
  line-height: 1.65;
}

.facts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.facts span {
  padding: 7px 11px;
  border: 1px solid rgba(129, 140, 248, .3);
  border-radius: 999px;
  background: rgba(30, 41, 59, .58);
  color: #c7d2fe;
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.demo-shell {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 24px;
  background: rgba(15, 17, 26, .9);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .42);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.toolbar-label {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 800;
}

.status {
  margin: 0;
  color: #8894a7;
  font-size: 12px;
}

.actions { display: flex; gap: 10px; }

.button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.button:focus-visible,
.resource-links a:focus-visible,
.back-link:focus-visible {
  outline: 3px solid #67e8f9;
  outline-offset: 3px;
}

.button-primary { background: #f8fafc; color: #111827; }
.button-secondary { border-color: rgba(148, 163, 184, .28); background: #181b25; color: #dbe2ee; }
.button:disabled { cursor: not-allowed; opacity: .48; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(148, 163, 184, .18);
}

.preview-card {
  position: relative;
  min-width: 0;
  padding: 22px 22px 0;
  isolation: isolate;
}

.preview-light { color: #0f172a; background: #f5f7fb; }
.preview-dark { color: #f8fafc; background: #111827; }
.preview-gradient {
  color: #fff;
  background:
    radial-gradient(circle at 80% 15%, rgba(250, 204, 21, .82), transparent 30%),
    linear-gradient(145deg, #7c3aed 0%, #2563eb 50%, #0891b2 100%);
}

.preview-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .3;
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.card-copy h2 {
  margin-bottom: 5px;
  font-size: 18px;
  letter-spacing: -.025em;
}

.card-copy p {
  margin-bottom: 0;
  color: inherit;
  opacity: .66;
  font-size: 12px;
}

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-top: 2px;
}

.alpha-video,
.fallback-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 17px rgba(15, 23, 42, .18));
}

.fallback-image { display: none; }
.show-fallback .fallback-image { display: block; }
.show-fallback .alpha-video { display: none; }

.demo-note {
  margin: 0;
  padding: 14px 20px;
  border-top: 1px solid rgba(148, 163, 184, .18);
  color: #8f9bad;
  font-size: 12px;
  text-align: center;
}

.resources {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
  padding: 76px 0;
}

.resources h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.04em;
}

.resources p:not(.eyebrow) {
  max-width: 690px;
  margin-bottom: 0;
  color: #9ca7b8;
  line-height: 1.7;
}

.resource-links {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.resource-links a {
  padding: 13px 15px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 10px;
  background: rgba(30, 33, 44, .72);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.resource-links a:hover { border-color: rgba(129, 140, 248, .68); background: #222637; }

footer {
  padding: 24px 0 42px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 800px) {
  .intro { padding-top: 58px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; }
  .button { flex: 1; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-card { padding-inline: max(22px, calc((100vw - 420px) / 2)); }
  .media-frame { max-height: 430px; }
  .resources { grid-template-columns: 1fr; gap: 26px; padding: 58px 0; }
  .resource-links { min-width: 0; }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(1180px, calc(100% - 24px)); }
  .site-header { min-height: 64px; }
  .brand img { width: 30px; height: 30px; }
  .back-link { font-size: 0; text-align: right; }
  .back-link::after { content: "Read guide"; font-size: 13px; }
  h1 { font-size: clamp(34px, 9vw, 39px); overflow-wrap: anywhere; }
  .lede { font-size: 16px; }
  .actions { flex-direction: column-reverse; }
  .preview-card { padding-inline: 16px; }
}

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