/* =========================================================
   101 Sahapanich — v2.0.0
   ========================================================= */
:root {
  --navy-900: #0d1730;
  --navy-800: #14213d;
  --navy-700: #1f3155;
  --navy-100: #e7ebf3;
  --gold-500: #c8a45d;
  --gold-600: #a9853f;
  --gold-100: #f6efe0;
  --white: #ffffff;
  --gray-50: #f7f8fa;
  --gray-100: #eef1f5;
  --gray-200: #e1e6ed;
  --gray-500: #6b7686;
  --gray-700: #3a4557;
  --gray-900: #1b2433;

  --font: "IBM Plex Sans Thai", "Noto Sans Thai", Tahoma, system-ui, sans-serif;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(13, 23, 48, 0.06), 0 2px 8px rgba(13, 23, 48, 0.05);
  --shadow: 0 12px 32px rgba(13, 23, 48, 0.10);
  --shadow-lg: 0 24px 60px rgba(13, 23, 48, 0.22);
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--gray-900); line-height: 1.3; margin: 0; font-weight: 700; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
  text-align: center;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  background: var(--gold-500);
  color: var(--navy-900);
  box-shadow: 0 8px 20px rgba(200, 164, 93, 0.35);
}
.button.primary:hover { background: #d4b36f; }
.button.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.button.ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.06); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 44px; height: 44px; flex: none; border-radius: 10px; }
.brand-text { display: grid; line-height: 1.25; }
.brand-th { color: var(--navy-800); font-weight: 700; font-size: 1.08rem; }
.brand-en { color: var(--gray-500); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  position: relative;
  padding: 8px 14px;
  color: var(--gray-700);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--navy-800); background: var(--gray-100); }
.main-nav a.is-active { color: var(--navy-800); }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-500);
}
.main-nav a.nav-cta {
  margin-left: 8px;
  padding: 9px 20px;
  background: var(--navy-800);
  color: var(--white);
  font-weight: 600;
}
.main-nav a.nav-cta:hover { background: var(--navy-700); }
.main-nav a.nav-cta::after { display: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  place-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  margin-inline: auto;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 128px) 0 clamp(88px, 11vw, 140px);
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(200, 164, 93, 0.22), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(64, 98, 170, 0.35), transparent 60%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgba(200, 164, 93, 0.4);
  border-radius: 999px;
  background: rgba(200, 164, 93, 0.1);
  color: #e6cf9f;
  font-size: 0.88rem;
  font-weight: 600;
}
.eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(200, 164, 93, 0.22);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.h1-line { display: block; }
.h1-line.accent {
  background: linear-gradient(90deg, #f1dcab, var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-en {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.14em;
}

.hero-text {
  max-width: 600px;
  margin-top: 24px;
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.hero-card-title {
  margin-bottom: 8px;
  color: var(--gold-500);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.facts { margin: 0; }
.facts div { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.facts dt { color: rgba(255, 255, 255, 0.55); font-size: 0.84rem; }
.facts dd { margin: 2px 0 0; color: var(--white); font-weight: 600; line-height: 1.5; }
.hero-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: #e6cf9f;
  font-weight: 600;
  font-size: 0.95rem;
}
.hero-card-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hero-card-link:hover { color: var(--white); }

/* ---------- Values strip ---------- */
.values { position: relative; z-index: 2; margin-top: -48px; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}
.value {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 26px 24px;
}
.value + .value { border-left: 1px solid var(--gray-200); }
.value svg {
  flex: none;
  width: 42px; height: 42px;
  padding: 9px;
  border-radius: 12px;
  background: var(--gold-100);
  fill: none;
  stroke: var(--gold-600);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.value strong { display: block; color: var(--gray-900); font-weight: 600; line-height: 1.4; }
.value span { display: block; margin-top: 2px; color: var(--gray-500); font-size: 0.88rem; line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 112px) 0; }
.section-muted { background: var(--gray-50); }

.section-heading { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-heading.left { margin: 0; text-align: left; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--gold-600);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.section-label::before {
  content: "";
  width: 24px; height: 2px;
  border-radius: 2px;
  background: var(--gold-500);
}
.section-heading h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.section-heading p:not(.section-label) { margin-top: 16px; color: var(--gray-500); font-size: 1.04rem; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.about-copy p + p { margin-top: 16px; }
.about-copy .lead { color: var(--gray-900); font-size: 1.18rem; font-weight: 500; line-height: 1.8; }
.checklist { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 36px; color: var(--gray-900); font-weight: 500; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8a45d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.br-desktop { display: inline; }
.nw { white-space: nowrap; }

/* Business cards */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-icon {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--navy-800);
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--gold-500); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.1rem; }
.card p { margin-top: 10px; color: var(--gray-500); font-size: 0.95rem; }

/* Categories */
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.category {
  position: relative;
  overflow: hidden;
  padding: 34px 30px 32px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--gray-50), var(--white));
  border: 1px solid var(--gray-200);
}
.category::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gold-500);
}
.category-no { display: block; margin-bottom: 14px; color: var(--gold-600); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em; }
.category h3 { font-size: 1.25rem; }
.category p { margin-top: 10px; color: var(--gray-500); }
.note { margin-top: 32px; text-align: center; color: var(--gray-500); }
.note a { color: var(--navy-800); font-weight: 600; border-bottom: 1.5px solid var(--gold-500); }
.note a:hover { color: var(--gold-600); }

/* Process */
.section-dark {
  color: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(200, 164, 93, 0.16), transparent 60%),
    var(--navy-800);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .section-label { color: #e6cf9f; }
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  padding: 30px 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}
.step-no {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 1.1rem;
}
.steps h3 { font-size: 1.1rem; }
.steps p { margin-top: 8px; font-size: 0.95rem; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.contact-grid .section-heading p:not(.section-label) { margin-top: 16px; color: var(--gray-500); }
.contact-grid .button { margin-top: 30px; }
.contact-card {
  padding: 10px 30px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}
.contact-row { display: flex; align-items: center; gap: 18px; padding: 20px 0; }
.contact-row + .contact-row { border-top: 1px solid var(--gray-100); }
.contact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--navy-100);
}
.contact-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--navy-800); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-label { display: block; color: var(--gray-500); font-size: 0.85rem; }
.contact-row a, .contact-row strong { display: block; color: var(--gray-900); font-weight: 600; }
.contact-row a:hover { color: var(--gold-600); }
.pending { display: block; color: var(--gray-500); font-style: italic; }

/* ---------- Footer ---------- */
.site-footer { padding-top: 56px; background: var(--navy-900); color: rgba(255, 255, 255, 0.62); font-size: 0.92rem; }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 36px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-th { color: var(--white); font-weight: 600; }
.footer-en { font-size: 0.75rem; letter-spacing: 0.08em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer-nav a:hover, .footer-bottom a:hover { color: var(--gold-500); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .card-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value:nth-child(3) { border-left: 0; }
  .value:nth-child(n + 3) { border-top: 1px solid var(--gray-200); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: grid; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
  .main-nav a.is-active::after { display: none; }
  .main-nav a.is-active { background: var(--gray-100); }
  .main-nav a.nav-cta { margin: 8px 0 0; text-align: center; }

  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 560px; }
  .category-grid { grid-template-columns: 1fr; }
  .br-desktop { display: none; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .brand-mark { width: 38px; height: 38px; }
  .brand-th { font-size: 1rem; }
  .brand-en { font-size: 0.62rem; }
  .hero-actions .button { width: 100%; }
  .hero-card { padding: 24px; }
  .card-grid, .steps, .values-grid { grid-template-columns: 1fr; }
  .value + .value { border-left: 0; border-top: 1px solid var(--gray-200); }
  .contact-card { padding: 6px 20px; }
  .contact-grid .button { width: 100%; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .nav-toggle, .hero-actions, .hero::before { display: none; }
  .hero, .section-dark { background: none; color: #000; }
  .hero h1, .h1-line.accent, .section-dark h2, .section-dark h3 { color: #000; -webkit-text-fill-color: #000; }
}
