/* pricing-demo.css: styles of the three variants of the merged section "ราคาและนัด Demo" for krobjobsystem.com (28 พ.ย. 2569).
   The section carries id="pricing" (the hero menu link) and holds the Demo block with id="demo" (the hero's gold button and its link "สอบถามส่วนลดพิเศษ"). Owner decision 28 พ.ย. 2569: no form and no backend; both buttons open LINE OA @krobjob with a prefilled message, the LINE OA QR is the real file the owner sent, and the phone number is a tel: link beside it. Email and office hours are not repeated here because the footer right below carries them.
   One file serves all three variants: each <section class="pd"> also carries pd-a, pd-b or pd-c. The variant class swaps colour tokens and the surfaces (two white cards on the tint, one card split white and navy, a bare white price strip with a tint band); the content, the type scale and the row heights are shared.
   Responsive rules use CSS container queries, not media queries: the section must be wrapped in an element with class pd-scope (container-type: inline-size), so the same markup lays out correctly full width on the site and inside the 390 px phone box on the choice page index.html. The wrapper is not called pd-frame because hero.css already owns .pd-frame, .pd-devices, .pd-monitor, .pd-mon-screen, .pd-phone, .pd-ph-screen and .pd-shot for the device mockup; none of those names is used here, so both files can load on the compose page together.
   Colour tokens come from the page's :root block (index.html today, the site's global tokens later): --navy --gold --blue --white --h-bg --h-tint --h-ink --h-muted --h-line --h-shadow --font-head --font-body, plus the dark-ground ones the footer page defined, --navy-muted --navy-line. Everything in px below is declared once as a custom property on .pd, so the rules themselves only ever use var(). */

/* ---------- container ---------- */
.pd-scope { container-type: inline-size; container-name: pd; }

/* ---------- size tokens of the section ---------- */
.pd {
  /* type: the section heading and the price are the two display sizes; both scale with the container (cqi) and never past their cap */
  --p-fs-h: clamp(28px, 2.2cqi + 14px, 40px);
  --p-fs-amount: clamp(40px, 2.4cqi + 28px, 56px);
  --p-fs-cta: clamp(22px, 1cqi + 16px, 28px);
  --p-fs-plan: 18px;     /* the plan name above the price */
  --p-fs-lead: 17px;     /* the one-sentence lead under the heading, the unit beside the price */
  --p-fs: 16px;          /* list lines, add-on rows, button labels */
  --p-fs-sm: 14px;       /* the terms line, the phone line */
  --p-fs-xs: 13px;       /* the line under the buttons, the fine print, the scan caption */
  --p-lh: 1.6;
  --p-lh-h: 1.3;
  --p-lh-list: 1.75;     /* 16 px * 1.75 = 28 px, the height of the check disc, so one-line items centre on the disc */
  /* controls */
  --p-btn: 48px;         /* DESIGN.md: every button at least 48 px tall */
  --p-btn-pad: 24px;
  --p-btn-radius: 10px;  /* the hero's flat button radius */
  --p-btn-border: 2px;
  --p-tap: 44px;         /* minimum height of every link */
  --p-icon: 20px;        /* Lucide icon size, also inside the small check disc */
  --p-disc: 40px;        /* navy circle behind the icons of the Demo block */
  --p-check: 28px;       /* smaller navy circle behind the check marks of the included list */
  --p-ring: 3px;
  --p-ring-gap: 2px;
  --p-hair: 1px;
  /* the QR of the LINE OA: the real file, 160 px, on a white mat with an 8 px inset and a hairline border */
  --p-qr: 160px;
  --p-qr-pad: 8px;
  --p-radius: 12px;      /* card radius (hero cards use 8 to 12 px) */
  --p-radius-sm: 6px;
  --p-sticky-top: 24px;  /* A: how far from the viewport top the Demo card sticks */
  /* spacing scale */
  --p-s1: 4px;
  --p-s2: 8px;
  --p-s3: 12px;
  --p-s4: 16px;
  --p-s5: 24px;
  --p-s6: 32px;
  --p-s7: 40px;
  --p-s8: 48px;
  --p-s9: 64px;
  --p-wrap: 1200px;
  --p-measure: 34em;     /* the lead and the fine print never run wider than this */
  --p-gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --p-gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --p-digits: 0.02em;
  --p-amount-track: -0.01em;
  /* variant A colours are the defaults: white cards on the tint. The same names are re-set on .pd-cta in B for the navy half, so every rule under the Demo block reads one set of names. */
  --p-bg: var(--h-tint);
  --p-card: var(--white);
  --p-ink: var(--h-ink);
  --p-head: var(--navy);
  --p-muted: var(--h-muted);
  --p-line: var(--h-line);
  --p-link: var(--blue);
  --p-ring-c: var(--navy);
  --p-disc-bg: var(--navy);
  --p-disc-ink: var(--white);
  --p-disc-line: transparent;
  --p-line-btn-bg: var(--white);
  --p-line-btn-ink: var(--navy);
  --p-line-btn-border: var(--navy);
  --p-line-btn-hover: var(--h-tint);
  --p-selection: var(--navy);
  --p-selection-ink: var(--white);
  --p-band: var(--h-tint); /* C: the Demo band */

  background: var(--p-bg);
  color: var(--p-ink);
  font-family: var(--font-body);
  font-size: var(--p-fs);
  line-height: var(--p-lh);
  /* 1 px top rule so the seam with the tint FAQ above is visible, same as footer A (border-top: var(--f-hair) solid var(--f-line)); owner 28 พ.ย. 2569 */
  border-top: var(--p-hair) solid var(--p-line);
}
/* variant C: bare white page, the price strip has no card and the Demo sits on a rounded tint band */
.pd-c {
  --p-bg: var(--white);
  --p-card: transparent;
}

.pd *, .pd *::before, .pd *::after { box-sizing: border-box; }
.pd h2, .pd h3, .pd h4, .pd p, .pd ul, .pd dl, .pd dd { margin: 0; }
.pd ul { padding: 0; list-style: none; }
.pd svg, .pd img { display: block; }
/* browser surfaces carry the palette too: selection in the section's own colours */
.pd ::selection { background: var(--p-selection); color: var(--p-selection-ink); }

.pd-in {
  width: 100%;
  max-width: var(--p-wrap);
  margin: 0 auto;
  padding-left: var(--p-gutter-l);
  padding-right: var(--p-gutter-r);
  padding-block: var(--p-s8);
  display: grid;
  gap: var(--p-s6);
}
@container pd (min-width: 900px) {
  .pd-in { padding-block: var(--p-s9); gap: var(--p-s7); }
}

/* ---------- links and focus ---------- */
.pd a { color: var(--p-link); }
.pd a:focus-visible,
.pd .btn:focus-visible { outline: var(--p-ring) solid var(--p-ring-c); outline-offset: var(--p-ring-gap); border-radius: var(--p-radius-sm); }
.pd .btn:focus-visible { border-radius: var(--p-btn-radius); }

/* ---------- section heading ---------- */
.pd-head { display: grid; gap: var(--p-s3); }
.pd-h {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--p-fs-h);
  line-height: var(--p-lh-h);
  color: var(--p-head);
  text-wrap: balance;
}
.pd-lead { font-size: var(--p-fs-lead); color: var(--p-ink); max-width: var(--p-measure); text-wrap: pretty; }

/* ---------- A: two cards on the tint ---------- */
/* one column, Demo under the price; two columns 1.1 / 0.9 from 900 px with both cards top aligned. The Demo card sticks while the longer price card scrolls past, so the gold button stays in view; inside the choice page's frames nothing scrolls, so sticky has no visible effect there. */
.pd-grid { display: grid; gap: var(--p-s5); align-items: start; }
@container pd (min-width: 900px) {
  .pd-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--p-s6); }
  .pd-a .pd-cta { position: sticky; top: var(--p-sticky-top); }
}
.pd-a .pd-price,
.pd-a .pd-cta {
  background: var(--p-card);
  border-radius: var(--p-radius);
  border: var(--p-hair) solid var(--p-line);
  box-shadow: var(--h-shadow);
  padding: var(--p-s5);
}
@container pd (min-width: 600px) {
  .pd-a .pd-price, .pd-a .pd-cta { padding: var(--p-s6); }
}

/* ---------- price block (all variants) ---------- */
.pd-price { display: grid; gap: var(--p-s4); align-content: start; }
.pd-plan {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--p-fs-plan);
  line-height: var(--p-lh-h);
  color: var(--p-head);
}
/* the price: number and unit on one baseline, the unit wraps under the number only when the container is very narrow */
.pd-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--p-s2); }
.pd-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--p-fs-amount);
  line-height: 1;
  letter-spacing: var(--p-amount-track);
  color: var(--p-head);
}
.pd-unit { font-size: var(--p-fs-lead); font-weight: 500; color: var(--p-ink); }
.pd-terms { font-size: var(--p-fs-sm); color: var(--p-muted); }
/* group headings inside the price block (รวมอะไรบ้าง, ซื้อเพิ่มได้, and the three column heads in C): a hairline above separates each group from the one before */
.pd-sub {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--p-fs);
  line-height: var(--p-lh-h);
  color: var(--p-head);
  padding-top: var(--p-s4);
  border-top: var(--p-hair) solid var(--p-line);
}
/* the included list: a 28 px navy disc with a white Lucide check, then the line; one-line items centre on the disc through the 28 px line height, longer items wrap under themselves */
.pd-inc { display: grid; gap: var(--p-s2); }
.pd-inc li {
  display: grid;
  grid-template-columns: var(--p-check) minmax(0, 1fr);
  gap: var(--p-s3);
  align-items: start;
  line-height: var(--p-lh-list);
}
.pd-check {
  display: grid;
  place-items: center;
  width: var(--p-check);
  height: var(--p-check);
  border-radius: 50%;
  background: var(--p-disc-bg);
  color: var(--p-disc-ink);
}
.pd-check svg { width: var(--p-icon); height: var(--p-icon); }
.pd-dim { color: var(--p-muted); }
/* add-ons: three rows, label left, price right in tabular digits; a hairline under each row except the last */
.pd-add { display: grid; }
.pd-add div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 var(--p-s3);
  padding-block: var(--p-s2);
  border-bottom: var(--p-hair) solid var(--p-line);
}
.pd-add div:last-child { border-bottom: 0; }
/* under 480 px (a phone inside the card) the longest label and its price cannot share one line, so all three rows stack label over price, uniformly, instead of wrapping one by one */
@container pd (max-width: 479px) {
  .pd-add div { flex-direction: column; }
}
.pd-add dt { color: var(--p-ink); }
.pd-add dd { color: var(--p-head); font-weight: 500; white-space: nowrap; }
.pd-fine { font-size: var(--p-fs-xs); color: var(--p-muted); max-width: var(--p-measure); text-wrap: pretty; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: var(--p-digits); }
.nw { white-space: nowrap; }

/* ---------- Demo block (all variants) ---------- */
.pd-cta { display: grid; gap: var(--p-s5); align-content: start; color: var(--p-ink); }
.pd-cta-copy { display: grid; gap: var(--p-s5); }
.pd-cta-h {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--p-fs-cta);
  line-height: var(--p-lh-h);
  color: var(--p-head);
  text-wrap: balance;
}
/* the three points: 40 px disc with a Lucide icon, one short line each */
.pd-points { display: grid; gap: var(--p-s3); }
.pd-points li {
  display: grid;
  grid-template-columns: var(--p-disc) minmax(0, 1fr);
  gap: var(--p-s3);
  align-items: center;
  min-height: var(--p-disc);
  font-weight: 500;
}
.pd-disc {
  display: grid;
  place-items: center;
  width: var(--p-disc);
  height: var(--p-disc);
  border-radius: 50%;
  background: var(--p-disc-bg);
  color: var(--p-disc-ink);
  border: var(--p-hair) solid var(--p-disc-line);
}
.pd-disc svg { width: var(--p-icon); height: var(--p-icon); }

/* buttons: the hero's flat button, 48 px, 10 px radius. The gold one is the single gold point of the section; hover keeps the gold and shows a 2 px navy inner border (DESIGN.md), active drops 1 px. */
.pd .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--p-s2);
  min-height: var(--p-btn);
  padding: 0 var(--p-btn-pad);
  border-radius: var(--p-btn-radius);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--p-fs);
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  border: var(--p-btn-border) solid transparent;
}
.pd .btn svg { width: var(--p-icon); height: var(--p-icon); flex: none; }
.pd .btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }
.pd .btn-gold:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); box-shadow: inset 0 0 0 var(--p-btn-border) var(--navy); }
.pd .btn-gold:active { transform: translateY(1px); }
.pd .btn-line { background: var(--p-line-btn-bg); color: var(--p-line-btn-ink); border-color: var(--p-line-btn-border); }
.pd .btn-line:hover { background: var(--p-line-btn-hover); color: var(--p-line-btn-ink); border-color: var(--p-line-btn-border); }
.pd .btn-line:active { transform: translateY(1px); }
/* the button row: gold first, outlined second, the small note under the pair. Under 600 px both buttons go full width. */
.pd-act { display: grid; gap: var(--p-s3); }
.pd-btns { display: flex; flex-wrap: wrap; gap: var(--p-s3); }
.pd-btns .btn { flex: 1 1 100%; }
@container pd (min-width: 600px) {
  .pd-btns .btn { flex: none; }
}
.pd-note { font-size: var(--p-fs-xs); color: var(--p-muted); }

/* the QR and the phone line: a hairline above, the real QR image on a white mat (8 px inset, hairline border), the scan caption, then "หรือโทร" with the tel: link 44 px tall */
.pd-qr {
  display: grid;
  gap: var(--p-s2);
  justify-items: start;
  padding-top: var(--p-s5);
  border-top: var(--p-hair) solid var(--p-line);
}
.pd-qr-mat {
  display: inline-grid;
  place-items: center;
  padding: var(--p-qr-pad);
  background: var(--white);
  border: var(--p-hair) solid var(--h-line);
  border-radius: var(--p-radius);
}
.pd-qr-mat img { width: var(--p-qr); height: var(--p-qr); }
.pd-scan { font-size: var(--p-fs-xs); color: var(--p-muted); }
.pd-call { font-size: var(--p-fs-sm); color: var(--p-ink); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 var(--p-s1); }
.pd-call a { display: inline-flex; align-items: center; min-height: var(--p-tap); text-decoration: none; font-weight: 500; font-size: var(--p-fs); color: var(--p-link); }
.pd-call a:hover { text-decoration: underline; text-decoration-thickness: var(--p-hair); text-underline-offset: var(--p-s1); }

/* ---------- B: one card split white and navy ---------- */
/* one white card on the tint; the price half keeps the default tokens, the Demo half re-sets them for a navy ground: white text, --navy-muted for secondary text (8.78:1), hairlines in --navy-line, an outlined disc instead of a navy disc on navy, white outlined button, white focus ring. The card clips its corners so the navy half shares the 12 px radius. */
.pd-b .pd-card {
  display: grid;
  background: var(--p-card);
  border-radius: var(--p-radius);
  border: var(--p-hair) solid var(--p-line);
  box-shadow: var(--h-shadow);
  overflow: hidden;
}
@container pd (min-width: 900px) {
  .pd-b .pd-card { grid-template-columns: 1.1fr 0.9fr; }
}
.pd-b .pd-price { padding: var(--p-s5); }
.pd-b .pd-cta {
  --p-card: var(--navy);
  --p-ink: var(--white);
  --p-head: var(--white);
  --p-muted: var(--navy-muted);
  --p-line: var(--navy-line);
  --p-link: var(--white);
  --p-ring-c: var(--white);
  --p-disc-bg: transparent;
  --p-disc-ink: var(--white);
  --p-disc-line: var(--navy-line);
  --p-line-btn-bg: transparent;
  --p-line-btn-ink: var(--white);
  --p-line-btn-border: var(--white);
  /* hover of the outlined button on navy: an opaque mix (white 16% into navy), not the translucent --navy-line, so the measured text contrast on hover is the real one */
  --p-line-btn-hover: color-mix(in srgb, var(--white) 16%, var(--navy));
  --p-selection: var(--white);
  --p-selection-ink: var(--navy);
  background: var(--p-card);
  padding: var(--p-s5);
}
@container pd (min-width: 600px) {
  .pd-b .pd-price, .pd-b .pd-cta { padding: var(--p-s6); }
}
@container pd (min-width: 900px) {
  .pd-b .pd-price, .pd-b .pd-cta { padding: var(--p-s7); }
}
/* the white phone link has no colour of its own on navy, so it is underlined at rest in the muted colour and in white on hover */
.pd-b .pd-call a { text-decoration: underline; text-decoration-thickness: var(--p-hair); text-underline-offset: var(--p-s1); text-decoration-color: var(--p-muted); }
.pd-b .pd-call a:hover { text-decoration-color: var(--p-link); text-decoration-thickness: var(--p-btn-border); }
/* B only: the lower QR block sits centred under the full-width hairline, so the panel ends level with the fine print of the price half; heading, bullets and buttons stay on the left edge shared with the price half (เจ้าของเคาะ 28 พ.ย. 2569) */
.pd-b .pd-qr { justify-items: center; text-align: center; }
.pd-b .pd-call { display: flex; justify-content: center; }

/* ---------- C: horizontal price strip and a Demo band ---------- */
/* the strip: price and add-ons left (0.9), the included lines in three short columns right (1.1) from 900 px; the columns themselves go three across from 600 px. A hairline under the strip separates it from the band. */
.pd-strip { display: grid; gap: var(--p-s6); padding-bottom: var(--p-s6); border-bottom: var(--p-hair) solid var(--p-line); }
@container pd (min-width: 900px) {
  .pd-strip { grid-template-columns: 0.9fr 1.1fr; gap: var(--p-s8); align-items: start; }
}
.pd-cols { display: grid; gap: var(--p-s5); align-content: start; }
@container pd (min-width: 600px) {
  .pd-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pd-col { display: grid; gap: var(--p-s3); align-content: start; }
/* the band: a rounded tint block for the Demo; copy centred and stacked on narrow containers, copy left and the QR right from 900 px */
.pd-band {
  background: var(--p-band);
  border-radius: var(--p-radius);
  padding: var(--p-s5);
}
@container pd (min-width: 600px) {
  .pd-band { padding: var(--p-s6); }
}
.pd-c .pd-cta { justify-items: center; text-align: center; }
.pd-c .pd-cta-copy { justify-items: center; }
.pd-c .pd-points { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--p-s3) var(--p-s5); }
.pd-c .pd-points li { display: inline-grid; }
.pd-c .pd-btns { justify-content: center; }
.pd-c .pd-qr { justify-items: center; border-top: var(--p-hair) solid var(--p-line); }
/* the outlined button on the tint band hovers to white, not to the tint it already sits on */
.pd-c .pd-cta { --p-line-btn-hover: var(--white); }
@container pd (min-width: 900px) {
  .pd-band { padding: var(--p-s7); }
  .pd-c .pd-cta { grid-template-columns: minmax(0, 1fr) auto; gap: var(--p-s8); align-items: center; justify-items: start; text-align: left; }
  .pd-c .pd-cta-copy { justify-items: start; }
  .pd-c .pd-points { justify-content: start; }
  .pd-c .pd-btns { justify-content: start; }
  .pd-c .pd-qr { justify-items: center; border-top: 0; padding-top: 0; }
}
