:root {
  --quartz: #f3efe6;
  --quartz-deep: #e6e0d2;
  --silver: #f8fafc;
  --ink: #1a2433;
  --muted: #4a5568;
  --emerald: #1f8a6d;
  --emerald-glow: #3ecf9f;
  --violet: #6d4dff;
  --violet-soft: #c4b5fd;
  --cyan: #22d3ee;
  --line: rgba(26, 36, 51, 0.12);
  --glass: rgba(255, 255, 255, 0.46);
  --radius: 22px;
  --shadow: 0 18px 50px rgba(109, 77, 255, 0.08);
  --font: "Noto Sans Thai", system-ui, sans-serif;
  --display: "Fraunces", "Noto Sans Thai", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.75;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(62, 207, 159, 0.28), transparent 55%),
    radial-gradient(800px 380px at 92% 0%, rgba(109, 77, 255, 0.22), transparent 50%),
    radial-gradient(700px 500px at 70% 85%, rgba(34, 211, 238, 0.16), transparent 55%),
    var(--quartz);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(196, 181, 253, 0.12) 48%, transparent 72%);
  animation: aurora-shift 18s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
  from { transform: translateX(-4%); opacity: 0.7; }
  to { transform: translateX(6%); opacity: 1; }
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: var(--emerald);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1rem; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: #fff;
  padding: 0.5rem 0.8rem;
}

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

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

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

.mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.mark-crystal {
  width: 1.15rem;
  height: 1.6rem;
  background: linear-gradient(160deg, var(--violet), var(--emerald-glow) 55%, var(--cyan));
  clip-path: polygon(50% 0, 100% 28%, 82% 100%, 18% 100%, 0 28%);
  box-shadow: 0 0 16px rgba(62, 207, 159, 0.45);
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

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

.site-nav a:hover { color: var(--violet); }

@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; }
  .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    padding: 0.4rem 0 0.8rem;
  }
}

@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .site-nav[hidden] { display: flex !important; }
}

.crystal-panel {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

.hero-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  margin: 1.5rem auto 2.5rem;
  overflow: hidden;
}

.hero-copy {
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

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

.hero-copy h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  margin: 0 0 1rem;
}

.hero-photo {
  min-height: 340px;
  position: relative;
}

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

.caption-plate {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(248, 250, 252, 0.88);
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  font-size: 0.88rem;
  max-width: 16rem;
}

.btn {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-pulse {
  color: #fff;
  background: linear-gradient(120deg, var(--violet), var(--emerald) 60%, var(--cyan));
  box-shadow: 0 8px 24px rgba(31, 138, 109, 0.28);
}

.btn-pulse::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: scale(0);
  opacity: 0;
}

.btn-pulse:hover::after,
.btn-pulse:focus-visible::after {
  animation: crystal-pulse 0.9s ease-out;
}

@keyframes crystal-pulse {
  0% { transform: scale(0); opacity: 0.9; inset: 50% auto auto 50%; }
  100% { transform: scale(18); opacity: 0; inset: 50% auto auto 50%; }
}

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

.text-link {
  font-weight: 600;
}

.section {
  margin: 2.6rem auto;
}

.section h2 {
  font-size: 1.85rem;
  margin-bottom: 0.8rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 42rem;
}

.primary-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  padding: 1.4rem;
  align-items: center;
}

.primary-block img {
  border-radius: 16px;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.offer-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.offer-card {
  padding: 1.1rem;
}

.offer-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 0.8rem;
}

.offer-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quote {
  padding: 1.3rem 1.4rem;
  font-size: 1.05rem;
}

.quote footer {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.team-grid,
.case-grid,
.post-grid,
.price-grid {
  display: grid;
  gap: 1rem;
}

.team-grid { grid-template-columns: repeat(3, 1fr); }
.case-grid { grid-template-columns: 1fr; }
.post-grid { grid-template-columns: repeat(2, 1fr); }
.price-grid { grid-template-columns: repeat(3, 1fr); }

.portrait {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 16px;
}

.case-item {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem;
  padding: 1rem;
}

.case-item img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: 16px;
}

.legal,
.prose {
  padding: 1.6rem 0 3rem;
  max-width: 46rem;
}

.legal h1,
.prose h1 { font-size: 2rem; }

.form {
  display: grid;
  gap: 0.85rem;
  padding: 1.3rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-weight: 500;
}

input,
select,
textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.field-error,
.form-status {
  color: #9b1c4a;
  font-size: 0.92rem;
  min-height: 1.1em;
}

.form-status.is-ok { color: var(--emerald); }

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.28);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.4rem;
  padding: 2rem 0 1rem;
}

.footer-brand {
  font-family: var(--display);
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.footer-label {
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.footer-end {
  padding-bottom: 1.4rem;
  color: var(--muted);
}

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 1.5rem));
  z-index: 30;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(109, 77, 255, 0.2);
  box-shadow: var(--shadow);
  border-radius: 18px;
  backdrop-filter: blur(16px);
}

.cookie-inner { padding: 1rem 0.2rem; }
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.page-hero img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 1.2rem 0;
}

.stack { display: grid; gap: 0.8rem; }

.not-found {
  text-align: center;
  padding: 4rem 1rem 5rem;
}

@media (max-width: 900px) {
  .hero-split,
  .primary-block,
  .case-item,
  .evidence,
  .offer-list,
  .team-grid,
  .post-grid,
  .price-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
