/* ============================================================
   DataGo — datago.id
   Static landing · dark theme · self-hosted fonts, zero JS
   Perf: no external requests, no layout shift, no animations
   that matter on mobile.
   ============================================================ */

/* ---------- 1. Fonts (self-hosted, variable, latin subset) ---------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-latin.woff2) format("woff2");
}

/* ---------- 2. Tokens ---------- */
:root {
  --bg: #0b0f0c;
  --bg-raise: #111814;
  --bg-card: #0e1410;
  --line: #1e2a23;
  --line-soft: #16201a;
  --text: #e8efe9;
  --muted: #9fb0a4;
  --accent: #5be389;
  --accent-ink: #062d16;
  --accent-soft: rgba(91, 227, 137, 0.12);
  --radius: 14px;
  --wrap: 1080px;
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- 3. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-raise);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  transition: top 0.15s ease;
}
.skip:focus { top: 0; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-solid {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-solid:hover { background: #79eda1; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

/* ---------- 5. Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .mark { flex: 0 0 auto; }

.menu {
  display: flex;
  align-items: center;
  gap: 22px;
}
.menu a:not(.btn) {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.menu a:not(.btn):hover { color: var(--text); }
.menu .btn { padding: 8px 16px; }

/* ---------- 6. Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 72px 0 64px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 12px;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}
.lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 54ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
.chips li {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 14px;
}

.hero-spec {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-spec dl {
  margin: 0;
  display: grid;
}
.hero-spec dl > div {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.92rem;
}
.hero-spec dl > div:last-child { border-bottom: 0; }
.hero-spec dt {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-spec dd { margin: 0; }
.hero-spec code { white-space: normal; }

/* ---------- 7. Sections ---------- */
main > section { padding: 56px 0; }
main > section:first-of-type { padding-top: 0; }
.section-sub {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 32px;
}

/* ---------- 8. Modes (3 cara pakai) ---------- */
.modes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: mode;
}
.mode {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  counter-increment: mode;
}
.mode::before {
  content: "0" counter(mode);
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--line);
  font-weight: 700;
}
.mode-when {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.mode-when span {
  display: block;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 12px;
  width: fit-content;
}
.mode-body { padding-right: 44px; }
.mode-body p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 8px 0 0;
}

/* ---------- 9. Models & terminal ---------- */
.provs {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.provs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.p-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.terminal {
  margin: 0;
  background: #070b09;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.term-bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.term-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}
.term-bar span:first-child { background: var(--accent); opacity: 0.7; }
.terminal pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
  color: #c6d6cc;
}
.terminal code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
  color: inherit;
}

/* ---------- 10. Pricing table ---------- */
.table-wrap,
.plans {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.thead,
.trow {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 0.8fr;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
}
.thead {
  background: var(--bg-raise);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.trow + .trow { border-top: 1px solid var(--line-soft); }
.trow em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.trow s { color: var(--muted); opacity: 0.8; }
.trow strong { font-size: 1.05rem; }
.trow-hl {
  background: var(--accent-soft);
}
.trow-hl strong { color: var(--accent); }
.trow-hl span:last-child strong,
.trow-hl span:nth-child(4) {
  color: var(--accent);
  font-weight: 700;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 24px;
}
.plan {
  padding: 22px 20px;
}
.plan + .plan { border-left: 1px solid var(--line-soft); }
.plan p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 0;
}
.plan strong { color: var(--text); }

/* ---------- 11. Agents ---------- */
.agent-list {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 2;
  max-width: 60ch;
}
.agent-list::first-letter { color: var(--text); }

/* ---------- 12. FAQ ---------- */
.faq {
  border-top: 1px solid var(--line-soft);
}
.faq details {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 18px 40px 18px 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  color: var(--muted);
  max-width: 72ch;
  margin: 0 0 20px;
  padding-right: 28px;
}

/* ---------- 13. CTA band ---------- */
.cta-band {
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 56px 24px;
}
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.cta-band p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 8px;
}
.cta-band .cta-row {
  justify-content: center;
  margin: 24px 0 0;
}

/* ---------- 14. Footer ---------- */
.site-foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 48px;
  padding: 48px 0 24px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}
.foot-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0 0;
  max-width: 34ch;
}
.foot-h {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.site-foot nav,
.site-foot > div > div:last-child { display: grid; }
.site-foot nav a,
.site-foot > div > div:last-child a {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 4px 0;
}
.site-foot nav a:hover,
.site-foot > div > div:last-child a:hover { color: var(--text); }
.foot-note {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.foot-note p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 56px 0 48px;
  }
  .modes { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }

  /* Header: keep brand + sign-in buttons, drop text links */
  .menu a:not(.btn) { display: none; }
  .menu { gap: 10px; }

  main > section { padding: 44px 0; }

  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }

  /* Price table: rows become 2x2 cards */
  .thead { display: none; }
  .trow {
    grid-template-columns: 1fr 1fr;
    row-gap: 4px;
    padding: 16px;
  }
  .trow > span:first-child {
    grid-column: 1 / -1;
  }

  .foot-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 20px; }
}

/* ---------- 16. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- 17. Print ---------- */
@media print {
  .site-head,
  .cta-band,
  .site-foot { display: none; }
  body { background: #fff; color: #000; }
}
