/* ==========================================================================
   DevStack — Homepage (redesign)
   Dipakai hanya oleh src/pages/index.astro. Memakai token dari global.css.
   Prinsip: satu pesan per section, teks terbaca (≥14px), hierarki jelas.
   ========================================================================== */

.home { font-size: 15px; }
.home section { padding: 72px 0; border-top: 1px solid var(--border); }
.home section.h-alt { background: rgba(255, 255, 255, 0.015); }

/* ---------- section header */
.h-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.h-head.left { margin-left: 0; text-align: left; }
.h-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 12px;
}
.h-head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.03em; }
.h-head p { color: var(--muted); font-size: 16px; line-height: 1.6; margin-top: 12px; }

/* ---------- hero */
.h-hero { padding: 72px 0 64px; border-bottom: 1px solid var(--border); }
.h-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.h-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-strong);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; text-decoration: none;
}
.h-pill b { color: var(--accent-3); font-weight: 600; }
.h-pill:hover { border-color: var(--muted-2); }
.h-hero h1 { font-size: clamp(38px, 5.6vw, 60px); line-height: 1.02; letter-spacing: -0.045em; margin-bottom: 20px; }
.h-hero h1 span {
  background: linear-gradient(120deg, var(--accent) 0%, #ff9a5c 60%, #ffd08a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.h-lead { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 540px; margin-bottom: 28px; }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.h-actions .btn, .h-actions .btn-outline { padding: 13px 22px; font-size: 14px; }
.h-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.h-checks li { display: inline-flex; align-items: center; gap: 8px; }
.h-checks i { color: var(--success); }

/* ---------- code window (hero) */
.h-code { background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.h-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.h-tabs { display: flex; gap: 4px; }
.h-tab {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 6px 12px; cursor: pointer;
}
.h-tab:hover { color: var(--text); }
.h-tab[aria-selected="true"] { color: var(--text); background: var(--card-2); border-color: var(--border-strong); }
.h-copy { font-family: var(--font-mono); font-size: 12px; color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 10px; cursor: pointer; }
.h-copy:hover { color: var(--text); border-color: var(--border-hover); }
.h-code pre { margin: 0; padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--text-2); overflow-x: auto; }
.h-code pre[hidden] { display: none; }
.h-code .k { color: #ff7b72; } .h-code .s { color: #ffa657; } .h-code .c { color: var(--muted-2); } .h-code .f { color: #79c0ff; }
.h-code-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.h-code-foot b { color: var(--success); font-weight: 600; }

/* ---------- stats band */
.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }
.h-stats div { padding: 20px 24px; border-right: 1px solid var(--border); }
.h-stats div:last-child { border-right: none; }
.h-stats strong { display: block; font-family: var(--font-display); font-size: 28px; letter-spacing: -0.03em; }
.h-stats span { color: var(--muted); font-size: 14px; }

/* ---------- tools strip */
.home section.h-tools { padding: 32px 0; }
.h-tools p { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.h-tools ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none; padding: 0; }
.h-tools li { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--text-2); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; }
.h-tools li i { color: var(--muted); }

/* ---------- generic cards */
.h-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.h-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.h-card { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; transition: border-color 0.2s, transform 0.2s; }
.h-card:hover { border-color: var(--border-hover); }
.h-card h3 { font-size: 19px; margin: 18px 0 10px; letter-spacing: -0.02em; }
.h-card p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.h-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent-3); font-size: 17px; }
.h-card.sm { padding: 22px; }
.h-card.sm h3 { font-size: 16px; margin: 14px 0 6px; }
.h-card.sm p { font-size: 14px; }
.h-card.sm .h-icon { width: 38px; height: 38px; font-size: 15px; }

/* ---------- steps */
.h-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; list-style: none; padding: 0; }
.h-step { position: relative; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }
.h-step-num { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.h-step h3 { font-size: 19px; margin: 10px 0 8px; }
.h-step p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.h-step a { color: var(--accent-3); font-family: var(--font-mono); font-size: 13.5px; text-decoration: none; }
.h-step a:hover { text-decoration: underline; }
.home code { font-family: var(--font-mono); font-size: 0.88em; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 1px 6px; color: var(--text-2); }

/* ---------- pricing (reuse .plan-card dari global.css) */
.h-free {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1080px; margin: 0 auto 24px; padding: 18px 24px;
  border: 1px solid var(--success-border); background: var(--success-soft); border-radius: var(--r-lg);
}
.h-free strong { font-family: var(--font-display); font-size: 17px; }
.h-free p { color: var(--text-2); font-size: 14.5px; margin-top: 2px; }
.h-center { text-align: center; margin-top: 32px; }
.home .plan-name { font-size: 17px; }
.home .plan-features li { font-size: 14px; }

/* ---------- detail teknis (tab) */
.h-detail { max-width: 860px; margin: 0 auto; }
.h-dtab-list { display: flex; gap: 6px; padding: 4px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); }
.h-dtab { flex: 1; font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; }
.h-dtab:hover { color: var(--text); }
.h-dtab[aria-selected="true"] { color: var(--text); background: var(--card-2); border-color: var(--border-strong); }
.h-dtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.h-dpanel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px 20px; }
.h-dpanel[hidden] { display: none; }
.h-dpanel .h-link { margin: 0; padding: 12px 0 8px; border-top: 1px solid var(--border); }

.h-compare { list-style: none; padding: 0; }
.h-compare li { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.h-compare li:first-child { border-top: none; }
.h-compare-head { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.h-compare li span:nth-child(n+2) { text-align: center; }
.h-compare .yes { color: var(--success); }
.h-compare .no { color: var(--muted); font-size: 13.5px; }
.h-compare .no i { color: var(--muted-2); }

.h-list { list-style: none; padding: 0; }
.h-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 13px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.h-list li:first-child { border-top: none; }
.h-list li code { white-space: nowrap; }
.h-list li > span { color: var(--muted); }
.h-list.icon li { flex-wrap: nowrap; align-items: flex-start; gap: 14px; }
.h-list.icon li > i { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent-3); font-size: 14px; }
.h-list.icon strong { display: block; font-family: var(--font-display); font-size: 15.5px; margin-bottom: 2px; }
.h-list.icon div span { color: var(--muted); font-size: 14px; line-height: 1.55; }

.h-note { max-width: 720px; margin: 24px auto 0; text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.h-note a { color: var(--accent-3); }
.h-testi + .h-usage-grid { margin-top: 24px; }

/* ---------- usage */
.h-usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.h-usage-grid .chart-card { padding: 20px; }
.h-usage-grid .chart-head h3 { font-size: 15px; }
.h-usage-grid .chart-svg { height: 150px; }

/* ---------- testimonials */
.h-testi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.h-testi .testimonial { padding: 24px; }
.h-testi .testimonial p { font-size: 15px; }

/* ---------- faq */
.h-faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.h-faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); }
.h-faq details[open] { border-color: var(--border-hover); }
.h-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-family: var(--font-display); font-weight: 600; font-size: 16.5px; }
.h-faq summary::-webkit-details-marker { display: none; }
.h-faq summary i { color: var(--muted); transition: transform 0.2s; }
.h-faq details[open] summary i { transform: rotate(45deg); color: var(--accent); }
.h-faq details p { padding: 0 22px 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.h-faq details p a { color: var(--accent-3); }
.h-faq-more { text-align: center; margin-top: 28px; color: var(--muted); font-size: 15px; }
.h-faq-more a { color: var(--accent-3); }

/* ---------- final CTA */
.h-cta { text-align: center; padding: 56px 32px; border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: radial-gradient(600px 240px at 50% 0%, var(--accent-soft), transparent 70%), linear-gradient(150deg, var(--card), var(--card-2)); }
.h-cta h2 { font-size: clamp(26px, 3.4vw, 36px); }
.h-cta p { color: var(--muted); font-size: 16px; margin: 12px auto 28px; max-width: 520px; }
.h-cta .h-actions { justify-content: center; }

/* ---------- responsive */
@media (max-width: 980px) {
  .h-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .h-grid-3, .h-steps, .h-testi { grid-template-columns: 1fr; }
  .h-stats { grid-template-columns: repeat(2, 1fr); }
  .h-stats div:nth-child(2n) { border-right: none; }
  .h-stats div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .home section { padding: 44px 0; }
  .home section.h-tools { padding: 24px 0; }
  .h-hero { padding: 36px 0 40px; }
  .h-stats { margin-top: 36px; }
  .h-stats div { padding: 16px; }
  .h-stats strong { font-size: 24px; }
  .h-head { margin-bottom: 28px; }
  .h-lead { font-size: 16px; }
  .h-card, .h-step { padding: 20px; }
  .h-usage-grid { grid-template-columns: 1fr; }
  .h-actions .btn, .h-actions .btn-outline { flex: 1 1 100%; }
  .h-checks { flex-direction: column; gap: 8px; }
  .h-free { padding: 16px; }
  .h-free .btn-outline { width: 100%; }
  .h-cta { padding: 36px 20px; }
  .h-dtab { padding: 9px 6px; font-size: 12px; }
  .h-dpanel { padding: 4px 16px; }
  .h-compare li { grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; font-size: 13.5px; }
  .h-list li code { white-space: normal; word-break: break-all; }
  .h-faq summary { padding: 16px; font-size: 15.5px; }
  .h-faq details p { padding: 0 16px 16px; }
}
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .h-code pre { font-size: 12px; padding: 16px; }
  .h-tab { padding: 6px 8px; }
  .h-code-foot { font-size: 11px; }
  /* slug model panjang (bt/deepseek-v4.1-flash) tidak boleh melebarkan kartu */
  .h-step p code, .h-list li code { overflow-wrap: anywhere; }
}
.h-link { margin-top: 16px; }
.h-link a { color: var(--accent-3); font-family: var(--font-mono); font-size: 13.5px; text-decoration: none; }
.h-link a:hover { text-decoration: underline; }
.h-usage-grid .chart-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
