/* Hallmark · shape: kept (10-page IA per docs/Design.md) · genre: editorial · theme: brand (docs/Design.md locked system) · redesign: polish · hero: kept (gradient hero: headline, one sentence, two actions) · nav: kept (sticky header, mobile drawer) · footer: kept (three-column mast) · signature: the proof strip of real project figures
 * axes: navy paper, red accent, white type · posture: restrained · surface: absolute · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · waive 26b · links and tel actions only, no form control and no aria-disabled anywhere on the site · the site has only links and tel actions, so no disabled state can exist */
/* Hallmark · waive 7b · dark theme per owner decision 2026-10-29 — navy surfaces only, no light paper anywhere · surface: absolute stays declared: the navy paper is the brand choice, and no #ffffff surface exists on the site */
/* Hallmark · dismissed 3 · the 3px red left accent on ref-list and note-block is the red-stripe brand element specified in docs/Design.md section 4, not a stray side stripe */
/* Hallmark · answered F21 · the expertise index puts h1 above card titles in h3 by IA design (no h2 level on the card grid) so the h1 to h3 step is intentional */
/* Hallmark · answered F7 · one hairline-edge box recipe across cards and list rows is the deliberate system language in docs/Design.md (thin navy-tint lines, 8px radius); roles are told apart by surface level and content, not by box styling */
/* ============================================================
   S.T. MASTERTECH — design system
   CI  : Navy / Signal Red / White  (docs/Design.md)
   Type: Inter (latin/numbers) + Prompt (Thai) — self-hosted
   ============================================================ */

@font-face {
  font-family: "Prompt";
  src: url("fonts/Prompt-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: optional;
}
@font-face {
  font-family: "Prompt";
  src: url("fonts/Prompt-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: optional;
}
@font-face {
  font-family: "Prompt";
  src: url("fonts/Prompt-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: optional;
}
@font-face {
  font-family: "Prompt";
  src: url("fonts/Prompt-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: optional;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --st-navy-950: #071828;
  --st-navy-900: #0a2134;
  --st-navy-800: #0f2a41;
  --st-navy-700: #16364f;
  --st-red: #f52c4b;
  --st-red-deep: #eb2341;
  --st-red-action: #da2444;
  --st-red-bright: #ff5d75;
  --st-white: #f8fbff;
  --st-text: #d4e1e9;
  --st-text-soft: #a6c1d2;
  --st-text-quiet: #5a7184;
  --st-light: #0f2a41;
  --st-line: rgba(166, 193, 210, .26);
  /* web implementation tokens (UI variation ตามแบบ --st-red-action — บันทึกใน docs/Design.md)
     Dark theme (เจ้าของสั่ง 2026-10-29): ทั้งเว็บพื้นกรมท่า — พื้นสว่างเดิมถูกแทนด้วยระดับกรมท่า 800/900
     --st-text-quiet ไม่ใช้บนเว็บนี้แล้ว (บนพื้นเข้มให้ 3.23:1) — ข้อความรองใช้ --st-text-soft */
  --st-ink-soft: #d4e1e9;
  --st-surface: #0a2134;
  --st-red-tint: rgba(245, 44, 75, .12);
  --st-red-ink: #ffb3bd;
  --st-line-dark: rgba(255, 255, 255, .07);
  --st-wash-dark: rgba(255, 255, 255, .08);
  --st-outline-line: rgba(248, 251, 255, .45);
  --st-red-wash: rgba(245, 44, 75, .18);
  --ink: #f8fbff;
  --muted: #a6c1d2;
  --content-max: 1200px;
  --radius: 8px;
  --font: "Inter", "Prompt", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-header: 0 10px 30px rgba(0, 0, 0, .25);
  --shadow-drawer: -20px 0 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--st-ink-soft);
  background: var(--st-surface);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px); }

:focus-visible { outline: 2px solid var(--st-red); outline-offset: 3px; border-radius: 3px; }

/* ---------- typography ---------- */
.eyebrow {
  font-family: "Inter", var(--font);
  font-weight: 600; font-size: 12.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--st-red-bright);
  margin-bottom: 16px;
}
.h2 {
  font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.28; color: var(--ink); letter-spacing: -.01em;
  text-wrap: balance;
}
.h2--light { color: var(--st-white); }
.lead { font-size: 20px; line-height: 1.7; color: var(--ink); font-weight: 400; margin-bottom: 18px; }
.muted { color: var(--muted); }
.footnote { font-size: 14.5px; color: var(--st-text-soft); margin-top: 14px; line-height: 1.65; }
.note-block { border-left: 3px solid var(--st-red); padding: 12px 16px; background: var(--st-red-tint); color: var(--st-red-ink); border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px;
  font-family: "Inter", var(--font); font-weight: 600; font-size: 15px;
  border-radius: 6px; border: 1px solid transparent; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.btn--red { background: var(--st-red-action); color: var(--st-white); }
.btn--red:hover { background: var(--st-red-deep); }
.btn--outline { border-color: var(--st-outline-line); color: var(--st-white); }
.btn--outline:hover { border-color: var(--st-white); background: var(--st-wash-dark); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--st-navy-950);
  border-bottom: 1px solid var(--st-line-dark);
  color: var(--st-white);
  transition: background .25s ease, box-shadow .25s ease;
}
.has-hero .site-header { background: transparent; border-bottom-color: transparent; }
.has-hero .site-header.scrolled { background: var(--st-navy-950); color: var(--st-white); border-bottom-color: var(--st-line-dark); box-shadow: var(--shadow-header); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }

.brand { display: flex; align-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: "Inter", var(--font); font-weight: 700; font-size: 17px; letter-spacing: .05em; }
.brand-text small { font-family: "Inter", var(--font); font-weight: 500; font-size: 10px; letter-spacing: .24em; color: var(--st-text-soft); text-transform: uppercase; margin-top: 4px; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav ul { display: flex; gap: 26px; }
.main-nav ul a {
  font-weight: 500; font-size: 15px; color: var(--st-text-soft);
  padding: 6px 0; position: relative;
}
.main-nav ul a:hover { color: var(--st-white); }
.main-nav ul a.is-active { color: var(--st-white); }
.main-nav ul a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--st-red);
}
.main-nav__cta { min-height: 44px; padding: 0 20px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--st-white); transition: transform .2s, opacity .2s; }

/* ============================================================
   HERO (home)
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--st-red-wash), transparent 60%),
    linear-gradient(160deg, var(--st-navy-800), var(--st-navy-950) 70%);
  color: var(--st-white);
  padding: clamp(90px, 13vh, 150px) 0 clamp(80px, 12vh, 130px);
  margin-top: -76px;            /* sit under transparent header */
}
.hero__inner { position: relative; z-index: 2; max-width: 840px; }
.hero__eyebrow {
  font-family: "Inter", var(--font); font-weight: 600; font-size: 13px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--st-red-bright);
  margin-bottom: 26px;
}
.hero__title {
  font-weight: 700; font-size: clamp(2rem, 4.6vw, 4.3rem);
  line-height: 1.16; letter-spacing: -.015em; margin-bottom: 24px;
  text-wrap: balance;
}
.hero__desc { font-size: 19px; line-height: 1.8; color: var(--st-text); font-weight: 400; max-width: 680px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }

/* ---------- page hero (interior) ---------- */
.page-hero {
  background:
    radial-gradient(900px 400px at 85% -20%, var(--st-red-wash), transparent 60%),
    linear-gradient(160deg, var(--st-navy-800), var(--st-navy-950));
  color: var(--st-white);
  padding: 72px 0 68px;
}
.page-hero__title { font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.page-hero__desc { margin-top: 16px; font-size: 18px; color: var(--st-text); max-width: 640px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--navy { background: linear-gradient(180deg, var(--st-navy-900), var(--st-navy-950)); color: var(--st-text); }
.section--light { background: var(--st-light); color: var(--st-text); }
.narrow { max-width: 760px; }

.grid--overview { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px 56px; align-items: start; }
.grid--expertise { display: grid; grid-template-columns: .85fr 1.15fr; gap: 28px 56px; align-items: start; margin-bottom: 8px; padding-bottom: 8px; }
.grid--contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px 56px; align-items: start; }

.section-more { margin-top: 28px; }

/* ---------- photo figures ---------- */
.photo-figure { margin: 0; border: 1px solid var(--st-line); border-radius: var(--radius); overflow: hidden; background: var(--st-surface); }
.photo-figure img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.photo-figure figcaption { font-size: 14px; color: var(--muted); padding: 12px 18px; border-top: 1px solid var(--st-line); line-height: 1.6; }
.tel-big a { font-family: "Inter", var(--font); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--st-red-bright); }
.tel-big { margin-bottom: 8px; }

.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px 56px; align-items: start; }
.split__body .muted { margin-bottom: 4px; }

/* ============================================================
   PROOF STRIP
   ============================================================ */
.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--st-line); margin-top: 40px; border: 1px solid var(--st-line); border-radius: var(--radius); overflow: hidden; }
.metric { background: var(--st-navy-900); color: var(--st-text-soft); padding: 28px 24px; }
.metric__num { display: block; font-family: "Inter", var(--font); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); color: var(--st-white); line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric__unit { display: block; font-weight: 600; color: var(--st-red-bright); font-size: 15px; margin: 8px 0 10px; }
.metric__note { font-size: 13.5px; line-height: 1.6; color: var(--st-text-soft); }

/* ============================================================
   CAPABILITY CARDS
   ============================================================ */
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 40px; }
.cap-card {
  display: flex; flex-direction: column; border-radius: var(--radius);
  background: var(--st-navy-900); color: var(--st-text);
  border: 1px solid var(--st-line);
  transition: transform .2s, border-color .2s;
}
.cap-card:hover { transform: translateY(-4px); border-color: var(--st-outline-line); }
.cap-card__body { padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cap-card__num {
  display: block; font-family: "Inter", var(--font); font-weight: 700; font-size: 28px;
  color: var(--st-red-bright); letter-spacing: .06em; line-height: 1;
  padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--st-line);
}
.cap-card__title { font-family: "Inter", var(--font); font-weight: 700; font-size: 20px; color: var(--st-white); line-height: 1.25; }
.cap-card__th { font-weight: 600; color: var(--st-text); font-size: 16px; }
.cap-card__blurb { font-size: 15px; line-height: 1.7; color: var(--st-text-soft); }
.cap-card__more { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--st-red-bright); }

/* ============================================================
   FLOW / LISTS
   ============================================================ */
.flow-list { margin-top: 22px; display: grid; gap: 14px; }
.flow-list li { display: flex; gap: 16px; align-items: baseline; padding: 14px 18px; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: var(--radius); color: var(--ink); }
.flow-list span { font-family: "Inter", var(--font); font-weight: 700; color: var(--st-red-bright); }

.check-list, .ref-list { margin-top: 8px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 26px; color: var(--ink); font-size: 16.5px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px;
  border: 2px solid var(--st-red); border-radius: 2px;
}
.ref-list li { padding: 16px 18px; background: var(--st-surface); border: 1px solid var(--st-line); border-left: 3px solid var(--st-red); border-radius: var(--radius); color: var(--ink); }

/* ============================================================
   PROJECTS
   ============================================================ */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; margin-top: 40px; }
.project-banner { margin: 48px 0 0; border: 1px solid var(--st-line); border-radius: var(--radius); overflow: hidden; background: var(--st-surface); }
.project-banner img { display: block; width: 100%; height: auto; }
.project-banner figcaption { padding: 12px 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.project-card {
  background: var(--st-surface); border: 1px solid var(--st-line); border-left: 3px solid var(--st-red); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 12px; color: var(--muted);
}
.project-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project-card__name { font-family: "Inter", var(--font); font-weight: 700; font-size: 19px; color: var(--ink); line-height: 1.3; margin: 0; }
.project-card__value { font-family: "Inter", var(--font); font-weight: 700; font-size: 16px; color: var(--st-red-bright); white-space: nowrap; font-variant-numeric: tabular-nums; }
.project-card__client { font-weight: 600; font-size: 14.5px; color: var(--st-text-soft); }
.project-card__scope { font-size: 15px; line-height: 1.7; color: var(--muted); }
.project-card__src { margin-top: auto; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }

/* ============================================================
   STEPS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 24px; margin-top: 40px; }
.step { border-top: 3px solid var(--st-red); padding-top: 22px; }
.step__num { font-family: "Inter", var(--font); font-weight: 700; font-size: 15px; color: var(--st-red-bright); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.step h3 { font-weight: 600; font-size: 19px; color: var(--st-white); margin: 10px 0 6px; }
.step p { font-size: 14.5px; color: var(--st-text-soft); }

/* ============================================================
   GLOSSARY / PAGER / CONTACT
   ============================================================ */
.glossary { margin-top: 30px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.gloss-item { background: var(--st-navy-900); border: 1px solid var(--st-line); border-radius: var(--radius); padding: 18px 20px; color: var(--muted); }
.gloss-item dt { font-family: "Inter", var(--font); font-weight: 700; color: var(--ink); font-size: 16px; }
.gloss-item dd { margin-top: 6px; font-size: 15px; color: var(--muted); }

.pager { display: flex; gap: 14px; flex-wrap: wrap; padding: 28px 0 60px; }

.contact-block { margin-top: 24px; }
.contact-block h3 { font-weight: 600; font-size: 19px; color: var(--ink); margin-bottom: 14px; }
.contact-block .muted { line-height: 1.8; }
.contact-tel { margin-top: 18px; font-size: 18px; }
.contact-tel .label { font-family: "Inter", var(--font); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--st-text-soft); display: block; }
.contact-tel a { font-family: "Inter", var(--font); font-weight: 700; font-size: 22px; color: var(--st-red-bright); }
.contact-aside { background: var(--st-light); border: 1px solid var(--st-line); border-radius: var(--radius); padding: 28px; color: var(--muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--st-navy-950); color: var(--st-text-soft); padding: 56px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px 56px; }
.footer-brand strong { font-family: "Inter", var(--font); font-weight: 700; color: var(--st-white); font-size: 17px; letter-spacing: .03em; }
.footer-brand p { margin-top: 6px; }
.footer-tag { color: var(--st-text-soft); font-size: 13px; letter-spacing: .06em; margin-top: 12px !important; }
.footer-nav ul { display: grid; gap: 10px; }
.footer-nav a:hover { color: var(--st-white); }
.footer-contact p { margin-bottom: 8px; }
.footer-contact a { color: var(--st-red); font-weight: 600; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--st-line-dark);
  color: var(--st-text-soft); font-size: 13px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw);
    flex-direction: column; align-items: flex-start; gap: 26px;
    background: var(--st-navy-950); color: var(--st-white); padding: 92px 28px 32px;
    transform: translateX(100%); transition: transform .25s ease;
    box-shadow: var(--shadow-drawer);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; width: 100%; gap: 8px; }
  .main-nav ul li { width: 100%; }
  .main-nav ul a { display: block; padding: 10px 0; font-size: 17px; }
  .main-nav__cta { width: 100%; margin-top: 6px; }
  .has-hero .main-nav { background: var(--st-navy-950); color: var(--st-white); }
}

@media (max-width: 960px) {
  .grid--overview, .split, .grid--contact { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .glossary { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .cap-grid { grid-template-columns: 1fr; }
  .proof-strip { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding: 110px 0 90px; }
  .project-card__head { flex-direction: column; gap: 6px; }
  .project-card__value { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}