:root {
  color-scheme: dark;
  --bg: #000;
  --bg-elevated: #0a0a0a;
  --text: #ededed;
  --muted: #888;
  --border: #333;
  --border-subtle: #1a1a1a;
  --radius: 8px;
  --header-h: 64px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1080px;
  --max-wide: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: #fff;
  color: #000;
}

.btn-primary:hover {
  background: #e4e4e4;
  color: #000;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: #111;
  color: #fff;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-primary:disabled,
.btn-primary:disabled:hover {
  background: #8a8a8a;
  color: #2a2a2a;
  opacity: 1;
}

[data-process] svg {
  flex: 0 0 16px;
  display: none;
}

[data-process].is-restore svg {
  display: block;
}

[data-process] svg.is-spinning {
  animation: restore-icon-spin 800ms linear;
}

@keyframes restore-icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(720deg);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  border-bottom: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100% - 40px, var(--max-wide));
  height: 100%;
  margin: 0 auto;
  gap: 16px;
}

.logo {
  font-weight: 600;
  letter-spacing: -0.04em;
  justify-self: start;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #fff;
}

.site-header .btn {
  justify-self: end;
}

.hero,
.product,
.demo {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 18px;
  color: #b4b4b4;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.eyebrow-accent {
  color: #fff;
  font-style: normal;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.hero h1 {
  font-size: clamp(48px, 8vw, 80px);
  letter-spacing: -0.06em;
}

.hero-lead {
  max-width: 34rem;
  margin: 22px auto 0;
  color: #a1a1a1;
  font-size: 18px;
  line-height: 1.5;
}

.hero-sub {
  max-width: 32rem;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.section-head {
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 28px;
}

.section-head p {
  margin-top: 8px;
  color: var(--muted);
}

.product {
  padding: 24px 0 72px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.product-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.product-card p {
  color: var(--muted);
  font-size: 14px;
}

.demo {
  padding: 24px 0 96px;
  width: min(100% - 40px, var(--max-wide));
}

.demo-stage {
  display: grid;
  gap: 28px;
}

.demo-origin {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.demo-board-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.demo-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #050505;
}

.demo-frame img {
  width: 100%;
}

img.zoomable {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

body.lightbox-open img.zoomable {
  cursor: zoom-in;
}

.checker {
  background-color: #0c0c0c;
  background-image:
    linear-gradient(45deg, #161616 25%, transparent 25%),
    linear-gradient(-45deg, #161616 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #161616 75%),
    linear-gradient(-45deg, transparent 75%, #161616 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.demo-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.demo-downloads a {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.demo-downloads a::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1.25a.75.75 0 0 1 .75.75v6.19l2.22-2.22a.75.75 0 1 1 1.06 1.06l-3.5 3.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 0 1 1.06-1.06L7.25 8.19V2A.75.75 0 0 1 8 1.25ZM3.25 12a.75.75 0 0 1 .75-.75h8a.75.75 0 0 1 0 1.5h-8A.75.75 0 0 1 3.25 12Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1.25a.75.75 0 0 1 .75.75v6.19l2.22-2.22a.75.75 0 1 1 1.06 1.06l-3.5 3.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 0 1 1.06-1.06L7.25 8.19V2A.75.75 0 0 1 8 1.25ZM3.25 12a.75.75 0 0 1 .75-.75h8a.75.75 0 0 1 0 1.5h-8A.75.75 0 0 1 3.25 12Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.demo-downloads a:hover {
  color: #fff;
  border-color: #555;
}

.demo-export-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.layer-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.layer-panel-head h3 {
  font-size: 15px;
}

.layer-panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.layer-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.layer-card {
  width: 100%;
  transform-origin: top center;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.layer-card button {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0d0d0d;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.layer-card img {
  width: 56px;
  height: 40px;
  object-fit: contain;
  background:
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
    linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  border-radius: 4px;
}

.layer-card strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.layer-card.is-active button,
.layer-card button:hover {
  border-color: #666;
}

.layer-stack.is-swapping {
  pointer-events: none;
}

.layer-card.is-swapping button {
  border-color: #666;
}

.layer-card.is-swapping img {
  animation: layer-swap-pulse 0.38s ease;
}

@keyframes layer-swap-pulse {
  0%,
  100% {
    opacity: 1;
    filter: none;
  }
  40% {
    opacity: 0.45;
    filter: brightness(1.35);
  }
}

.demo-process {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
}

.process-wrap {
  position: relative;
  display: inline-flex;
}

.process-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: min(380px, calc(100vw - 48px));
  padding: 10px 12px;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  background: #171717;
  color: #a1a1a1;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.process-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  border: 5px solid transparent;
  border-top-color: #171717;
  transform: translateX(-50%);
}

.process-wrap:hover .process-tip,
.process-wrap:focus-within .process-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.demo-loading[hidden] {
  display: none !important;
}

.demo-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--muted);
  text-align: center;
}

.demo-origin.is-processing {
  pointer-events: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 80px;
}

.footer-cta,
.features,
.footer-legal {
  width: min(100% - 40px, var(--max-wide));
  margin: 0 auto;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-cta h2 {
  font-size: 24px;
}

.footer-cta p {
  margin-top: 6px;
  color: var(--muted);
}

.features h2 {
  font-size: 20px;
}

.features > .muted {
  margin: 8px 0 28px;
}

.features a {
  color: #a1a1a1;
}

.features a:hover {
  color: #fff;
}

.feature-groups {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.3fr;
  gap: 32px;
}

.feature-group h3 {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.feature-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.feature-group li {
  display: grid;
  gap: 2px;
}

.feature-group a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.feature-group span {
  color: var(--muted);
  font-size: 13px;
}

.feature-group li.is-current a {
  box-shadow: inset 0 -1px 0 #fff;
}

.footer-legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.footer-legal p + p {
  margin-top: 4px;
}

.footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent);
}

.footer-legal a:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.86);
  cursor: zoom-out;
}

.lightbox.is-open {
  display: grid !important;
}

.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
}

@media (max-width: 880px) {
  .site-header-inner {
    grid-template-columns: auto 1fr auto;
    width: min(100% - 24px, var(--max-wide));
    gap: 10px;
  }

  .site-nav {
    gap: 12px;
    font-size: 12px;
    justify-self: center;
  }

  .product-grid,
  .demo-origin,
  .feature-groups,
  .footer-cta {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding-top: 64px;
  }
}
