:root {
  --brand: #b5222a;
  --brand-dark: #7f151b;
  --brand-soft: #fff1f2;
  --ink: #17202a;
  --ink-soft: #52606d;
  --line: #e4e9ee;
  --paper: #ffffff;
  --surface: #f6f7f8;
  --warm: #f4eadf;
  --success: #1f7a55;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 16px 45px rgba(27, 36, 44, 0.11);
  --content: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

h1, h2, h3, h4 {
  margin: 0 0 0.65em;
  color: var(--ink);
  line-height: 1.28;
  letter-spacing: -0.018em;
}

h1 { font-size: clamp(2.35rem, 5vw, 4.6rem); }
h2 { font-size: clamp(1.85rem, 3.7vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.52rem); }
p { margin: 0 0 1.15em; }

.container {
  width: min(calc(100% - 36px), var(--content));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 36px), 780px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(228, 233, 238, 0.9);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.15;
}

.brand img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.brand span small {
  display: block;
  margin-top: 4px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 9px 11px;
  color: var(--ink);
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.site-nav .nav-cta {
  margin-left: 6px;
  padding-inline: 16px;
  color: #fff;
  background: var(--brand);
}

.site-nav .nav-cta:hover { color: #fff; background: var(--brand-dark); }

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1.35rem;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0;
  background:
    radial-gradient(circle at 8% 10%, rgba(181, 34, 42, 0.12), transparent 28%),
    linear-gradient(145deg, #fff 0%, #f7f4f2 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -42% auto;
  width: 460px;
  aspect-ratio: 1;
  background: var(--brand);
  border-radius: 50%;
  opacity: 0.055;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 3px;
  background: var(--brand);
  border-radius: 9px;
}

.hero h1 strong { color: var(--brand); }
.hero-line { display: block; }

.lead {
  max-width: 720px;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(181, 34, 42, 0.22);
  transform: translateY(-2px);
}

.btn-outline { color: var(--brand-dark); background: transparent; }
.btn-outline:hover { color: #fff; }
.btn-light { color: var(--ink); background: #fff; border-color: #fff; }
.btn-light:hover { color: var(--brand-dark); background: #fff; }

.hero-media {
  position: relative;
  min-height: 470px;
}

.hero-media > img {
  width: 100%;
  height: 470px;
  object-fit: cover;
  border-radius: 26px 26px 80px 26px;
  box-shadow: var(--shadow);
}

.hero-note {
  position: absolute;
  left: -24px;
  bottom: 24px;
  max-width: 280px;
  padding: 16px 18px;
  background: #fff;
  border-left: 5px solid var(--brand);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  font-weight: 700;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.trust-item {
  padding: 14px 12px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.trust-item strong { display: block; color: var(--brand-dark); font-size: 1.15rem; }
.trust-item span { color: var(--ink-soft); font-size: 0.82rem; }

.section { padding: clamp(66px, 8vw, 104px) 0; }
.section-alt { background: var(--surface); }
.section-dark { color: #fff; background: #1d242b; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lead, .section-dark p { color: #d4dbe1; }

.section-header {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-header.center { margin-inline: auto; text-align: center; }
.section-header.center .eyebrow { justify-content: center; }
.section-header.center .eyebrow::before { display: none; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.card {
  height: 100%;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card:hover { border-color: #d7b8ba; box-shadow: 0 12px 32px rgba(32, 41, 50, 0.08); }
.card p:last-child { margin-bottom: 0; }

.service-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-card .icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 13px;
  font-size: 1.45rem;
}

.service-card p { color: var(--ink-soft); }
.text-link { margin-top: auto; font-weight: 800; text-decoration: none; }
.text-link::after { content: " →"; }

.project-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.project-card .content { padding: 22px; }
.project-card p { color: var(--ink-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }
.tag {
  padding: 5px 9px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 750;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fact { padding: 28px 20px; background: #fff; text-align: center; }
.fact strong { display: block; color: var(--brand); font-size: 1.55rem; }
.fact span { color: var(--ink-soft); font-size: 0.88rem; }

.steps { counter-reset: steps; }
.step { position: relative; padding-left: 76px; }
.step::before {
  counter-increment: steps;
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-weight: 900;
}

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; margin: 10px 0; padding-left: 30px; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 900;
}

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 44px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  border-radius: 24px;
}

.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band p { max-width: 720px; color: #ffe8e9; }

.page-hero {
  padding: 54px 0 62px;
  background: linear-gradient(145deg, #fff 0%, #f7f3f1 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 { max-width: 960px; font-size: clamp(2.25rem, 5vw, 4rem); }
.breadcrumbs { margin-bottom: 20px; color: var(--ink-soft); font-size: 0.88rem; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs span { margin: 0 8px; }

.answer-box,
.experience-box,
.note-box {
  margin: 24px 0;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
}

.answer-box { background: var(--brand-soft); border-left: 5px solid var(--brand); }
.experience-box { background: #edf7f1; border-left: 5px solid var(--success); }
.note-box { background: #fff8e8; border-left: 5px solid #c98917; }
.answer-box p:last-child, .experience-box p:last-child, .note-box p:last-child { margin-bottom: 0; }

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 280px;
  align-items: start;
  justify-content: space-between;
  gap: 58px;
}

.article-content h2 { margin-top: 1.8em; }
.article-content h3 { margin-top: 1.55em; }
.article-content figure { margin: 32px 0; }
.article-content figure img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }
.article-content figcaption { margin-top: 10px; color: var(--ink-soft); font-size: 0.86rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 0 0 28px; color: var(--ink-soft); font-size: 0.88rem; }
.table-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.article-content table { width: 100%; min-width: 680px; border-collapse: collapse; background: #fff; }
.article-content th,
.article-content td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-content th { background: #f7f3f1; color: var(--ink); font-size: 0.9rem; }
.article-content tr:last-child td { border-bottom: 0; }

.toc {
  position: sticky;
  top: 104px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.toc strong { display: block; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { color: var(--ink-soft); font-size: 0.88rem; text-decoration: none; }
.toc a:hover { color: var(--brand); }

.faq-list { display: grid; gap: 12px; }
.faq-list details { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.faq-list summary { cursor: pointer; color: var(--ink); font-weight: 800; }
.faq-list details p { margin: 12px 0 0; color: var(--ink-soft); }

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.contact-card { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.contact-card address { font-style: normal; }

.floating-contact {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  color: #fff;
  background: #06a45a;
  border-radius: 99px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  font-weight: 850;
  text-decoration: none;
}

.floating-contact:hover { color: #fff; background: #07894d; }

.site-footer {
  padding: 60px 0 26px;
  color: #cbd2d9;
  background: #151b20;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 46px;
}

.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer a { color: #e6eaed; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 7px 0; }
.footer-bottom { margin-top: 38px; padding-top: 20px; border-top: 1px solid #2b333a; font-size: 0.82rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 980px) {
  .menu-toggle { display: grid; place-items: center; }
  .site-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    padding: 14px 18px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(0,0,0,0.08);
  }
  .site-nav.is-open { display: grid; }
  .site-nav .nav-cta { margin: 4px 0 0; text-align: center; }
  .hero-grid, .contact-grid, .article-shell { grid-template-columns: 1fr; }
  .hero-media { min-height: auto; }
  .hero-media > img { height: min(65vw, 500px); }
  .hero-note { left: 18px; }
  .grid-4, .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .toc { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  body { font-size: 16px; }
  .container, .narrow { width: min(calc(100% - 28px), var(--content)); }
  .brand span { display: none; }
  .hero { padding-top: 44px; }
  .hero-media > img { height: 360px; border-radius: 20px 20px 50px 20px; }
  .hero-note { right: 14px; left: 14px; bottom: 14px; max-width: none; }
  .trust-row, .grid-2, .grid-3, .grid-4, .fact-grid, .footer-grid { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
  .project-card img { height: 230px; }
  .cta-band { padding: 30px 24px; }
  .floating-contact { right: 12px; bottom: 12px; padding: 10px 14px; font-size: 0.88rem; }
}

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