/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0f172a;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[lang="th"] body {
  font-family: 'IBM Plex Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #eff6ff;
  --accent: #0ea5e9;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
}

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: .02em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--brand); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: #fff;
}
.lang-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 999px;
  letter-spacing: .04em;
}
.lang-btn.active {
  color: #fff;
  background: var(--ink);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 96px 0 72px;
  background:
    radial-gradient(1200px 500px at 90% -10%, #e0eaff 0%, transparent 60%),
    radial-gradient(900px 400px at 0% 0%, #ecf5ff 0%, transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15,23,42,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 820px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: .04em;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--ink);
}
.lead {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  transition: all .18s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  box-shadow: var(--shadow);
}
.badge strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
}
.badge span { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 2px; }

/* ============ Section common ============ */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 40px; max-width: 720px; }
.kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 8px 0 0;
  letter-spacing: -.02em;
  font-weight: 800;
}
.section-sub { color: var(--muted); margin-top: 12px; max-width: 560px; }

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}
.about-grid p { color: var(--ink-2); margin: 0; font-size: 16px; }

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.legal-grid > div {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.legal-grid > div:nth-child(3n) { border-right: 0; }
.legal-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.legal-grid dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.legal-grid dd { margin: 0; font-weight: 600; color: var(--ink); }

/* ============ Cards (services) ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ============ Products ============ */
.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.product-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.product-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}
.easysub-mark {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
}
.product h3 { margin: 0; font-size: 18px; font-weight: 700; }
.product .muted { color: var(--muted); font-weight: 500; }
.product p { color: var(--ink-2); margin: 0 0 14px; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
  margin-top: 4px;
}
.tag-live { background: #dcfce7; color: #166534; }
.tag-soon { background: #fef3c7; color: #92400e; }
.link {
  font-weight: 600;
  color: var(--brand);
  font-size: 14px;
}
.link.muted { color: var(--muted); cursor: default; }

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.contact-card p { margin: 0; color: var(--ink); font-weight: 500; }
.contact-card a { color: var(--brand); }
.contact-card a:hover { text-decoration: underline; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand p { margin: 2px 0 0; }
.footer-meta { text-align: right; }
.footer-meta p { margin: 2px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 16px; }
  .legal-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-grid > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .legal-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .legal-grid > div:nth-child(2n) { border-right: 0; }
  .legal-grid > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .legal-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .cards, .products, .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
}
@media (max-width: 480px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-grid > div { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .legal-grid > div:last-child { border-bottom: 0 !important; }
  .hero-badges .badge { flex: 1 1 calc(50% - 12px); }
}
