:root {
  --plate: #eef1f3;
  --plate-deep: #e1e6ea;
  --ink: #17212b;
  --ink-soft: #4a5866;
  --teal: #4c2286;
  --teal-ink: #ffffff;
  --filament: #fbc41f;
  --line: #c9d1d8;
  --surface: #ffffff;
  --danger: #b42318;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --font-display: "Anuphan", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai Looped", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --plate: #121a21;
    --plate-deep: #0d1318;
    --ink: #e8eef2;
    --ink-soft: #a5b3bf;
    --teal: #b79cf2;
    --teal-ink: #1d0b38;
    --filament: #fbc41f;
    --line: #2a3742;
    --surface: #18222b;
    --danger: #ff8a7a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --plate: #121a21;
  --plate-deep: #0d1318;
  --ink: #e8eef2;
  --ink-soft: #a5b3bf;
  --teal: #b79cf2;
  --teal-ink: #1d0b38;
  --filament: #fbc41f;
  --line: #2a3742;
  --surface: #18222b;
  --danger: #ff8a7a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plate);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--filament); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; font-weight: 700; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- chrome ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand img { height: 34px; width: auto; display: block; }
.brand-tag { font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 700px) { .brand-tag { display: none; } }
.nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--filament); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 0;
  background: var(--teal);
  color: var(--teal-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.nav .btn { color: var(--teal-ink); padding: 9px 16px; font-size: .95rem; }
.site-footer {
  padding: 40px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .95rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- hero: the layer-lines headline ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(48px, 7vw, 104px);
}
.hero-kicker { color: var(--ink-soft); font-size: 1rem; margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 6.2rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  background: repeating-linear-gradient(180deg, var(--ink) 0 0.075em, color-mix(in srgb, var(--ink) 78%, var(--teal)) 0.075em 0.09em);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: layer-up 1.4s steps(14, end) both;
}
@keyframes layer-up {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) { .hero h1 { animation: none; } }
.hero-sub { margin-top: 22px; max-width: 36em; font-size: 1.15rem; color: var(--ink-soft); }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.plate {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--plate-deep);
  padding: clamp(18px, 3vw, 32px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.plate a { display: block; width: 86%; text-decoration: none; }
.plate img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); box-shadow: 0 18px 40px -22px rgba(0,0,0,.45); }
.plate-caption { margin-top: 12px; font-size: .92rem; color: var(--ink-soft); }
.plate-empty { color: var(--ink-soft); text-align: center; max-width: 18em; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 96px) var(--gutter); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.section-head p { color: var(--ink-soft); max-width: 34em; }
.text-link { color: var(--teal); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 5px; }

.kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.kind { padding: 22px 22px 6px 0; }
.kind + .kind { padding-left: 22px; border-left: 1px solid var(--line); }
.kind h3 { font-size: 1.2rem; margin-bottom: 8px; }
.kind p { color: var(--ink-soft); font-size: .98rem; }

/* steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 58px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--teal);
}
.steps li::after { content: ""; position: absolute; top: 20px; left: 44px; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.15rem; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- work tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.tile { text-decoration: none; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tile-media { aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--plate-deep); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile-media img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .tile-media img { transition: none; } }
.tile h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.tile p { color: var(--ink-soft); font-size: .96rem; }
.tile-media.placeholder { background: repeating-linear-gradient(180deg, var(--plate-deep) 0 4px, var(--plate) 4px 7px); }
.skeleton .tile-media { background: var(--plate-deep); animation: pulse 1.6s ease-in-out infinite; }
.skeleton .bar { height: 1em; width: 60%; border-radius: 4px; background: var(--plate-deep); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skeleton .tile-media, .skeleton .bar { animation: none; } }
.note { color: var(--ink-soft); padding: 28px 0; }
.error-note { color: var(--danger); }

.page-head { padding: clamp(40px, 6vw, 80px) var(--gutter) 0; max-width: 60rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.1rem; max-width: 40em; }
.crumbs { margin-bottom: 14px; font-size: .95rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }

/* project detail */
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 56px); padding: clamp(32px, 5vw, 64px) var(--gutter); }
.project-info h1 { font-size: clamp(1.9rem, 4vw, 3rem); overflow-wrap: anywhere; }
.project-info .desc { margin-top: 14px; color: var(--ink-soft); }
.details { margin: 24px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: .98rem; }
.details dt { color: var(--ink-soft); }
.details dd { margin: 0; }
.gallery { display: grid; gap: clamp(14px, 2vw, 22px); }
.gallery figure { margin: 0; }
.gallery img, .gallery video { width: 100%; max-height: 80vh; object-fit: contain; background: var(--plate-deep); border-radius: var(--radius-md); }
@media (max-width: 700px) { .gallery img, .gallery video { max-height: 62vh; } }
.gallery figcaption { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }
.project-cta { margin-top: 28px; }

/* ---------- quote form ---------- */
.quote { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); padding: clamp(40px, 6vw, 80px) var(--gutter); align-items: start; }
.quote-intro h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.quote-intro > p { margin-top: 16px; color: var(--ink-soft); font-size: 1.08rem; }
.checklist { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .55em; width: 16px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--teal) 0 2px, transparent 2px 4px); }
.form-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3.5vw, 40px); }
.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label, .field legend { font-weight: 600; font-size: 1rem; }
.field .req { color: var(--danger); margin-left: 4px; }
.field .help { font-size: .9rem; color: var(--ink-soft); }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="tel"],
.field input[type="number"], .field input[type="date"], .field input[type="time"], .field input[type="datetime-local"],
.field input[type="password"], .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.err { color: var(--danger); font-size: .92rem; min-height: 0; }
.err:empty { display: none; }
.form-error { color: var(--danger); margin-bottom: 14px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.thanks { padding: 12px 0; }
.thanks h2 { font-size: 1.6rem; margin-bottom: 10px; }
.thanks p + p { margin-top: 8px; }
.form-skeleton .bar { height: 44px; border-radius: var(--radius-sm); background: var(--plate-deep); margin-bottom: 18px; animation: pulse 1.6s ease-in-out infinite; }

/* ---------- pricing ---------- */
.price-block { padding: clamp(32px, 5vw, 64px) var(--gutter); }
.price-block + .price-block { border-top: 1px solid var(--line); }
.price-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-bottom: 10px; }
.price-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); }
.price-tag { font-size: .95rem; color: var(--teal); font-weight: 600; }
.price-for { color: var(--ink-soft); max-width: 46em; margin-bottom: 22px; }
.base-rate { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px 18px; border-left: 4px solid var(--filament); background: var(--surface); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-bottom: 24px; }
.base-rate strong { font-family: var(--font-display); font-size: 1.5rem; }
.base-rate span { color: var(--ink-soft); font-size: .95rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.price-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.price-table th, .price-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.price-table tr:last-child td { border-bottom: 0; }
.price-table thead th { font-family: var(--font-display); font-size: .98rem; background: color-mix(in srgb, var(--teal) 10%, var(--surface)); }
.price-table td.num { font-family: var(--font-display); font-weight: 600; white-space: nowrap; font-size: 1.05rem; }
.price-table .unit { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.price-table td.note { color: var(--ink-soft); font-size: .96rem; }
.price-note { margin-top: 16px; color: var(--ink-soft); font-size: .95rem; max-width: 46em; }
.free-consult { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: var(--filament); color: #1d0b38; font-weight: 600; font-size: .92rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .quote, .project { grid-template-columns: 1fr; }
  .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kind:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .kinds, .steps { grid-template-columns: 1fr; }
  .kind + .kind { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .steps li::after { display: none; }
  .site-header { flex-wrap: wrap; }
  .nav { width: 100%; justify-content: space-between; }
}