:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f5f4;
  --text: #1c1917;
  --muted: #5f5b57;
  --line: #e4e2df;
  --primary: #1c1917;
  --on-primary: #ffffff;
  --success: #166534;
  --error: #b91c1c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1f1d1c;
    --text: #f2f0ee;
    --muted: #a8a39e;
    --line: #322f2d;
    --primary: #f2f0ee;
    --on-primary: #141312;
    --success: #4ade80;
    --error: #f87171;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}

.brand {
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

.hero {
  padding-top: 96px;
  padding-bottom: 96px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 9.6vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 34em;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.button:hover {
  border-color: var(--text);
}

.button-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.button-primary:hover {
  opacity: 0.85;
}

.button[aria-disabled="true"],
.button:disabled {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  opacity: 1;
  cursor: not-allowed;
}

.section {
  padding-top: 56px;
  padding-bottom: 56px;
}

.section h2 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-note {
  max-width: 34em;
  margin: -12px 0 24px;
  color: var(--muted);
}

.tool-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.tool-item h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.tool-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.tool-item .tool-meta {
  font-size: 14px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}

.video-card h3 {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 500;
}

.video-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
}

button.video-frame {
  cursor: pointer;
}

.video-frame img,
.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.signup-form {
  display: grid;
  gap: 12px;
  max-width: 440px;
}

.signup-form > label:first-of-type {
  font-size: 14px;
  font-weight: 500;
}

.signup-form input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.signup-form input[type="text"]:hover {
  border-color: var(--muted);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  accent-color: var(--primary);
}

.signup-form .button {
  justify-self: start;
  margin-top: 4px;
}

.form-status {
  min-height: 1.6em;
  margin: 0;
  font-size: 14px;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--error);
}

/* Giấu ô bẫy khỏi người dùng nhưng bot vẫn điền */
.trap {
  position: absolute;
  left: -9999px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  nav {
    gap: 14px;
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .tool-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
