/* Service Studio storefront v0.1.0
   Tokens follow Service Studio 1.2 (Editorial / Clay): paper, ink, clay, soft, Anuphan. */

@font-face { font-family: Anuphan; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/anuphan-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Anuphan; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/anuphan-latin-600-normal.woff2) format('woff2'); }

:root {
  --paper: #f8f5ee;
  --paper-2: #fcfbf7;
  --ink: #292820;
  --clay: #ad442f;
  --soft: #f0d9c8;
  --muted: #5c5a50;
  --on-ink: #f5f3ec;
  --on-ink-muted: #c8c6bb;
  --line: rgba(41, 40, 32, .15);
  --line-strong: rgba(41, 40, 32, .32);
  --font: Anuphan, "Noto Sans Thai", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --gap: clamp(20px, 3vw, 44px);
  --section: clamp(64px, 8vw, 112px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 240ms;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: normal; }
html.modal-open { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
b, strong { font-weight: 600; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 26px; border-radius: 999px; border: 2px solid transparent; font-size: 16px; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer; transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--clay); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 15px; }
.btn[disabled] { cursor: not-allowed; background: #d9d4c8; color: #4a4840; border-color: transparent; transform: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper-2); cursor: pointer; transition: background-color var(--t) var(--ease), transform var(--t) var(--ease); }
.icon-btn:hover { background: var(--soft); transform: rotate(90deg); }

/* Header + navigation */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(248, 245, 238, .92); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(248, 245, 238, .8); backdrop-filter: saturate(1.4) blur(12px); } }
.header-row { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; text-decoration: none; margin-right: auto; }
.brandmark { width: 14px; height: 14px; border-radius: 4px; background: var(--clay); transform: rotate(45deg); flex: none; }
.site-nav { position: relative; }
.nav-list { list-style: none; padding: 0; display: flex; gap: 4px; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 15px; text-decoration: none; transition: color var(--t) var(--ease), background-color var(--t) var(--ease); }
.nav-list a:hover { color: var(--ink); background: rgba(41, 40, 32, .06); }
.nav-list a[aria-current="true"] { color: var(--ink); }
.nav-indicator { position: absolute; left: 0; bottom: 4px; height: 2px; width: 1px; background: var(--clay); border-radius: 2px; opacity: 0; transform-origin: left center; transition: transform 300ms var(--ease), opacity var(--t) var(--ease); pointer-events: none; }
.nav-indicator.is-visible { opacity: 1; }
.status-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 600; white-space: nowrap; }
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-size: 15px; }
.menu-icon { position: relative; width: 16px; height: 10px; }
.menu-icon span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--t) var(--ease), top var(--t) var(--ease); }
.menu-icon span:first-child { top: 0; }
.menu-icon span:last-child { top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-icon span:first-child { top: 4px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon span:last-child { top: 4px; transform: rotate(-45deg); }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 48px; align-items: center; padding-block: clamp(48px, 8vw, 112px); }
.hero-copy { grid-column: 1 / span 7; min-width: 0; }
.hero-visual { grid-column: 8 / span 5; min-width: 0; }
.hero-kind { display: inline-block; background: var(--soft); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; margin-bottom: 24px; }
h1 { font-size: clamp(36px, 5.4vw, 68px); line-height: 1.06; letter-spacing: -.025em; margin-bottom: 24px; max-width: 13em; }
.hero-lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); max-width: 33em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-status { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 15px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--clay); flex: none; }

/* The product sheet: the Editorial 1.2 signature, a card resting on a lined panel */
.hero-visual { display: grid; place-items: center; min-height: 440px; padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); border-radius: var(--r); background: var(--soft) repeating-linear-gradient(0deg, transparent 0 31px, rgba(41, 40, 32, .07) 31px 32px); }
.sheet { width: 100%; max-width: 380px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px 22px; transform: rotate(-2deg); box-shadow: 10px 12px 0 -1px var(--clay), 0 20px 40px -24px rgba(41, 40, 32, .5); }
.sheet-title { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.sheet ul { list-style: none; padding: 0; }
.sheet li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.sheet li b { font-size: 18px; line-height: 1.35; }
.sheet li span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.sheet-foot { font-size: 14px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
html.js-motion .sheet { animation: sheet-settle 700ms var(--ease) 120ms both; }
@keyframes sheet-settle { from { transform: rotate(0) translateY(10px); box-shadow: 0 0 0 -1px var(--clay), 0 20px 40px -24px rgba(41, 40, 32, .5); } to { transform: rotate(-2deg); } }

/* Section heads */
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.15; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 18px; }
.section-head-split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px var(--gap); align-items: end; }
.section-head-split h2 { margin-bottom: 0; }

/* Showcase: dark band, media is the hero of this section */
.showcase { background: var(--ink); color: var(--on-ink); padding-block: var(--section); --focus: var(--soft); }
.showcase :focus-visible { outline-color: var(--soft); }
.showcase .section-head p { color: var(--on-ink-muted); }
.preview-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.preview-card { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.media-frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: #34332a; }
.media-frame-wide { width: 100%; aspect-ratio: 4 / 3; max-height: 42dvh; }
.media-frame img, .media-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(245, 243, 236, .06) 31px 32px), #34332a; color: var(--on-ink-muted); font-size: 15px; }
.media-placeholder span { border: 1px dashed rgba(245, 243, 236, .35); border-radius: 999px; padding: 6px 14px; }
.preview-card .media-frame { transition: transform 300ms var(--ease); }
.preview-card:hover .media-frame { transform: translateY(-4px); }
.media-badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(41, 40, 32, .8); color: var(--on-ink); font-size: 13px; }
.media-badge svg { width: 14px; height: 14px; }
.preview-text h3 { font-size: 22px; line-height: 1.25; margin-bottom: 6px; }
.preview-text p { color: var(--on-ink-muted); font-size: 16px; }
.preview-card .btn { align-self: flex-start; margin-top: auto; border-color: rgba(245, 243, 236, .4); color: var(--on-ink); }
.preview-card .btn:hover { border-color: var(--on-ink); background: rgba(245, 243, 236, .08); }

/* Included: ruled rows, as in the Editorial service list */
.included { padding-block: var(--section); }
.included-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.col-title { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.rows > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 20px; padding: 18px 0; border-top: 1px solid var(--line-strong); }
.rows > div:last-child { border-bottom: 1px solid var(--line-strong); }
.rows dt { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.rows dd { color: var(--muted); font-size: 16px; }

/* How it works */
.how { background: var(--paper-2); padding-block: var(--section); border-block: 1px solid var(--line); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); position: relative; }
.steps::before { content: ""; position: absolute; top: 22px; left: 23px; right: calc((100% - 2 * var(--gap)) / 3 - 23px); height: 2px; background: var(--line-strong); }
.steps li { position: relative; min-width: 0; }
.step-n { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--clay); color: #fff; font-weight: 600; font-size: 18px; margin-bottom: 18px; }
.steps h3 { font-size: 21px; line-height: 1.3; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 16px; }
.limits { margin-top: clamp(40px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px var(--gap); }
.limits h3 { font-size: 18px; }
.limits ul { padding-left: 1.1em; columns: 2; column-gap: var(--gap); color: var(--muted); font-size: 16px; }
.limits li { break-inside: avoid; margin-bottom: 8px; }

/* Availability */
.availability { padding-block: var(--section) 0; }
.availability-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px var(--gap); align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: calc(var(--r) * 1.5); background: var(--soft); }
.availability-panel h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.15; margin-bottom: 12px; }
.availability-panel p { color: #3f3d35; font-size: 18px; max-width: 30em; }
.buy { display: grid; gap: 12px; justify-items: start; }
.buy .btn { min-width: 220px; }
.buy-note { font-size: 15px; color: #3f3d35; }

/* FAQ */
.faq { padding-block: var(--section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 var(--gap); }
.faq .section-head { margin-bottom: 24px; }
.faq-list { min-width: 0; }
details { border-bottom: 1px solid var(--line-strong); }
details:first-child { border-top: 1px solid var(--line-strong); }
summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 4px; font-size: 18px; font-weight: 600; line-height: 1.4; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 11px; height: 11px; border-right: 2px solid var(--clay); border-bottom: 2px solid var(--clay); transform: rotate(45deg) translate(-3px, -3px); transition: transform var(--t) var(--ease); }
details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
details p { color: var(--muted); padding: 0 40px 22px 4px; max-width: 40em; }

/* Contact + footer */
.site-footer { background: var(--ink); color: var(--on-ink); }
.site-footer :focus-visible { outline-color: var(--soft); }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px var(--gap); padding-block: clamp(32px, 4vw, 48px); align-items: center; }
.contact h2 { font-size: clamp(20px, 2vw, 24px); line-height: 1.25; margin-bottom: 4px; }
.contact-copy p { color: var(--on-ink-muted); font-size: 15px; }
.contact-channels { display: grid; gap: 10px; min-width: 0; }
.channel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; padding: 10px 16px; border-radius: var(--r); background: rgba(245, 243, 236, .07); }
.channel-label { grid-column: 1; font-size: 13px; color: var(--on-ink-muted); }
.channel-value { grid-column: 1; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
a.channel-value { text-decoration: underline; text-decoration-color: rgba(245, 243, 236, .35); text-underline-offset: 4px; transition: text-decoration-color var(--t) var(--ease); }
a.channel-value:hover { text-decoration-color: var(--soft); }
.channel-select { user-select: all; -webkit-user-select: all; }
.channel .btn-small { grid-column: 2; grid-row: 1 / 3; border-color: rgba(245, 243, 236, .4); background: transparent; color: var(--on-ink); }
.channel .btn-small:hover { border-color: var(--on-ink); }
.copy-status { grid-column: 1 / -1; font-size: 14px; color: var(--soft); min-height: 0; }
.copy-status:empty { display: none; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-block: 24px; border-top: 1px solid rgba(245, 243, 236, .15); font-size: 14px; color: var(--on-ink-muted); }
.footer-row b { color: var(--on-ink); }
.footer-row a { display: inline-flex; min-height: 44px; align-items: center; }

/* Preview dialog */
.preview-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: calc(var(--r) * 1.5); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); overflow: hidden; }
.preview-dialog::backdrop { background: rgba(28, 27, 22, .62); }
.preview-dialog[open] { display: flex; }
.dialog-inner { display: flex; flex-direction: column; width: 100%; max-height: calc(100dvh - 32px); min-height: 0; }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 24px; border-bottom: 1px solid var(--line); }
.dialog-count { font-size: 14px; color: var(--muted); }
.dialog-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1; }
.dialog-scroll .media-frame { border-radius: 0; }
@media (min-width: 860px) {
  .dialog-scroll { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .dialog-scroll .media-frame { position: sticky; top: 20px; width: auto; max-height: none; margin: 20px 0 20px 20px; border-radius: var(--r); }
  .dialog-scroll .dialog-cols { grid-template-columns: minmax(0, 1fr); }
}
.dialog-body { padding: 24px; display: grid; gap: 14px; }
.dialog-body h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
.dialog-desc { color: var(--muted); font-size: 17px; max-width: 40em; }
.dialog-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px var(--gap); padding-top: 14px; border-top: 1px solid var(--line); }
.dialog-cols h3 { font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.dialog-cols ul { padding-left: 1.1em; }
.dialog-cols li { margin-bottom: 4px; }
.dialog-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--line); }
html.js-motion .preview-dialog[open] .dialog-inner { animation: dialog-in 260ms var(--ease) both; }
html.js-motion .preview-dialog[open]::backdrop { animation: fade-in 220ms ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Reveal: only hidden once main.js has confirmed it can show them again */
html.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
html.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .nav-list a { padding-inline: 9px; font-size: 14px; }
  .included-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  html.js .menu-toggle { display: inline-flex; }
  html.js .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t); box-shadow: 0 20px 30px -24px rgba(41, 40, 32, .5); }
  html.js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s; }
  html.js .nav-list { flex-direction: column; gap: 2px; }
  html.js .nav-list a { font-size: 18px; padding: 12px 10px; width: 100%; }
  html.js .nav-indicator { display: none; }
  html.no-js .site-header { position: static; }
  html.no-js .header-row { flex-wrap: wrap; padding-block: 10px; }
  html.no-js .nav-list { flex-wrap: wrap; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy, .hero-visual { grid-column: 1 / -1; }
  .hero-visual { min-height: 0; }
  .section-head-split { grid-template-columns: minmax(0, 1fr); }
  .preview-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .availability-panel { grid-template-columns: minmax(0, 1fr); }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .limits { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .status-chip { display: none; }
  h1 { font-size: clamp(34px, 10vw, 44px); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .sheet { transform: rotate(-1.5deg); box-shadow: 6px 7px 0 -1px var(--clay), 0 20px 40px -24px rgba(41, 40, 32, .5); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .steps::before { top: 23px; bottom: 23px; left: 22px; right: auto; width: 2px; height: auto; }
  .steps li { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 18px; }
  .step-n { grid-row: 1 / 3; margin: 0; }
  .limits ul { columns: 1; }
  .rows > div { grid-template-columns: minmax(0, 1fr); }
  .buy, .buy .btn { width: 100%; }
  .channel { grid-template-columns: minmax(0, 1fr); }
  .channel .btn-small { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .dialog-cols { grid-template-columns: minmax(0, 1fr); }
  .dialog-body { padding: 20px; }
  .dialog-foot { padding: 12px 20px; }
  .preview-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dialog-inner { max-height: calc(100dvh - 16px); }
  details p { padding-right: 4px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .header-row { gap: 10px; }
  .brand { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js-reveal .reveal { opacity: 1; transform: none; }
  .icon-btn:hover { transform: none; }
}

/* Full preview media: preserve the complete screenshot/video. Card thumbnails retain cover. */
.preview-dialog .media-frame img, .preview-dialog .media-frame video { object-fit: contain; }

/* Builder: controls on a ruled sheet, the live site sitting on the lined clay-soft panel from the hero */
.builder { padding-block: var(--section); border-top: 1px solid var(--line); }
.builder-fallback { padding: 18px 22px; border: 1px dashed var(--line-strong); border-radius: var(--r); color: var(--muted); }
.bench { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.bench-controls { min-width: 0; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 4px clamp(18px, 2.4vw, 28px) 20px; }
.group { min-width: 0; margin: 0; padding: 20px 0 22px; border: 0; border-top: 1px solid var(--line); }
.group:first-child { border-top: 0; }
.group legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--muted); }
.group legend + * { clear: both; }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: grid; gap: 2px; align-content: start; padding: 8px 8px 12px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; transition: box-shadow var(--t) var(--ease), background-color var(--t) var(--ease); }
.choice:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.choice input, .swatch-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.choice:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--clay); }
.choice:has(input:focus-visible), .swatch-choice:has(input:focus-visible) { outline: 3px solid var(--clay); outline-offset: 3px; }
.choice-name { font-weight: 600; font-size: 15px; line-height: 1.3; margin-top: 8px; padding-inline: 2px; }
.choice-desc { font-size: 13px; line-height: 1.4; color: var(--muted); padding-inline: 2px; }
.choice-art { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.choice-art i { position: absolute; display: block; border-radius: 2px; }
.art-editorial i:nth-child(1) { left: 10%; top: 26%; width: 38%; height: 9%; background: var(--ink); }
.art-editorial i:nth-child(2) { left: 10%; top: 44%; width: 30%; height: 6%; background: rgba(41, 40, 32, .35); }
.art-editorial i:nth-child(3) { right: 9%; top: 14%; width: 34%; height: 72%; background: var(--soft); box-shadow: 3px 3px 0 var(--clay); transform: rotate(-3deg); }
.art-minimal { background: #fff; }
.art-minimal i:nth-child(1) { left: 10%; top: 22%; width: 44%; height: 9%; background: var(--ink); }
.art-minimal i:nth-child(2) { left: 10%; top: 40%; width: 34%; height: 6%; background: rgba(41, 40, 32, .3); }
.art-minimal i:nth-child(3) { left: 10%; right: 10%; bottom: 14%; height: 22%; background: var(--soft); }
.art-contrast { background: var(--ink); box-shadow: none; }
.art-contrast i:nth-child(1) { left: 10%; top: 24%; width: 78%; height: 13%; background: var(--on-ink); }
.art-contrast i:nth-child(2) { left: 10%; top: 46%; width: 50%; height: 6%; background: var(--on-ink-muted); opacity: .6; }
.art-contrast i:nth-child(3) { left: 10%; right: 10%; bottom: 18%; height: 2px; background: var(--soft); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch-choice { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px 6px 8px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 15px; font-weight: 600; cursor: pointer; transition: box-shadow var(--t) var(--ease), background-color var(--t) var(--ease); }
.swatch-choice:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.swatch-choice:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.swatch { width: 28px; height: 28px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(41, 40, 32, .15); }
.sw-clay { background: linear-gradient(135deg, #ad442f 0 50%, #f0d9c8 50% 100%); }
.sw-forest { background: linear-gradient(135deg, #28644a 0 50%, #d6e4cd 50% 100%); }
.sw-indigo { background: linear-gradient(135deg, #514aad 0 50%, #ded9ef 50% 100%); }

.field { display: grid; gap: 6px; min-width: 0; }
.field + .field { margin-top: 14px; }
.field label { font-size: 15px; font-weight: 600; line-height: 1.4; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; transition: border-color var(--t) var(--ease); }
.field textarea { resize: vertical; min-height: 0; }
.field input:hover, .field textarea:hover { border-color: rgba(41, 40, 32, .5); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--clay); outline-offset: 1px; border-color: var(--ink); }
.field input::placeholder { color: #8a877b; }
.field [aria-invalid="true"] { border-color: #a3361f; box-shadow: inset 0 0 0 1px #a3361f; }
.hint { font-size: 14px; line-height: 1.5; color: var(--muted); }
.field-error { font-size: 14px; line-height: 1.5; color: #8f3121; font-weight: 600; }
.service-field { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; row-gap: 10px; }
.service-field + .service-field { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.service-field .field { grid-column: 2; }
.service-field .field + .field { margin-top: 0; }
.service-n { grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 30px; border-radius: 50%; background: var(--soft); font-size: 14px; font-weight: 600; }
.bench-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.to-preview { display: none; min-height: 44px; align-items: center; font-size: 15px; font-weight: 600; text-underline-offset: 4px; }
.builder-status { font-size: 14px; color: var(--muted); margin-top: 10px; }
.builder-status:empty { display: none; }

.bench-preview { position: sticky; top: calc(var(--header-h) + 16px); min-width: 0; display: grid; gap: 14px; }
.bench-preview:focus { outline: none; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.stage-title { font-size: 18px; line-height: 1.3; }
.stage-meta { font-size: 14px; color: var(--muted); }
.device-toggle { display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--paper-2); }
.device-toggle button { min-height: 44px; min-width: 88px; padding: 6px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.device-toggle button:hover { color: var(--ink); }
.device-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.stage { display: grid; justify-items: center; padding: clamp(14px, 2.4vw, 28px); border-radius: var(--r); background: var(--soft) repeating-linear-gradient(0deg, transparent 0 31px, rgba(41, 40, 32, .07) 31px 32px); overflow: hidden; }
.device { max-width: 100%; background: var(--paper-2); }
.device.is-desktop { width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 8px 10px 0 -1px var(--clay), 0 24px 40px -28px rgba(41, 40, 32, .55); }
.device.is-phone { padding: 10px; border-radius: 38px; background: var(--ink); box-shadow: 8px 10px 0 -1px var(--clay), 0 24px 40px -28px rgba(41, 40, 32, .55); }
.device-chrome { display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.device.is-phone .device-chrome { display: none; }
.dots { display: inline-flex; gap: 6px; flex: none; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(41, 40, 32, .2); }
.device-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.viewport { position: relative; overflow: hidden; background: #fff; }
.device.is-phone .viewport { border-radius: 28px; }
.viewport iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.stage-note { font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 48em; }
.download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.download > div { min-width: 0; flex: 1 1 260px; }
.download-title { font-weight: 600; font-size: 17px; }
.download-note { font-size: 14px; line-height: 1.5; color: #4a4840; max-width: 34em; }
.download .btn { min-width: 180px; }

@media (max-width: 1024px) {
  .bench { grid-template-columns: minmax(0, 1fr); }
  .bench-preview { position: static; order: -1; }
  .to-preview { display: inline-flex; }
}
@media (max-width: 640px) {
  .choices { grid-template-columns: minmax(0, 1fr); }
  .choice { grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 8px; }
  .choice-art { grid-row: 1 / 3; }
  .choice-name { margin-top: 0; align-self: end; }
  .choice-desc { align-self: start; }
  .device-toggle { width: 100%; }
  .device-toggle button { flex: 1; }
  .download .btn { width: 100%; }
}

/* ==========================================================================
   v0.3.0 "Editorial Studio" layer.
   Direction: a design studio's printed catalogue for its own template. One family (Anuphan 400/600),
   a stricter type scale, square-cornered precision, hairline structure. Decorative pills, blur and
   scattered entrance motion are removed; the hero headline is the one bold element.
   ========================================================================== */
:root {
  --r: 4px;
  --ink-soft: #3d3c33;
  --section: clamp(80px, 10vw, 144px);
}
body { font-size: 17px; line-height: 1.7; }

/* Header: opaque paper, no frosted glass; status as plain text with the clay dot */
.site-header { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
.brandmark { border-radius: 1px; }
.nav-list a { border-radius: var(--r); }
.status-chip { min-height: 0; padding: 0; border-radius: 0; background: none; font-weight: 600; font-size: 14px; gap: 8px; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); }
.menu-toggle { border-radius: var(--r); }

/* Buttons: square-cornered, solid clay primary, quiet secondary */
.btn { border-radius: var(--r); min-height: 50px; padding: 12px 24px; letter-spacing: .005em; }
.btn:active { transform: none; }
.btn-ghost { border-width: 1px; }
.icon-btn { border-radius: var(--r); }
.icon-btn:hover { transform: none; }

/* Hero: the headline is the statement */
.hero { padding-block: clamp(56px, 9vw, 128px) clamp(56px, 8vw, 112px); row-gap: 56px; align-items: end; }
.hero-kind { display: block; background: none; border-radius: 0; padding: 0 0 14px; margin-bottom: 28px; border-bottom: 1px solid var(--line-strong); max-width: 22em; font-size: 15px; font-weight: 600; color: var(--muted); }
h1 { font-size: clamp(44px, 7.2vw, 96px); line-height: .98; letter-spacing: -.04em; max-width: 10.5em; margin-bottom: 32px; }
.hero-lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; max-width: 30em; color: var(--ink-soft); }
.hero-actions { margin-top: 40px; }
.hero-visual { border-radius: 0; min-height: 460px; }
.sheet { border-radius: 2px; }

/* Section heads: editorial split, title left, standfirst right */
.section-head { max-width: none; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px var(--gap); align-items: end; padding-top: 20px; border-top: 1px solid var(--line-strong); margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 0; }
.section-head p { font-size: 18px; line-height: 1.6; max-width: 34em; }
.showcase .section-head { border-top-color: rgba(245, 243, 236, .25); }
.faq .section-head { display: block; border-top: 0; padding-top: 0; }
.faq .section-head h2 { margin-bottom: 12px; }

/* Showcase: plain labels instead of pills, no lifting cards */
.media-frame { border-radius: 2px; }
.media-placeholder span { border: 0; border-radius: 0; padding: 0; border-bottom: 1px solid rgba(245, 243, 236, .35); }
.media-badge { border-radius: 2px; }
.preview-card:hover .media-frame { transform: none; }
.preview-text h3 { font-size: 24px; letter-spacing: -.015em; }

/* Included: denser ruled list */
.rows > div { padding: 20px 0; }
.rows dt { font-size: 18px; }

/* Steps are a real sequence: large figures, no badges or connector line */
.steps::before { display: none; }
.steps li { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.step-n { display: block; width: auto; height: auto; border-radius: 0; background: none; color: var(--clay); font-size: 56px; line-height: 1; font-weight: 400; letter-spacing: -.04em; margin-bottom: 20px; }
.steps h3 { font-size: 22px; letter-spacing: -.01em; }

/* Availability: a ruled notice, not a coloured card */
.availability-panel { border-radius: 0; background: transparent; border: 1px solid var(--ink); }
.availability-panel h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -.03em; }
.availability-panel p, .buy-note { color: var(--ink-soft); }

/* FAQ */
summary { font-size: 19px; min-height: 64px; }

/* Footer contact (email only) */
.channel { border-radius: var(--r); background: transparent; box-shadow: inset 0 0 0 1px rgba(245, 243, 236, .22); }

/* Builder controls: same precision corners */
.bench-controls, .choice, .choice-art, .field input, .field textarea, .stage, .device.is-desktop { border-radius: var(--r); }
.swatch-choice, .device-toggle, .device-toggle button { border-radius: var(--r); }
.service-n { border-radius: 0; background: none; color: var(--clay); font-size: 16px; }
.builder-fallback { border-radius: var(--r); }
.preview-dialog { border-radius: var(--r); }

/* Motion: keep the single hero moment (sheet settles); sections no longer fade up one by one */
html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }

@media (max-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .hero { align-items: start; }
}
@media (max-width: 640px) {
  h1 { font-size: clamp(40px, 12vw, 56px); line-height: 1; }
  .step-n { font-size: 44px; }
  .steps li { display: block; }
  .section-head h2, .availability-panel h2 { font-size: clamp(30px, 8.5vw, 40px); }
}
/* v0.3.1 review fixes */
/* Hit targets: brand link and footer email reach 44px */
.brand { min-height: 44px; }
a.channel-value { display: inline-flex; align-items: center; min-height: 44px; }
/* Narrow screens: the preview sits above a long form, so keep "Show the preview" and the reset within reach */
@media (max-width: 1024px) {
  .bench-tools { position: sticky; bottom: 0; z-index: 2; margin-inline: calc(-1 * clamp(18px, 2.4vw, 28px)); padding: 12px clamp(18px, 2.4vw, 28px); background: var(--paper-2); border-top: 1px solid var(--line-strong); }
  .to-preview { padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--r); text-decoration: none; }
}@media (max-width: 1024px) {
  .bench-tools { flex-wrap: nowrap; gap: 8px; }
  .bench-tools .btn-small, .to-preview { min-height: 44px; padding-inline: 12px; font-size: 14px; white-space: nowrap; }
}

/* v0.4.0: 7 colour themes sit in an even grid instead of a ragged wrap */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
.swatch-choice { padding-right: 10px; }
@media (max-width: 380px) { .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } .swatch-choice { font-size: 14px; } }

/* v0.5.0: language switch, Thai page */
.lang-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 14px; color: var(--muted); text-underline-offset: 4px; white-space: nowrap; }
.lang-link:hover { color: var(--ink); }
.lang-note { margin-top: 18px; max-width: 34em; font-size: 15px; color: var(--muted); }
/* Thai needs room above and below the line for vowels and tone marks: no tight leading or negative tracking */
.lang-th { line-height: 1.85; }
.lang-th h1 { line-height: 1.32; letter-spacing: 0; font-size: clamp(36px, 5.4vw, 68px); max-width: 14em; }
.lang-th h2, .lang-th .section-head h2, .lang-th .availability-panel h2 { line-height: 1.4; letter-spacing: 0; }
.lang-th h3, .lang-th summary, .lang-th .step-n { letter-spacing: 0; }
.lang-th summary { line-height: 1.6; }
.brand { white-space: nowrap; flex: none; }
.lang-th .nav-list a { padding-inline: 10px; }
@media (max-width: 640px) { .lang-th h1 { font-size: clamp(30px, 8.6vw, 40px); } }