/* OpenSoi marketing site — locked palette and minimal styling.
 *
 * Brand blue:  #1a7af0
 * Action red:  #e74c3c
 * Open green:  #1a7a1a
 *
 * Mobile-first, no JS framework, single CSS file.
 */

:root {
  --brand: #1a7af0;
  --brand-dark: #1564c4;
  --action: #e74c3c;
  --open: #1a7a1a;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e5e5e5;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

body.lang-th {
  font-family: 'Sarabun', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- Layout ---------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

main {
  padding: 0 0 48px;
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 56px 20px 40px;
  background: linear-gradient(180deg, #f0f6ff 0%, var(--bg) 100%);
}

.hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(26, 122, 240, 0.18);
  display: block;
  margin: 0 auto 20px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero h1 .th {
  display: block;
  font-family: 'Sarabun', system-ui, sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--brand);
  margin-top: 4px;
}

.hero .subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 12px auto 0;
}

/* ---------- Sections ---------- */

section {
  padding: 36px 0;
}

section h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.features {
  display: grid;
  gap: 16px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature .icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.feature .body {
  flex: 1;
}

.feature .body strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature .body span {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- How it works ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
}

.step {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px 16px 56px;
  position: relative;
  font-size: 14px;
  color: var(--text);
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- CTA ---------- */

.cta {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 24px -20px;
}

.cta-button {
  display: inline-block;
  padding: 14px 28px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.cta-button:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

.cta-button.disabled {
  background: #c0c0c0;
  cursor: default;
  pointer-events: none;
}

.cta-note {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.cta-note a {
  color: var(--brand);
}

/* ---------- Footer ---------- */

footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

footer .links {
  margin-bottom: 8px;
}

footer .links a {
  margin: 0 10px;
}

/* ---------- Privacy page ---------- */

.privacy-banner {
  background: #fff8e6;
  border-left: 3px solid var(--action);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 20px 0 24px;
}

.privacy-banner strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.privacy-banner span {
  font-size: 13px;
  color: var(--text-muted);
}

.privacy-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.privacy-section {
  margin-bottom: 28px;
}

.privacy-section h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
}

.privacy-section p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.65;
}

.privacy-section ul {
  margin: 0 0 10px;
  padding-left: 22px;
}

.privacy-section li {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 6px;
}

.lang-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 13px;
  margin: 8px 0 16px;
}

.lang-toggle a {
  padding: 6px 14px;
  color: var(--text-muted);
  background: var(--surface);
}

.lang-toggle a.active {
  background: var(--brand);
  color: #fff;
}

.email-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
}

.back-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */

@media (min-width: 600px) {
  .hero {
    padding: 80px 20px 56px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .hero h1 .th {
    font-size: 26px;
  }
  .hero .subtitle {
    font-size: 18px;
  }
  section h2 {
    font-size: 26px;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .features .feature:first-child {
    grid-column: 1 / -1;
  }
}
