:root {
  --bg: linear-gradient(160deg, #eef1f8 0%, #dde3f0 45%, #d0d8ea 100%);
  --bg-solid: #e4e9f3;
  --text: #171717;
  --muted: #5c6370;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-solid: #f4f6fb;
  --border: rgba(23, 23, 23, 0.1);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.06);
  --btn: #171717;
  --btn-text: #f5f5f5;
  --kbd-bg: rgba(255, 255, 255, 0.8);
  --radius: 16px;
  --radius-sm: 10px;
}

html.dark {
  --bg: linear-gradient(160deg, #2a2a30 0%, #222226 45%, #1c1c20 100%);
  --bg-solid: #222226;
  --text: #f5f5f5;
  --muted: #a3a3ad;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-solid: #2a2a30;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.25);
  --btn: #f5f5f5;
  --btn-text: #171717;
  --kbd-bg: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  background-color: var(--bg-solid);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: inherit;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  backdrop-filter: blur(16px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.segment {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.segment-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.segment-btn.is-active {
  background: var(--btn);
  color: var(--btn-text);
}

.icon-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

html.dark .icon-sun,
html:not(.dark) .icon-moon {
  display: none;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.slogan {
  margin: 1rem 0 0;
  max-width: 32rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
}

.hotkey-badge {
  margin-top: 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.7rem 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hotkey-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.keys {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.keys-plus {
  color: var(--muted);
  font-size: 0.8rem;
}

kbd {
  display: inline-block;
  min-width: 2.1rem;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--kbd-bg);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 1px 0 var(--border);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1.25rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--btn);
  color: var(--btn-text);
  box-shadow: var(--shadow-soft);
}

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

.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.demo-section {
  max-width: 1200px;
}

.demo-row {
  display: flex;
  gap: 0.85rem;
  align-items: stretch;
}

.section h2 {
  margin: 0 0 1.75rem;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  text-align: center;
}

.app-frame {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.demo-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.demo-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 1;
}

.demo-loading-dots {
  display: flex;
  gap: 0.32rem;
}

.demo-loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--text);
  opacity: 0.22;
  animation: demo-dot 1.05s ease-in-out infinite;
}

.demo-loading-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.demo-loading-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes demo-dot {
  0%,
  80%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.app-frame.is-ready .demo-loading {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.card {
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

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

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.05rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.step-num {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.steps h3 {
  margin: 0.15rem 0 0.25rem;
  font-size: 1rem;
}

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

.download-section {
  text-align: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.15rem;
  padding: 2rem 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .topbar {
    padding: 0.75rem 1rem;
  }

  .hotkey-badge {
    flex-direction: column;
    gap: 0.45rem;
    border-radius: 14px;
    padding: 0.7rem 1rem;
  }

  .cta {
    width: 100%;
  }

  .cta .btn {
    flex: 1 1 100%;
  }

  .demo-row {
    flex-direction: column;
  }

  .section {
    padding: 3rem 1.1rem;
  }
}

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

  .btn:hover {
    transform: none;
  }

  .demo-loading-dots span {
    animation: none;
    opacity: 0.55;
  }
}
