/* ============================================================
   ติดแบรนด์ (Tidbrand) — CMYK Design System · PREMIUM
   Refined CMYK · ink-led neutrals · soft depth · Thai-first
   (2026-07-27: elevated from neo-brutalist → premium/enterprise
    while keeping the CMYK brand DNA. CMYK used as precise accents,
    ink + warm paper carry the layout, soft layered shadows,
    hairline borders.)
   ============================================================ */

:root {
  /* --- CMYK process (brand DNA — used as ACCENTS, not big fills) --- */
  --cyan: #00AEEF;
  --magenta: #EC008C;
  --magenta-ink: #BC0068; /* darker magenta for small text/links — passes WCAG AA on light bg */
  --yellow: #FFD500;

  /* --- ink-led neutrals (carry the layout) --- */
  --key: #14141A;          /* primary ink (also the legacy token used across pages) */
  --ink: #14141A;
  --ink-2: #3A3A42;        /* secondary text */
  --ink-3: #6E6E78;        /* muted / eyebrow */
  --muted: #4A4A52;        /* body-secondary (AA on paper) */
  --line: #14141A;

  /* --- surfaces --- */
  --cream: #FAF8F3;        /* warm paper (page bg) */
  --paper-2: #F2EFE8;      /* panel tint */
  --card: #FFFFFF;

  /* --- soft CMYK tints (card washes) --- */
  --cyan-soft: #E4F5FD;
  --magenta-soft: #FCEAF3;
  --yellow-soft: #FFF7D6;

  /* --- hairlines & depth (the premium tell) --- */
  --hair: rgba(20,20,26,.10);
  --hair-2: rgba(20,20,26,.06);
  --sh-sm: 0 1px 2px rgba(20,20,26,.06), 0 1px 3px rgba(20,20,26,.08);
  --sh-md: 0 14px 34px -16px rgba(20,20,26,.22), 0 2px 6px rgba(20,20,26,.05);
  --sh-lg: 0 34px 70px -28px rgba(20,20,26,.30), 0 4px 10px rgba(20,20,26,.05);

  --maxw: 1160px;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(60px, 9vw, 96px) 0; }

h1, h2, h3, h4, .font-display { font-family: 'Kanit', sans-serif; letter-spacing: -0.3px; }

/* ---------- CMYK registration bar ---------- */
.cmyk-bar { display: flex; height: 4px; }
.cmyk-bar > span { flex: 1; }
.cmyk-bar > span:nth-child(1) { background: var(--cyan); }
.cmyk-bar > span:nth-child(2) { background: var(--magenta); }
.cmyk-bar > span:nth-child(3) { background: var(--yellow); }
.cmyk-bar > span:nth-child(4) { background: var(--key); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 243, 0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  min-height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 18px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--key);
}
.brand span {
  font-family: 'Kanit', sans-serif; font-weight: 800;
  font-size: 22px; letter-spacing: 0.2px;
}
.nav-links {
  display: flex; align-items: center; gap: 24px;
  font-size: 14.5px; font-weight: 500;
  margin-left: auto;
}
.nav-links a { text-decoration: none; transition: color .12s ease; }
.nav-links a:not(.btn) { color: var(--ink-2); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 40px; padding: 9px 8px;
  border: 1px solid var(--hair); border-radius: 10px;
  background: var(--card); cursor: pointer;
  box-shadow: var(--sh-sm);
}
.nav-burger span { display: block; height: 2.5px; background: var(--ink); border-radius: 2px; }

/* ---------- Services dropdown ---------- */
.nav-dd { position: relative; }
.nav-dd-trigger { display: inline-flex; align-items: center; gap: 5px; }
.nav-dd-caret { font-size: 10px; transition: transform .15s ease; }
.nav-dd::after { content: ""; position: absolute; left: -8px; right: -8px; top: 100%; height: 16px; } /* hover bridge across the gap */
.nav-dd-menu {
  display: none; position: absolute; top: calc(100% + 14px); left: 0;
  background: var(--card); border: 1px solid var(--hair); border-radius: 14px;
  box-shadow: var(--sh-md); padding: 10px; min-width: 244px; z-index: 60;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { display: block; }
.nav-dd:hover .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu a { display: block; padding: 8px 11px; border-radius: 9px; font-size: 14px; white-space: nowrap; color: var(--ink-2); transition: background .12s ease, color .12s ease; }
.nav-dd-menu a:hover { background: var(--paper-2); color: var(--ink); }
.nav-dd-all { font-family: 'Kanit', sans-serif; font-weight: 700; color: var(--ink) !important; margin-bottom: 4px; }
.nav-dd-group { display: block; font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .5px; color: var(--ink-3); padding: 9px 11px 3px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: 'Kanit', sans-serif; text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.btn-cta {
  background: var(--ink); color: var(--cream);
  padding: 10px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px;
  box-shadow: var(--sh-sm);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn-lg { padding: 14px 30px; border-radius: 13px; font-size: 17px; }
.btn-primary { background: var(--ink); color: var(--cream); font-weight: 600; box-shadow: var(--sh-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.btn-outline { background: var(--card); color: var(--ink); font-weight: 600; border: 1px solid var(--hair); box-shadow: var(--sh-sm); }
.btn-outline:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn-dark { background: var(--ink); color: var(--cream); font-weight: 600; box-shadow: var(--sh-md); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: 1.8px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px;
}
.pill-dark { background: var(--ink); color: var(--cream); }
.pill-yellow { background: var(--paper-2); color: var(--ink); }
.pill-yellow::before { content: ""; width: 16px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta) 45%, var(--yellow)); }
.dots { display: flex; gap: 4px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; }
.dots span:nth-child(1) { background: var(--cyan); }
.dots span:nth-child(2) { background: var(--magenta); }
.dots span:nth-child(3) { background: var(--yellow); }

.mark-c { box-shadow: inset 0 -0.42em 0 var(--cyan-soft); }
.mark-y { box-shadow: inset 0 -0.42em 0 var(--yellow-soft); }
.mark-p { box-shadow: inset 0 -0.4em 0 var(--magenta-soft); }
.tag {
  font-size: 12.5px; font-weight: 500; background: var(--card);
  border: 1px solid var(--hair); padding: 4px 13px; border-radius: 999px;
  display: inline-block; box-shadow: var(--sh-sm);
}
.chip-brand {
  font-style: normal; color: var(--cream); background: var(--ink);
  padding: 0 14px; display: inline-block; transform: none;
  border-radius: 7px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--hair); border-radius: 20px;
  padding: 30px 26px; box-shadow: var(--sh-sm);
  position: relative;
}
.card-sm { border-radius: 16px; padding: 24px 22px; box-shadow: var(--sh-sm); }
.grid { display: grid; gap: 24px; }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Section heading ---------- */
.head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.head h2 { font-weight: 700; font-size: clamp(28px, 4vw, 42px); line-height: 1.28; letter-spacing: -0.5px; }
.head p { margin-top: 12px; color: var(--muted); font-size: 15.5px; text-wrap: pretty; }
.head .pill { margin-bottom: 16px; }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--ink); overflow: hidden; padding: 13px 0;
}
.marquee-track {
  display: flex; gap: 22px; width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee-item {
  display: flex; align-items: center; gap: 22px; flex-shrink: 0;
  font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--cream); white-space: nowrap; letter-spacing: .3px;
}
.marquee-item i { font-style: normal; font-size: 16px; opacity: .5; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--hair);
  border-radius: 14px; overflow: hidden; box-shadow: var(--sh-sm);
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 14px; font-family: 'Kanit', sans-serif;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .x {
  font-family: 'Kanit', sans-serif; font-size: 22px; font-weight: 600;
  color: var(--ink-3); flex-shrink: 0; line-height: 1; transition: transform .2s ease, color .2s ease;
}
.faq details[open] .x { transform: rotate(45deg); color: var(--ink); }
.faq .body { padding: 0 22px 18px; font-size: 14.8px; color: var(--muted); }
.faq .body a { color: var(--magenta-ink); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #B7B7C0; padding: 60px 0 34px; font-size: 14px; }
.footer .cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 34px; margin-bottom: 38px;
}
.footer h4 { color: var(--cream); font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { color: #B7B7C0; text-decoration: none; transition: color .12s ease; }
.footer a:hover { color: #fff; }
.footer .brand span { color: var(--cream); }
.footer .credit {
  border-top: 1px solid rgba(250, 248, 243, 0.14); padding-top: 22px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap; font-size: 12.5px; color: #83838E; text-align: center;
}
.footer .credit b { color: #C9C4B8; font-weight: 500; }

/* ---------- Floating chat ---------- */
.chat-fab {
  font-family: 'Kanit', sans-serif; position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 9px;
  background: var(--ink); color: var(--cream); text-decoration: none;
  padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; box-shadow: var(--sh-md);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.chat-fab::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta)); flex-shrink: 0; }
.chat-fab:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; padding: clamp(52px, 8vw, 92px) 0 clamp(48px, 7vw, 80px);
  background-image: radial-gradient(rgba(20,20,26,0.05) 1px, transparent 1.2px);
  background-size: 24px 24px; background-position: 0 0;
}
.hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250,248,243,0.7), rgba(250,248,243,0.95)); }
.hero-inner {
  position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 44px; align-items: center;
}
.hero h1 {
  font-weight: 700; line-height: 1.14;
  font-size: clamp(38px, 5.4vw, 62px); letter-spacing: -0.8px;
}
.hero h1 em { font-style: normal; }
.hero-lead { margin: 22px 0 30px; font-size: 17px; color: var(--muted); max-width: 520px; text-wrap: pretty; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 20px; }

/* ---------- Responsive: mobile nav fix ---------- */
@media (max-width: 820px) {
  .nav-burger { display: flex; }
  .nav-links {
    display: none; order: 3; flex-basis: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    margin-left: 0; padding: 8px 0 6px;
  }
  .nav-links a:not(.btn) { padding: 12px 6px; border-top: 1px solid var(--hair); }
  .nav-links .btn { justify-content: center; margin-top: 8px; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  /* dropdown becomes an inline expanded list on mobile */
  .nav-dd { width: 100%; }
  .nav-dd::after { display: none; }
  .nav-dd-caret { display: none; }
  .nav-dd-menu, .nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu {
    display: block; position: static; background: transparent;
    border: none; box-shadow: none; padding: 2px 0 4px 14px; min-width: 0; z-index: auto;
  }
  .nav-dd-menu a { border-top: none !important; padding: 9px 6px; }
  .nav-dd-group { padding: 8px 6px 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .btn, .card, .chat-fab { transition: none !important; }
}
