/* colors_and_type.css is linked separately in header.php (parallel load). */

* { box-sizing: border-box; }
html, body { margin:0; padding:0; font-family: var(--font-sans); color: var(--fg-1); background:#fff; -webkit-font-smoothing:antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ===== NAV ===== */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(16px); background: rgba(255,255,255,0.82); border-bottom: 1px solid var(--border-1); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo-row { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.logo-row img { height: 34px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--fg-2); transition: color 150ms var(--ease-out); cursor:pointer }
.nav-links a:hover, .nav-links a.active { color: var(--brand-700); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 10px; border: 0; transition: all 220ms var(--ease-out); white-space: nowrap; }
.btn.p { background: var(--brand-500); color: #fff; box-shadow: var(--shadow-brand); }
.btn.p:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn.p:active { transform: scale(0.98); }
.btn.s { background: #fff; color: var(--fg-1); border: 1px solid var(--border-2); }
.btn.s:hover { border-color: var(--brand-500); color: var(--brand-700); }
.btn.g { background: transparent; color: var(--fg-1); }
.btn.g:hover { color: var(--brand-700); }
.btn.y { background: var(--accent-yellow); color: #422006; box-shadow: 0 10px 24px rgba(250,204,21,0.38); }
.btn.y:hover { background: #EAB308; }
.btn.dk { background: var(--ink-900); color:#fff; }
.btn.dk:hover{ background:#000; }
.btn.lg { padding: 14px 26px; font-size: 16px; }
.btn.xl { padding: 16px 30px; font-size: 17px; }

/* ===== SECTION UTILS ===== */
section { padding: 80px 0; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.sec-head .eb { display: inline-block; background: var(--brand-50); color: var(--brand-700); padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 14px; }
.sec-head p { font-size: 18px; color: var(--fg-3); line-height: 1.55; margin: 0; }

/* ===== Sheet mock (cho preview sản phẩm) ===== */
.sh { width:100%; height:100%; background:#fff; display:flex; flex-direction:column; font-family:var(--font-sans); }
.sh-tb { height:26px; background:#F1F5F9; border-bottom:1px solid var(--border-1); display:flex; align-items:center; gap:5px; padding:0 10px; }
.sh-tb .d { width:10px; height:10px; border-radius:50%; background:#E2E8F0; }
.sh-tb .d.r{ background:#EF4444 } .sh-tb .d.o{ background:#F59E0B } .sh-tb .d.g{ background:#22C55E }
.sh-tb .t { margin-left:8px; font-size:11px; color:var(--fg-3); font-weight:600; }
.sh-tool { height:30px; display:flex; align-items:center; gap:8px; padding:0 10px; border-bottom:1px solid var(--border-1); font-size:11px; color:var(--fg-2); }
.sh-tool span { padding:3px 7px; background:var(--ink-100); border-radius:5px; }
.sh-grid { flex:1; display:grid; grid-template-columns:34px repeat(6,1fr); grid-auto-rows:24px; overflow:hidden; }
.sh-grid .col-h, .sh-grid .row-h { background:#F8FAFC; color:var(--fg-3); font-size:10px; font-weight:600; display:flex; align-items:center; justify-content:center; border-right:1px solid var(--border-1); border-bottom:1px solid var(--border-1); }
.sh-grid .cell { border-right:1px solid var(--ink-200); border-bottom:1px solid var(--ink-200); display:flex; align-items:center; padding:0 6px; font-size:11px; color:var(--fg-2); background:#fff; }
.sh-grid .cell.num { justify-content:flex-end; font-variant-numeric:tabular-nums; }
.sh-grid .cell.sel { background:#FEF9C3; outline:2px solid #16A34A; outline-offset:-2px; z-index:2; }
.sh-grid .cell.hl  { background:#DCFCE7; }
.sh-grid .cell.pos { color:#16A34A; }
.sh-grid .cell.neg { color:#DC2626; }

/* ===== Cards & shadows ===== */
.card { background:#fff; border:1px solid var(--border-1); border-radius: var(--r-xl); transition: all 260ms var(--ease-out); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--brand-300); }

/* ===== FOOTER ===== */
footer { background: var(--bg-2); border-top: 1px solid var(--border-1); padding: 56px 0 28px; margin-top: 40px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.foot h5 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-1); margin: 0 0 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot a { color: var(--fg-3); font-size: 14px; cursor:pointer }
.foot a:hover { color: var(--brand-700); }
.foot-bot { display:flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-1); font-size: 13px; color: var(--fg-3); }
.pays { display:flex; gap: 8px; align-items: center; }
.pay { padding: 5px 10px; background:#fff; border:1px solid var(--border-1); border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--fg-2); }

/* ===== ENTRY ANIMATIONS ===== */
@keyframes fadeUp { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes scaleIn { from { opacity:0; transform: scale(0.92); } to { opacity:1; transform: scale(1); } }
.anim-up   { opacity:0; animation: fadeUp 700ms var(--ease-out) forwards; }
.anim-in   { opacity:0; animation: fadeIn 700ms var(--ease-out) forwards; }
.anim-pop  { opacity:0; animation: scaleIn 600ms var(--ease-spring) forwards; }
.d1 { animation-delay: 80ms; } .d2 { animation-delay: 180ms; } .d3 { animation-delay: 280ms; }
.d4 { animation-delay: 380ms; } .d5 { animation-delay: 480ms; } .d6 { animation-delay: 580ms; }

/* Reduced motion: show content immediately, no fade/scale entrance. */
@media (prefers-reduced-motion: reduce) {
  .anim-up, .anim-in, .anim-pop { opacity: 1 !important; animation: none !important; }
}

/* ===== STATS BAR ===== */
.stats { padding: 36px 0; border-top: 1px solid var(--border-1); border-bottom: 1px solid var(--border-1); background: var(--bg-2); }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 24px; }
.stats .n { font-size: 44px; font-weight: 800; color: var(--brand-600); letter-spacing: -0.02em; line-height: 1; }
.stats .l { font-size: 14px; color: var(--fg-3); margin-top: 6px; font-weight: 500; }

/* ===== Tweaks panel ===== */
.tweaks-panel { position: fixed; right: 18px; bottom: 18px; z-index: 999; width: 300px; background:#fff; border:1px solid var(--border-1); border-radius:16px; box-shadow: var(--shadow-lg); padding: 16px 18px; font-size: 13px; display:none; }
.tweaks-panel.show { display:block; animation: scaleIn 250ms var(--ease-out); }
.tweaks-panel h4 { margin: 0 0 12px; font-size: 14px; font-weight: 800; display:flex; align-items:center; justify-content:space-between; }
.tweak-row { margin-bottom: 14px; }
.tweak-row label { display:block; font-size: 12px; color: var(--fg-3); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.swatches { display:flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-2); }
.swatch.active { box-shadow: 0 0 0 2px var(--brand-500); transform: scale(1.1); }
.tweak-row select, .tweak-row input[type=range] { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--border-1); border-radius: 8px; background:#fff; }

@media (max-width: 900px){
  .stats-in { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
}
