:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #16191c;
  --muted: #5d656c;
  --line: #e6e3dc;
  --brand: #3497b4;
  --brand-dark: #23738b;
  --brand-soft: #e7f3f7;
  --radius: 0;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Poppins", "Noto Sans Thai", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: .75em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 40em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 250, 247, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 8px; height: 68px; }
.header-inner .logo { margin-right: auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.45rem; }
.logo img { height: 40px; width: auto; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 14px; border-radius: 0;
}
.nav a:hover { background: var(--brand-soft); }
.nav a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-soft); }
.lang {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .85rem;
  padding: 6px 12px; border: 1px solid var(--ink); line-height: 1.4;
}
.lang:hover { background: var(--ink); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 720px) {
  .nav-toggle { display: block; order: 3; }
  .nav {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav a { padding: 12px 4px; border-radius: 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current="page"], .nav a:hover { background: none; }
  .nav-open .nav { display: flex; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 0; font: inherit; font-weight: 500;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Homepage hero: moving photo rows */
.hero { position: relative; padding: 18px 0 0; overflow: hidden; }
.photo-rows { display: grid; gap: 12px; position: relative; }
.photo-row { overflow: hidden; height: var(--row-h, clamp(150px, 27vh, 320px)); }
.photo-track {
  display: flex; gap: 12px; height: 100%; width: max-content;
  animation: slide 60s linear infinite;
}
.photo-track.reverse { animation-direction: reverse; }
.photo-tile { height: 100%; flex: none; display: flex; gap: 4px; }
.photo-tile.stack { flex-direction: column; }
.photo-tile img { flex: 1 1 0; min-width: 0; min-height: 0; width: 100%; height: 100%; object-fit: cover; background: var(--line); }
.photo-tile img { cursor: zoom-in; }
@media (hover: hover) {
  .photo-row:hover .photo-track { animation-play-state: paused; }
}
.photo-rows.paused .photo-track, .lightbox-open .photo-track { animation-play-state: paused; }
.rows-pause {
  position: absolute; right: var(--gutter); bottom: 12px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(22, 25, 28, .75); color: #fff; border: 0; cursor: pointer;
}
.rows-pause:hover { background: var(--ink); }
.rows-pause svg { width: 18px; height: 18px; }

/* Large photo view */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 12, 14, .94);
  display: grid; place-items: center; padding: 56px 64px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 112px); width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 2.6rem; line-height: 1; width: 56px; height: 56px; opacity: .85;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 4px; right: 4px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-size: .85rem; margin: 0; }
.lightbox-open { overflow: hidden; }
@media (max-width: 720px) {
  .lightbox { padding: 56px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 0; transform: none; }
}
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero-text { text-align: center; padding: clamp(40px, 7vw, 80px) 0 clamp(48px, 8vw, 96px); }
.hero-text h1 span { color: var(--brand); }
.hero-text .lead { margin: 0 auto 1.8em; }
.hero-text .btn-row { justify-content: center; }

@media (max-width: 720px) {
  .photo-rows { gap: 8px; }
  .photo-track { gap: 8px; }
  .photo-row { --row-h: clamp(140px, 22vh, 220px); }
}

@media (prefers-reduced-motion: reduce) {
  .photo-track { animation: none; }
  .photo-row { overflow-x: auto; }
}

/* Sections */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-head { padding: clamp(48px, 8vw, 96px) 0 clamp(24px, 4vw, 40px); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split img.square { aspect-ratio: 1 / 1; max-width: 480px; justify-self: end; }
@media (max-width: 640px) { .split { grid-template-columns: 1fr; } .split img.square { justify-self: start; } }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 32px; }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { margin-bottom: .3em; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.cta { text-align: center; }
.cta .lead { margin: 0 auto 1.6em; }
.cta .btn-row { justify-content: center; }

/* Price page */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.price-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column;
}
.price-card.featured { border: 2px solid var(--brand); }
.price-card .tag { align-self: flex-start; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); background: var(--brand-soft); padding: 4px 10px; border-radius: 0; margin-bottom: 14px; }
.price-card h3 { font-size: 1.3rem; margin-bottom: .1em; }
.price-card .bonus { color: var(--muted); margin-bottom: 18px; }
.price-card .amount { font-size: 2.2rem; font-weight: 600; line-height: 1; margin-top: auto; }
.price-card .amount small { font-size: 1rem; font-weight: 500; color: var(--muted); }

.price-columns { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); margin-top: clamp(40px, 6vw, 64px); }
@media (max-width: 820px) { .price-columns { grid-template-columns: 1fr; } }
.addons { list-style: none; margin: 0; padding: 0; }
.addons li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.addons li span:last-child { font-weight: 600; white-space: nowrap; }
.included { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.included li { display: flex; gap: 12px; align-items: flex-start; }
.included li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%2323738b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.examples { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; margin-top: 24px; }
.examples figure { margin: 0; text-align: center; color: var(--muted); font-size: .9rem; }
.examples img { height: 280px; width: auto; border-radius: 0; margin-bottom: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
@media (max-width: 520px) { .examples img { height: 200px; } }
.note { color: var(--muted); font-size: .9rem; margin-top: 16px; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.contact-list a { font-size: 1.1rem; font-weight: 500; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--brand-dark); }
.contact-list small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
.form input, .form textarea, .form select {
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 0;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.form textarea { min-height: 120px; resize: vertical; }
.hidden { display: none; }

/* About */
.partner { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.partner img { width: 64px; height: 64px; border-radius: 0; flex: none; }
.partner p { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* Thai text: wide letter spacing and capitals don't suit Thai script */
:lang(th) .eyebrow, :lang(th) .price-card .tag, :lang(th) .contact-list small { letter-spacing: .02em; text-transform: none; }
:lang(th) body { line-height: 1.75; }
