:root {
  color-scheme: light;
  --font-sans: "Noto Sans Thai", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #17202a;
  --muted: #637083;
  --paper: #fbfcf8;
  --surface: #ffffff;
  --line: rgba(23, 32, 42, 0.11);
  --blue: #2563eb;
  --green: #129575;
  --amber: #f0a92b;
  --coral: #e85d5a;
  --violet: #7c5cff;
  --soft: #f3f7f2;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  background: rgba(251, 252, 248, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  font-size: 14px;
  font-weight: 600;
}

.main-nav a {
  color: var(--muted);
}

.main-nav a:hover {
  color: var(--ink);
}

.language-toggle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  min-height: 38px;
  min-width: 86px;
  padding: 0 12px;
}

.hero {
  align-items: center;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcf8 58%, #f3f7f2 100%);
  display: grid;
  gap: clamp(34px, 6vw, 72px);
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  min-height: auto;
  overflow: hidden;
  padding: 136px clamp(22px, 7vw, 96px) 82px;
  position: relative;
}

.hero-content {
  color: var(--ink);
  max-width: 800px;
}

.eyebrow {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 14px;
}

.hero .eyebrow {
  color: var(--green);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(38px, 6vw, 72px);
  letter-spacing: 0;
  line-height: 1.17;
  margin: 0;
  max-width: 940px;
}

.hero-lede {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.85;
  margin: 24px 0 0;
  max-width: 780px;
}

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

.button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.hero-visual {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual img {
  display: block;
  width: 100%;
}

.stats-band {
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stats-band div {
  border-right: 1px solid var(--line);
  padding: 30px clamp(18px, 4vw, 52px);
}

.stats-band strong {
  display: block;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
}

.stats-band span {
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.section {
  padding: clamp(72px, 10vw, 124px) clamp(22px, 7vw, 96px);
}

.intro,
.tool-section {
  align-items: center;
  display: grid;
  gap: clamp(34px, 6vw, 76px);
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
}

.section-copy h2,
.section-heading h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: 0;
  line-height: 1.23;
  margin: 0;
}

.section-copy p:not(.eyebrow),
.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
  margin-top: 18px;
  max-width: 780px;
}

.image-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.image-panel img {
  display: block;
  width: 100%;
}

.section-heading {
  margin-bottom: 34px;
  max-width: 960px;
}

.feature-grid,
.command-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.command-deep-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 22px;
}

.feature-card,
.command-list article,
.command-deep-list article,
.tradeoff-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.feature-card h3,
.command-deep-list h3,
.workflow-step h3,
.tradeoff-grid h3 {
  font-size: 22px;
  letter-spacing: 0;
  margin: 14px 0 8px;
}

.feature-card p,
.command-deep-list p,
.workflow-step p,
.command-list p,
.tradeoff-grid li,
.quickstart p {
  color: var(--muted);
  margin: 0;
}

.feature-icon {
  color: var(--coral);
  font-weight: 900;
}

.workflow-section {
  background: var(--soft);
}

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

.workflow-step {
  border-left: 4px solid var(--green);
  padding: 0 20px 0 18px;
}

.workflow-step span {
  color: var(--green);
  font-size: 36px;
  font-weight: 900;
}

.commands-section {
  background: #fffaf0;
}

.command-list code {
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  padding: 9px 11px;
}

.tool-grid {
  display: grid;
  gap: 14px;
}

.tool-grid div {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 24px;
}

.tool-grid strong {
  font-size: 20px;
}

.tool-grid span {
  color: var(--muted);
  font-weight: 800;
}

.tradeoff-section {
  background: #f5f7fb;
}

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

.tradeoff-grid ul {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.pros {
  border-top: 6px solid var(--green) !important;
}

.limits {
  border-top: 6px solid var(--amber) !important;
}

/* ── Tech details expand panel ── */
.tech-details {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
}

.tech-details summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  user-select: none;
}

.tech-details summary::-webkit-details-marker {
  display: none;
}

.tech-details[open] summary {
  color: var(--ink);
  margin-bottom: 14px;
}

.tech-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tech-how {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.tech-code {
  background: #0b111e;
  border-radius: 6px;
  color: #c9d8f5;
  font-size: 12px;
  line-height: 1.75;
  margin: 0;
  overflow-x: auto;
  padding: 16px 18px;
  white-space: pre;
}

.quickstart {
  background: #17202a;
  color: #fff;
}

.quickstart .eyebrow {
  color: #8ef2d7;
}

.quickstart h2 {
  color: #fff;
}

.quickstart pre {
  background: #0b111e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #e7eefc;
  font-size: clamp(13px, 1.4vw, 16px);
  overflow-x: auto;
  padding: 24px;
}

.quickstart p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 820px;
}

.site-footer {
  align-items: center;
  background: #0b111e;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  justify-content: space-between;
  padding: 26px clamp(22px, 7vw, 96px);
}

.site-footer span:first-child {
  color: #fff;
  font-weight: 900;
}

@media (max-width: 920px) {
  .main-nav {
    display: none;
  }

  .intro,
  .hero,
  .tool-section,
  .tradeoff-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .command-deep-list,
  .command-list,
  .workflow,
  .stats-band {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 112px;
  }

  .feature-grid,
  .command-list,
  .workflow,
  .stats-band {
    grid-template-columns: 1fr;
  }

  .stats-band div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .tool-grid div,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
