/* ============================================================
   ข้างกัน สตูดิโอ — Website v29
   ============================================================ */

:root {
  --ink:    #141414;
  --paper:  #ffffff;
  --muted:  #8a8a85;
  --line:   #e6e5e0;
  --hover:  #f5f4f0;
  --accent: #3d4a38;

  --pad: clamp(24px, 4vw, 56px);
  --font-body: "IBM Plex Sans Thai", "Noto Sans Thai", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { font-weight: 600; line-height: 1.22; }

.mono { font-family: var(--font-mono); }
.label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pad { padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- Notice bar ---------- */
.mock-bar { display: none; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 40; background: var(--paper); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 var(--pad); }
.brand { font-weight: 600; font-size: 1.18rem; letter-spacing: .01em; display: flex; align-items: center; gap: 9px; }
.brand-gif { height: 34px; width: auto; display: block; }
.brand small { font-family: var(--font-mono); font-weight: 400; font-size: .62rem; letter-spacing: .18em; color: #555; text-transform: uppercase; }

/* ---------- Nav right ---------- */
.nav-right { display: flex; align-items: center; gap: 12px; }

/* ---------- Hamburger ---------- */
.menu-btn { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-btn span { width: 22px; height: 1.5px; background: var(--ink); transition: .25s; }
.header.open .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.header.open .menu-btn span:nth-child(2) { opacity: 0; }
.header.open .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Dropdown nav ---------- */
.links {
  list-style: none;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  padding: 0 var(--pad) 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.header.open .links { max-height: 600px; padding-bottom: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.links a { display: block; padding: 14px 0; font-size: .95rem; letter-spacing: .04em; }
.links a:hover { color: var(--muted); }
.links a.active { border-bottom: 1px solid var(--ink); display: inline-block; padding-bottom: 2px; }

/* ---------- Nav sub-menu ---------- */
.nav-item-row { display: flex; align-items: center; justify-content: space-between; }
.nav-item-row a { flex: 1; }
.nav-item-row a.active { flex: none; }
.sub-toggle { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 0 4px; transition: transform .2s; line-height: 1; }
.has-sub.open .sub-toggle { transform: rotate(90deg); }
.sub-links { list-style: none; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.has-sub.open .sub-links { max-height: 200px; }
.sub-links li a { padding: 9px 0 9px 20px !important; font-size: .85rem; color: var(--muted); letter-spacing: .03em; }
.sub-links li a:hover { color: var(--ink); }

/* ---------- Language toggle ---------- */
.lang-btn { font-family: var(--font-mono); font-size: .63rem; letter-spacing: .12em; text-transform: uppercase; background: none; border: 1px solid var(--line); padding: 5px 10px; color: var(--muted); cursor: pointer; transition: .15s; }
.lang-btn:hover, .lang-btn:focus { border-color: var(--ink); color: var(--ink); outline: none; }
.links .lang-item { padding: 10px 0 4px; }

/* ---------- Social icons ---------- */
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--muted); transition: color .15s; }
.social-icon:hover { color: var(--ink); }
.social-icon svg { display: block; }

/* ---------- Filter bar ---------- */
.filter { }
.filter-in { display: flex; flex-wrap: wrap; align-items: center; padding: 0 var(--pad); font-family: var(--font-mono); font-size: .73rem; letter-spacing: .06em; text-transform: uppercase; }
.filter a { padding: 13px 18px 13px 0; color: var(--muted); white-space: nowrap; }
.filter a.on, .filter a:hover { color: var(--ink); }
.filter .count { margin-left: auto; color: var(--muted); }

/* ---------- Intro ---------- */
.intro { padding: 34px var(--pad) 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.intro h1 { font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 500; max-width: 780px; line-height: 1.3; }
.intro .meta { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }

/* ---------- Hover image cycle ---------- */
.shot { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.72); font-size: .76rem; }
.shot.on { opacity: 1; }
.ticks { position: absolute; left: 11px; right: 11px; bottom: 11px; display: flex; gap: 4px; z-index: 2; opacity: 0; transition: opacity .2s; }
.item:hover .ticks { opacity: 1; }
.ticks i { flex: 1; height: 2px; background: rgba(255,255,255,.4); }
.ticks i.on { background: #fff; }

/* ---------- Project list ---------- */
.list { padding-bottom: 80px; }
.item { display: grid; grid-template-columns: 45% 1fr; cursor: pointer; text-decoration: none; min-height: 280px; }
.item:hover { background: var(--hover); }
.item .pic { position: relative; overflow: hidden; background: var(--hover); align-self: stretch; }
.item .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s ease; }
.item:hover .shot.on img { transform: scale(1.04); }
.item .meta { padding: clamp(24px,3vw,40px) clamp(24px,3vw,48px); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.item h3 { font-size: clamp(1.1rem, 2.2vw, 1.7rem); font-weight: 600; line-height: 1.3; }
.item .meta-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.item .meta-sub { display: flex; align-items: center; gap: 8px; }
.item .loc, .item .yr { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.item .desc { font-size: .9rem; color: var(--muted); line-height: 1.72; }
.cat-tag { display: inline-block; background: var(--hover); color: var(--muted); font-family: var(--font-mono); font-size: .65rem; padding: 2px 10px; border-radius: 90px; letter-spacing: .04em; white-space: nowrap; }

/* ---------- Tone placeholders ---------- */
.ph { background: linear-gradient(150deg,#9aa6ad,#5d6b72); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.72); font-size: .8rem; }
.ph { position: relative; overflow: hidden; border: 1px dashed var(--line); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t1 { background: #4a6741; } .t2 { background: #8b6f4e; } .t3 { background: #5a7a6e; }
.t4 { background: #7a6a54; } .t5 { background: #6b7a6e; } .t6 { background: #5c6b58; }

/* ---------- Project detail ---------- */
.pj-wrap { display: grid; grid-template-columns: 200px 1fr; align-items: start; }
.pj-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 28px 22px 40px; scrollbar-width: none; }
.pj-sidebar::-webkit-scrollbar { display: none; }
.pj-back { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 24px; }
.pj-back:hover { color: var(--ink); }
.pj-ico-wrap { margin-bottom: 14px; }
.pj-ico { width: 52px; height: 52px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .02em; }
.pj-ico-wrap img { width: 52px; height: 52px; object-fit: cover; display: block; }
.pj-name { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.pj-loc { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; margin-bottom: 24px; }
.pj-specs { display: flex; flex-direction: column; }
.pjs { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.pjs small { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pjs span { font-size: .88rem; }
.pj-carousel { position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; user-select: none; }
.pj-carousel.is-dragging { cursor: grabbing; }
.pj-carousel::-webkit-scrollbar { display: none; }
.pj-track { display: flex; height: 100%; }
.pj-slide-img { flex: none; height: 100%; aspect-ratio: 4/3; overflow: hidden; }
.pj-slide-img img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--paper); }
.pj-slide-text { flex: 0 0 260px; height: 100%; padding: 44px 28px 44px 20px; overflow-y: auto; font-size: .9rem; line-height: 1.88; color: var(--muted); scrollbar-width: none; }
.pj-slide-text::-webkit-scrollbar { display: none; }
.pj-slide-text p + p { margin-top: 14px; }
.pj-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; color: #fff; background: rgba(0,0,0,.4); padding: 5px 13px; z-index: 5; pointer-events: none; }

/* ---------- Generic sections ---------- */
.section { padding: 64px var(--pad); }
.page-head { padding: 56px var(--pad) 44px; }
.page-head .label { margin-bottom: 14px; display: block; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 500; max-width: 880px; }
.page-head p { color: var(--muted); max-width: 600px; margin-top: 16px; }
.maxw { max-width: 760px; }
.lead { font-size: 1.15rem; font-weight: 500; max-width: 760px; line-height: 1.5; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; }

/* ---------- Rows (services / process) ---------- */
.rows { }
.row { display: grid; grid-template-columns: 70px 1fr 1.4fr; gap: 24px; padding: 26px 0; align-items: baseline; }
.row .num { font-family: var(--font-mono); color: var(--muted); font-size: .8rem; }
.row h3 { font-size: 1.2rem; }
.row p { color: var(--muted); font-size: .95rem; }
.row ul { color: var(--muted); font-size: .92rem; list-style: none; }
.row ul li { padding: 1px 0; }

/* ---------- Slideshow ---------- */
.slideshow { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #1a1a1a; }
.slideshow .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); font-size: .85rem; }
.slideshow .slide.on { opacity: 1; }
.ss-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: none; background: rgba(255,255,255,.85); cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: .2s; z-index: 2; }
.ss-nav:hover { background: #fff; }
.ss-nav.prev { left: 16px; } .ss-nav.next { right: 16px; }
.counter { position: absolute; left: 16px; bottom: 16px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; color: #fff; background: rgba(0,0,0,.4); padding: 5px 11px; z-index: 2; }
.dots { position: absolute; right: 16px; bottom: 18px; display: flex; gap: 7px; z-index: 2; }
.dots i { width: 8px; height: 8px; border: 1px solid #fff; border-radius: 50%; cursor: pointer; transition: .2s; }
.dots i.on { background: #fff; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 56px var(--pad); }
.cinfo .row2 { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0; }
.cinfo .row2 b { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 0; border: none; border-bottom: 1px solid var(--line); font-family: var(--font-body); font-size: 1rem; background: transparent; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.btn { display: inline-block; padding: 14px 30px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--ink); cursor: pointer; transition: .2s; }
.btn:hover { background: var(--paper); color: var(--ink); }
.form-note { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); margin-top: 14px; letter-spacing: .03em; }

/* ---------- Footer ---------- */
.footer { }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; padding: 44px var(--pad); }
.footer h4 { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.footer ul { list-style: none; }
.footer ul li { padding: 4px 0; font-size: .92rem; color: var(--muted); }
.footer ul li a:hover { color: var(--ink); }
.footer .brand { margin-bottom: 12px; }
.footer .tag { font-size: .92rem; color: var(--muted); max-width: 280px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px var(--pad); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .pj-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .item { grid-template-columns: 1fr; min-height: auto; }
  .item .pic { aspect-ratio: 4/3; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .pj-sidebar { position: static; height: auto; padding: 24px var(--pad) 20px; }
  .pj-specs { flex-direction: row; flex-wrap: wrap; }
  .pjs { width: 50%; padding: 10px 8px 10px 0; }
  .pj-slide-img { aspect-ratio: 4/5; }
  .pj-slide-text { display: none; }
}
