/* ==========================================================================
   Lab Connect — Landing page styles
   Theme: tech clean / ฟ้า–ขาว
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces & ink */
  --paper:       #ffffff;
  --mist:        #f2f7fb;
  --panel:       #ffffff;
  --ink:         #0b1b2b;
  --slate:       #5a7086;
  --line:        #dce7f0;
  --line-strong: #c3d6e6;

  /* Accent — สีเน้นสีเดียวทั้งหน้า */
  --azure:       #0f73e8;
  --azure-deep:  #0a55ad;
  --azure-soft:  #e7f1fe;
  --cyan:        #22b8e6;

  /* Semantic status — แยกจากสี accent */
  --signal:      #16a97f;
  --signal-soft: #e4f6ef;
  --amber:       #c9781f;
  --amber-soft:  #fbefe0;
  --alert:       #d0455b;

  /* Effects */
  --grid:        rgba(15, 115, 232, .07);
  --lift:        0 1px 2px rgba(11, 27, 43, .04), 0 18px 40px -26px rgba(11, 27, 43, .35);
  --lift-soft:   0 1px 2px rgba(11, 27, 43, .04), 0 10px 24px -20px rgba(11, 27, 43, .3);

  /* Type */
  --face-display: "IBM Plex Sans Thai", "Segoe UI", system-ui, sans-serif;
  --face-body:    "Anuphan", "IBM Plex Sans Thai", "Segoe UI", system-ui, sans-serif;
  --face-mono:    "IBM Plex Mono", "IBM Plex Sans Thai", ui-monospace, "Cascadia Mono", monospace;

  --step--2: .75rem;
  --step--1: .8125rem;
  --step-0:  1rem;
  --step-1:  1.0625rem;
  --step-2:  1.375rem;
  --step-3:  clamp(1.5rem, 1.2rem + 1.1vw, 1.9rem);
  --step-4:  clamp(1.9rem, 1.5rem + 1.7vw, 2.55rem);
  --step-5:  clamp(2.2rem, 1.6rem + 2.7vw, 3.35rem);

  /* Layout */
  --measure: 1140px;
  --gutter:  clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #0a121b;
    --mist:        #0e1926;
    --panel:       #101d2b;
    --ink:         #e7eef6;
    --slate:       #94a9bf;
    --line:        #1e2f42;
    --line-strong: #2b4157;

    --azure:       #52a0ff;
    --azure-deep:  #8bc0ff;
    --azure-soft:  #11263e;
    --cyan:        #45cdf5;

    --signal:      #33c295;
    --signal-soft: #0e2b24;
    --amber:       #e0a054;
    --amber-soft:  #2c2113;
    --alert:       #f0788b;

    --grid:        rgba(82, 160, 255, .09);
    --lift:        0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -26px rgba(0, 0, 0, .8);
    --lift-soft:   0 1px 2px rgba(0, 0, 0, .35), 0 10px 24px -20px rgba(0, 0, 0, .7);
  }
}

:root[data-theme="dark"] {
  --paper:       #0a121b;
  --mist:        #0e1926;
  --panel:       #101d2b;
  --ink:         #e7eef6;
  --slate:       #94a9bf;
  --line:        #1e2f42;
  --line-strong: #2b4157;

  --azure:       #52a0ff;
  --azure-deep:  #8bc0ff;
  --azure-soft:  #11263e;
  --cyan:        #45cdf5;

  --signal:      #33c295;
  --signal-soft: #0e2b24;
  --amber:       #e0a054;
  --amber-soft:  #2c2113;
  --alert:       #f0788b;

  --grid:        rgba(82, 160, 255, .09);
  --lift:        0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -26px rgba(0, 0, 0, .8);
  --lift-soft:   0 1px 2px rgba(0, 0, 0, .35), 0 10px 24px -20px rgba(0, 0, 0, .7);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-body);
  font-size: var(--step-1);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--face-display);
  font-weight: 600;
  line-height: 1.26;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -.012em;
}

p { margin: 0; }

a { color: var(--azure); text-decoration: none; }
a:hover { color: var(--azure-deep); }

img, svg { max-width: 100%; }

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

::selection { background: var(--azure-soft); color: var(--ink); }

.shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  background: var(--azure);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
}
.skip-link:focus { left: 12px; color: #fff; }

/* Shared type helpers */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--face-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .09em;
  color: var(--azure);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--azure);
  border-radius: 2px;
}

/* กันไม่ให้ชื่อผลิตภัณฑ์ถูกตัดกลางคำขึ้นบรรทัดใหม่ */
.nb { white-space: nowrap; }

.mono {
  font-family: var(--face-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--step--1);
  letter-spacing: -.01em;
}

/* Section rhythm — จุดเดียวที่คุมระยะ ไม่ให้ cascade ตีกัน */
.band { padding-block: clamp(64px, 8vw, 104px); }
.band--mist { background: var(--mist); }
.band--edged { border-top: 1px solid var(--line); }

.band__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 64ch;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}
.band__head h2 { font-size: var(--step-4); }
.band__head p { color: var(--slate); max-width: 58ch; }

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--face-display);
  font-size: var(--step-0);
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--azure);
  color: #fff;
  box-shadow: var(--lift-soft);
}
.btn--primary:hover { background: var(--azure-deep); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--azure); color: var(--azure); }

.btn--sm { padding: 9px 18px; font-size: var(--step--1); }

/* --------------------------------------------------------------------------
   4. Masthead
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.masthead.is-stuck { border-bottom-color: var(--line); }

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--face-display);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: -.02em;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  flex: none;
  display: block;
  object-fit: contain;
}
/* โลโก้เป็นจุดสีเดียวของหัวเว็บ — wordmark แยกน้ำหนักแทนการใช้สี */
.brand__name b { color: inherit; font-weight: 700; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 30px;
}
.navlinks a {
  color: var(--slate);
  font-family: var(--face-display);
  font-size: var(--step-0);
  font-weight: 500;
  position: relative;
  padding-block: 4px;
}
.navlinks a:hover { color: var(--ink); }
.navlinks a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--azure);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.navlinks a:hover::after { transform: scaleX(1); }

.masthead__cta { display: flex; align-items: center; gap: 12px; }

.navtoggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(52px, 7vw, 92px) clamp(60px, 8vw, 104px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(115% 80% at 72% 6%, #000 0%, transparent 72%);
  mask-image: radial-gradient(115% 80% at 72% 6%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero__copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; min-width: 0; }

.hero h1 {
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -.028em;
  line-height: 1.18;
}
.hero h1 em { font-style: normal; color: var(--azure); }

.hero__lede { color: var(--slate); font-size: 1.125rem; max-width: 46ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 6px;
  color: var(--slate);
  font-size: var(--step-0);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { color: var(--signal); flex: none; }

/* Sync monitor — ใจความของ hero */
.monitor {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--lift);
  overflow: hidden;
  min-width: 0;
}

.monitor__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--mist) 70%, var(--panel));
}
.monitor__title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--face-mono);
  font-size: var(--step--1);
  color: var(--ink);
  font-weight: 500;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--signal) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 0%, transparent); }
}

.tag {
  font-family: var(--face-display);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--slate);
  background: var(--mist);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.monitor__cols,
.monitor__row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(0, .95fr) 92px 46px;
  gap: 13px;
  align-items: center;
  padding: 11px 16px;
}
.monitor__cols {
  font-family: var(--face-display);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--slate);
  border-bottom: 1px solid var(--line);
  padding-block: 9px;
}
.monitor__cols span:nth-child(5) { text-align: right; }

.monitor__row {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  font-size: var(--step--1);
}
.monitor__row:last-child { border-bottom: 0; }
.monitor__row.is-new { animation: rowin .55s ease-out; }
@keyframes rowin {
  from { background: var(--azure-soft); }
  to   { background: transparent; }
}

.monitor__body { min-height: 268px; }

.site-id { font-family: var(--face-mono); color: var(--azure); font-weight: 500; font-size: var(--step--1); }
.site-name { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.machine-id,
.row-time {
  font-family: var(--face-mono);
  font-variant-numeric: tabular-nums;
  color: var(--slate);
  font-size: var(--step--2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-time { text-align: right; }

.conn-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--face-display);
  font-size: var(--step--2);
  font-weight: 600;
  color: var(--signal);
  white-space: nowrap;
}
.conn-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.monitor__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--mist) 70%, var(--panel));
  font-family: var(--face-mono);
  font-size: var(--step--2);
  color: var(--slate);
}
.monitor__foot b { color: var(--signal); font-weight: 500; }

/* --------------------------------------------------------------------------
   6. Assurance strip
   -------------------------------------------------------------------------- */
.assure {
  border-block: 1px solid var(--line);
  background: var(--mist);
}
.assure__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.assure__list li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 22px 0 22px 28px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--step-0);
  min-width: 0;
}
.assure__list li:first-child { border-left: 0; padding-left: 0; }
.assure__list svg { color: var(--azure); flex: none; }

/* --------------------------------------------------------------------------
   7. Flow — ลำดับเดินทางของข้อมูล (เป็นลำดับจริง จึงใส่เลขกำกับ)
   -------------------------------------------------------------------------- */
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.flow__step {
  padding: 0 26px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}
.flow__step:first-child { border-left: 0; padding-left: 0; }
.flow__step:last-child { padding-right: 0; }

.flow__index {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--face-mono);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--azure);
}
.flow__index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--azure), color-mix(in srgb, var(--azure) 0%, transparent));
}
.flow__step:last-child .flow__index::after {
  flex: 0 0 16px;
  background: var(--azure);
}

.flow__step h3 { font-size: var(--step-2); }
.flow__step p { color: var(--slate); font-size: var(--step-0); }
.flow__step code {
  font-family: var(--face-mono);
  font-size: var(--step--2);
  color: var(--slate);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
  align-self: flex-start;
}
.band--mist .flow__step code { background: var(--paper); }

/* --------------------------------------------------------------------------
   8. Capabilities — ตารางเส้นบาง แทนกองการ์ด
   -------------------------------------------------------------------------- */
.caps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.caps__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(24px, 3vw, 34px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color .2s ease;
  min-width: 0;
}
.caps__item:hover { background: var(--mist); }

.caps__icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--azure-soft);
  color: var(--azure);
  flex: none;
}
.caps__item h3 { font-size: var(--step-2); }
.caps__item p { color: var(--slate); font-size: var(--step-0); }

/* --------------------------------------------------------------------------
   9. Security
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.split__intro { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.split__intro h2 { font-size: var(--step-4); }
.split__intro p { color: var(--slate); }

.specs { display: flex; flex-direction: column; min-width: 0; }
.specs__row {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.specs__row:last-child { border-bottom: 1px solid var(--line); }
.specs__key {
  font-family: var(--face-mono);
  font-size: var(--step--1);
  color: var(--azure);
  letter-spacing: -.01em;
}
.specs__val { color: var(--ink); font-size: var(--step-0); }

/* --------------------------------------------------------------------------
   10. Contact
   -------------------------------------------------------------------------- */
.split--contact { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }

.contact__next {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact__next li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink);
  font-size: var(--step-0);
}
.contact__next svg { color: var(--azure); flex: none; margin-top: 5px; }

.contact__direct {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--step-0);
  color: var(--slate);
}
.contact__direct a { font-family: var(--face-mono); font-size: var(--step-0); }

/* Form */
.form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--lift);
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--wide { grid-column: 1 / -1; }

.field label {
  font-family: var(--face-display);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}
.field label span { color: var(--alert); margin-inline-start: 2px; }

.field input,
.field select,
.field textarea {
  font-family: var(--face-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px 13px;
  width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.65; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 49%, var(--slate) 50%, var(--slate) 58%, transparent 59%),
                    linear-gradient(-45deg, transparent 49%, var(--slate) 50%, var(--slate) 58%, transparent 59%);
  background-size: 9px 9px, 9px 9px;
  background-position: right 20px center, right 14px center;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--slate) 70%, transparent); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--azure) 16%, transparent);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--alert); }

.field__err {
  font-size: var(--step--2);
  color: var(--alert);
  display: none;
}
.field.is-invalid .field__err { display: block; }

.form__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 2px;
}
.form__note { color: var(--slate); font-size: var(--step--1); max-width: 34ch; }

.form__status {
  grid-column: 1 / -1;
  display: none;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 9px;
  font-size: var(--step-0);
  border: 1px solid transparent;
  line-height: 1.6;
}
.form__status.is-shown { display: flex; }
.form__status.is-ok { background: var(--signal-soft); border-color: color-mix(in srgb, var(--signal) 32%, transparent); color: var(--ink); }
.form__status.is-bad { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 32%, transparent); color: var(--ink); }
.form__status svg { flex: none; margin-top: 4px; }
.form__status.is-ok svg { color: var(--signal); }
.form__status.is-bad svg { color: var(--amber); }

.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 46px 32px;
  background: var(--paper);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px 48px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.footer__about { display: flex; flex-direction: column; gap: 12px; max-width: 40ch; }
.footer__about p { color: var(--slate); font-size: var(--step-0); }

.footer__nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__nav h4 {
  font-size: var(--step--1);
  letter-spacing: .07em;
  color: var(--slate);
  margin-bottom: 12px;
  font-weight: 600;
}
.footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer__nav a { color: var(--ink); font-size: var(--step-0); }
.footer__nav a:hover { color: var(--azure); }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  color: var(--slate);
  font-size: var(--step--1);
}
.footer__base .mono { color: var(--slate); }

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { max-width: 62ch; }
  .split, .split--contact { grid-template-columns: minmax(0, 1fr); }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
  .flow__step:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 860px) {
  .navlinks {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--lift);
    padding: 6px var(--gutter) 16px;
    display: none;
  }
  .navlinks.is-open { display: flex; }
  .navlinks a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .navlinks a::after { display: none; }
  .navtoggle { display: inline-flex; }
  .masthead__cta .btn { display: none; }

  .assure__list { grid-template-columns: 1fr; }
  .assure__list li { border-left: 0; padding: 14px 0; border-top: 1px solid var(--line); }
  .assure__list li:first-child { border-top: 0; }

  .specs__row { grid-template-columns: 1fr; gap: 5px; }
}

@media (max-width: 620px) {
  body { font-size: var(--step-0); }
  .caps, .flow { grid-template-columns: minmax(0, 1fr); }
  .flow__step,
  .flow__step:first-child { padding: 0 0 0 20px; border-left: 2px solid var(--line); }
  .form { grid-template-columns: minmax(0, 1fr); }

  /* จอแคบ — เหลือ รหัสสาขา / สาขา / สถานะ */
  .monitor__cols,
  .monitor__row { grid-template-columns: 78px minmax(0, 1fr) 92px; }
  .monitor__cols span:nth-child(3),
  .monitor__cols span:nth-child(5),
  .monitor__row .machine-id,
  .monitor__row .row-time { display: none; }
  .monitor__body { min-height: 238px; }

  /* ปุ่มยาวในภาษาไทยต้องเรียงลงมา ไม่ดันความกว้างหน้าจอ */
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* --------------------------------------------------------------------------
   13. Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
