/* ==========================================================================
   Balo Sinh Tồn VN – Landing page
   Mobile-first · Brand: xanh rêu đậm + cam + kem
   ========================================================================== */

:root {
  --green: #1b4d3e;
  --green-dark: #143b30;
  --green-deep: #0f2e25;
  --green-soft: #e4ede8;
  --orange: #f26b21;
  --orange-dark: #d95a14;
  --orange-soft: #fde6d8;
  --cream: #f4eee3;
  --cream-2: #ede4d3;
  --white: #ffffff;
  --ink: #15241f;
  --muted: #56655f;
  --line: rgba(27, 77, 62, 0.14);

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 32px rgba(21, 36, 31, 0.10);
  --shadow-lg: 0 24px 60px rgba(21, 36, 31, 0.18);
  --container: 1140px;
  --gutter: 20px;
  --header-h: 68px;

  --topo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' viewBox='0 0 520 520'%3E%3Cg fill='none' stroke='%231b4d3e' stroke-opacity='.09' stroke-width='1.4'%3E%3Cpath d='M-20 80c90-40 150 30 240 0s160-70 300-10'/%3E%3Cpath d='M-20 130c90-40 150 30 240 0s160-70 300-10'/%3E%3Cpath d='M-20 180c90-40 150 30 240 0s160-70 300-10'/%3E%3Cpath d='M-20 360c110 50 170-20 260 10s150 60 280 0'/%3E%3Cpath d='M-20 410c110 50 170-20 260 10s150 60 280 0'/%3E%3Cpath d='M-20 460c110 50 170-20 260 10s150 60 280 0'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--green); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 800; letter-spacing: -0.015em; color: var(--green); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
.ic { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

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

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 2000; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.35em; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; line-height: 1.2; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(242, 107, 33, 0.32); }
.btn-primary:hover { background: var(--orange-dark); box-shadow: 0 14px 30px rgba(242, 107, 33, 0.42); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-light { background: #fff; color: var(--green); }
.btn-light:hover { background: var(--cream); }
.btn-sm { padding: 0.6em 1.05em; font-size: 0.92rem; }
.btn-lg { padding: 0.95em 1.5em; font-size: 1.02rem; }
.btn-xl { padding: 1.05em 1.8em; font-size: 1.1rem; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange); margin: 0 0 0.9rem;
}
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(242,107,33,.5); animation: dotPulse 1.8s ease-out infinite; }
@keyframes dotPulse { 0% { box-shadow: 0 0 0 0 rgba(242,107,33,.55); } 100% { box-shadow: 0 0 0 10px rgba(242,107,33,0); } }

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 720px; margin: 0 auto clamp(28px, 5vw, 48px); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); }
.section-head .sub { margin: 0.9rem auto 0; color: var(--muted); font-size: clamp(1rem, 1.9vw, 1.12rem); max-width: 600px; }
.section-head-light h2 { color: #fff; }
.section-head-light .sub { color: rgba(255,255,255,.78); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(244, 238, 227, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(21,36,31,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--green); font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { white-space: nowrap; }
.brand-name span { color: var(--orange); }
@media (max-width: 359px) { .brand-name { display: none; } }
@media (min-width: 900px) { .brand { gap: 10px; font-size: 1.02rem; } .brand-mark { width: 40px; height: 40px; } }

.nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.header-cta { padding: 0.6em 0.95em; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--green); cursor: pointer;
}
.nav-toggle .ic-close { display: none; }
.nav-toggle[aria-expanded="true"] .ic-open { display: none; }
.nav-toggle[aria-expanded="true"] .ic-close { display: block; }

/* Mobile drawer */
.nav.is-open {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--header-h) + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-lg);
}
.nav a { text-decoration: none; color: var(--green); font-weight: 600; padding: 12px 14px; border-radius: 10px; }
.nav a:hover { background: var(--green-soft); }
.nav .nav-cta { margin-top: 6px; color: #fff; text-align: center; justify-content: center; }
.nav .nav-cta:hover { background: var(--orange-dark); }

@media (min-width: 900px) {
  .nav { display: flex; align-items: center; gap: 4px; position: static; }
  .nav a { padding: 8px 12px; font-size: 0.95rem; }
  .nav .nav-cta { margin: 0 0 0 8px; padding: 0.6em 1.05em; }
  .header-actions { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--cream) var(--topo);
  background-size: 520px;
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 5vw, 56px);
}
.hero::after {
  content: ""; position: absolute; inset: auto -20% -40% auto; width: 70vw; max-width: 760px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(242,107,33,.14), transparent 70%); pointer-events: none;
}
.hero-grid { display: grid; gap: 28px; align-items: center; position: relative; z-index: 1; }
.hero .eyebrow { white-space: nowrap; }
.hero h1 { font-size: clamp(2.5rem, 9.5vw, 4.1rem); line-height: 1.08; text-transform: uppercase; letter-spacing: -0.02em; }
.hero h1 .accent { color: var(--orange); }
.hero .lead { margin: 1.1rem 0 1.5rem; color: var(--muted); font-size: clamp(1.02rem, 2.2vw, 1.2rem); max-width: 560px; }
.hero .lead strong { color: var(--green); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { flex: 1 1 220px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 1.4rem; font-size: 0.92rem; font-weight: 600; color: var(--green); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .ic { color: var(--orange); }

.hero-visual { position: relative; max-width: 440px; margin: 0 auto; width: 86%; }
.hero-visual picture img { border-radius: 28px; box-shadow: var(--shadow-lg); }
.hero-badge {
  position: absolute; left: -8px; bottom: 22px;
  background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow);
  border-left: 4px solid var(--orange); font-size: 0.86rem; line-height: 1.3;
}
.hero-badge strong { display: block; color: var(--green); }
.hero-badge span { color: var(--muted); }

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
  .hero-actions .btn { flex: 0 0 auto; }
  .hero-visual { width: 100%; max-width: 480px; margin: 0 0 0 auto; }
  .hero-badge { left: -28px; bottom: 40px; font-size: 0.95rem; padding: 14px 18px; }
}

/* ---------- Quick answer (AEO) ---------- */
.quick { padding: 0 0 clamp(16px, 3vw, 24px); background: var(--cream); }
.quick-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow); font-size: 1rem; color: var(--ink);
}
.quick-box p:last-child { margin: 0; }
.quick-label { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: .5rem; }
.quick-box strong { color: var(--green); }

/* ---------- Tại sao ---------- */
.why { background: var(--white); }
.cards { display: grid; gap: 16px; }
.card {
  background: var(--cream); border-radius: var(--radius); padding: 24px 22px;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }
.card-icon, .item-icon, .step-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green); color: #fff; margin-bottom: 16px;
}
.card h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (min-width: 640px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }

.note {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 28px;
  background: var(--orange-soft); border-left: 4px solid var(--orange); border-radius: 12px; padding: 16px 18px;
}
.note .ic { color: var(--orange); margin-top: 3px; }
.note p { margin: 0; color: var(--ink); font-size: .97rem; }
.note strong { color: var(--green); }

/* ---------- Bên trong balo ---------- */
.inside { background: var(--cream) var(--topo); background-size: 520px; }
.flatlay { margin: 0 0 28px; }
.flatlay img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.flatlay figcaption { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 10px; }
.items { display: grid; gap: 14px; }
.item { background: #fff; border-radius: var(--radius); padding: 22px 20px; border: 1px solid var(--line); }
.item h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.item p { margin: 0; color: var(--muted); font-size: .95rem; }
.item-icon { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px; background: var(--green-soft); color: var(--green); }
.item-more { background: var(--green); border-color: var(--green); color: #fff; }
.item-more h3 { color: #fff; }
.item-more p { color: rgba(255,255,255,.82); margin-bottom: 16px; }
.item-more .item-icon { background: var(--orange); color: #fff; }
@media (min-width: 560px) { .items { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .items { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* ---------- Dành cho ai ---------- */
.who { background: var(--white); }
.who-grid { display: grid; gap: 18px; }
.who-card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--green-deep);
  aspect-ratio: 4 / 5; box-shadow: var(--shadow);
}
.who-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.who-card:hover img { transform: scale(1.04); }
.who-card picture { position: absolute; inset: 0; }
.who-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 20px;
  background: linear-gradient(to top, rgba(15,46,37,.95) 0%, rgba(15,46,37,.75) 55%, rgba(15,46,37,0) 100%);
  color: #fff;
}
.who-body h3 { color: #fff; font-size: 1.12rem; margin-bottom: .4rem; }
.who-body p { margin: 0; color: rgba(255,255,255,.85); font-size: .95rem; }
@media (min-width: 720px) { .who-grid { grid-template-columns: repeat(3, 1fr); } .who-card { aspect-ratio: 3 / 4; } }

/* ---------- Đăng ký sớm ---------- */
.signup {
  background: var(--green) radial-gradient(1200px 600px at 100% 0%, rgba(242,107,33,.18), transparent 60%);
  color: #fff;
}
.signup .eyebrow { color: #ffb48a; }
.steps { display: grid; gap: 16px; counter-reset: step; }
.step {
  position: relative; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 24px 22px 22px;
}
.step-num {
  position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--orange); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .95rem;
}
.step-icon { background: rgba(255,255,255,.12); color: #fff; }
.step h3 { color: #fff; font-size: 1.1rem; margin-bottom: .45rem; }
.step p { margin: 0; color: rgba(255,255,255,.8); font-size: .96rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

.signup-panel {
  margin-top: 28px; background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px); display: grid; gap: 24px; box-shadow: var(--shadow-lg);
}
.signup-benefits h3 { font-size: 1.15rem; margin-bottom: 14px; }
.signup-benefits li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: .98rem; }
.signup-benefits .ic { color: var(--orange); margin-top: 3px; }
.signup-cta { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 10px; text-align: center; }
.signup-cta .btn { width: 100%; }
.signup-cta .small { margin: 0; font-size: .85rem; color: var(--muted); }
@media (min-width: 860px) {
  .signup-panel { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .signup-cta { padding-left: 24px; border-left: 1px solid var(--line); }
  .signup-cta .btn { width: auto; align-self: center; }
}

/* ---------- FAQ ---------- */
.faq { background: var(--cream); }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; cursor: pointer; list-style: none; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.faq-plus { position: relative; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--green-soft); }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--green); transform: translate(-50%, -50%); transition: transform .2s; }
.faq-plus::before { width: 12px; height: 2px; }
.faq-plus::after { width: 2px; height: 12px; }
.faq-item[open] .faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] summary { background: var(--green-soft); }
.faq-body { padding: 4px 18px 18px; color: var(--muted); font-size: .97rem; }
.faq-body p { margin: 0; }

/* ---------- CTA cuối ---------- */
.final { background: var(--green-deep); color: #fff; overflow: hidden; }
.final-grid { display: grid; }
.final-copy { padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 6vw, 80px); position: relative; z-index: 1; }
.final .eyebrow { color: #ffb48a; }
.final h2 { color: #fff; font-size: clamp(2.2rem, 7.5vw, 3.6rem); text-transform: uppercase; line-height: 1.02; }
.final p { margin: 1rem 0 1.6rem; color: rgba(255,255,255,.8); max-width: 480px; font-size: 1.05rem; }
.final-visual { position: relative; margin: 0 calc(-1 * var(--gutter)) 0; }
.final-visual img { width: 100%; height: 100%; object-fit: cover; max-height: 420px; }
.final-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--green-deep) 0%, rgba(15,46,37,0) 45%); z-index: 1; }
.final-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, var(--green-deep) 0%, rgba(15,46,37,0) 18%); z-index: 1; }
@media (min-width: 760px) {
  .final-grid { grid-template-columns: 1.1fr 0.9fr; align-items: stretch; }
  .final-visual { margin: 0; }
  .final-visual img { max-height: none; min-height: 100%; }
  .final-visual::before { background: linear-gradient(to right, var(--green-deep) 0%, rgba(15,46,37,0) 45%); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: rgba(255,255,255,.82); border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; gap: 28px; padding: 44px var(--gutter) 28px; }
.footer-brand img { width: 110px; height: auto; }
.footer-tagline { margin: 12px 0 0; font-weight: 700; color: #fff; }
.footer-nav { display: grid; gap: 8px; }
.footer-nav a { color: rgba(255,255,255,.82); text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-contact h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.footer-contact p { margin: 0 0 6px; }
.footer-contact a { color: rgba(255,255,255,.9); }
.footer-contact .btn { margin-top: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px var(--gutter) calc(16px + 72px); font-size: .85rem; color: rgba(255,255,255,.6); }
@media (min-width: 900px) { .footer-bottom { padding-bottom: 16px; } }
.footer-bottom p { margin: 0; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }

/* ---------- Nút đặt trước nổi (FAB) ---------- */
.fab {
  position: fixed; z-index: 950;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 20px; border-radius: 999px;
  background: var(--orange); color: #fff; text-decoration: none; font-weight: 800; font-size: 1rem;
  box-shadow: 0 12px 30px rgba(242, 107, 33, 0.45), 0 2px 6px rgba(0,0,0,.15);
  transition: transform .2s ease, background .2s ease;
  animation: fabIn .5s ease-out both;
}
.fab::before {
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  border: 2px solid rgba(242,107,33,.7); animation: fabRing 2.2s ease-out infinite; pointer-events: none;
}
.fab:hover { background: var(--orange-dark); transform: translateY(-2px); }
.fab .ic { width: 22px; height: 22px; }
@media (max-width: 480px) { .fab { padding: 12px 18px; font-size: .95rem; } }
@keyframes fabRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes fabIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal, .no-io .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
