/* ============================================================
   COMPAT ACCOUNT — shared stylesheet
   Design tokens + component classes for the marketing site.
   ============================================================ */

:root {
  --bg: #FAF7F1;
  --surface: #fff;
  --ink: #26231E;
  --ink-soft: #5A5347;
  --muted: #6B6459;
  --muted-2: #9A9284;
  --brand: #2E7D5B;
  --brand-dark: #256247;
  --brand-tint: #E7F0EA;
  --brand-deep: #1F4A38;
  --brand-mid: #3F6151;
  --border: #ECE6DB;
  --band: #F1EBE0;
  --quick: #F6F2EA;
  --dark: #26231E;
  --dark-border: #3B372F;
  --dark-muted: #B9B1A2;
  --line-soft: #F0EBE1;
  --maxw: 1180px;
  --font-head: 'Anuphan', sans-serif;
  --font-body: 'Sarabun', sans-serif;

  /* Layered soft shadow scale — depth from stacking low-alpha layers,
     tinted with the warm ink hue (38,35,30) so it never goes muddy-gray. */
  --shadow-2xs: 0 1px 2px 0 rgba(38, 35, 30, .04);
  --shadow-xs:  0 1px 2px 0 rgba(38, 35, 30, .05);
  --shadow-sm:
    0 1px 2px 0 rgba(38, 35, 30, .05),
    0 2px 4px -1px rgba(38, 35, 30, .04);
  --shadow-md:
    0 1px 2px 0 rgba(38, 35, 30, .05),
    0 4px 8px -2px rgba(38, 35, 30, .05),
    0 12px 24px -8px rgba(38, 35, 30, .05);
  --shadow-lg:
    0 2px 4px -1px rgba(38, 35, 30, .05),
    0 8px 16px -4px rgba(38, 35, 30, .06),
    0 24px 40px -12px rgba(38, 35, 30, .09);
  --shadow-card: var(--shadow-lg); /* back-compat alias */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { font-family: var(--font-head); }

/* Thai-safe typography: no spaces in Thai → the line-breaker routinely
   strands one word on the last line. pretty re-flows earlier breaks to
   kill the orphan; balance evens out heading/subtitle lines. */
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* One motion language everywhere; respected once, globally, below. */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 32px);
  padding-right: clamp(20px, 5vw, 32px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: #fff; border: 1px solid #D9D1C4; color: var(--ink); box-shadow: var(--shadow-2xs); }
.btn-outline:hover { color: var(--ink); box-shadow: var(--shadow-sm); }

.btn--hero { padding: 14px 26px; font-size: 16px; }
.btn--md   { padding: 13px 24px; border-radius: 11px; font-size: 15px; }
.btn--cta  { padding: 15px 30px; font-size: 16px; }
.btn--cta2 { padding: 14px 28px; border-radius: 11px; }
.btn--note { padding: 13px 26px; border-radius: 11px; white-space: nowrap; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { color: inherit; }
.brand-badge {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 19px;
}
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.brand-name span { color: var(--brand); }
.nav-links {
  display: flex; align-items: center;
  gap: clamp(14px, 2.5vw, 30px);
  font-size: 15px;
  flex-wrap: wrap;
}
.nav-links a { color: #4A453D; }
.nav-links a:hover { color: var(--brand); }
.nav-links a.active { color: var(--brand); font-weight: 600; }

/* ---------- Hero (home) ---------- */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
  padding-top: clamp(40px, 7vw, 72px);
  padding-bottom: clamp(40px, 7vw, 72px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 600; font-size: 14px;
}
.hero .eyebrow { margin-bottom: 24px; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.18;
  margin: 0 0 20px;
  letter-spacing: -.3px;
}
.hero-lead {
  font-size: 19px; line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 470px;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; margin-top: 38px; flex-wrap: wrap; }
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 28px; color: var(--brand); }
.stat-label { font-size: 14px; color: var(--muted); }

/* ---------- Quick download card (hero right) ---------- */
.quick-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.quick-title { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.quick-list { display: flex; flex-direction: column; gap: 10px; }
.quick-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--quick);
  color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.quick-item:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-item .label { font-weight: 600; }
.dl-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.dl-icon.dark { background: var(--ink); }

/* ---------- Products ---------- */
.products { padding-top: 30px; padding-bottom: 60px; }
.products h2 { font-weight: 700; font-size: clamp(26px, 4vw, 32px); margin: 0 0 6px; }
.products .sub { font-size: 16px; color: var(--muted); margin: 0 0 28px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  color: var(--ink);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-cta { transition: background-color .2s ease; }
.product-badge {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: var(--brand-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
}
.product-badge.sm { font-size: 16px; }
.product-badge.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
.product-badge.lg.sm { font-size: 17px; }
.product-name { font-family: var(--font-head); font-weight: 700; font-size: 21px; }
.product-cta {
  padding: 10px 22px;
  border-radius: 10px;
  background: var(--brand); color: #fff;
  font-weight: 600; font-size: 14px;
}
.product-cta:hover { color: #fff; }
.product-cta.block { width: 100%; padding: 11px; text-align: center; }

/* ---------- Band (why us) ---------- */
.band { background: var(--band); }
.band-inner { padding-top: 60px; padding-bottom: 60px; }
.band h2 { font-weight: 700; font-size: clamp(24px, 4vw, 30px); margin: 0 0 30px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.feature-card h3 { font-weight: 700; font-size: 18px; margin: 0 0 8px; }
.feature-card p { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ---------- Pricing preview (dark, home) ---------- */
.pricing-wrap { padding-top: 60px; padding-bottom: 60px; }
.pricing-card {
  background: var(--dark);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 44px);
  color: #F4EFE6;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}
.pricing-card h2 { font-weight: 700; font-size: 30px; margin: 0 0 12px; color: #fff; }
.pricing-card .lead { font-size: 15px; color: var(--dark-muted); line-height: 1.6; margin: 0 0 24px; }
.price-rows { display: flex; flex-direction: column; }
.price-row {
  display: flex; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--dark-border);
}
.price-row:last-child { border-bottom: none; }
.price-row .lbl { color: #DCD5C7; }
.price-row .val { font-weight: 600; }

/* ---------- CTA bands ---------- */
.pad-b { padding-bottom: 70px; }
.cta-green { background: var(--brand-tint); border-radius: 22px; padding: 50px; text-align: center; }
.cta-green h2 { font-weight: 700; font-size: 32px; margin: 0 0 12px; color: var(--brand-deep); }
.cta-green p { font-size: 17px; color: var(--brand-mid); margin: 0 0 26px; }

.cta-dark { background: var(--dark); border-radius: 20px; padding: 40px; text-align: center; color: #F4EFE6; }
.cta-dark h2 { font-weight: 700; font-size: 28px; margin: 0 0 10px; color: #fff; }
.cta-dark p { font-size: 16px; color: var(--dark-muted); margin: 0 0 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-muted); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 48px; padding-bottom: 48px;
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-badge {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-head); font-weight: 700;
}
.footer-brand .name { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: #fff; }
.footer-address { font-size: 14px; line-height: 1.7; }
.footer-col h4 { font-family: var(--font-body); font-weight: 600; color: #fff; margin: 0 0 12px; font-size: 15px; }
.footer-links { font-size: 14px; line-height: 2; }
.footer-links a { color: var(--dark-muted); display: block; }
.footer-links a:hover { color: #fff; }
.footer-text { font-size: 14px; line-height: 2; }
.footer-text a { color: var(--dark-muted); }
.footer-text a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--dark-border); }
.footer-bottom .container { padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: #8A8272; }

/* ---------- Sub-page header ---------- */
.page-head { padding-top: 60px; padding-bottom: 20px; }
.crumb { font-size: 14px; color: var(--muted-2); margin-bottom: 10px; }
.page-head h1 { font-weight: 700; font-size: clamp(30px, 5vw, 44px); margin: 0 0 12px; }
.page-head .lead { font-size: 18px; color: var(--muted); margin: 0; max-width: 620px; }

/* ---------- Downloads ---------- */
.dl-section { padding-top: 36px; }
.dl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dl-head .ico {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--brand-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.dl-head h2 { font-weight: 700; font-size: 24px; margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.tool-link {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tool-link:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tool-link .name { font-weight: 600; font-size: 16px; }
.tool-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.free-list { display: flex; flex-direction: column; gap: 10px; }
.free-link {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 20px;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease;
}
.free-link:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.free-link .name { font-weight: 500; }
.free-link .more { color: var(--brand); font-weight: 600; font-size: 14px; }
.free-link.plain { background: transparent; border: none; color: var(--muted); font-size: 14px; box-shadow: none; }
.free-link.plain:hover { color: var(--ink); transform: none; box-shadow: none; }
.help-note {
  background: var(--brand-tint);
  border-radius: 18px;
  padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.help-note .t { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--brand-deep); margin-bottom: 4px; }
.help-note .d { font-size: 15px; color: var(--brand-mid); }

/* ---------- Service ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.price-group { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 30px 32px; box-shadow: var(--shadow-sm); }
.price-group h2 { font-weight: 700; font-size: 20px; margin: 0 0 18px; }
.price-line { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.price-line:last-child { border-bottom: none; }
.price-line .lbl { color: var(--ink-soft); }
.price-line .lbl { min-width: 0; }
.price-line .amt { font-family: var(--font-head); font-weight: 600; white-space: nowrap; }
.price-line .amt small { color: var(--muted-2); font-weight: 400; font-size: 13px; }
/* Keep parenthetical Thai hints as one unit so the line-breaker can't
   strand a single word (e.g. "…ยาก / ง่าย"); the whole "(…)" wraps together. */
.hint { color: var(--muted-2); font-size: 13px; white-space: nowrap; }

.discount { background: var(--brand-tint); border-radius: 18px; padding: 30px 32px; }
.discount-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.discount-head .t { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--brand-deep); }
.discount-cards { display: flex; gap: 16px; flex-wrap: wrap; }
.discount-card { flex: 1; min-width: 280px; background: #fff; border-radius: 14px; padding: 20px 24px; box-shadow: var(--shadow-xs); }
.discount-card .t { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.discount-card .v { color: var(--brand); font-family: var(--font-head); font-weight: 700; font-size: 22px; }

.note { border: 1px dashed #D9CFBE; border-radius: 14px; padding: 22px 26px; background: #FBF8F1; }
.note p { font-size: 14px; color: #8A6D3B; line-height: 1.7; margin: 0; }
.note strong { color: #7A5A28; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 28px;
  display: flex; gap: 18px; align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.info-ico {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.info-card h3 { font-family: var(--font-head); font-weight: 700; font-size: 17px; margin: 0 0 6px; }
.info-card .body { font-size: 15px; color: var(--muted); line-height: 1.7; }
.info-card .phone { font-size: 20px; color: var(--brand); font-weight: 600; font-family: var(--font-head); }
.info-card .email { font-size: 16px; color: var(--brand); font-weight: 600; }
.contact-panel {
  background: var(--dark);
  border-radius: 20px;
  padding: 38px;
  color: #F4EFE6;
  display: flex; flex-direction: column; justify-content: center;
}
.contact-panel .eyebrow {
  align-self: flex-start;
  background: rgba(46, 125, 91, .25);
  color: #8FD3B4;
  font-size: 13px;
  margin-bottom: 20px;
}
.contact-panel h2 { font-weight: 700; font-size: 28px; margin: 0 0 14px; color: #fff; }
.contact-panel p { font-size: 16px; color: var(--dark-muted); line-height: 1.65; margin: 0 0 28px; }
.contact-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px;
  border-radius: 12px;
  font-weight: 600;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.contact-btn:hover { transform: translateY(-2px); }
.contact-btn.primary { background: var(--brand); color: #fff; font-size: 17px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.contact-btn.primary:hover { color: #fff; }
.contact-btn.ghost {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #F4EFE6; font-size: 16px;
}
.contact-btn.ghost:hover { color: #F4EFE6; }
