/* IZY.VN — shared styles for root site (home / policy / privacy) */
:root {
  color-scheme: light;
  --bg: #f5f7fc;
  --card: #ffffff;
  --text: #17233b;
  --muted: #5d6b85;
  --line: #dde4f0;
  --brand: #5a8dee;
  --brand-dark: #3565c4;
  --brand-ink: #1d3a75;
  --accent: #e8effc;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

h1, h2 { font-family: "Space Grotesk", "Be Vietnam Pro", -apple-system, sans-serif; }

/* Bilingual toggle: html[data-lang] hides the other language */
html[data-lang="vi"] [lang="en"] { display: none !important; }
html[data-lang="en"] [lang="vi"] { display: none !important; }

.inner { width: min(1000px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}
.topbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--brand-ink);
  text-decoration: none;
}
.topbar .logo img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.topbar nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: wrap;
}
.topbar nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.topbar nav a:hover { color: var(--brand-dark); }

.tb-controls { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-switch { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; }
.lang-switch button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.lang-switch button svg {
  width: 24px;
  height: 16px;
  border-radius: 3px;
  display: block;
  opacity: 0.3;
  filter: saturate(0.3) brightness(0.75);
  transition: opacity 0.2s, filter 0.2s, transform 0.2s;
}
.lang-switch button:hover svg { opacity: 0.7; filter: saturate(0.8) brightness(0.95); }
html[data-lang="vi"] .lang-switch button[data-set="vi"] svg,
html[data-lang="en"] .lang-switch button[data-set="en"] svg {
  opacity: 1;
  filter: none;
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(90, 141, 238, 0.4);
}

a { color: var(--brand-dark); }
main a, footer a { font-weight: 650; text-decoration: none; }
main a:hover, footer a:hover { text-decoration: underline; }

.hero {
  background: linear-gradient(135deg, #2c4a92 0%, #3565c4 45%, #5a8dee 100%);
  color: #fff;
  padding: 64px 0 56px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
}
.hero .tagline {
  color: #dbe7ff;
  font-size: clamp(17px, 2.5vw, 20px);
  max-width: 760px;
  margin: 0 0 26px;
}
.hero .pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 16px;
}
.btn {
  display: inline-block;
  background: #ffffff;
  color: var(--brand-dark);
  border-radius: 10px;
  padding: 11px 22px;
  font-weight: 750;
  text-decoration: none;
}
.btn:hover { background: var(--accent); text-decoration: none; }
.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  margin-left: 10px;
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.12); }

.section { padding: 44px 0 8px; }
.section > h2 { margin: 0 0 6px; font-size: 28px; color: var(--brand-ink); }
.section > .lead { color: var(--muted); margin: 0 0 22px; max-width: 780px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

.product {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  margin: 22px 0;
}
.product img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.product h3 { margin: 0 0 6px; font-size: 20px; }
.product p { margin: 0 0 10px; color: var(--muted); }
.product .links { font-size: 15px; }
.product .links a { margin-right: 16px; }

/* Legal pages */
.page-head {
  background: linear-gradient(135deg, #2c4a92 0%, #3565c4 55%, #5a8dee 100%);
  color: #fff;
  padding: 46px 0 40px;
  margin-bottom: 30px;
}
.page-head h1 { margin: 0 0 6px; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; }
.page-head .updated { color: #dbe7ff; margin: 0; }
article.card { padding: 30px; margin-bottom: 36px; }
article.card h2 { margin: 26px 0 10px; font-size: 22px; color: var(--brand-ink); }
article.card h2:first-of-type { margin-top: 0; }
article.card h3 { margin: 20px 0 8px; font-size: 17px; }
article.card p { margin: 0 0 13px; }
article.card ul { margin: 8px 0 14px; padding-left: 22px; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 28px 20px 42px;
  text-align: center;
  font-size: 14px;
  margin-top: 40px;
}
footer .foot-links { margin-bottom: 8px; }
footer .foot-links a { margin: 0 10px; }
footer p { margin: 4px 0; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .product { flex-direction: column; }
  .hero { padding: 48px 0 44px; }
  article.card { padding: 22px; }
}

@media (max-width: 640px) {
  .inner, .topbar .inner { width: calc(100% - 32px); }
  .topbar .inner { flex-wrap: wrap; row-gap: 2px; gap: 12px; padding: 10px 0; }
  .topbar .logo { font-size: 16.5px; }
  .topbar .logo img { width: 30px; height: 30px; }
  .tb-controls { margin-left: auto; }
  .topbar nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 6px;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { font-size: 13.5px; white-space: nowrap; }
  .page-head { padding: 34px 0 30px; }
}
