/* =========================================================
   Rocket AI — Reset, typography, layout primitives, buttons
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: var(--lh-body);
  color: var(--c-ink-2);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-wrap: pretty;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--c-ink);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -.02em;
  text-wrap: pretty;
}
h1 { font-size: var(--t-4xl); font-weight: 800; }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-xl); line-height: var(--lh-snug); }
h4 { font-size: var(--t-lg); line-height: var(--lh-snug); }

p  { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0; padding: 0; list-style: none; }

strong, b { color: var(--c-ink); font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] { display: none !important; }

::selection { background: var(--c-brand-soft); color: var(--c-brand-deep); }

/* ---------------- Layout ---------------- */

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-5); }
.narrow    { max-width: var(--narrow); margin-inline: auto; }

.section { padding-block: var(--section-y); position: relative; }
.section--soft  { background: var(--c-bg-soft); }
.section--tint  { background: linear-gradient(180deg, var(--c-brand-tint), #fff); }
.section--line  { border-top: 1px solid var(--c-line); }

.section-head { max-width: 720px; margin-bottom: var(--s-10); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: var(--s-4); font-size: var(--t-md); color: var(--c-muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-4);
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-brand);
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; border-radius: 2px;
  background: var(--c-brand); opacity: .55;
}
.section-head--center .eyebrow::before { display: none; }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------- Surfaces ---------------- */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--sh-xs);
}
.card--flat { box-shadow: none; }
.card--brand { border-color: #cddffc; background: var(--c-brand-tint); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 600;
  background: var(--c-brand-soft); color: var(--c-brand-deep);
}
.badge--ok     { background: var(--c-ok-soft);     color: var(--c-ok); }
.badge--accent { background: var(--c-accent-soft); color: var(--c-accent); }
.badge--plain  { background: var(--c-bg-soft);     color: var(--c-muted); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: inherit; font-size: var(--t-md); font-weight: 700;
  line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .6; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--c-brand-2), var(--c-brand));
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(29,78,216,.3); }

.btn-secondary {
  background: var(--c-surface);
  border-color: var(--c-line-strong);
  color: var(--c-ink);
  box-shadow: var(--sh-xs);
}
.btn-secondary:hover { border-color: var(--c-brand); color: var(--c-brand); }

.btn-ghost { background: transparent; color: var(--c-muted); padding-inline: var(--s-4); }
.btn-ghost:hover { color: var(--c-ink); }

.btn-lg  { padding: 18px 36px; font-size: var(--t-lg); }
.btn-sm  { padding: 10px 18px; font-size: var(--t-sm); }
.btn-block { display: flex; width: 100%; }

.btn-note {
  margin-top: var(--s-3);
  font-size: var(--t-sm); color: var(--c-muted);
}

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.cta-row--center { justify-content: center; }

/* ---------------- Lists ---------------- */

.list-check li,
.list-cross li {
  position: relative;
  padding-left: 30px;
  margin-bottom: var(--s-3);
}
.list-check li::before,
.list-cross li::before {
  position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
}
.list-check li::before { content: '✓'; background: var(--c-ok-soft);     color: var(--c-ok); }
.list-cross li::before { content: '✕'; background: var(--c-danger-soft); color: var(--c-danger); }

.list-dot li {
  position: relative; padding-left: 20px; margin-bottom: var(--s-2);
}
.list-dot li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--c-brand); opacity: .5;
}

/* ---------------- Reveal on scroll ---------------- */

/* Mặc định LUÔN hiển thị — an toàn cho crawler, nhảy anchor và full-page capture. */
.reveal { opacity: 1; transform: none; }
.reveal.is-in {
  animation: rk-reveal-in .42s var(--ease) both;
}
@keyframes rk-reveal-in {
  from { opacity: .84; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- Utilities ---------------- */

.u-center { text-align: center; }
.u-muted  { color: var(--c-muted); }
.u-small  { font-size: var(--t-sm); }
.u-mono   { font-family: var(--font-mono); }
.u-nowrap { white-space: nowrap; }
.u-mt-6   { margin-top: var(--s-6); }
.u-mt-10  { margin-top: var(--s-10); }

.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;
}

/* Placeholder chờ nội dung thật — dễ thấy khi review, dễ grep khi thay */
.placeholder {
  border: 1px dashed var(--c-line-strong);
  border-radius: var(--r-md);
  background: repeating-linear-gradient(135deg, #fafbfd, #fafbfd 10px, #f3f5f9 10px, #f3f5f9 20px);
  color: var(--c-muted);
  padding: var(--s-6);
  text-align: center;
  font-size: var(--t-sm);
}
.placeholder strong { display: block; margin-bottom: 4px; color: var(--c-ink-2); }
