/* tech.css: the "technology we run on" logo band of krobjobsystem.com (28 พ.ย. 2569).
   Position: between ส่วนที่ 7 ขั้นตอนเริ่มใช้ (#steps) and ส่วนที่ 8 คำถามที่พบบ่อย (#faq). The owner chose variant A on 28 พ.ย. 2569 (locked copy tech/final.html,
   placed in the composite docs/design/index.html), with no Claude logo. B and C stay in this file for the choice page and demo.html.
   One file serves the three variants: the section carries tech-a, tech-b or tech-c and that class only changes the layout.
     A (chosen by the owner): a thin white band. Kicker "เบื้องหลังระบบ" (same style as the FAQ kicker), the heading as a small h2,
        one centred row of nine logo + name items. No borders, no chips. Wraps to two rows on tablets, a 3 x 3 grid at phone width.
     B: two columns inside the 800 px FAQ column: kicker, h2 and one supporting sentence left, a 3 x 3 grid of logos right. Stacks on phones.
     C: chips like the owner's reference screenshot, in the Krobjob look: 1 px line border, 12 px corners, logo + name,
        centred wrapping rows, navy names. Heading only, no kicker.
   Logos: the official monochrome SVGs of Simple Icons (CC0), unedited, in tech/img/. An <img> cannot take fill: currentColor from the page,
   so each logo is painted with the CSS mask of its own file over a background in the logo colour --tech-logo-c (the img box keeps its src so it still loads,
   reports naturalWidth and is the fallback; padding pushes its own bitmap out of the content box).
   Colour (owner decision 28 พ.ย. 2569, replacing the first one-muted-colour design): every logo is painted in its real brand colour, the hex of
   Simple Icons 16.38.1, declared once as --brand-<slug> below and set as --tech-logo-c on its own .tech-logo-<slug> class. The owner's reason:
   "มีสีดีกว่า คนไทยดูแล้วไม่น่าเชื่อถือ" (grey logos read as less trustworthy to Thai buyers). The names stay --h-muted text.
   Brand logos are third-party marks, not UI colour, so the page still has a single gold and this band has none.
   Each logo has alt="" because its name is written beside it as text.
   Optical sizes: Simple Icons all sit in a 24 x 24 box, so wide marks (Cloudflare, MySQL) look smaller than round ones at the same height.
   --tech-s scales one logo, set per logo below, balanced by eye on the screenshots. The mask URL sits on the per-logo class (not in a custom
   property) so it always resolves against tech.css, whichever page links the file.
   Responsive rules use container queries: put the section in an element with class tech-frame (container-type: inline-size), the same
   pattern as .faq-frame, so the markup lays out by its real width on the site and inside the 390 px phone box of the choice page.
   No gold anywhere in this file. Thai text: no text-transform, letter-spacing only on the small kicker (same as faq.css).
   Colour tokens come from the page's :root block: --navy --white --h-ink --h-muted --h-line --h-tint --font-head --font-body.
   Every px and ms is declared once as a custom property, so the rules only ever use var(). */

/* ---------- container ---------- */
.tech-frame { container-type: inline-size; container-name: tech; }

/* ds-allow-hardcode:start */
.tech {
  --tech-logo: 24px;        /* logo height, the brief's base size */
  --tech-wrap: 1200px;      /* A and C: widest content */
  --tech-col: 800px;        /* B: the FAQ column width */
  --tech-fs-kicker: 14px;   /* same as the FAQ kicker */
  --tech-h2-min: 20px;      /* h2: clamp(20px, 0.8cqi + 12px, 24px), smaller than the FAQ title on purpose: the band is a footnote, not a section */
  --tech-h2-step: 12px;
  --tech-h2-max: 24px;
  --tech-fs-name: 15px;
  --tech-fs-name-m: 14px;
  --tech-fs-chip: 16px;
  --tech-fs-p: 16px;
  --tech-lh: 1.6;
  --tech-lh-h: 1.35;
  --tech-lh-name: 1.4;
  --tech-letter: 0.04em;
  --tech-measure: 30em;
  --tech-pad: 40px;         /* A: band padding top and bottom on wide screens (about 180 px total height) */
  --tech-pad-m: 32px;
  --tech-pad-b: 64px;       /* B and C: a little more air, they read as a small section */
  --tech-pad-b-m: 48px;
  --tech-gap-name: 8px;     /* logo to name */
  --tech-gap-row: 40px;     /* A: between items in the row */
  --tech-gap-row-v: 20px;   /* A: between wrapped rows */
  --tech-chip-h: 48px;
  --tech-chip-pad-l: 12px;
  --tech-chip-pad-r: 16px;
  --tech-chip-gap: 12px;
  --tech-radius: 12px;
  --tech-hair: 1px;
  --tech-s1: 4px;
  --tech-s2: 8px;
  --tech-s3: 12px;
  --tech-s4: 16px;
  --tech-s5: 20px;
  --tech-s6: 24px;
  --tech-s7: 32px;
  --tech-s8: 48px;
  --tech-gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --tech-gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --tech-bp-row: 640px;     /* reference only: below 640 px the A row becomes the 3 x 3 grid */
  --tech-chips: 720px;
  --tech-slot: 35px;        /* C phones: logo column as wide as the widest scaled logo (24 x 1.45), so the names line up */      /* C: width of the chip block, so the nine chips break 5 + 4 instead of 8 + 1 */
  /* colours */
  --tech-bg: var(--white);
  --tech-ink: var(--h-ink);
  --tech-title: var(--navy);
  --tech-muted: var(--h-muted);
  --tech-logo-c: var(--h-muted);
  --tech-line: var(--h-line);
  --tech-chip-bg: var(--white);
  --tech-sel: color-mix(in srgb, var(--navy) 16%, transparent);
  /* third-party brand colours, the hex of each icon in Simple Icons 16.38.1 (_data/simple-icons.json). They are exempt from the page palette
     by owner decision 28 พ.ย. 2569 ("มีสีดีกว่า คนไทยดูแล้วไม่น่าเชื่อถือ"); they paint only the logo marks, never text, buttons or surfaces. */
  --brand-laravel: #ff2d20;
  --brand-mysql: #4479a1;
  --brand-redis: #ff4438;
  --brand-nginx: #009639;
  --brand-cloudflare: #f38020;
  --brand-digitalocean: #0080ff;
  --brand-ubuntu: #e95420;
  --brand-github: #181717;
  --brand-sentry: #362d59;
  --brand-claude: #d97757;   /* only the answered Q2 chip of the choice page */
}
/* C: darker names inside the chips, closest to the reference (the logos keep their brand colours like A and B) */
.tech-c { --tech-name-c: var(--h-ink); }

/* per logo: mask file, brand colour, optical balance (Simple Icons boxes are 24 x 24; the scale grows the box, the mark stays centred) */
.tech-logo-laravel { -webkit-mask-image: url("img/laravel.svg"); mask-image: url("img/laravel.svg"); --tech-logo-c: var(--brand-laravel); --tech-s: 1.08; }
.tech-logo-mysql { -webkit-mask-image: url("img/mysql.svg"); mask-image: url("img/mysql.svg"); --tech-logo-c: var(--brand-mysql); --tech-s: 1.45; }
.tech-logo-redis { -webkit-mask-image: url("img/redis.svg"); mask-image: url("img/redis.svg"); --tech-logo-c: var(--brand-redis); }
.tech-logo-nginx { -webkit-mask-image: url("img/nginx.svg"); mask-image: url("img/nginx.svg"); --tech-logo-c: var(--brand-nginx); --tech-s: 0.96; }
.tech-logo-cloudflare { -webkit-mask-image: url("img/cloudflare.svg"); mask-image: url("img/cloudflare.svg"); --tech-logo-c: var(--brand-cloudflare); --tech-s: 1.45; }
.tech-logo-digitalocean { -webkit-mask-image: url("img/digitalocean.svg"); mask-image: url("img/digitalocean.svg"); --tech-logo-c: var(--brand-digitalocean); --tech-s: 0.96; }
.tech-logo-ubuntu { -webkit-mask-image: url("img/ubuntu.svg"); mask-image: url("img/ubuntu.svg"); --tech-logo-c: var(--brand-ubuntu); --tech-s: 0.96; }
.tech-logo-github { -webkit-mask-image: url("img/github.svg"); mask-image: url("img/github.svg"); --tech-logo-c: var(--brand-github); --tech-s: 0.96; }
.tech-logo-sentry { -webkit-mask-image: url("img/sentry.svg"); mask-image: url("img/sentry.svg"); --tech-logo-c: var(--brand-sentry); }
/* Claude: shown only in the answered owner box of the choice page (Q2, owner 28 พ.ย. 2569: no Claude logo on the site) */
.tech-logo-claude { -webkit-mask-image: url("img/claude.svg"); mask-image: url("img/claude.svg"); --tech-logo-c: var(--brand-claude); --tech-s: 0.96; }
/* ds-allow-hardcode:end */

/* ---------- section ---------- */
.tech {
  background: var(--tech-bg);
  color: var(--tech-ink);
  font-family: var(--font-body);
  line-height: var(--tech-lh);
}
.tech *, .tech *::before, .tech *::after { box-sizing: border-box; }
.tech h2, .tech p, .tech ul { margin: 0; }
.tech ::selection { background: var(--tech-sel); color: var(--navy); }
.tech .nw { white-space: nowrap; }

.tech-in {
  width: 100%;
  max-width: var(--tech-wrap);
  margin: 0 auto;
  padding: var(--tech-pad-m) var(--tech-gutter-r) var(--tech-pad-m) var(--tech-gutter-l);
}

/* ---------- heading ---------- */
.tech-head { display: grid; gap: var(--tech-s1); justify-items: center; text-align: center; }
.tech-kicker {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--tech-fs-kicker);
  letter-spacing: var(--tech-letter);
  line-height: var(--tech-lh-name);
  color: var(--tech-muted);
}
.tech-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(var(--tech-h2-min), calc(0.8cqi + var(--tech-h2-step)), var(--tech-h2-max));
  line-height: var(--tech-lh-h);
  color: var(--tech-title);
  text-wrap: balance;
}
.tech-lead { max-width: var(--tech-measure); font-size: var(--tech-fs-p); color: var(--tech-ink); text-wrap: pretty; }

/* ---------- the list and one item ---------- */
.tech-list { list-style: none; padding: 0; }
.tech-item {
  display: inline-flex;
  align-items: center;
  gap: var(--tech-gap-name);
  min-width: 0;
}
.tech-logo {
  --tech-size: calc(var(--tech-logo) * var(--tech-s, 1));
  flex: none;
  display: block;
  box-sizing: border-box;
  width: var(--tech-size);
  height: var(--tech-size);
  /* push the img's own bitmap out of its content box; the box then shows only the masked background */
  padding-left: var(--tech-size);
  overflow: hidden;
  background-color: var(--tech-logo-c);
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  /* keep the row height steady when one logo is scaled up */
  margin-block: calc((var(--tech-logo) - var(--tech-size)) / 2);
}
.tech-name {
  font-size: var(--tech-fs-name);
  font-weight: 500;
  line-height: var(--tech-lh-name);
  color: var(--tech-name-c, var(--tech-muted));
  white-space: nowrap;
}
@media (forced-colors: active) {
  .tech-logo { forced-color-adjust: none; background-color: CanvasText; }
}

/* ---------- A: one row ---------- */
.tech-a .tech-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tech-s5) var(--tech-s3);
  margin-top: var(--tech-s6);
}
.tech-a .tech-item { flex-direction: column; gap: var(--tech-s2); justify-content: start; }
.tech-a .tech-name { font-size: var(--tech-fs-name-m); }
@container tech (min-width: 640px) {
  .tech-a .tech-in { padding-block: var(--tech-pad); }
  .tech-a .tech-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--tech-gap-row-v) var(--tech-gap-row);
  }
  .tech-a .tech-item { flex-direction: row; gap: var(--tech-gap-name); }
  .tech-a .tech-name { font-size: var(--tech-fs-name); }
}

/* ---------- B: two columns in the FAQ column ---------- */
.tech-b .tech-in { max-width: calc(var(--tech-col) + var(--tech-s7)); padding-block: var(--tech-pad-b-m); display: grid; gap: var(--tech-s6); }
.tech-b .tech-head { justify-items: start; text-align: left; }
.tech-b .tech-lead { margin-top: var(--tech-s2); }
.tech-b .tech-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tech-s5) var(--tech-s3);
  align-content: center;
}
/* narrow phones: logo above the name, so "DigitalOcean" fits a third of 358 px */
.tech-b .tech-item { flex-direction: column; gap: var(--tech-s2); }
.tech-b .tech-name { font-size: var(--tech-fs-name-m); }
@container tech (min-width: 480px) {
  .tech-b .tech-item { flex-direction: row; gap: var(--tech-gap-name); }
  .tech-b .tech-name { font-size: var(--tech-fs-name); }
}
@container tech (min-width: 760px) {
  .tech-b .tech-in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--tech-s8); align-items: center; padding-block: var(--tech-pad-b); }
  .tech-b .tech-list { gap: var(--tech-s5) var(--tech-s4); }
}

/* ---------- C: chips ---------- */
.tech-c .tech-in { padding-block: var(--tech-pad-b-m); }
/* phones: two equal columns of chips; wider: centred wrapping rows like the reference */
.tech-c .tech-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--tech-chip-gap);
  margin-top: var(--tech-s6);
}
.tech-c .tech-item {
  min-height: var(--tech-chip-h);
  padding: 0 var(--tech-chip-pad-r) 0 var(--tech-chip-pad-l);
  gap: var(--tech-s3);
  border: var(--tech-hair) solid var(--tech-line);
  border-radius: var(--tech-radius);
  background: var(--tech-chip-bg);
}
.tech-c .tech-name { font-size: var(--tech-fs-chip); }
@container tech (max-width: 639.98px) {
  .tech-c .tech-item { display: grid; grid-template-columns: var(--tech-slot) minmax(0, 1fr); justify-items: start; }
  .tech-c .tech-logo { justify-self: center; }
}
@container tech (min-width: 640px) {
  .tech-c .tech-in { padding-block: var(--tech-pad-b); }
  .tech-c .tech-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: var(--tech-chips);
    margin-inline: auto;
  }
}
