/* PV Dev studio page.
   Concept: the page is a transparent quotation. One memorable element (the ใบเสนอราคา card,
   set in the Thai official-document face Sarabun, with a red company stamp); everything else
   quiet, left-aligned, Thai-first. LINE green appears only on LINE actions. */
:root {
  --bg: #e8edf1;          /* cool slate paper, not cream */
  --surface: #ffffff;
  --ink: #17202b;
  --muted: #586472;
  --rule: #c9d2da;
  --stamp: #c4122f;       /* Thai company-seal red, used once or twice */
  --line: #06c755;        /* LINE brand green, LINE buttons only */
  --line-ink: #04612a;
  --focus: #1f5fbf;
  --ui: "Anuphan", "Noto Sans Thai", system-ui, sans-serif;
  --doc: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.7 var(--ui);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 14px;
}
.brand { font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; text-decoration: none; }
.brand b { color: var(--stamp); font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { font-size: var(--step--1); color: var(--muted); text-decoration: none; padding: 8px 6px; }
.lang strong { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  font: 600 var(--step-0)/1 var(--ui); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn-line { background: var(--line); color: #fff; }
.btn-line:hover { background: #05b04b; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: var(--step--1); }
.line-dot { width: 18px; height: 18px; flex: none; }

/* Hero */
.hero {
  display: grid; gap: 32px; align-items: center;
  padding-block: 28px 56px;
}
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 0.95fr; gap: 56px; padding-block: 48px 80px; } }
.hero h1 {
  font-size: var(--step-3); line-height: 1.3; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 16px; text-wrap: balance;
}
.hero p.lede { font-size: var(--step-1); color: var(--muted); margin: 0 0 24px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.promises li { display: flex; gap: 10px; align-items: flex-start; }
.promises svg { flex: none; margin-top: 5px; }

/* The quotation */
.quote {
  position: relative;
  background: var(--surface);
  font-family: var(--doc);
  padding: 28px 24px 24px;
  border-top: 6px solid var(--ink);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(23, 32, 43, 0.45);
  max-width: 480px; width: 100%; justify-self: center;
}
.quote-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.quote-head h2 { font-family: var(--doc); font-size: var(--step-2); margin: 0; font-weight: 700; }
.quote-no { font-size: var(--step--1); color: var(--muted); }
.quote-to { font-size: var(--step--1); color: var(--muted); margin: 4px 0 16px; }
.quote table { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.quote th { text-align: left; font-weight: 600; font-size: var(--step--1); color: var(--muted); border-bottom: 1px solid var(--ink); padding: 6px 0; }
.quote th:last-child, .quote td:last-child { text-align: right; white-space: nowrap; }
.quote td { padding: 9px 0; border-bottom: 1px dashed var(--rule); vertical-align: top; }
.quote td.inc { color: var(--muted); }
.quote tfoot td { border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 12px; font-weight: 700; font-size: var(--step-1); }
.quote-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.quote-note { font-size: var(--step--1); color: var(--muted); margin: 0; }
.stamp {
  flex: none;
  border: 3px solid var(--stamp); color: var(--stamp);
  border-radius: 10px; padding: 6px 12px;
  font: 700 var(--step--1)/1.35 var(--doc); text-align: center;
  transform: rotate(-9deg); background: rgba(255, 255, 255, 0.82);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: stamp-in 420ms cubic-bezier(.2,.9,.3,1.3) 500ms both; }
  @keyframes stamp-in { from { opacity: 0; transform: rotate(-9deg) scale(1.6); } to { opacity: 1; transform: rotate(-9deg) scale(1); } }
}

/* Sections */
section { padding-block: 56px; }
section + section { border-top: 1px solid var(--rule); }
h2.sec { font-size: var(--step-2); line-height: 1.35; margin: 0 0 8px; font-weight: 700; }
.sec-lede { color: var(--muted); margin: 0 0 28px; max-width: 40em; }

/* Work */
.works { display: grid; gap: 28px 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .works { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.work { text-decoration: none; display: grid; gap: 10px; }
.work-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--rule); }
.work-media img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; left: 12px; bottom: 12px;
  background: var(--surface); color: var(--ink);
  font: 700 var(--step--1)/1 var(--doc);
  padding: 8px 12px 8px 20px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.work h3 { margin: 0; font-size: var(--step-1); line-height: 1.35; }
.work p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.work:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.fineprint { font-size: var(--step--1); color: var(--muted); margin-top: 24px; }

/* Prices */
.price-group + .price-group { margin-top: 40px; }
.price-group h3 { font-size: var(--step-1); margin: 0 0 12px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
table.prices { width: 100%; border-collapse: collapse; min-width: 560px; }
table.prices th, table.prices td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.prices th { font-size: var(--step--1); color: var(--muted); font-weight: 600; background: #f4f6f8; }
table.prices tr:last-child td { border-bottom: 0; }
table.prices td.amt { font-family: var(--doc); font-weight: 700; font-size: var(--step-1); white-space: nowrap; }
table.prices td.amt small { display: block; font-weight: 400; font-size: var(--step--1); color: var(--muted); }
table.prices td .name { font-weight: 600; display: block; }
table.prices td .desc { color: var(--muted); font-size: var(--step--1); }
.addons { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); font-size: var(--step--1); }
.addons strong { color: var(--ink); }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; max-width: 46em; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(step); font: 700 var(--step-1)/44px var(--doc); text-align: center;
  width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%;
}
.steps strong { display: block; }
.steps span { color: var(--muted); }

/* FAQ */
.faq { max-width: 46em; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style-position: outside; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Contact */
.contact { display: grid; gap: 24px; align-items: start; }
@media (min-width: 800px) { .contact { grid-template-columns: 1.2fr 1fr; } }
.contact-card { background: var(--surface); border-top: 6px solid var(--line); padding: 24px; }
.contact-card dl { margin: 16px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.contact-card dt { color: var(--muted); }
.contact-card dd { margin: 0; font-weight: 600; }

footer.foot { padding-block: 28px 96px; color: var(--muted); font-size: var(--step--1); border-top: 1px solid var(--rule); }
@media (min-width: 800px) { footer.foot { padding-bottom: 36px; } }

/* Mobile LINE bar */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(232, 237, 241, 0.96); border-top: 1px solid var(--rule);
}
.mbar .btn { flex: 1; }
@media (min-width: 800px) { .mbar { display: none; } }
