/* ===== Design tokens ===== */
:root {
  --bg: #12141a;
  --bg-alt: #191c24;
  --surface: #20242e;
  --surface-2: #2b3040;
  --brand: #ff8a1f;
  --brand-dark: #f06d0a;
  --brand-soft: rgba(255, 138, 31, .14);
  --on-brand: #1c1206;
  --text: #f2f4f8;
  --muted: #a3aabb;
  --border: rgba(255, 255, 255, .1);
  --radius: 14px;
  --shadow: 0 18px 45px rgba(0, 0, 0, .38);
  --header-h: 74px;
  --max: 1200px;
  --pad: 20px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 14px; }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 14px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.container-narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: var(--on-brand); padding: 10px 18px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 11px 24px; font-size: .95rem; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--on-brand); box-shadow: 0 8px 22px rgba(255, 138, 31, .3);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(255, 138, 31, .45); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-lg { padding: 15px 40px; font-size: 1.05rem; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 20, 26, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }

.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; min-width: 0; }
.logo img { height: 52px; width: auto; max-width: 100%; object-fit: contain; }

.nav-auth { display: flex; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* ===== Hero slider ===== */
.hero { background: var(--bg-alt); }
.slider { position: relative; width: 100%; overflow: hidden; }
.slides { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.slide { min-width: 100%; }
.slide img { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(18, 20, 26, .55); color: #fff;
  border: 1px solid var(--border); border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; opacity: 0; transition: opacity .25s ease, background .2s ease;
}
.slider:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }
.slider-arrow:hover { background: var(--brand); color: var(--on-brand); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider-dots {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 9px;
}
.slider-dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(18, 20, 26, .35); cursor: pointer; transition: width .25s ease, background .25s ease;
}
.slider-dots button.is-active { width: 28px; border-radius: 999px; background: var(--on-brand); }

/* ===== Stats ===== */
.stats { background: var(--surface); border-block: 1px solid var(--border); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; padding-block: 26px; text-align: center;
}
.stat strong { display: block; font-size: 1.55rem; color: var(--brand); }
.stat span { font-size: .9rem; color: var(--muted); }
.stat-logo { height: 36px; width: auto; margin: 0 auto 8px; }

/* ===== Sections ===== */
.section { padding: 62px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { text-align: center; }
.section-sub {
  text-align: center; color: var(--muted);
  max-width: 640px; margin: 0 auto 38px;
}
.lead { font-size: 1.06rem; color: #d8dce6; }
#intro h1 { text-align: center; }
#intro p { max-width: 900px; margin-inline: auto; text-align: center; color: var(--muted); }

/* ===== Giới thiệu KIM88 ===== */
.about-title {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  color: var(--brand); text-align: center; margin-bottom: 24px;
  flex-wrap: wrap;
}
.about-title::before, .about-title::after {
  content: ""; flex: 1; min-width: 40px; height: 1px; background: var(--brand); opacity: .45;
}
.about-title-logo { height: 42px; width: auto; flex-shrink: 0; }
.about-title span { font-size: clamp(1.05rem, 2.2vw, 1.45rem); }
.about-lead {
  border-left: 4px solid var(--brand);
  padding: 2px 0 2px 20px; margin-bottom: 30px;
  font-style: italic; color: var(--text);
}
.about-grid {
  display: grid; gap: 34px 44px;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255, 138, 31, .45);
  padding-top: 30px;
}
.about-figure {
  margin: 0 0 20px; padding: 34px 30px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  display: grid; place-items: center;
}
.about-figure img { width: 100%; max-width: 320px; height: auto; }
.about-col h3 { color: var(--brand); font-size: 1.18rem; }
.about-col h3 + p { margin-bottom: 24px; }
.about-col p { color: var(--muted); }

/* ===== Lý do chọn KIM88 ===== */
.why-title {
  color: var(--brand);
  text-align: center;
  margin-bottom: 18px;
}
.why-intro {
  text-align: center;
  max-width: 920px;
  margin: 0 auto 34px;
  color: var(--text);
}
.why-grid {
  display: grid;
  gap: 28px 32px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  border-top: 1px solid rgba(255, 138, 31, .45);
  padding-top: 28px;
}
.why-item h3 {
  color: var(--brand);
  font-size: 1.12rem;
  margin-bottom: 12px;
}
.why-item p {
  color: var(--text);
  font-size: .95rem;
  margin: 0;
}

/* ===== Product images ===== */
.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(6, 1fr);
  justify-items: center;
}
.product {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.product img {
  width: 100%;
  height: auto;
  aspect-ratio: 192 / 300;
  object-fit: cover;
}
.product:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 16px 36px rgba(255, 138, 31, .28);
}

/* ===== Steps ===== */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 60px 22px 22px;
}
.steps li::before {
  content: counter(step);
  position: absolute; top: 16px; left: 22px;
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); border-radius: 50%; font-weight: 800;
}
.steps p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ===== FAQ ===== */
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 20px; margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--muted); font-size: .95rem; padding-bottom: 8px; margin: 0; }

/* ===== CTA ===== */
.cta {
  padding: 62px 0; text-align: center;
  background: linear-gradient(135deg, #20242e, #3a2a16 55%, #5a3510);
}
.cta p { color: var(--muted); margin-bottom: 26px; }

/* ===== Footer ===== */
.site-footer { background: #0b0d12; border-top: 1px solid var(--border); padding-top: 48px; font-size: .93rem; }
.site-footer .logo img { height: 48px; }
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding-bottom: 34px;
}
.footer-desc { color: var(--muted); margin-top: 14px; max-width: 380px; }
.site-footer h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .6px; color: var(--brand); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer ul a { color: var(--muted); }
.site-footer ul a:hover { color: var(--brand); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-top: 1px solid var(--border); padding-block: 18px; color: var(--muted);
}
.age-badge {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid var(--muted); border-radius: 50%; font-size: .8rem; font-weight: 700;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .logo img { height: 46px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { gap: 28px 32px; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .logo img { height: 42px; }
  .nav-auth { gap: 8px; }
  .nav-auth .btn { padding: 9px 16px; font-size: .88rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 26px; }
  .about-title { gap: 12px; }
  .about-figure { padding: 26px 22px; }
  .slider-arrow { opacity: 1; width: 38px; height: 38px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .product { max-width: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 62px; --pad: 16px; }
  .section, .cta { padding: 44px 0; }
  .header-inner { gap: 10px; }
  .logo img { height: 34px; }
  .nav-auth .btn { padding: 8px 14px; font-size: .82rem; }

  .slider-arrow { width: 32px; height: 32px; font-size: .85rem; }
  .slider-dots { bottom: 8px; }
  .slider-dots button { width: 8px; height: 8px; }
  .slider-dots button.is-active { width: 22px; }

  .stat-logo { height: 28px; }
  .stat strong { font-size: 1.3rem; }

  .about-title::before, .about-title::after { display: none; }
  .about-title-logo { height: 34px; }
  .about-lead { padding-left: 14px; margin-bottom: 24px; }
  .about-figure { padding: 20px 16px; }
  .about-grid, .why-grid { padding-top: 24px; gap: 24px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .site-footer .logo img { height: 40px; }
  .footer-bottom { flex-direction: column; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  :root { --header-h: 58px; --pad: 14px; }
  .header-inner { gap: 8px; }
  .logo img { height: 28px; }
  .nav-auth { gap: 6px; }
  .nav-auth .btn { padding: 7px 11px; font-size: .76rem; }

  .stats-grid { gap: 12px; padding-block: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .faq-item { padding: 2px 14px; }
}

@media (max-width: 360px) {
  .logo img { height: 24px; }
  .nav-auth .btn { padding: 6px 10px; font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
