:root {
  color-scheme: light;
  --ink: #241a18;
  --muted: #725f56;
  --paper: #fff7ec;
  --panel: #fffdf8;
  --line: #ead7c6;
  --peach: #ff9259;
  --peach-dark: #d95e26;
  --blue: #487fdc;
  --mint: #27b392;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 247, 236, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

nav a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

section {
  scroll-margin-top: 88px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1.15fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: 42px 0;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--peach-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-size: 28px;
}

.hero-copy p,
.setup p,
.download-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions,
.download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(90, 62, 37, 0.08);
}

.button:hover {
  border-color: var(--peach);
  transform: translateY(-1px);
}

.button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.82;
}

.button.primary {
  border-color: var(--peach-dark);
  background: var(--peach);
  color: #1f110b;
}

.preview {
  margin: 0;
}

.preview img {
  display: block;
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(89, 62, 40, 0.18);
}

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding: 20px 0 58px;
}

.download-card {
  align-content: space-between;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--blue);
  border-radius: 8px;
  background: var(--panel);
}

.download-card.ready {
  border-top-color: var(--mint);
}

.download-card.pending {
  border-top-color: var(--peach);
}

.setup {
  margin-bottom: 70px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.local-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 420px);
  gap: clamp(20px, 5vw, 58px);
  align-items: center;
  margin: 0 0 56px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.local-preview iframe {
  display: block;
  width: 100%;
  height: min(760px, 82vh);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 42px rgba(89, 62, 40, 0.14);
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f4e2cf;
}

@media (max-width: 860px) {
  .topbar,
  nav,
  .hero-actions {
    align-items: flex-start;
  }

  .topbar,
  .hero {
    display: block;
  }

  nav {
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .preview {
    margin-top: 30px;
  }

  .downloads,
  .setup-grid,
  .local-preview {
    grid-template-columns: 1fr;
  }
}
