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

body {
  background: #fff;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Page-load animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll-triggered animations ── */
[data-animate] {
  opacity: 0;
  transform: translateY(32px) scale(0.97);
  transition:
    opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
[data-animate].in-view {
  opacity: 1;
  transform: none;
}

/* ── Hero ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 88px 24px 56px;
}

h1 {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.04em;
  color: #1d1d1f;
  margin-bottom: 18px;
  animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.glow-word {
  color: #1d1d1f;
  position: relative;
  display: inline-block;
}

.squiggle {
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 14px;
  overflow: visible;
  pointer-events: none;
}

.squiggle path {
  fill: none;
  stroke: #4B7FE8;
  stroke-width: 4.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 262;
  stroke-dashoffset: 262;
  animation: draw-squiggle 1.35s 0.6s cubic-bezier(0.37, 0, 0.63, 1) forwards;
}

@keyframes draw-squiggle {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .squiggle path {
    stroke-dashoffset: 0;
    animation: none;
  }
}

.tagline {
  font-size: 19px;
  color: #4f4f57;
  line-height: 1.6;
  margin-bottom: 40px;
  animation: fadeUp 0.8s 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ── Install ── */
.install-wrap {
  width: 100%;
  max-width: 520px;
  margin-bottom: 56px;
  animation: fadeUp 0.8s 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.terminal-row {
  display: flex;
  align-items: center;
  background: #f5f5f7;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.terminal-cmd {
  flex: 1;
  padding: 13px 16px;
  font-family: "SF Mono", "Fira Code", "Menlo", monospace;
  font-size: 12.5px;
  color: #333;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  text-align: left;
}
.terminal-cmd::-webkit-scrollbar { display: none; }
.terminal-cmd .prompt { color: #76767d; user-select: none; }

.copy-btn {
  padding: 13px 18px;
  background: #e8e8ed;
  border: none;
  border-left: 1px solid rgba(0,0,0,0.06);
  color: #555;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.copy-btn:hover { background: #d8d8de; color: #1d1d1f; }
.copy-btn.copied { color: #1a8a3a; }

.alt-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.alt-sep { color: #d2d2d7; font-size: 14px; }

.link-dl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #4f4f57;
  text-decoration: none;
  transition: color 0.2s;
}
.link-dl:hover { color: #1d1d1f; }

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #4f4f57;
  text-decoration: none;
  transition: color 0.2s;
}
.gh-link:hover { color: #1d1d1f; }
.gh-link svg { width: 13px; height: 13px; }

.star-count { font-size: 11px; color: #66666d; }

.open-help {
  margin-top: 12px;
  text-align: center;
}
.open-help summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #66666d;
  user-select: none;
  transition: color 0.2s;
}
.open-help summary:hover { color: #4f4f57; }
.open-help summary::-webkit-details-marker { display: none; }
.open-help summary::before {
  content: '▸';
  font-size: 9px;
  display: inline-block;
  transition: transform 0.2s;
}
.open-help[open] summary::before { transform: rotate(90deg); }
.open-help p {
  margin-top: 8px;
  font-size: 12px;
  color: #4f4f57;
  line-height: 1.6;
}

/* ── Video placeholder ── */
.video-wrap {
  width: 100%;
  max-width: 760px;
  margin-bottom: 0;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5f5f7;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding-left: 3px;
  color: #bbb;
}

.video-placeholder p {
  font-size: 13px;
  color: #66666d;
  letter-spacing: 0.01em;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 760px;
  padding: 36px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.feat-card {
  background: #f5f5f7;
  border-radius: 20px;
  padding: 32px 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.feat-card:hover { transform: scale(1.025); }

.feat-icon {
  font-size: 26px;
  line-height: 1;
}

.feat-label {
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1f;
  text-align: center;
  line-height: 1.4;
}

/* ── Footer ── */
footer {
  padding: 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  text-align: center;
  font-size: 13px;
  color: #5c5c64;
}
footer a { color: #3f3f46; text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #1d1d1f; }

/* ── Mobile ── */
@media (max-width: 600px) {
  main { padding: 60px 20px 48px; }
  h1 { font-size: clamp(36px, 10vw, 52px); }
  .tagline { font-size: 17px; }
  .install-wrap { max-width: 100%; margin-bottom: 44px; }
  .terminal-cmd { font-size: 11px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); padding: 28px 0; gap: 10px; }
  .feat-card { padding: 26px 12px 22px; }
  .video-placeholder { border-radius: 16px; }
}
