/* ============================================================
   S3D.vn — Theme CAM / KEM, nền vân gỗ  (bám mẫu mới)
   ============================================================ */

:root {
  /* Nền kem ấm */
  --bg:          #F4ECDF;
  --bg-2:        #EFE4D2;
  /* Thẻ trắng kem */
  --card:        #FDFBF6;
  --card-2:      #FBF7EF;
  /* Cam đất — màu nhấn chính */
  --orange:      #DE7A33;
  --orange-2:    #E98C46;   /* sáng (gradient trên) */
  --orange-dark: #C4641E;
  --orange-soft: rgba(222,122,51,0.10);
  --orange-line: rgba(222,122,51,0.32);
  /* Nâu — chữ */
  --brown:       #4A3728;
  --text:        #4A3B2E;
  --text-muted:  #8E7C68;
  --muted:       #B9A78F;
  --line:        rgba(120,85,45,0.14);

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-card:
     0 22px 48px rgba(140,95,45,0.10),
     0 6px 16px rgba(140,95,45,0.06);
  --shadow-pill:
     0 10px 26px rgba(140,95,45,0.10),
     0 2px 6px rgba(140,95,45,0.06);
  --shadow-btn:
     0 12px 24px rgba(200,105,35,0.28),
     0 3px 8px rgba(200,105,35,0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Nền trang trí vân gỗ ---------- */
body::before {
  content: "";
  position: fixed;
  top: -160px; right: -150px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center,
     rgba(196,140,80,0.16) 0 1.5px, transparent 1.5px 16px);
  -webkit-mask-image: radial-gradient(circle at center, #000 55%, transparent 72%);
          mask-image: radial-gradient(circle at center, #000 55%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 200px;
  background: repeating-linear-gradient(94deg,
     rgba(196,140,80,0.05) 0 3px, transparent 3px 10px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
          mask-image: linear-gradient(to top, #000, transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
svg { display: block; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   HERO
   ============================================================ */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1080px;
  margin: 0 auto;
  padding: 46px 24px 70px;
  display: flex;
  flex-direction: column;
}
body.shotmode .stage { min-height: auto; padding-bottom: 40px; }

/* ---------- Top nav ---------- */
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--brown); flex-shrink: 0; }
.brand span { color: var(--orange); }
.topnav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  list-style: none;
  align-items: center;
  font-size: .9rem;
  font-weight: 600;
}
.topnav-links li { display: flex; align-items: center; }
.topnav-links li + li::before {
  content: ""; width: 1px; height: 13px; background: var(--line); margin: 0 20px;
}
.topnav-links a { color: var(--text-muted); transition: color .2s; white-space: nowrap; }
.topnav-links a:hover, .topnav-links a.active { color: var(--orange); }
.topnav-links a.active { font-weight: 700; }

.lang-toggle {
  border: none;
  background: var(--card);
  box-shadow: var(--shadow-pill);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: box-shadow .2s;
}
.lang-toggle .lang-on { color: var(--orange); }
.lang-toggle .lang-sep { margin: 0 3px; opacity: .5; }

/* ---------- Tab selector ---------- */
.tabwrap { margin: 40px auto 0; display: flex; justify-content: center; }
.tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--card);
  padding: 12px 30px;
  border-radius: 999px;
  box-shadow: var(--shadow-pill);
  border: 1px solid var(--line);
}
.tab-arrow {
  border: none; background: transparent;
  color: var(--muted); font-size: 1.7rem; line-height: 1;
  cursor: pointer; padding: 0 4px;
  transition: color .2s, transform .2s;
}
.tab-arrow:hover { color: var(--orange); transform: scale(1.15); }
.tab {
  border: none; background: transparent;
  font-family: inherit; font-weight: 800; font-size: 1.9rem;
  letter-spacing: .02em; color: var(--muted);
  padding: 0 12px; cursor: pointer; line-height: 1.1;
  transition: color .25s;
}
.tab:hover { color: var(--orange-dark); }
.tab.is-active { color: var(--orange); }

.tab-sub { margin: 16px auto 0; text-align: center; font-size: .9rem; color: var(--text-muted); max-width: 520px; }

/* ---------- Two cards ---------- */
.cards {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: stretch;
}
.card {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 34px 38px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

/* Icon grid (left) — 7 x 2 tiles viền cam */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-content: center;
  gap: 10px;
  width: 100%;
  min-height: 128px;
  margin-bottom: 22px;
}
.ico {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--orange-line);
  color: var(--orange);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.ico:hover { transform: translateY(-2px); background: var(--orange-soft); box-shadow: 0 6px 14px rgba(200,105,35,.16); }
.ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Device selector (right) — chọn số máy tính */
.devsel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-content: center;
  gap: 10px;
  width: 100%;
  min-height: 128px;
  margin-bottom: 22px;
}
.dev-cell {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 15px 6px 12px;
  border: 1px solid var(--orange-line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer; font-family: inherit;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .25s;
}
.dev-num {
  font-size: 1.75rem; font-weight: 800; color: var(--orange);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1;
  transition: color .2s;
}
.dev-lbl {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); font-weight: 600; transition: color .2s;
}
.dev-cell:hover { transform: translateY(-1px); background: var(--orange-soft); }
.dev-cell.is-active {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  border-color: transparent;
  box-shadow: var(--shadow-btn);
  transform: none;
}
.dev-cell.is-active .dev-num,
.dev-cell.is-active .dev-lbl { color: #fff; }

/* Shared card text */
.card-desc {
  font-size: .86rem; color: var(--text-muted);
  max-width: 340px; margin-bottom: 22px; min-height: 4.7em;
}
.inline-link { color: var(--orange); font-weight: 600; white-space: nowrap; }
.inline-link:hover { color: var(--orange-dark); }

/* Buttons — cam đặc, pill */
.btn {
  display: inline-block;
  font-family: inherit; font-weight: 700; font-size: .95rem;
  color: #fff;
  padding: 15px 42px;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  box-shadow: var(--shadow-btn);
  transition: transform .15s, box-shadow .25s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); box-shadow: 0 5px 12px rgba(200,105,35,.30); }

.fineprint { margin-top: 16px; font-size: .74rem; line-height: 1.5; color: var(--muted); max-width: 340px; }

/* ============================================================
   BAND
   ============================================================ */
.band {
  position: relative; z-index: 1;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  max-width: 1080px;
  margin: 0 auto 70px;
  padding: 50px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
}
.band-title { font-size: 1.8rem; font-weight: 700; color: var(--brown); letter-spacing: -.02em; }
.band-title::after { content: ""; display: block; width: 46px; height: 3px; border-radius: 3px; background: var(--orange); margin: 14px auto 0; }
.band-sub { margin-top: 16px; font-size: .95rem; color: var(--text-muted); max-width: 580px; margin-inline: auto; }

/* ============================================================
   FEATURES
   ============================================================ */
.features { position: relative; z-index: 1; padding: 0 24px 80px; }
.features-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 32px 28px;
  transition: transform .25s, box-shadow .25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 26px 54px rgba(140,95,45,.14); }
.feature-ico {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--orange-soft); border: 1px solid var(--orange-line);
  color: var(--orange); margin-bottom: 18px;
}
.feature-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 { font-size: 1.08rem; font-weight: 700; color: var(--brown); margin-bottom: 8px; }
.feature-card p { font-size: .88rem; color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative; z-index: 1;
  background: var(--bg-2);
  text-align: center;
  padding: 40px 24px 46px;
  border-top: 1px solid var(--line);
}
.foot-brand { font-weight: 800; font-size: 1.1rem; color: var(--brown); margin-bottom: 8px; }
.foot-brand span { color: var(--orange); }
.foot-copy { font-size: .78rem; color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .stage { padding: 34px 18px 50px; }
  .topnav-links { flex-wrap: wrap; justify-content: center; row-gap: 8px; font-size: .82rem; }
  .topnav-links li + li::before { margin: 0 12px; }
  .tabs { gap: 14px; padding: 10px 20px; }
  .tab { font-size: 1.55rem; }
  .cards { grid-template-columns: 1fr; gap: 20px; }
  .icon-grid { grid-template-columns: repeat(7, 1fr); min-height: 0; }
  .card-desc { min-height: 0; max-width: 360px; }
  .features-inner { grid-template-columns: 1fr; }
  .band { margin: 0 18px 50px; padding: 40px 26px; }
  .band-title { font-size: 1.45rem; }
}
@media (max-width: 440px) {
  .topnav-links { font-size: .78rem; }
  .tab { font-size: 1.3rem; padding: 0 7px; }
  .tabs { gap: 10px; padding: 9px 16px; }
  .tab-arrow { font-size: 1.4rem; }
  .card { padding: 26px 22px 26px; }
  .icon-grid { grid-template-columns: repeat(5, 1fr); }
  .cd-num { font-size: 1.9rem; }
  .btn { padding: 14px 32px; }
}
