/* =========================================================
   My Little Boss — Brand System v2
   Palette: Cream / Sky / Tomato / Mustard / Pot Green / Butter / Blossom
   Type: Fredoka (EN display+body), Mali (TH), IBM Plex Mono (labels)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Mali:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --cream:           #FBF3E3;
  --cream-2:         #F6EAD0;
  --sky:             #66C7E8;
  --sky-ink:         #1C88A8;
  --tomato:          #E8452C;
  --tomato-deep:     #C1371E;
  --mustard:         #F7C531;
  --pot:             #0F4D2F;
  --pot-soft:        #1b6a42;
  --butter:          #FFD84A;
  --blossom:         #F6A3C4;
  --ink:             #1a1a1a;
  --ink-60:          #5a5a5a;
  --divider:         rgba(15,77,47,0.15);
  --divider-soft:    rgba(15,77,47,0.08);
  --line-green:      #06C755;
  --line-green-deep: #05a548;

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body:    'Fredoka', system-ui, sans-serif;
  --font-thai:    'Mali', 'Fredoka', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-pill: 999px;
}

/* ── Language system ───────────────────────────────────── */
[data-th] { display: none !important; }
[data-en] { display: inline !important; }
body.lang-th [data-en] { display: none !important; }
body.lang-th [data-th] { display: inline !important; }
body.lang-th { font-family: var(--font-thai); }
body.lang-th h1, body.lang-th h2, body.lang-th h3, body.lang-th h4 {
  font-family: var(--font-thai);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
p { margin: 0; }
img { display: block; max-width: 100%; }

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
.hl {
  font-size: clamp(40px, 5.2vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.97;
}
.hl em {
  font-style: normal;
  color: var(--tomato);
  display: inline-block;
  transform: rotate(-1.2deg);
}
body.lang-th .hl {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.18;
  letter-spacing: 0;
}
.sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 560px;
  font-weight: 400;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pot);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tomato);
  flex-shrink: 0;
}
.fine {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-60);
  text-transform: uppercase;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-line {
  background: var(--line-green);
  color: #fff;
  box-shadow: 0 2px 0 var(--line-green-deep), 0 10px 24px -10px rgba(6,199,85,0.55);
}
.btn-line:hover { background: #0bd162; color: #fff; }
.btn-pot {
  background: var(--pot);
  color: var(--cream);
  box-shadow: 0 2px 0 #083919;
}
.btn-pot:hover { background: var(--pot-soft); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--pot);
  border: 1.5px solid var(--pot);
}
.btn-ghost:hover { background: rgba(15,77,47,0.06); }
.btn-tomato {
  background: var(--tomato);
  color: #fff;
  box-shadow: 0 2px 0 var(--tomato-deep);
}
.btn-tomato:hover { background: var(--tomato-deep); color: #fff; }
.btn-lg { padding: 18px 28px; font-size: 17px; }
.btn-sm { padding: 10px 16px; font-size: 13px; }

/* ── Chips / Badges ────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--cream-2);
  color: var(--pot);
  border: 1px solid var(--divider);
}
.chip-sky     { background: var(--sky);     color: var(--pot);  border-color: transparent; }
.chip-tomato  { background: var(--tomato);  color: #fff;        border-color: transparent; }
.chip-mustard { background: var(--mustard); color: var(--pot);  border-color: transparent; }
.chip-green   { background: var(--pot);     color: var(--cream);border-color: transparent; }
.chip-butter  { background: var(--butter);  color: var(--pot);  border-color: transparent; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--divider);
  padding: 28px;
}
.card-cream  { background: var(--cream); }
.card-cream2 { background: var(--cream-2); }
.card-sky    { background: var(--sky);    color: var(--pot);  border-color: transparent; }
.card-tomato { background: var(--tomato); color: #fff;        border-color: transparent; }
.card-pot    { background: var(--pot);    color: var(--cream);border-color: transparent; }
.card-mustard{ background: var(--mustard);color: var(--pot);  border-color: transparent; }
.card-butter { background: var(--butter); color: var(--pot);  border-color: transparent; }

/* ── Nav ───────────────────────────────────────────────── */
.v2-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,243,227,0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--divider-soft);
}
.v2-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 24px;
}
.v2-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.v2-nav-logo-img {
  height: 48px;
  width: 48px;
  display: block;
  object-fit: contain;
}
@media (max-width: 640px) {
  .v2-nav-logo-img { height: 42px; width: 42px; }
}
.v2-nav-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.04em;
  color: var(--pot);
  line-height: 1;
}
.v2-nav-logo-sub {
  font-family: var(--font-thai);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-60);
  margin-top: 2px;
}
.v2-nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.v2-nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--pot);
  opacity: 0.8;
  transition: opacity .15s;
  text-decoration: none;
}
.v2-nav-link:hover { opacity: 1; }
.v2-nav-link.active { color: var(--tomato); opacity: 1; font-weight: 600; }
.v2-nav-actions { display: flex; align-items: center; gap: 12px; }

.v2-lang-toggle {
  display: inline-flex;
  background: var(--cream-2);
  border-radius: var(--r-pill);
  padding: 3px;
}
.v2-lang-toggle button {
  padding: 6px 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-60);
  transition: background .15s, color .15s;
}
.v2-lang-toggle button.active {
  background: var(--pot);
  color: var(--cream);
}

/* Hamburger */
.v2-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}
.v2-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--pot);
  border-radius: 2px;
  transition: all 0.3s;
}
.v2-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.v2-hamburger.open span:nth-child(2) { opacity: 0; }
.v2-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.v2-mobile-menu {
  display: none;
  position: fixed;
  top: 62px; left: 0; right: 0; bottom: 0;
  background: rgba(251,243,227,0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 150;
}
.v2-mobile-menu.open { display: flex; }
.v2-mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pot);
  letter-spacing: -0.02em;
}
.v2-mobile-menu a.active { color: var(--tomato); }

/* ── Layout / Section ──────────────────────────────────── */
.v2-section {
  padding: 96px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.v2-section-sm  { padding: 56px 32px; max-width: 1280px; margin: 0 auto; }
.v2-section-hero { padding: 72px 32px 80px; max-width: 1280px; margin: 0 auto; }

.v2-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ── Grid ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }

/* ── Pill list ─────────────────────────────────────────── */
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--divider);
  font-size: 13px;
  color: var(--pot);
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.pill:hover { border-color: var(--pot); }
.pill-active { background: var(--pot); color: var(--cream); border-color: var(--pot); }

/* ── Stat ──────────────────────────────────────────────── */
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--pot);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-top: 8px;
}

/* ── Accordion ─────────────────────────────────────────── */
.acc { border-bottom: 1px solid var(--divider); }
.acc:first-child { border-top: 1px solid var(--divider); }
.acc-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--pot);
  width: 100%;
  text-align: left;
  cursor: pointer;
  gap: 20px;
  background: none;
  border: none;
}
.acc-plus {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cream-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  transition: transform .2s, background .2s;
  flex-shrink: 0;
  color: var(--pot);
}
.acc.open .acc-plus { background: var(--tomato); color: #fff; transform: rotate(45deg); }
.acc-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.65;
  padding-top: 0;
  padding-bottom: 0;
}
.acc.open .acc-a { max-height: 500px; padding-bottom: 22px; }

/* ── Food image slot ───────────────────────────────────── */
.food-img {
  width: 100%;
  background: var(--cream-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 0 rgba(15,77,47,0.08), 0 18px 40px -20px rgba(15,77,47,0.28);
}
.food-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.food-img-caption {
  position: absolute;
  left: 10px; bottom: 10px;
  background: var(--cream);
  color: var(--pot);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: var(--r-pill);
}
.food-ph {
  width: 100%;
  border-radius: var(--r-lg);
  background-color: var(--cream-2);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ── Arrow link ────────────────────────────────────────── */
.arrow-link {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--pot);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1.5px solid var(--pot);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.arrow-link:hover { color: var(--tomato); border-color: var(--tomato); }

/* ── Footer ────────────────────────────────────────────── */
.v2-footer {
  background: var(--pot);
  color: var(--cream);
  padding: 64px 32px 28px;
}
.v2-footer a { color: var(--cream); opacity: 0.8; transition: opacity .15s; }
.v2-footer a:hover { opacity: 1; }
.v2-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--butter);
  margin-bottom: 16px;
}
.v2-footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto 48px;
}
.v2-footer-link {
  display: block;
  padding: 6px 0;
  font-size: 14px;
}
.v2-footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(251,243,227,0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

/* ── Mobile sticky CTA ─────────────────────────────────── */
.v2-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 8px 14px 12px;
  background: rgba(251,243,227,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--divider-soft);
  z-index: 90;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.v2-sticky-bar.visible { transform: translateY(0); }
/* Compact button inside sticky bar — overrides per-page inline padding/font-size */
.v2-sticky-bar .btn { padding: 13px 16px !important; font-size: 15px !important; }

/* ── Table ─────────────────────────────────────────────── */
.v2-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.v2-tbl th {
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-60);
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
}
.v2-tbl td {
  padding: 16px;
  border-bottom: 1px solid var(--divider-soft);
  color: var(--ink);
}
.v2-tbl tr.best td { background: var(--butter); font-weight: 600; }

/* ── Field / Input ─────────────────────────────────────── */
.v2-field { display: flex; flex-direction: column; gap: 6px; }
.v2-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pot);
  font-weight: 500;
}
.v2-field input, .v2-field select {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--divider);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.v2-field input:focus, .v2-field select:focus { border-color: var(--pot); }
.v2-field .hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-60);
}

/* ── Wavy divider ──────────────────────────────────────── */
.wavy {
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--tomato) 0 8px, transparent 8px 16px);
  opacity: 0.3;
}

/* ── Utility ───────────────────────────────────────────── */
.flex   { display: flex; }
.center { align-items: center; justify-content: center; }
.between{ justify-content: space-between; }
.items-center { align-items: center; }
.col    { flex-direction: column; }
.wrap   { flex-wrap: wrap; }
.gap-2  { gap: 8px;  }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.gap-8  { gap: 32px; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mt-6   { margin-top: 24px; }
.mt-8   { margin-top: 32px; }
.mt-12  { margin-top: 48px; }
.mb-4   { margin-bottom: 16px; }
.mb-6   { margin-bottom: 24px; }
.mb-8   { margin-bottom: 32px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.relative { position: relative; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .v2-nav-links { display: none !important; }
  .v2-hamburger { display: flex; }
  .v2-nav-inner { gap: 10px; }
  .v2-nav-actions { flex-shrink: 0; margin-left: auto; }
  .v2-nav-actions .v2-lang-toggle { flex-direction: row-reverse; }
  .v2-nav-actions .btn { display: none; }
  .v2-section { padding: 72px 20px; }
  .v2-section-sm { padding: 48px 20px; }
  .v2-section-hero { padding: 56px 20px 64px; }
  .v2-wrap { padding: 0 20px; }
  /* Tablet: keep hero & 2-col stacked, but benefits/steps render as 2-up */
  .grid-2, .grid-hero { grid-template-columns: 1fr; gap: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hl { font-size: clamp(34px, 8vw, 52px) !important; }
  .sub { font-size: 17px; }
  .v2-footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
  .v2-sticky-bar { display: block; }
  /* Sticky bar clearance so the bar never covers footer / closing section.
     Scoped via :has() so policy pages (no sticky bar) don't get empty space. */
  body:has(.v2-sticky-bar) { padding-bottom: 72px; }
  .stat-num { font-size: 48px; }
  .acc-q { font-size: 16px; }
  .v2-nav-inner { padding: 12px 20px; }
}
@media (max-width: 640px) {
  .v2-nav-logo-text,
  .v2-nav-logo-sub { display: none; }
}
@media (max-width: 480px) {
  .v2-footer-cols { grid-template-columns: 1fr; }
  /* Small phones: grid-3 cards (tool cards etc.) are text-heavy → single column */
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .v2-section { padding: 56px 18px; }
  .v2-section-hero { padding: 40px 18px 48px; }
}
