/* Landing Experia (GĐ1 C1). CSS thuần, không framework. Màu đặt bằng biến để có giao diện sáng/tối:
   - mặc định theo hệ điều hành (prefers-color-scheme);
   - nút đổi giao diện ghi <html data-theme="light|dark"> (theme-init.js đọc lại lựa chọn đã lưu). */

:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2fb;
  --text: #0f172a;
  --muted: #475569;
  --line: #d7deeb;
  --accent: #1d4ed8;
  --accent-hover: #1e3a8a;
  --accent-ink: #ffffff;
  --accent-soft: #dbe7ff;
  --badge-soon-bg: #fdf0d5;
  --badge-soon-ink: #7a4a00;
  --ok: #166534;
  --ok-bg: #e7f6ec;
  --err: #b42318;
  --err-bg: #fdecea;
  --focus: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 16px rgb(15 23 42 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Bảng màu tối dùng ở hai chỗ: người dùng chọn tối, hoặc hệ điều hành tối và người dùng chưa chọn sáng */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #111a2e;
  --surface-2: #16213a;
  --text: #e6ecf6;
  --muted: #a3b1c8;
  --line: #263454;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-ink: #0b1a3a;
  --accent-soft: #172b55;
  --badge-soon-bg: #3a2c0c;
  --badge-soon-ink: #fcd98a;
  --ok: #86efac;
  --ok-bg: #0f2a1a;
  --err: #fca5a5;
  --err-bg: #3a1414;
  --focus: #93c5fd;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1120;
    --surface: #111a2e;
    --surface-2: #16213a;
    --text: #e6ecf6;
    --muted: #a3b1c8;
    --line: #263454;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-ink: #0b1a3a;
    --accent-soft: #172b55;
    --badge-soon-bg: #3a2c0c;
    --badge-soon-ink: #fcd98a;
    --ok: #86efac;
    --ok-bg: #0f2a1a;
    --err: #fca5a5;
    --err-bg: #3a1414;
    --focus: #93c5fd;
    --shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: anywhere;
}
img,
svg {
  max-width: 100%;
}
a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--accent-hover);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2rem, 5.2vw, 3.2rem);
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.15rem;
}
p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Đầu trang ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  height: 32px;
  width: auto;
  flex: none;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 0;
  display: inline-block;
}
.site-nav a:hover {
  color: var(--text);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.lang-switch:hover,
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-moon {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: inline;
}

/* ---------- Khối nội dung ---------- */
.section {
  padding: 64px 0;
}
.section-alt {
  background: var(--surface-2);
}
.section-head {
  max-width: 720px;
  margin-bottom: 32px;
}
.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero {
  padding: 72px 0 56px;
}
.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
  max-width: 680px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
/* Ghi chú 'dữ liệu demo' dưới nút xem demo */
.demo-note {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}
.btn-ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}
.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.65;
  cursor: progress;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card p {
  color: var(--muted);
}
.card .card-foot {
  margin-top: auto;
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.card-icon svg {
  width: 22px;
  height: 22px;
}
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-soon {
  background: var(--badge-soon-bg);
  color: var(--badge-soon-ink);
}
.card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.card-title .badge {
  margin-left: 0;
}

/* ---------- Experia Agri ---------- */
.agri {
  display: grid;
  gap: 24px;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.agri p {
  color: var(--muted);
}

/* ---------- Bảng giá ---------- */
.plans .card h3 {
  margin-bottom: 4px;
}
.plan-meta {
  margin: 16px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.plan-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.plan-meta dt {
  color: var(--muted);
}
.plan-meta dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}
.note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 20px;
}

/* ---------- Form dùng thử ---------- */
.trial {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: start;
}
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.field {
  margin-bottom: 16px;
}
.field label,
.field .label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.hint,
.field .hint {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}
.req {
  color: var(--err);
}
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--muted);
}
[aria-invalid="true"] {
  border-color: var(--err) !important;
}
.field-error {
  display: block;
  color: var(--err);
  font-size: 0.875rem;
  margin-top: 4px;
}
.field-error:empty {
  display: none;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex: none;
  accent-color: var(--accent);
}
.check label {
  font-weight: 400;
}
/* Honeypot: đẩy khỏi màn hình (không display:none để bot vẫn thấy và điền) */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
}
.form-status:empty {
  display: none;
}
.form-status.is-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.form-status.is-error {
  background: var(--err-bg);
  color: var(--err);
}
.trial-points {
  padding-left: 1.2em;
  color: var(--muted);
}
.trial-points li {
  margin-bottom: 8px;
}

/* ---------- Trang văn bản (thông báo dữ liệu) ---------- */
.prose {
  max-width: 760px;
  padding: 48px 0 64px;
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 1.8em;
}
.prose ul {
  padding-left: 1.2em;
}
.prose li {
  margin-bottom: 6px;
}
.meta-line {
  color: var(--muted);
}

/* ---------- Chân trang ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a {
  color: var(--muted);
}

@media (max-width: 640px) {
  .section {
    padding: 48px 0;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .site-nav {
    order: 3;
    width: 100%;
  }
  .form,
  .agri {
    padding: 18px;
  }
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
