/* ============================================================
   NghienDeutsch — Design System v3 "German Precision"
   Đen tối giản + Space Grotesk (heading) + Inter (body)
   Thanh 3 màu cờ Đức #161616 / #DD0000 / #FFCE00 làm điểm nhấn
   (đồng bộ tông với email template thương hiệu)
   ============================================================ */

/* DARK-ONLY hiện tại; câu hỏi light+dark vẫn cần chủ dự án xác nhận lại. */
:root {
  color-scheme: dark;
  --bg: #070708;
  --bg-soft: #0E0E10;
  --bg-card: #151517;
  --bg-deep: #0A0A0B;
  --ink: #F7F7F5;
  --ink-soft: #B7B7B2;
  --ink-mute: #858580;
  --black: #161616;
  --red: #FF5147;         /* đỏ sáng cho nền tối (cờ #DD0000 giữ ở thanh tricolor) */
  --gold: #FFCE00;
  --line: #2A2A2D;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .35);
  --radius: 16px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --font-head: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(42px, 6vw, 68px); line-height: 1.04; letter-spacing: 0; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: 0; }
h3 { font-size: 21px; line-height: 1.35; letter-spacing: 0; }
.lead { font-size: clamp(16px, 1.9vw, 19px); color: var(--ink-soft); line-height: 1.7; font-weight: 400; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 92px 0; }
@media (max-width: 720px){ section { padding: 60px 0; } }

/* ---------- Thanh 3 màu cờ Đức ---------- */
.flag-bar { height: 7px; background: linear-gradient(90deg, var(--black) 0 33.33%, #DD0000 33.33% 66.66%, var(--gold) 66.66% 100%); }
.tricolor-sm {
  width: 96px; height: 4px; margin: 20px auto 0;
  background: linear-gradient(90deg, var(--black) 0 33.33%, #DD0000 33.33% 66.66%, var(--gold) 66.66% 100%);
}
.section-head h2::after {
  content: ""; display: block; width: 96px; height: 4px; margin: 20px auto 0;
  background: linear-gradient(90deg, var(--black) 0 33.33%, #DD0000 33.33% 66.66%, var(--gold) 66.66% 100%);
}

/* Nhãn nhỏ viết hoa kiểu email ("NGHIENDUCCHUA") */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase;
  color: var(--ink-soft); display: inline-block; margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  padding: 14px 28px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #161616; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-card); }
.btn-lg { padding: 16px 34px; font-size: 16.5px; }

.install-download-wrap {
  margin: 12px 0 18px;
}
.install-download-btn {
  display: inline-grid;
  grid-template-columns: 24px minmax(0, auto);
  justify-content: center;
  align-items: center;
  column-gap: 12px;
  width: min(100%, 520px);
  min-height: 58px;
  padding: 15px 24px;
  border-radius: var(--radius-pill);
  border-color: color-mix(in srgb, #161616 16%, transparent);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}
.install-download-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.install-download-label {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: normal;
  word-break: normal;
}
.install-download-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 55%, white);
  outline-offset: 3px;
}

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: 1px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--bg-card); box-shadow: var(--shadow-sm); }
.nav-links { display: flex; gap: 28px; margin-left: 14px; }
.nav-links a { color: var(--ink-soft); font-size: 14.5px; font-weight: 400; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-switch, .theme-toggle {
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--radius-pill); padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); letter-spacing: 1px;
}
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 26px; cursor: pointer; padding: 4px 8px; }
.nav-links .nav-cta-m, .nav-links .nav-login-m { display: none; }
@media (max-width: 880px){
  /* Mobile: chỉ brand + lang + hamburger trên thanh; CTA chuyển vào menu xổ. */
  .nav-inner { gap: 10px; height: 60px; }
  .brand { font-size: 17px; gap: 9px; }
  .brand img { width: 30px; height: 30px; }
  .nav-right { gap: 8px; }
  .nav-right > .btn-primary { display: none; }   /* ẩn CTA vàng trên thanh hẹp (giữ nút ghost "← Trang chủ") */
  .nav-right > .btn-ghost { padding: 8px 14px; font-size: 13px; }
  .lang-switch { padding: 6px 10px; font-size: 12px; }
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column;
    background: var(--bg-card); border-bottom: 1px solid var(--line); padding: 20px 24px 22px; gap: 18px;
    box-shadow: var(--shadow); z-index: 60; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 16px; }
  .nav-links .nav-login-m { display: block; }
  .nav-links .nav-cta-m { display: inline-flex; justify-content: center; margin-top: 4px; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 76px; text-align: center; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  padding: 8px 20px; border-radius: 30px;
  background: var(--gold); color: #161616; margin-bottom: 26px;
}
@media (max-width: 720px){
  .hero { padding-top: 38px; padding-bottom: 48px; }
  .hero .badge {
    max-width: 100%; justify-content: center; white-space: normal;
    font-size: 10px; line-height: 1.45; letter-spacing: 0;
    padding: 8px 14px; margin-bottom: 18px;
  }
  .hero h1 { max-width: 13ch; font-size: 38px; line-height: 1.08; }
  .hero h1 + .lead::before { margin: 18px auto 20px; }
  .hero .lead { font-size: 16px; line-height: 1.55; margin-bottom: 24px; }
  .hero-cta {
    flex-direction: column; align-items: stretch; gap: 10px;
    max-width: 340px; margin: 0 auto 14px;
  }
  .hero-cta .btn { justify-content: center; }
  .hero-cta .btn-lg { padding: 13px 22px; font-size: 15px; }
  .hero-note { font-size: 12px; line-height: 1.45; }
  .demo-wrap { margin-top: 34px; }
  .logo-strip { gap: 14px; }
}
.hero h1 { max-width: 16ch; margin: 0 auto; }
.hero h1 .accent { color: var(--red); }
.hero h1 + .lead::before {
  content: ""; display: block; width: 96px; height: 4px; margin: 24px auto 26px;
  background: linear-gradient(90deg, var(--black) 0 33.33%, #DD0000 33.33% 66.66%, var(--gold) 66.66% 100%);
}
.hero .lead { max-width: 62ch; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.hero-note { font-size: 13px; color: var(--ink-mute); font-weight: 300; }
.logo-strip { margin-top: 44px; display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; align-items: center;
  font-size: 12px; color: var(--ink-mute); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.logo-strip b { color: var(--ink); font-family: var(--font-head); font-size: 14px; letter-spacing: .5px; text-transform: none; }

/* ---------- Demo frame ---------- */
.demo-wrap { margin: 52px auto 0; max-width: 960px; }
.browser {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--bg-card);
}
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--bg-deep); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.browser-bar i:nth-child(1){ background: var(--black); }
.browser-bar i:nth-child(2){ background: #DD0000; }
.browser-bar i:nth-child(3){ background: var(--gold); }
.browser-bar .url { margin-left: 12px; font-size: 12px; color: var(--ink-mute); }
.browser img { width: 100%; }

/* ---------- Steps (vòng số đen/đỏ/vàng như email) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  min-height: 344px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 44px 36px;
  box-shadow: var(--shadow-sm);
}
.step-top { min-height: 52px; display: flex; align-items: center; gap: 24px; margin-bottom: 48px; }
.step .ico { font-size: 42px; line-height: 1; }
.step .num {
  flex: 0 0 46px;
  font-family: var(--font-body); font-size: 18px; font-weight: 700;
  width: 46px; height: 46px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.steps .step:nth-child(1) .num { background: #8F6AE8; }
.steps .step:nth-child(2) .num { background: #DD0000; }
.steps .step:nth-child(3) .num { background: var(--gold); color: #161616; }
.step h3 { margin-bottom: 16px; font-size: 29px; }
.step p { color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
@media (max-width: 900px){
  .step { min-height: 310px; padding: 34px 26px; }
  .step-top { margin-bottom: 34px; }
}
@media (max-width: 720px){
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; padding: 32px 26px; }
  .step-top { margin-bottom: 30px; }
}

/* ---------- Feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 100px; }
.feature.rev .fig { order: -1; }
@media (max-width: 860px){ .feature, .feature.rev { grid-template-columns: 1fr; gap: 28px; } .feature.rev .fig { order: 0; } .feature + .feature { margin-top: 60px; } }
.feature .fig { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature .fig img { display: block; width: 100%; aspect-ratio: 2048 / 1120; object-fit: cover; }
.feature h2::after {
  content: ""; display: block; width: 72px; height: 3px; margin-top: 16px;
  background: linear-gradient(90deg, var(--black) 0 33.33%, #DD0000 33.33% 66.66%, var(--gold) 66.66% 100%);
}
.feature .lead { margin-top: 18px; font-size: 15.5px; }
.feature ul { list-style: none; margin-top: 20px; }
.feature li { padding-left: 30px; position: relative; margin-bottom: 11px; color: var(--ink-soft); font-size: 15px; }
.feature li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #161616;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ---------- Compare table ---------- */
.compare-wrap { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
table.compare th, table.compare td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare thead th { font-family: var(--font-head); font-size: 15px; letter-spacing: .3px; background: var(--bg-deep); }
table.compare thead th:first-child { color: var(--ink-soft); }
table.compare .us { color: var(--red); font-weight: 700; }
table.compare td.mark { text-align: center; color: var(--ink-soft); }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; align-items: stretch; justify-content: center; max-width: 760px; margin: 0 auto; }
@media (max-width: 860px){ .plans { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }
.plan { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.plan.pop { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), var(--shadow); position: relative; }
.plan.pop .tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #161616; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  padding: 6px 18px; border-radius: 30px;
}
.plan h3 { margin-bottom: 4px; }
.plan .price { font-family: var(--font-head); font-size: 42px; font-weight: 700; letter-spacing: .5px; margin: 14px 0 2px; }
.plan .price small { font-size: 14px; color: var(--ink-soft); font-weight: 400; font-family: var(--font-body); }
.plan .price-eur { font-size: 13.5px; color: var(--ink-mute); margin-bottom: 18px; }
.plan ul { list-style: none; margin: 10px 0 26px; flex: 1; }
.plan li { padding: 8px 0 8px 28px; position: relative; font-size: 14.5px; color: var(--ink-soft); }
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  width: 19px; height: 19px; border-radius: 50%; background: var(--gold); color: #161616;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.plan .btn { width: 100%; justify-content: center; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { font-family: var(--font-head); font-weight: 700; font-size: 18px; letter-spacing: .3px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 26px; font-weight: 400; font-family: var(--font-body); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }

/* ---------- CTA band (nâu đậm như footer email) ---------- */
.cta-band {
  background: var(--bg-card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 24px; padding: 64px 40px; text-align: center; box-shadow: var(--shadow);
}
.cta-band h2 { color: inherit; }
.cta-band h2::after {
  content: ""; display: block; width: 96px; height: 4px; margin: 20px auto 0;
  background: linear-gradient(90deg, #FAF6EE 0 33.33%, #DD0000 33.33% 66.66%, #FFCE00 66.66% 100%);
}
.cta-band .lead { color: color-mix(in srgb, currentColor 70%, transparent); margin: 18px auto 30px; max-width: 46ch; }
.cta-band .btn-primary { background: var(--gold); color: #161616; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 52px 0 44px; background: var(--bg-soft); }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-grid .brand { margin-bottom: 12px; }
footer .cols { display: flex; gap: 56px; flex-wrap: wrap; }
footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 4px; color: var(--ink-soft); margin-bottom: 14px; font-weight: 600; }
footer .cols a { display: block; color: var(--ink-soft); font-size: 14px; margin-bottom: 9px; font-weight: 300; }
footer .cols a:hover { color: var(--ink); }
.copyright { margin-top: 40px; font-size: 12px; color: var(--ink-mute); font-weight: 300; line-height: 1.7; }

.section-head { text-align: center; max-width: 62ch; margin: 0 auto 60px; }
.section-head .lead { margin-top: 22px; }
.bg-soft { background: var(--bg-soft); }

/* legal pages */
.legal { max-width: 760px; }
.legal h1 { font-size: 38px; margin-bottom: 8px; }
.legal h1::after {
  content: ""; display: block; width: 96px; height: 4px; margin: 18px 0 0;
  background: linear-gradient(90deg, var(--black) 0 33.33%, #DD0000 33.33% 66.66%, var(--gold) 66.66% 100%);
}
.legal h2 { font-size: 23px; margin: 34px 0 12px; }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: 12px; font-size: 15px; }
.legal ul { padding-left: 22px; }
.legal .updated { color: var(--ink-mute); font-size: 14px; margin: 14px 0 32px; }
.legal code { background: var(--bg-deep); padding: 2px 7px; border-radius: 6px; font-size: 13.5px; }
[hidden] { display: none !important; }

/* ================= MOBILE POLISH (đợt 18/07) — cân đối trên điện thoại ================= */
html, body { max-width: 100%; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; }
@media (max-width: 720px){
  .foot-grid { flex-direction: column; gap: 26px; }
  footer .cols { gap: 26px 40px; }
  footer { padding: 40px 0 36px; }
  .foot-social { justify-content: flex-start; }
  .section-head h2 { font-size: 30px; }
  h1 { font-size: 38px; line-height: 1.08; }
  .compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare { min-width: 520px; }
  .plan { padding: 26px 22px; }
  .container { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 420px){
  .hero-cta .btn { width: 100%; justify-content: center; }
  .plan .price { font-size: 36px; }
}
@media (max-width: 540px){
  .nav-inner { padding-left: 14px; padding-right: 14px; }
  .nav-right > .btn-ghost { display: none; }
  .brand { min-width: 0; font-size: 16px; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .lang-switch { padding: 6px 9px; }
  .nav-toggle { padding: 3px 4px; }
}

/* Mobile layout shared by landing, install and legal pages. */
@media (max-width: 600px){
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .flag-bar { height: 6px; }
  .nav-inner { width: 100%; min-width: 0; }
  .brand { max-width: calc(100vw - 132px); letter-spacing: 0; white-space: nowrap; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; }
  .nav-right { min-width: 0; flex: 0 0 auto; white-space: nowrap; }
  main.container { padding-top: 34px !important; padding-bottom: 56px !important; }
  .legal { width: 100%; min-width: 0; }
  .legal h1 { font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }
  .legal h2 { font-size: 21px; line-height: 1.3; }
  .legal p, .legal li { font-size: 14.5px; overflow-wrap: anywhere; }
  .legal .btn { width: 100%; justify-content: center; text-align: center; white-space: normal; }
  .legal .install-download-btn {
    grid-template-columns: 22px minmax(0, auto);
    min-height: 56px;
    padding: 14px 16px;
    column-gap: 10px;
    font-size: 15.5px;
    white-space: normal;
  }
  .install-download-icon { width: 22px; height: 22px; font-size: 20px; }
  .legal code { white-space: normal; overflow-wrap: anywhere; }
  .cta-band { padding: 42px 20px; border-radius: 16px; }
  .section-head { margin-bottom: 38px; }
  .faq summary { font-size: 16px; align-items: flex-start; }
  footer .cols { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 360px){
  .container { padding-left: 14px; padding-right: 14px; }
  .brand { max-width: calc(100vw - 116px); font-size: 15px; }
  .lang-switch { font-size: 11px; padding: 6px 8px; }
  .hero h1 { font-size: 34px; }
  .hero .badge { width: 100%; }
  footer .cols { grid-template-columns: 1fr; }
}
