:root {
  --ink: #17202b;
  --muted: #4d5b6a;
  --paper: #eef3f6;
  --quartz: rgba(255, 255, 255, 0.58);
  --emerald: #0d9b6e;
  --violet: #6b4de8;
  --cyan: #2ec4d6;
  --silver: #f7fafc;
  --line: rgba(107, 77, 232, 0.18);
  --radius: 1.35rem;
  --shadow: 0 18px 50px rgba(23, 32, 43, 0.12);
  --font: "Sarabun", "IBM Plex Sans Thai", sans-serif;
  --display: "IBM Plex Sans Thai", "Sarabun", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(46, 196, 214, 0.28), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(107, 77, 232, 0.22), transparent 50%),
    radial-gradient(800px 500px at 70% 100%, rgba(13, 155, 110, 0.18), transparent 55%),
    var(--paper);
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--violet); }
a:hover { color: var(--emerald); }

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(238, 243, 246, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 1.7rem;
  height: 1.7rem;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 50%, var(--emerald));
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 18px rgba(46, 196, 214, 0.45);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--quartz);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.site-nav a[aria-current="page"] {
  color: var(--emerald);
}

.crystal {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.38)),
    linear-gradient(120deg, rgba(46, 196, 214, 0.12), rgba(107, 77, 232, 0.1), rgba(13, 155, 110, 0.1));
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
}

.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 78vh;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 78vh;
}

.hero-copy {
  margin: 2.5rem 2rem 2.5rem -3rem;
  padding: 2.2rem 2rem;
  align-self: center;
  position: relative;
  z-index: 1;
}

.kicker {
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--emerald);
  font-weight: 600;
  margin: 0 0 0.6rem;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0 0 1rem; }
h2 { font-size: 1.55rem; }
.lede { font-size: 1.12rem; color: var(--muted); }

.text-cta {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--cyan);
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--emerald), var(--violet) 55%, var(--cyan));
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(107, 77, 232, 0.28);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  transform: translateX(-120%);
}

.btn:hover::after {
  animation: crystal-pulse 0.85s ease;
}

@keyframes crystal-pulse {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.band { padding: 4rem 0; }
.band-alt { background: rgba(255,255,255,0.28); }
.intro { color: var(--muted); max-width: 46rem; }

.primary-offer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-top: 1.5rem;
}

.primary-offer img { height: 100%; object-fit: cover; min-height: 280px; }
.primary-offer > div { padding: 1.6rem; }

.offer-list, .team-grid, .portfolio-grid, .service-index, .post-index {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1.2rem;
}

.offer-list { grid-template-columns: repeat(2, 1fr); }
.offer-list li, .team-grid li, .portfolio-grid li { overflow: hidden; }
.offer-list img, .team-grid img, .portfolio-grid img, .service-index img, .post-index img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.offer-list h3, .offer-list p, .team-grid h3, .team-grid p, .portfolio-grid h2, .portfolio-grid p {
  padding: 0 1.1rem;
}
.offer-list h3 { margin-bottom: 0.3rem; }
.offer-list p:last-child, .team-grid p:last-child { padding-bottom: 1.1rem; }

.quote-stack blockquote {
  padding: 1.4rem 1.6rem;
  margin: 1rem 0 0;
}
.quote-stack footer { color: var(--muted); font-size: 0.95rem; }

.visit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}
.visit-row img { border-radius: var(--radius); height: 280px; object-fit: cover; width: 100%; }

.page-hero { padding: 3.2rem 0 1rem; }
.prose { max-width: 42rem; }
.prose.legal { max-width: 48rem; }
.meta { color: var(--muted); }

.team-grid, .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
.team-grid .meta, .portfolio-grid .meta { padding: 0.8rem 1.1rem 0; margin: 0; }

.service-index li, .post-index li {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
}
.service-index img, .post-index img { height: 100%; min-height: 160px; }
.service-index div, .post-index div { padding: 1.2rem 1.3rem; }

.detail-hero img {
  width: 100%;
  height: min(52vh, 420px);
  object-fit: cover;
}
.service-detail, .post-detail { padding-bottom: 4rem; }

.price-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}
.price-table th, .price-table td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.form-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.4rem;
}
.form, .visit-card { padding: 1.5rem; }
.field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: var(--silver);
  color: var(--ink);
}
.field-error, .form-status {
  color: #9b1c3a;
  margin: 0.35rem 0 0;
}
.form-status[data-ok="true"] { color: var(--emerald); }

.cta-row { margin-top: 2rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 1.5rem;
  background: rgba(255,255,255,0.35);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 1.2rem;
}
.footer-brand { font-family: var(--display); font-weight: 700; }
.footer-label { font-weight: 700; margin-bottom: 0.3rem; }
.footer-legal { list-style: none; padding: 0; margin: 0; }
.footer-copy { color: var(--muted); margin-top: 1.5rem; }

.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 40;
}
.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(238,243,246,0.9)),
    linear-gradient(120deg, rgba(46,196,214,0.18), rgba(107,77,232,0.16));
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-split, .primary-offer, .visit-row, .form-layout, .footer-grid,
  .offer-list, .team-grid, .portfolio-grid, .service-index li, .post-index li {
    grid-template-columns: 1fr;
  }
  .hero-copy { margin: -3rem 1rem 1.5rem; }
  .hero-photo img { min-height: 42vh; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(238, 243, 246, 0.96);
    padding: 0.8rem 1rem 1.2rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .header-inner { position: relative; }
}
