/* ===========================================================
   Homepage-only polish (index.html) — scoped under .home so
   shared components on other pages keep their current design.
   =========================================================== */

/* -----------------------------------------------------------
   1. Vertical rhythm
   ----------------------------------------------------------- */
.home .page-hero { padding: 96px 40px 72px; }
.home .page-hero h1 { margin: 0 0 18px; }
.home .page-hero .hero-sub { margin: 0 auto 28px; }
.home .content-section { padding: 96px 40px; border-top: none; }
.home .content-section h2 { margin: 0 0 20px; }
.home .content-section .eyebrow { margin: 0 0 16px; }
.home .content-section .section-lead { margin: 0 0 32px; }
.home .content-wide { background: none; }

/* -----------------------------------------------------------
   2. Hero — typography + product visual
   ----------------------------------------------------------- */
.home .page-hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.home .eyebrow {
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  background: rgba(238, 240, 255, 0.7);
}

/* mini editor window mockup */
.home .hero-visual {
  position: relative;
  max-width: 780px;
  margin: 48px auto 0;
  text-align: left;
}
.home .hero-window {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.home .hero-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.home .hw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.home .hw-dot:nth-child(1) { background: #f87171; }
.home .hw-dot:nth-child(2) { background: #fbbf24; }
.home .hw-dot:nth-child(3) { background: #34d399; }
.home .hw-file {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.home .hw-run {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  background: var(--grad-brand);
  padding: 4px 14px;
  border-radius: 7px;
  box-shadow: var(--shadow-xs);
}
.home .hero-window-body {
  display: flex;
  min-height: 250px;
}
.home .hero-code {
  flex: 1 1 50%;
  min-width: 0;
  margin: 0;
  padding: 18px 20px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  overflow: hidden;
  white-space: pre-wrap;
}
.hl-tag     { color: #ff8a5b; }
.hl-attr    { color: #7dd3fc; }
.hl-str     { color: #86efac; }
.hl-fn      { color: #fbbf24; }
.hl-comment { color: #64748b; font-style: italic; }
.home .hero-preview {
  flex: 1 1 50%;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #eef0ff 0%, #f6f7ff 100%);
}
.home .hero-preview-card {
  width: 100%;
  max-width: 150px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.home .hero-preview-card strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #4338ca;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.home .hero-preview-card span {
  display: block;
  font-size: 10.5px;
  line-height: 1.45;
  color: #6b7280;
  margin-bottom: 10px;
}
.home .hero-preview-card em {
  display: inline-block;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #4f46e5;
  border-radius: 6px;
  padding: 4px 12px;
}

/* floating feature chips — fluid, no overflow */
.home .hero-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.home .hero-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.home .chip-offline  { top: -10px; left: 8px; }
.home .chip-offline::before  { background: var(--green); }
.home .chip-nosignup { top: 22%; right: 8px; }
.home .chip-nosignup::before { background: var(--accent); }
.home .chip-autosave { bottom: -10px; right: 12px; }
.home .chip-autosave::before { background: var(--badge-yellow); }
@media (max-width: 720px) {
  .home .hero-chip {
    position: static;
  }
  .home .hero-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .home .hero-visual::after {
    content: "";
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  /* move chips below window on small screens */
  .home .chip-offline, .home .chip-nosignup, .home .chip-autosave {
    position: static;
  }
  .home .hero-window { order: -1; }
}

/* -----------------------------------------------------------
   3. Tool cards — unified anatomy, dimmed coming-soon
   ----------------------------------------------------------- */
.home .tools-grid--home { gap: 24px; }
.home .tool-card {
  padding: 28px 26px;
  border-radius: 14px;
  gap: 13px;
}
.home .tool-card .tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 8px 16px -8px rgba(79, 70, 229, 0.55);
}
.home .tool-card h3 { font-size: 16.5px; }
.home .tool-card .tag {
  font-size: 10.5px;
  padding: 3px 10px;
}
.home .tool-card .post-link { font-size: 13.5px; }

/* coming-soon cards: clearly secondary */
.home .tool-card.soft {
  background: #fafbfc;
  border-color: var(--border);
}
.home .tool-card.soft .tool-icon {
  filter: saturate(0.4);
  opacity: 0.85;
  box-shadow: none;
}
.home .tool-card.soft h3 { color: var(--text-2); }
.home .tool-card.soft p { color: var(--text-3); }
.home .tool-card.soft .tag {
  color: var(--text-2);
  background: #fff;
  border-color: var(--border-strong);
}
.home .tool-card.soft .post-link { color: var(--text-3); }
.home .tool-card.soft:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

/* -----------------------------------------------------------
   4. FAQ — hairline rows, two columns on desktop
   ----------------------------------------------------------- */
.home .faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  max-width: 880px;
  margin: 36px auto 0;
}
.home .faq details {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  border-bottom: 1px solid var(--border);
}
.home .faq summary {
  padding: 18px 34px 18px 0;
  font-size: 14.5px;
}
.home .faq summary::after {
  right: 8px;
  border-right-width: 1.5px;
  border-top-width: 1.5px;
}
.home .faq details p {
  padding: 0 34px 18px 0;
}
.home .faq details[open] summary::after { border-color: var(--accent); }

/* -----------------------------------------------------------
   5. Responsive
   ----------------------------------------------------------- */
@media (max-width: 900px) {
  .home .faq { grid-template-columns: 1fr; max-width: 720px; }
}
@media (max-width: 760px) {
  .home .page-hero { padding: 64px 24px 56px; }
  .home .content-section { padding: 64px 24px; }
  .home .page-hero h1 { font-size: clamp(28px, 7vw, 34px); }
  .home .hero-visual { margin-top: 40px; }
  .home .tools-grid--home { gap: 20px; }
}
@media (max-width: 720px) {
  .home .hero-window-body { flex-direction: column; }
  .home .hero-code { max-height: 240px; overflow: auto; -webkit-overflow-scrolling: touch; }
  .home .hero-preview { min-height: 180px; }
}
@media (max-width: 560px) {
  .home .hero-chip { padding: 6px 12px; font-size: 11px; }
}
