/* ============================================================================
   web-07 · ช่างคิว (ChangQ)

   Concept: before software, every trades business in Thailand ran its day off a
   whiteboard by the office door — rows are technicians, across is time, magnets
   are jobs. That is the language the customer already reads, so the site is
   built out of it rather than out of SaaS-marketing furniture. Cobalt-on-white
   with a floating drop-shadowed screenshot — the default for this category — is
   avoided entirely: the palette is signal yellow and asphalt, the colours of a
   service van and a hi-vis vest.

   Signature: the dispatch board (.board). It is real CSS Grid with real markup,
   not a picture of a product. On first load one unassigned job drops into the
   free technician's row — the product demonstrated in two seconds without a
   single sentence of copy.

   There is not one photograph on this site. That is the decision, not an
   omission: the product is a screen, and a stock photo of a smiling technician
   would say nothing.
   ============================================================================ */

:root {
  --asphalt: #111A18;
  --panel: #1A2724;
  --van: #F7F7F4;
  --signal: #FFC93C;
  --teal: #1E9A8A;
  --grey: #7C8B87;

  --container: 1200px;
  --pad: clamp(20px, 5vw, 48px);
  --gap: clamp(72px, 9vw, 120px);
}

body {
  background: var(--asphalt);
  color: var(--van);
  font-family: 'IBM Plex Sans Thai', system-ui, sans-serif;
  line-height: 1.75;
  /* hour lines from the board, bled through as the texture of the whole site */
  background-image: repeating-linear-gradient(90deg, rgba(247,247,244,.06) 0 1px, transparent 1px 96px);
}

.mono, .num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: 'Chakra Petch', system-ui, sans-serif; font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
h3 { font-weight: 600; }

.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--gap); }
.section--panel { background: var(--panel); }
.lede { color: var(--grey); max-width: 56ch; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* the block: a job on the board, reused as the site's bullet and its brand mark */
.brand__block, .blk {
  display: inline-block; width: 12px; height: 6px; background: var(--signal);
  flex: none; border-radius: 1px;
}
.brand__block { margin-right: 8px; vertical-align: 2px; }

/* -- buttons ---------------------------------------------------------------- */
.btn { display: inline-block; padding: 15px 30px; border-radius: 3px; text-decoration: none; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.btn--primary { background: var(--signal); color: var(--asphalt); }
.btn--primary:hover { background: #ffd662; }
.btn--ghost { border: 1px solid var(--grey); color: var(--van); }
.btn--ghost:hover { border-color: var(--van); }
.btn--dark { background: var(--asphalt); color: var(--signal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* -- header ------------------------------------------------------------------ */
.header { position: sticky; top: 0; z-index: 30; background: var(--asphalt); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-stuck { border-bottom-color: rgba(247,247,244,.14); }
.header__inner { max-width: var(--container); margin-inline: auto; padding: 12px var(--pad); display: flex; align-items: center; gap: 24px; }
.brand { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.header__cta { margin-left: auto; padding: 10px 20px; font-size: .9375rem; }
.nav { display: flex; gap: 20px; margin-left: 20px; }
.nav__link { text-decoration: none; font-size: .9375rem; }
.nav__link.is-active, .nav__link:hover { color: var(--signal); }
.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-left: auto; }
.burger span { display: block; width: 22px; height: 2px; background: var(--van); }
@media (max-width: 900px) {
  /* only the CTA gets the auto margin — with one on the burger too, the free space is
     split between them and the button ends up stranded mid-header. */
  .burger { display: flex; order: 3; margin-left: 0; }
  .header__cta { margin-left: auto; order: 2; }
  .nav { position: fixed; inset: 0; z-index: 40; flex-direction: column; justify-content: center; align-items: center; gap: 26px; margin: 0; background: var(--asphalt); transform: translateY(-100%); transition: transform .3s; }
  .nav.is-open { transform: none; }
  .nav__link { font-size: 1.25rem; }
  body.nav-open { overflow: hidden; }
}

/* -- SIGNATURE: the dispatch board ---------------------------------------------- */
/* One column per quarter-hour from 07:00 to 18:00 (44 of them), plus a sticky name column.
   A job's width is its real duration: a 45-minute clean is visibly shorter than a
   three-hour installation, which is the whole point of a board. */
.board-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.board {
  min-width: 820px;
  display: grid;
  grid-template-columns: 104px repeat(44, minmax(14px, 1fr));
  background: var(--panel);
  border: 1px solid rgba(247,247,244,.14);
  border-radius: 3px;
}
.board__hour {
  grid-row: 1; grid-column: span 4;
  padding: 8px 0 8px 6px;
  font-family: 'IBM Plex Mono', monospace; font-size: .6875rem; color: var(--grey);
  border-left: 1px solid rgba(247,247,244,.10);
}
.board__corner { grid-row: 1; grid-column: 1; position: sticky; left: 0; background: var(--panel); z-index: 3; }
.board__name {
  grid-column: 1; position: sticky; left: 0; z-index: 3;
  background: var(--panel);
  padding: 12px 12px 12px 14px;
  font-size: .875rem; white-space: nowrap;
  border-top: 1px solid rgba(247,247,244,.08);
  border-right: 1px solid rgba(247,247,244,.14);
}
/* Lanes and jobs must be block-level: as inline spans the job shrink-wraps its text and
   escapes the slot it was placed in, which is exactly wrong for a board where width is
   supposed to mean duration. */
.board__lane { display: block; border-top: 1px solid rgba(247,247,244,.08); min-height: 56px; }
.job {
  display: block; height: 40px; margin: 8px 2px; padding: 4px 8px; border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace; font-size: .6875rem; line-height: 1.3;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: var(--signal); color: var(--asphalt);
}
.job--done { background: var(--teal); color: var(--van); }
.job b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; }

/* the one job that has not been assigned yet: it starts floating above its lane */
.job--new {
  background: transparent; color: var(--grey);
  border: 1px dashed var(--grey);
  transform: translateY(-30px); opacity: .85;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), background-color .3s .55s, color .3s .55s, border-color .3s .55s;
}
.board.is-assigned .job--new {
  transform: none; opacity: 1;
  background: var(--signal); color: var(--asphalt); border-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .job--new { transform: none; opacity: 1; transition: none; background: var(--signal); color: var(--asphalt); border-color: transparent; }
}

.board-note { margin-top: 12px; font-size: .8125rem; color: var(--grey); }

/* -- hero ------------------------------------------------------------------------ */
/* minmax(0, …) on the board column: a grid item defaults to min-width:auto, which would let
   the 820px board push the whole row wide instead of scrolling inside its own box. */
.hero { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.35fr); gap: clamp(28px,4vw,56px); align-items: center; padding-block: clamp(48px,7vw,96px); }
/* Stacked, the board still needs minmax(0, …) for the same reason: a plain 1fr track is
   min-width:auto, so the 820px board would set the width of the whole hero. */
@media (max-width: 1100px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { max-width: 16ch; }
.hero__small { margin-top: 24px; color: var(--grey); font-size: .875rem; }

/* -- problem / answer rows --------------------------------------------------------- */
.pa { max-width: 1000px; margin-top: 40px; }
.pa__row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid rgba(247,247,244,.12); }
@media (max-width: 860px) { .pa__row { grid-template-columns: 1fr; gap: 16px; } }
/* fixed label column for the rows that carry a short label + a sentence */
.pa__row--label { grid-template-columns: 200px 1fr; align-items: center; }
@media (max-width: 860px) { .pa__row--label { grid-template-columns: 1fr; align-items: start; } }
.pa__row:last-child { border-bottom: 1px solid rgba(247,247,244,.12); }
.pa h3 { font-size: 1.125rem; margin-bottom: 8px; }
.pa__problem p { color: var(--grey); }
.pa__answer { background: var(--panel); padding: 20px 24px; border-left: 3px solid var(--signal); border-radius: 0 3px 3px 0; }

/* -- stat strip ---------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2,1fr); } }
.stat { padding: 24px; border-right: 1px solid rgba(247,247,244,.14); }
.stat:last-child { border-right: 0; }
.stat__n { display: block; font-family: 'IBM Plex Mono', monospace; font-size: clamp(2.25rem,5vw,3.5rem); color: var(--signal); line-height: 1.1; }
.stat__label { font-weight: 600; margin-top: 6px; }
.stat__base { font-family: 'IBM Plex Mono', monospace; font-size: .8125rem; color: var(--grey); }

/* -- who uses it ------------------------------------------------------------------------ */
.who { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px 40px; margin-top: 40px; }
@media (max-width: 720px) { .who { grid-template-columns: 1fr; } }
.who h3 { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; }
.who p { color: var(--grey); font-size: .9375rem; margin-left: 22px; }

.quote { background: var(--panel); padding: 32px; border-left: 3px solid var(--signal); margin-top: 44px; border-radius: 0 3px 3px 0; }
.quote p { font-size: 1.25rem; max-width: 56ch; }
.quote cite { display: block; margin-top: 14px; font-style: normal; font-family: 'IBM Plex Mono', monospace; font-size: .875rem; color: var(--grey); }

/* -- feature blocks with CSS-drawn figures ------------------------------------------------- */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,64px); align-items: center; padding-block: clamp(48px,6vw,80px); border-top: 1px solid rgba(247,247,244,.1); }
.feat:nth-child(even) > .feat__fig { order: -1; }
@media (max-width: 900px) { .feat { grid-template-columns: 1fr; } .feat:nth-child(even) > .feat__fig { order: 0; } }
.feat__n { font-family: 'IBM Plex Mono', monospace; font-size: 2rem; color: var(--grey); line-height: 1; }
.feat h3 { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 1.5rem; margin: 8px 0 12px; }
.feat p { color: rgba(247,247,244,.84); max-width: 44ch; }
.feat__fig { background: var(--panel); border: 1px solid rgba(247,247,244,.12); border-radius: 3px; padding: 20px; }

/* small figures, all CSS/SVG — nothing here is an image file */
.fig-card { font-family: 'IBM Plex Mono', monospace; font-size: .75rem; }
.fig-card__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(247,247,244,.16); }
.fig-card__row:last-child { border-bottom: 0; }
.fig-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.fig-chart span { flex: 1; background: var(--signal); border-radius: 2px 2px 0 0; }
.fig-chart__axis { display: flex; gap: 8px; margin-top: 8px; font-family: 'IBM Plex Mono', monospace; font-size: .625rem; color: var(--grey); }
.fig-chart__axis span { flex: 1; text-align: center; }
.fig-phone { max-width: 200px; margin-inline: auto; border: 1px solid rgba(247,247,244,.3); border-radius: 12px; padding: 12px 10px; }
.fig-phone__job { background: var(--asphalt); border-radius: 3px; padding: 8px 10px; margin-bottom: 8px; font-family: 'IBM Plex Mono', monospace; font-size: .6875rem; }
.fig-phone__btn { background: var(--signal); color: var(--asphalt); border-radius: 3px; padding: 8px; text-align: center; font-size: .75rem; font-weight: 600; }
.fig-qr { width: 84px; height: 84px; background-image: repeating-conic-gradient(var(--van) 0 25%, transparent 0 50%); background-size: 12px 12px; border: 4px solid var(--van); }

/* -- pricing: flips to light ------------------------------------------------------------------ */
.light { background: var(--van); color: var(--asphalt); padding-block: var(--gap); }
.light h2 { color: var(--asphalt); }
.light .lede { color: #5C6A66; }
.plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 40px; align-items: start; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid rgba(17,26,24,.18); border-radius: 3px; padding: 28px 24px; }
.plan--pick { border-color: rgba(17,26,24,.3); }
.plan__top { height: 6px; background: transparent; margin: -28px -24px 20px; border-radius: 3px 3px 0 0; }
.plan--pick .plan__top { background: var(--signal); }
.plan__tag { font-family: 'IBM Plex Mono', monospace; font-size: .6875rem; color: #5C6A66; min-height: 1.2em; display: block; }
.plan h3 { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 1.375rem; margin-top: 4px; }
.plan__price { font-family: 'IBM Plex Mono', monospace; font-size: clamp(2rem,4vw,2.75rem); line-height: 1.1; margin: 10px 0 2px; }
.plan__per { font-size: .8125rem; color: #5C6A66; }
.plan ul { margin: 20px 0 24px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: .9375rem; }
.plan li::before { content: ''; flex: none; width: 10px; height: 5px; background: var(--signal); border-radius: 1px; margin-top: .55em; }
.plan .btn--ghost { border-color: rgba(17,26,24,.3); color: var(--asphalt); display: block; text-align: center; }
.plan .btn--primary { display: block; text-align: center; }

/* -- comparison table ------------------------------------------------------------------------- */
.cmp-wrap { overflow-x: auto; margin-top: 40px; }
.cmp { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .9375rem; }
.cmp thead th { position: sticky; top: 58px; background: var(--van); z-index: 5; padding: 12px 16px; text-align: center; border-bottom: 2px solid var(--asphalt); font-family: 'Chakra Petch', sans-serif; }
.cmp thead th:first-child { text-align: left; }
.cmp th[scope="row"] { text-align: left; font-weight: 400; padding: 12px 16px; position: sticky; left: 0; background: var(--van); }
.cmp td { text-align: center; padding: 12px 16px; font-family: 'IBM Plex Mono', monospace; }
.cmp tbody tr:nth-child(odd) th[scope="row"], .cmp tbody tr:nth-child(odd) td { background: rgba(17,26,24,.04); }
.cmp .col-pick { background: rgba(255,201,60,.12); }
.cmp tbody tr:nth-child(odd) .col-pick { background: rgba(255,201,60,.18); }
.yes { display: inline-block; width: 12px; height: 6px; background: var(--signal); border-radius: 1px; }
.no { display: inline-block; width: 12px; height: 1px; background: #9AA6A2; }

/* -- integrations / faq ------------------------------------------------------------------------- */
.grid2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px 40px; margin-top: 40px; }
@media (max-width: 780px) { .grid2 { grid-template-columns: 1fr; } }
/* three across where the content is three short items. Written as a class, not an inline
   style: an inline grid-template-columns outranks every media query below it. */
.grid2--3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 900px) { .grid2--3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid2--3 { grid-template-columns: 1fr; } }
.grid2 h3 { font-size: 1.0625rem; }
.grid2 p { color: var(--grey); font-size: .9375rem; }
.grid2 .plan-note { font-family: 'IBM Plex Mono', monospace; font-size: .75rem; color: var(--signal); margin-top: 4px; }

.faq { max-width: 800px; margin-top: 40px; }
.faq details { border-bottom: 1px solid rgba(247,247,244,.12); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; align-items: center; gap: 14px; font-family: 'Chakra Petch', sans-serif; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ''; flex: none; width: 12px; height: 6px; background: var(--signal); border-radius: 1px; transition: transform .2s; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq p { padding: 0 0 20px 26px; color: var(--grey); }

/* -- contact -------------------------------------------------------------------------------------- */
.steps { max-width: 820px; margin-top: 40px; border-left: 1px solid rgba(247,247,244,.14); }
.step { position: relative; padding: 22px 0 22px 30px; }
.step + .step { border-top: 1px solid rgba(247,247,244,.1); }
.step::before { content: ''; position: absolute; left: 0; top: 34px; width: 10px; height: 1px; background: rgba(247,247,244,.3); }
.step__n { font-family: 'IBM Plex Mono', monospace; font-size: 1.5rem; color: var(--signal); }
.step h3 { font-size: 1.0625rem; margin: 2px 0 6px; }
.step p { color: var(--grey); max-width: 52ch; }

.ctable { width: 100%; max-width: 960px; margin-top: 40px; }
.ctable th, .ctable td { padding: 16px 20px 16px 0; border-top: 1px solid rgba(247,247,244,.12); vertical-align: top; text-align: left; font-weight: 400; }
.ctable tr:last-child td, .ctable tr:last-child th { border-bottom: 1px solid rgba(247,247,244,.12); }
.ctable tr:hover { background: var(--panel); }
.ctable .is-kind { font-family: 'Chakra Petch', sans-serif; font-weight: 600; white-space: nowrap; }
.ctable .is-ch { font-family: 'IBM Plex Mono', monospace; color: var(--signal); }
.ctable .is-when { color: var(--grey); font-size: .9375rem; }
.hazard { display: inline-block; width: 12px; height: 6px; border-radius: 1px; margin-right: 8px; vertical-align: 1px; background: repeating-linear-gradient(45deg, #E4572E 0 4px, var(--signal) 4px 8px); }
@media (max-width: 780px) {
  .ctable, .ctable tbody, .ctable tr, .ctable th, .ctable td { display: block; width: auto; }
  .ctable tr { padding: 14px 0; border-top: 1px solid rgba(247,247,244,.12); }
  .ctable th, .ctable td { padding: 0; border: 0; }
}

/* opening hours drawn as board lanes, same language as the dispatch board */
.oh { min-width: 700px; display: grid; grid-template-columns: 130px repeat(30, 1fr); background: var(--panel); border: 1px solid rgba(247,247,244,.14); border-radius: 3px; }
.oh__hour { grid-row: 1; grid-column: span 2; padding: 8px 0 8px 4px; font-family: 'IBM Plex Mono', monospace; font-size: .625rem; color: var(--grey); border-left: 1px solid rgba(247,247,244,.08); }
.oh__name { grid-column: 1; padding: 12px 14px; font-size: .875rem; border-top: 1px solid rgba(247,247,244,.08); border-right: 1px solid rgba(247,247,244,.14); }
.oh__lane { border-top: 1px solid rgba(247,247,244,.08); min-height: 44px; }
.oh__bar { margin: 10px 2px; height: 22px; border-radius: 3px; background: var(--signal); }
.oh__bar--support { background: var(--teal); }

.addr { max-width: 720px; margin-top: 40px; }
.addr__row { padding: 14px 0; border-top: 1px solid rgba(247,247,244,.12); }
.addr__row:last-child { border-bottom: 1px solid rgba(247,247,244,.12); }
.addr__label { font-family: 'Chakra Petch', sans-serif; font-weight: 600; color: var(--grey); font-size: .8125rem; }

/* -- CTA band ---------------------------------------------------------------------------------------- */
.band { background: var(--signal); color: var(--asphalt); padding-block: clamp(56px,7vw,88px); text-align: center; }
.band h2 { color: var(--asphalt); }
.band p { color: rgba(17,26,24,.78); max-width: 60ch; margin-inline: auto; }
.band .btn-row { justify-content: center; }
.band .btn--ghost { border-color: var(--asphalt); color: var(--asphalt); }
.band .btn--ghost:hover { border-color: var(--asphalt); background: rgba(17,26,24,.08); }
.band__small { margin-top: 18px; font-size: .875rem; }

/* -- footer -------------------------------------------------------------------------------------------- */
.footer { background: var(--panel); padding-block: 56px 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 32px; font-size: .9375rem; color: var(--grey); }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 1.125rem; color: var(--van); margin-bottom: 8px; }
.footer__label { font-size: .8125rem; color: var(--signal); margin-bottom: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(247,247,244,.12); font-size: .8125rem; }
