/*
Theme Name: JOM Building
Theme URI: https://jom-building.co.th
Author: JOM All Building Solutions
Author URI: https://jom-building.co.th
Description: Premium architectural WordPress theme for construction and design-build companies. Editorial layout with numbered sections, bilingual Thai/English content, five brand palettes, light/dark mode, and adjustable layout density. Six page templates: Home, About, Services, Projects, Project Detail, and Contact.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jom-building
Tags: business, portfolio, custom-colors, custom-logo, custom-menu, dark-mode, two-columns, translation-ready, featured-images
*/

/* ============================================
   JOM — All Building Solutions
   Premium Architectural Theme
   ============================================ */

:root {
  /* Palette — light (default) */
  --bg:        #f5f3ee;
  --surface:   #ffffff;
  --surface-2: #ebe7dd;
  --ink:       #15140f;
  --ink-2:     #2a2823;
  --muted:     #7a766c;
  --line:      #d9d4c6;
  --line-soft: #e6e2d6;
  --accent:    #c8202b;   /* JOM red */
  --accent-2:  #c75a1f;   /* terra */
  --ok:        #356b3b;

  /* Type — Kanit display + IBM Plex body: modern, full Thai + Latin support */
  --font-display: "Kanit", "IBM Plex Sans Thai", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", "IBM Plex Sans Thai", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "IBM Plex Sans Thai", ui-monospace, monospace;

  /* Scale */
  --gutter: 56px;
  --section-y: 140px;
  --radius: 2px;
  --max: 1480px;
}

[data-density="compact"] {
  --gutter: 40px;
  --section-y: 96px;
}
[data-density="roomy"] {
  --gutter: 72px;
  --section-y: 180px;
}

[data-theme="dark"] {
  --bg:        #0f0e0b;
  --surface:   #1a1813;
  --surface-2: #24211a;
  --ink:       #f3efe4;
  --ink-2:     #d9d4c6;
  --muted:     #8e887a;
  --line:      #2e2a22;
  --line-soft: #232017;
}

[data-palette="oxblood"] {
  --accent:   #8a1a22;
  --accent-2: #b6743a;
}
[data-palette="midnight"] {
  --accent:   #0f2942;
  --accent-2: #2a6fbd;
}
[data-palette="forest"] {
  --accent:   #2a4a32;
  --accent-2: #b6743a;
}
[data-palette="mono"] {
  --accent:   #15140f;
  --accent-2: #7a766c;
}

[data-typeface="plex"] {
  --font-display: "IBM Plex Sans", "IBM Plex Sans Thai", ui-sans-serif, system-ui, sans-serif;
}
[data-typeface="trirong"] {
  --font-display: "Trirong", "IBM Plex Sans Thai", Georgia, serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

/* Responsive scale — gutters + section rhythm shrink on tablets and phones */
@media (max-width: 1024px) { :root { --section-y: 104px; } }
@media (max-width: 720px)  { :root { --gutter: 24px; --section-y: 84px; } }
@media (max-width: 420px)  { :root { --gutter: 18px; --section-y: 60px; } }

/* WordPress accessibility helpers */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; padding: 0;
  overflow: hidden; position: absolute !important; word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 12px 18px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
}
.skip-link:focus { left: 8px; top: 8px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft  { float: left;  margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }

/* Layout primitives */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: 1680px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section-tight { padding: calc(var(--section-y) * 0.55) 0; }

/* Type */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-variation-settings: "wdth" 100;
}
/* Thai stacks vowels + tone marks vertically — tight Latin leading makes them
   collide between lines, so Thai gets generous leading and no negative tracking. */
[data-lang="th"] .display,
[data-lang="th"] .svc h3,
[data-lang="th"] .svc-detail h3 {
  line-height: 1.28;
  letter-spacing: 0;
}
.d-xl { font-size: clamp(56px, 8.4vw, 148px); }
.d-lg { font-size: clamp(44px, 6vw, 96px); }
.d-md { font-size: clamp(32px, 4vw, 64px); }
.d-sm { font-size: clamp(24px, 2.6vw, 40px); }
/* Phones: shrink display minimums so big headings never overflow a narrow screen */
@media (max-width: 600px) {
  .d-xl { font-size: clamp(38px, 10.6vw, 60px); }
  .d-lg { font-size: clamp(32px, 8.4vw, 48px); }
  .d-md { font-size: clamp(26px, 6.4vw, 40px); }
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.mono-sm { font-size: 10px; }

.lead {
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
}
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn .arr { width: 14px; height: 14px; }

/* Rules / dividers */
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.hr-strong { background: var(--ink); }

/* Section header pattern */
.sect-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gutter);
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.sect-head .index { color: var(--accent); }
.sect-head h2 { margin: 0; }
@media (max-width: 880px) {
  .sect-head { grid-template-columns: 1fr; gap: 20px; padding-bottom: 28px; margin-bottom: 36px; }
}

/* Image well placeholder */
.img-well {
  position: relative;
  background: var(--surface-2);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(0,0,0,0.04) 14px 15px
  );
  overflow: hidden;
}
[data-theme="dark"] .img-well {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(255,255,255,0.04) 14px 15px
  );
}
.img-well > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.img-well .label {
  position: absolute;
  inset: auto auto 12px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 8px;
  z-index: 1;
}
.img-well .corner {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  z-index: 1;
}

/* Tag chips */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
}
.tag.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.accent { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Selection */
::selection { background: var(--accent); color: #fff; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: 1680px; margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 18px;
}
.nav-logo-mark {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nav-logo-tag {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--ink);
  position: relative;
  padding-left: 18px;
  white-space: nowrap;
}
.nav-logo-tag::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 1px; height: 26px;
  background: var(--line);
  transform: translateY(-50%);
}

.nav-collapse { display: contents; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links li { position: relative; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 13.5px;
  white-space: nowrap;
  color: var(--ink-2);
  border-radius: 2px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links .current-menu-ancestor > a,
.nav-links a.active { color: var(--ink); }
.nav-links .current-menu-item > a::after,
.nav-links .current_page_item > a::after,
.nav-links .current-menu-ancestor > a::after,
.nav-links a.active::after {
  content: ""; display: block; height: 1px; background: var(--accent);
  margin-top: 4px;
}

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-quote-hidden { display: none; }
.lang-toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px; gap: 2px;
}
.lang-toggle button {
  background: transparent; border: 0; border-radius: 999px;
  padding: 4px 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--muted);
}
.lang-toggle button.on { background: var(--ink); color: var(--bg); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 2px;
}
.nav-toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .nav-collapse {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 26px;
  }
  .nav.open .nav-collapse { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--line-soft); }
  .nav-links .current-menu-item > a::after,
  .nav-links .current_page_item > a::after,
  .nav-links .current-menu-ancestor > a::after,
  .nav-links a.active::after { display: inline-block; width: 18px; margin-left: 8px; vertical-align: middle; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 16px; }
  .nav-actions .lang-toggle { align-self: flex-start; }
  .nav-actions .lang-toggle button { padding: 9px 18px; font-size: 11px; }
  .nav-actions .btn { justify-content: center; padding: 16px 22px; }
}

@media (max-width: 480px) {
  .nav-inner { padding-top: 14px; padding-bottom: 14px; }
  .nav-logo { gap: 14px; }
  .nav-logo-mark { width: 42px; height: 42px; }
  .nav-logo-tag { font-size: 13px; padding-left: 14px; }
  .nav-logo-tag::before { height: 22px; }
}
@media (max-width: 360px) {
  .nav-logo-tag { display: none; }
}

/* Footer */
.foot {
  background: var(--ink);
  color: var(--bg);
  padding: 100px 0 40px;
}
[data-theme="dark"] .foot { background: var(--surface); color: var(--ink); }
.foot a:hover { color: var(--accent); }
.foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 80px; border-bottom: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .foot-top { border-bottom-color: var(--line); }
.foot h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 20px; color: rgba(255,255,255,0.55); }
[data-theme="dark"] .foot h4 { color: var(--muted); }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 28px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
[data-theme="dark"] .foot-bottom { color: var(--muted); }
.foot-mark {
  font-family: var(--font-display);
  font-size: clamp(42px, 7.6vw, 116px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-transform: uppercase;
  margin: 48px 0 24px;
}
.foot-mark .fm-dot { color: var(--accent); }

/* Company facts strip — moved here from the hero */
.foot-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
[data-theme="dark"] .foot-meta { border-top-color: var(--line); color: var(--muted); }
.foot-meta b { display: block; margin-top: 5px; font-weight: 500; font-size: 12px; color: var(--bg); }
[data-theme="dark"] .foot-meta b { color: var(--ink); }
@media (max-width: 600px) { .foot-meta { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (max-width: 880px) {
  .foot-top { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
}
@media (max-width: 520px) {
  .foot { padding-top: 64px; }
  .foot-top { grid-template-columns: 1fr; }
}

/* Page transitions */
.page-enter { animation: pageIn .45s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .page-enter { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* HOME — Hero */
.hero {
  position: relative;
  padding-top: 60px;
}
.hero-meta {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
  padding: 0 0 36px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.hero-meta b { display: block; color: var(--ink); font-weight: 500; margin-top: 4px; font-size: 11px; }
.hero-title { padding: 56px 0 40px; }
/* Hero eyebrow — pill badge with pulsing dot + supporting line */
.hero-eyebrow {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 14px 18px;
  margin-bottom: 28px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 15px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 10px 28px -10px color-mix(in oklab, var(--accent) 70%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.18);
  white-space: nowrap;
}
.hero-badge-dot {
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: heroBadgePulse 2.2s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes heroBadgePulse {
  0%   { box-shadow: 0 0 0 0   rgba(255,255,255,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0   rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-badge-dot { animation: none; }
}
.hero-badge-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-left: 18px;
}
.hero-badge-sub::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 10px; height: 1px;
  background: var(--line);
  transform: translateY(-50%);
}
@media (max-width: 480px) {
  .hero-eyebrow { gap: 10px 14px; margin-bottom: 22px; }
  .hero-badge { padding: 8px 14px 8px 12px; font-size: 10.5px; letter-spacing: 0.14em; }
  .hero-badge-dot { width: 6px; height: 6px; }
  .hero-badge-sub { font-size: 10px; padding-left: 14px; }
  .hero-badge-sub::before { width: 8px; }
}
.hero-title h1 { margin: 0; }
.hero-sub {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: var(--gutter);
  align-items: end;
  padding: 24px 0 56px;
}
.hero-image {
  position: relative;
  aspect-ratio: 21 / 10;
  width: 100%;
}
.hero-image .badge {
  position: absolute; top: 24px; left: 24px;
  background: var(--bg); padding: 10px 14px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  z-index: 1;
}
.hero-image .badge b { color: var(--accent); }
.hero-corner-num {
  position: absolute; right: 24px; bottom: 20px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 72px; line-height: 1; color: var(--bg);
  mix-blend-mode: difference;
}

@media (max-width: 880px) {
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 36px; }
  .hero-title { padding: 32px 0 28px; }
  .hero-sub { grid-template-columns: 1fr; padding: 16px 0 36px; }
  .hero-sub .hero-actions { justify-content: flex-start !important; }
}
@media (max-width: 700px) { .hero-image { aspect-ratio: 3 / 2; } }

/* Services grid */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.svc {
  padding: 40px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  display: flex; flex-direction: column;
  min-height: 320px;
  transition: background .2s ease;
}
.svc:hover { background: var(--surface); }
.svc .num { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; }
.svc h3 { margin: 16px 0 14px; font-family: var(--font-display); font-weight: 500; font-size: 28px; letter-spacing: -0.02em; line-height: 1.05; }
.svc p { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; }
.svc .link { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.svc .link svg { width: 14px; height: 14px; transition: transform .2s ease; }
.svc:hover .link svg { transform: translateX(4px); }
@media (max-width: 1100px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 880px)  { .svc { min-height: 0; padding: 32px 24px; } }
@media (max-width: 600px)  { .services { grid-template-columns: 1fr; } }

/* Projects featured */
.proj-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}
.proj-grid .col { display: flex; flex-direction: column; gap: 32px; }
.proj-card { display: block; cursor: pointer; }
.proj-card .img-well { aspect-ratio: 4 / 3; }
.proj-card.big .img-well { aspect-ratio: 4 / 5; }
.proj-meta {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 0 0; gap: 16px;
}
.proj-meta h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.015em; transition: color .15s ease; }
.proj-meta .right { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.1em; text-align: right; }
.proj-card:hover h3 { color: var(--accent); }

@media (max-width: 880px) { .proj-grid { grid-template-columns: 1fr; } }

/* House types selector */
.types {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.type-card { background: var(--bg); padding: 28px; min-height: 280px; display: flex; flex-direction: column; cursor: pointer; transition: background .2s ease; }
.type-card:hover { background: var(--surface); }
.type-card .num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.14em; }
.type-card .ill { aspect-ratio: 4 / 3; margin: 16px 0 20px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.type-card h4 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; letter-spacing: -0.01em; }
.type-card .meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.type-card .price { margin-top: auto; padding-top: 16px; font-family: var(--font-mono); font-size: 11px; color: var(--ink); letter-spacing: 0.1em; }
@media (max-width: 1100px) { .types { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .types { grid-template-columns: 1fr; } .type-card { min-height: 0; } }

/* Process */
.process {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--line);
}
.step {
  background: var(--bg); padding: 36px 28px; position: relative;
  display: flex; flex-direction: column; gap: 20px;
  min-height: 280px;
}
.step .step-num {
  font-family: var(--font-display); font-weight: 500;
  font-size: 72px; line-height: 1; letter-spacing: -0.04em;
  color: var(--accent);
}
.step h4 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; letter-spacing: -0.01em; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.step .tag { align-self: flex-start; margin-top: auto; }
@media (max-width: 1100px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } .step { min-height: 0; } }

/* Team */
.team-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.member .img-well { aspect-ratio: 3 / 4; }
.member h4 { margin: 16px 0 4px; font-family: var(--font-display); font-weight: 500; font-size: 19px; letter-spacing: -0.01em; }
.member .role { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 880px) { .team-grid { grid-template-columns: 1fr 1fr; } }

/* CTA quote band */
.cta-band {
  background: var(--ink);
  color: var(--bg);
  padding: var(--section-y) var(--gutter);
}
[data-theme="dark"] .cta-band { background: var(--surface); }
.cta-band .wrap-inner { max-width: 1480px; margin: 0 auto; }
.cta-band .layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center; }
.cta-band h2 { margin: 0; color: var(--bg); }
[data-theme="dark"] .cta-band h2 { color: var(--ink); }
.cta-band .lead { color: rgba(255,255,255,0.7); }
[data-theme="dark"] .cta-band .lead { color: var(--ink-2); }
.cta-band .lead a { color: var(--bg); }
[data-theme="dark"] .cta-band .lead a { color: var(--ink); }
.cta-band .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); margin-top: 12px; }
.cta-band .btn-ghost { background: transparent; color: var(--bg); border-color: rgba(255,255,255,0.3); }
[data-theme="dark"] .cta-band .btn-ghost { color: var(--ink); border-color: var(--line); }
@media (max-width: 880px) { .cta-band .layout { grid-template-columns: 1fr; gap: 40px; } }

/* ABOUT page */
.about-hero { padding: 80px 0 60px; border-bottom: 1px solid var(--line); }
.about-meta {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 60px;
  padding: 80px 0; border-bottom: 1px solid var(--line);
}
.about-meta h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 16px; color: var(--muted); }
.about-meta p { margin: 0; color: var(--ink-2); }
.about-img-block { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 60px 0; }
.about-img-block .img-well { aspect-ratio: 4 / 5; }
.about-img-block .copy { padding: 40px 0; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value { background: var(--bg); padding: 48px 32px; }
.value .v-num { font-family: var(--font-display); font-weight: 500; font-size: 48px; color: var(--accent); line-height: 1; margin-bottom: 24px; }
.value h3 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -0.015em; }
.value p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 880px) { .values { grid-template-columns: 1fr; } }

/* SERVICES page */
.svc-detail { padding: 80px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 2fr; gap: var(--gutter); }
.svc-detail:last-child { border-bottom: 0; }
.svc-detail .lft .num { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; margin-bottom: 12px; }
.svc-detail h3 { margin: 0 0 24px; font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 4vw, 56px); letter-spacing: -0.025em; line-height: 1; }
.svc-detail .rgt { display: flex; flex-direction: column; gap: 28px; }
.svc-detail .rgt p { margin: 0; max-width: 60ch; color: var(--ink-2); }
.svc-detail .checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; padding: 24px 0; margin: 0; border-top: 1px solid var(--line); }
.svc-detail .checklist li { list-style: none; padding-left: 24px; position: relative; font-size: 14.5px; }
.svc-detail .checklist li::before { content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 1px; background: var(--accent); }
.svc-detail .svc-img { aspect-ratio: 16 / 9; }
@media (max-width: 620px) { .svc-detail .checklist { grid-template-columns: 1fr; } }

/* PROJECTS page */
.proj-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.filter-btn { background: transparent; border: 1px solid var(--line); padding: 8px 16px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); border-radius: 999px; transition: background .15s ease, color .15s ease; }
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.proj-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.proj-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.proj-list .proj-card .img-well { aspect-ratio: 4 / 3; }
.proj-list .proj-card.is-hidden { display: none; }
@media (max-width: 1100px) { .proj-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .proj-list { grid-template-columns: 1fr; } }

/* PROJECT DETAIL */
.pd-hero { padding-top: 40px; }
.pd-breadcrumb { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 32px; }
.pd-breadcrumb b { color: var(--ink); }
.pd-breadcrumb a:hover { color: var(--accent); }
.pd-title { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gutter); align-items: end; padding: 24px 0 48px; border-bottom: 1px solid var(--line); }
.pd-title h1 { margin: 0; }
.pd-title .meta-list { display: flex; flex-direction: column; gap: 14px; }
.pd-title .meta-list .row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pd-title .meta-list .row span:first-child { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pd-feature-img { aspect-ratio: 16 / 9; margin: 56px 0; }
.pd-body { display: grid; grid-template-columns: 1fr 2fr; gap: var(--gutter); padding: 0 0 80px; border-bottom: 1px solid var(--line); }
.pd-body h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 32px; letter-spacing: -0.02em; }
.pd-body .copy p { margin: 0 0 18px; color: var(--ink-2); }
.pd-gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding: 80px 0; }
.pd-gallery .g-cell { aspect-ratio: 1; }
.pd-gallery .g-cell.span-2 { grid-column: span 2; aspect-ratio: 1; }
.pd-gallery .g-cell.span-3 { grid-column: span 3; aspect-ratio: 1.4; }
.pd-gallery .g-cell.span-4 { grid-column: span 4; aspect-ratio: 1.5; }
.pd-gallery .g-cell.row-2 { grid-row: span 2; aspect-ratio: 0.7; }
.pd-upnext { border-top: 1px solid var(--line); padding: 60px 0; }
.pd-upnext-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; align-items: center; }
.pd-upnext a { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.pd-upnext a:hover h3 { color: var(--accent); }
@media (max-width: 880px) {
  .pd-gallery { grid-template-columns: repeat(2, 1fr); }
  .pd-gallery .g-cell, .pd-gallery .g-cell.span-2, .pd-gallery .g-cell.span-3,
  .pd-gallery .g-cell.span-4, .pd-gallery .g-cell.row-2 {
    grid-column: span 1; grid-row: span 1; aspect-ratio: 1;
  }
}

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gutter); }
.contact-form { display: flex; flex-direction: column; gap: 6px; }
.contact-form .field { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact-form input, .contact-form textarea, .contact-form select {
  background: transparent; border: 0; font-family: var(--font-body); font-size: 18px; color: var(--ink); outline: none; padding: 4px 0; width: 100%;
}
.contact-form select option { background: var(--surface); color: var(--ink); }
.contact-form textarea { min-height: 80px; resize: vertical; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-side { display: flex; flex-direction: column; gap: 32px; }
.contact-side .block { padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.contact-side h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 16px; color: var(--muted); }
.contact-side .big { font-family: var(--font-display); font-weight: 500; font-size: 26px; letter-spacing: -0.015em; line-height: 1.1; }
.form-note { font-size: 13.5px; padding: 14px 0; }
.form-note.ok { color: var(--ok); }
.form-note.err { color: var(--accent); }

@media (max-width: 880px) {
  .contact-grid, .pd-body, .pd-title, .about-img-block, .about-meta, .svc-detail, .pd-upnext-grid {
    grid-template-columns: 1fr; gap: 32px;
  }
  .contact-form .row { grid-template-columns: 1fr; gap: 6px; }
  .about-hero { padding: 48px 0 36px; }
  .about-meta { padding: 48px 0; gap: 36px; }
  .about-img-block { padding: 40px 0; }
  .about-img-block .copy { padding: 8px 0; }
  .svc-detail { padding: 48px 0; }
  .pd-body { padding-bottom: 56px; }
  .pd-gallery { padding: 48px 0; }
}

/* Generic page / posts (index.php, page.php, single.php) */
.entry { padding: var(--section-y) 0; }
.entry-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.entry-title { margin: 0; }
.entry-content { max-width: 72ch; }
.entry-content > * { margin: 0 0 20px; }
.entry-content h2 { font-family: var(--font-display); font-weight: 500; font-size: 32px; letter-spacing: -0.02em; margin-top: 48px; }
.entry-content h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -0.015em; margin-top: 36px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { border-left: 2px solid var(--accent); padding-left: 24px; margin-left: 0; color: var(--ink-2); }
.entry-content img { margin: 32px 0; }
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object { max-width: 100%; }
.entry-content table { display: block; width: 100%; overflow-x: auto; }
.entry-meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.post-card .img-well { aspect-ratio: 4 / 3; }
.post-card h3 { margin: 16px 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.015em; }
.post-card:hover h3 { color: var(--accent); }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 64px; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--font-mono); font-size: 12px;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--ink); }
@media (max-width: 980px) { .post-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .post-list { grid-template-columns: 1fr; } }

/* Language visibility — toggled by jom-theme.js via [data-lang] on <html> */
[data-lang="th"] .i18n-en { display: none; }
[data-lang="en"] .i18n-th { display: none; }

/* Homepage CTA — "Why JOM" trust card */
.cta-trust-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 36px 32px;
}
[data-theme="dark"] .cta-trust-card { background: var(--surface-2); border-color: var(--line); }
.cta-trust-kicker {
  display: block;
  color: rgba(255,255,255,0.55);
  margin-bottom: 24px;
}
[data-theme="dark"] .cta-trust-kicker { color: var(--muted); }
.cta-trust-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.cta-trust-list li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cta-trust-list li:first-child { padding-top: 6px; }
.cta-trust-list li:last-child { padding-bottom: 0; border-bottom: 0; }
[data-theme="dark"] .cta-trust-list li { border-bottom-color: var(--line); }
.cta-trust-mark {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  color: var(--accent);
  margin-top: 3px;
}
.cta-trust-text {
  flex: 1;
  font-size: 14.5px; line-height: 1.55;
  color: rgba(255,255,255,0.78);
}
[data-theme="dark"] .cta-trust-text { color: var(--ink-2); }
.cta-trust-text b {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  color: var(--bg);
}
[data-theme="dark"] .cta-trust-text b { color: var(--ink); }
@media (max-width: 560px) {
  .cta-trust-card { padding: 28px 22px; }
  .cta-trust-list li { padding: 16px 0; gap: 12px; }
  .cta-trust-mark { flex-basis: 20px; width: 20px; height: 20px; }
  .cta-trust-text { font-size: 14px; }
  .cta-trust-text b { font-size: 15.5px; }
}

/* Request-a-quote popup modal */
.quote-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.quote-modal.is-open { display: flex; align-items: center; justify-content: center; padding: 24px; }
.quote-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,14,11,0.62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.quote-modal-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-x: hidden; overflow-y: auto;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line);
  padding: 44px 40px 40px;
  animation: quoteIn .3s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes quoteIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .quote-modal-panel { animation: none; } }
.quote-modal-x {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: transparent;
  border-radius: 2px; font-size: 20px; line-height: 1; color: var(--ink);
}
.quote-modal-x:hover { background: var(--surface-2); border-color: var(--ink); }
.quote-modal .contact-form { margin-top: 2px; }
.quote-modal .form-note { margin-bottom: 8px; }
body.quote-open { overflow: hidden; }
@media (max-width: 560px) {
  .quote-modal.is-open { padding: 0; }
  .quote-modal-panel {
    max-width: none;
    max-height: 100vh; max-height: 100dvh;
    min-height: 100vh; min-height: 100dvh;
    padding: 56px 22px 32px; border: 0;
  }
}

/* Floating side CTA — appears after ~40% scroll, foldable */
.float-cta {
  position: fixed;
  right: 0; top: 50%;
  z-index: 90;
  display: flex; align-items: stretch;
  transform: translate( 100%, -50% );
  transition: transform .42s cubic-bezier(.2,.7,.2,1);
}
.float-cta.is-shown { transform: translate( 0, -50% ); }
.float-cta.is-shown.is-collapsed { transform: translate( calc( 100% - 36px ), -50% ); }
.float-cta-handle {
  flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); border: 0;
  color: #fff; cursor: pointer;
}
.float-cta-chev svg { display: block; transition: transform .3s ease; }
.float-cta.is-collapsed .float-cta-chev svg { transform: rotate( 180deg ); }
.float-cta-panel {
  width: 232px;
  background: var(--bg);
  border: 1px solid var(--line); border-right: 0;
  padding: 24px 22px;
  box-shadow: -10px 0 34px rgba(0,0,0,0.16);
}
.float-cta-kicker { color: var(--accent); }
.float-cta-text {
  margin: 12px 0 18px;
  font-size: 13.5px; line-height: 1.5;
  color: var(--muted);
}
.float-cta-panel .btn { width: 100%; justify-content: center; }
@media (max-width: 600px) { .float-cta { display: none; } }
