/* Home (namespaced under body.demo-home).
   The story in order: the question, how it works, then the demos. */

.demo-home .home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 56px;
}

/* --- The question --------------------------------------------------------- */

.demo-home .home-hero { max-width: 860px; margin-bottom: 72px; }

.demo-home .home-hero h1 {
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.demo-home .home-lede {
  max-width: 680px;
  margin: 24px 0 0;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
}

.demo-home .home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.demo-home .home-button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 55%), var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.demo-home .home-button.quiet { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--hairline); }
.demo-home .home-button:hover { filter: brightness(0.95); }

/* --- How it works --------------------------------------------------------- */

.demo-home .home-how { margin-bottom: 72px; }

.demo-home .home h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.demo-home .home-sub { margin: 6px 0 24px; color: var(--ink-2); }

.demo-home .home-how-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }

.demo-home .home-code {
  flex: 1 1 380px;
  margin: 0;
  padding: 22px 24px;
  border-radius: 16px;
  background: #2A2521;
  color: #EDE6DA;
  box-shadow: 0 18px 40px -26px rgba(42, 37, 33, 0.6);
}

.demo-home .home-code figcaption,
.demo-home .home-code p { font-size: 13px; color: #B4A996; }
.demo-home .home-code figcaption { margin-bottom: 10px; font-size: 12px; }
.demo-home .home-code p { margin: 14px 0 0; }

.demo-home .home-code pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
}

.demo-home .home-code .k { color: #E8A87C; }
.demo-home .home-code .v { color: #9BC7A6; }

.demo-home .home-steps {
  flex: 1 1 460px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-home .home-steps li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--ring-1);
}

.demo-home .home-steps b { font-weight: 600; }
.demo-home .home-steps li > span:last-child { font-size: 14px; color: var(--ink-2); }

.demo-home .step-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.demo-home .step-1 { background: #DCE9D9; color: #2F5A3B; }
.demo-home .step-2 { background: #FBEFD8; color: #7A5212; }
.demo-home .step-3 { background: #D8E6F3; color: #265782; }
.demo-home .step-4 { background: #FFD9C4; color: #8A3B12; }

/* --- The demos ------------------------------------------------------------ */

.demo-home .home-demos-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 20px;
  scroll-margin-top: 24px;
}

.demo-home .home-demos-head span { color: var(--ink-2); }

.demo-home .demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-home .demo-card {
  --card-ink: var(--ink);
  --card-wash: linear-gradient(160deg, #DED6C9, #F4EFE6);
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--ring);
  transition: box-shadow 160ms ease-out, transform 160ms ease-out;
}

.demo-home .demo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.08), 0 14px 30px -20px rgba(48, 43, 38, 0.35);
}

.demo-home .demo-card-todo { --card-ink: #3E6B4F; --card-wash: linear-gradient(160deg, #DCE9D9, #F4F0E6); }
.demo-home .demo-card-chat { --card-ink: #C25A2C; --card-wash: linear-gradient(160deg, #FFD9C4, #F7EBDD); }
.demo-home .demo-card-inbox { --card-ink: #2F6CA3; --card-wash: linear-gradient(160deg, #D8E6F3, #F4EEE4); }
.demo-home .demo-card-assistant { --card-ink: #9A4A2A; --card-wash: linear-gradient(160deg, #F3DCCB, #F6F0E6); }
.demo-home .demo-card-auth { --card-ink: #2E6E73; --card-wash: linear-gradient(160deg, #D3E9E8, #F3F1E8); }
.demo-home .demo-card-migrate { --card-ink: #6A4FA0; --card-wash: linear-gradient(160deg, #E5DEF7, #F4F0E8); }

/* A drawn sheet of a few lines: enough to say "an app", nothing to go stale. */
.demo-home .card-art {
  position: relative;
  display: block;
  height: 150px;
  overflow: hidden;
  background: var(--card-wash);
}

.demo-home .card-sheet {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -14px;
  height: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 10px 10px 0 0;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.06), 0 -6px 18px -10px rgba(48, 43, 38, 0.25);
}

.demo-home .card-sheet i {
  position: relative;
  display: block;
  height: 8px;
  margin-left: 22px;
  border-radius: 9999px;
  background: var(--hairline-soft);
}

.demo-home .card-sheet i::before {
  content: "";
  position: absolute;
  left: -22px;
  top: -3px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--hairline-soft);
}

.demo-home .card-sheet i:nth-child(1) { width: 62%; background: #DFD7CA; }
.demo-home .card-sheet i:nth-child(1)::before { border-radius: 50%; background: var(--card-ink); }
.demo-home .card-sheet i:nth-child(2) { width: 48%; }
.demo-home .card-sheet i:nth-child(3) { width: 70%; }

.demo-home .card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; }
.demo-home .card-head { display: flex; align-items: center; gap: 8px; }
.demo-home .card-head h3 { margin: 0; font-size: 18px; font-weight: 600; }
.demo-home .card-tag { margin-left: auto; font-size: 12px; color: var(--muted); }
.demo-home .card-copy { margin: 0; color: var(--ink-2); }
.demo-home .go { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--card-ink); }

.demo-home .board-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--paper-2);
}

.demo-home .board-band span { flex: 1 1 320px; color: var(--ink-2); }
.demo-home .board-band b { color: var(--ink); }
.demo-home .board-band a { font-weight: 600; color: var(--ink); text-decoration: none; }
.demo-home .board-band a:hover { text-decoration: underline; }

.demo-home .project-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--muted);
}

.demo-home .project-strip p { margin: 0; }
.demo-home .project-strip > p:first-child { flex: 1 1 420px; }
.demo-home .project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.demo-home .project-links a { color: var(--ink); font-weight: 500; }
.demo-home .project-links code { font-size: 13px; color: var(--ink-2); }

@media (max-width: 640px) {
  .demo-home .home { padding-top: 40px; }
  .demo-home .home-steps { grid-template-columns: 1fr; }
}
