:root {
  --bg: #f3efe6;
  --bg-2: #e7efe9;
  --ink: #17211c;
  --muted: #5b6b63;
  --card: rgba(255, 255, 255, 0.72);
  --stroke: rgba(23, 33, 28, 0.08);
  --accent: #0f766e;
  --accent-2: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --shadow: 0 24px 80px rgba(23, 33, 28, 0.12);
  --radius: 28px;
  --sans: "Manrope", ui-rounded, system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

html[data-theme="dark"] {
  --bg: #0b0f14;
  --bg-2: #12201c;
  --ink: #eef5f1;
  --muted: #9aaca3;
  --card: rgba(18, 24, 28, 0.78);
  --stroke: rgba(238, 245, 241, 0.08);
  --accent: #2dd4bf;
  --accent-2: #99f6e4;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: radial-gradient(1200px 600px at 10% -10%, var(--bg-2), transparent 55%), var(--bg);
  letter-spacing: -0.01em;
  text-rendering: optimizeLegibility;
}

.aurora {
  position: fixed;
  inset: -20vh -10vw auto auto;
  width: 70vw;
  height: 70vh;
  background:
    radial-gradient(circle at 30% 40%, rgba(45, 212, 191, 0.22), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.12), transparent 45%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.topbar, .page, .site-footer { position: relative; z-index: 1; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
  max-width: 980px;
  margin: 0 auto;
}

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

.icon-btn {
  border: 1px solid var(--stroke);
  background: var(--card);
  color: inherit;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  cursor: pointer;
}
html[data-theme="dark"] .sun { display: none; }
html[data-theme="light"] .moon { display: none; }

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.hero { padding: 28px 4px 18px; animation: rise 0.6s ease both; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.05;
  margin: 10px 0 16px;
  font-weight: 600;
}
.lead { font-size: 18px; color: var(--muted); max-width: 640px; line-height: 1.6; }
.hero-actions, .cta-stack { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #06201c;
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.28);
}
html[data-theme="light"] .btn-primary { color: #fff; }
.btn-secondary, .btn-ghost {
  background: var(--card);
  color: inherit;
  border-color: var(--stroke);
}
.btn-block { width: 100%; }

.grid-3, .split {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split { grid-template-columns: 1.1fr 0.9fr; }
.panel {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.step {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800;
}
.panel h2 { margin: 12px 0 8px; font-size: 20px; }
.panel p, .muted { color: var(--muted); line-height: 1.6; }
.checklist { padding-left: 18px; color: var(--muted); }
.checklist li { margin: 8px 0; }
.code-sample {
  background: rgba(0,0,0,0.28);
  color: #d1fae5;
  padding: 14px;
  border-radius: 14px;
  overflow: auto;
  font-size: 13px;
}
html[data-theme="light"] .code-sample { background: #12312c; }

.install-wrap { display: grid; place-items: start center; padding-top: 12px; }
.app-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 36px;
  padding: 28px 22px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise 0.55s ease both;
}
.card-glow {
  position: absolute; inset: -40% -20% auto;
  height: 220px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.app-hero { display: flex; gap: 16px; align-items: center; position: relative; }
.app-icon {
  width: 112px; height: 112px; border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  object-fit: cover; background: #111;
}
.app-kicker { margin: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.app-name { margin: 4px 0 4px; font-size: 28px; letter-spacing: -0.04em; }
.app-version, .app-description, .hint { color: var(--muted); }
.app-description { line-height: 1.55; margin: 18px 0; }

.spec-list {
  margin: 0 0 18px;
  background: var(--accent-soft);
  border-radius: 22px;
  overflow: hidden;
}
.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); font-size: 13px; }
.spec-list dd { margin: 0; font-weight: 700; text-align: right; font-size: 13px; }
.spec-list code { font-size: 12px; }

.hint { font-size: 13px; text-align: center; }
.state-card { max-width: 560px; padding: 40px 8px; animation: rise 0.5s ease both; }
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 0 16px 28px;
}

.overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(6, 10, 12, 0.55);
  display: grid; place-items: center;
  color: white; text-align: center; gap: 12px;
  backdrop-filter: blur(8px);
}
.overlay[hidden],
.toast[hidden] {
  display: none !important;
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #2dd4bf;
  animation: spin 0.8s linear infinite;
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #111; color: #fff; padding: 12px 16px; border-radius: 14px;
  z-index: 30; max-width: 90vw;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .grid-3, .split { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .app-hero { flex-direction: column; text-align: center; }
  .app-heading { text-align: center; }
  .spec-list > div { flex-direction: column; align-items: flex-start; }
  .spec-list dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
