:root {
  --color-ink: #1a1f1c;
  --color-ink-soft: #3d4540;
  --color-muted: #5c675f;
  --color-surface: #f3f5f1;
  --color-surface-2: #e6ebe4;
  --color-paper: #fafbf8;
  --color-primary: #0f3d3e;
  --color-primary-deep: #0a2c2d;
  --color-accent: #c17f3a;
  --color-accent-hover: #a66a2e;
  --color-line: #c9d2c8;
  --color-error: #8b2e2e;
  --color-success: #1f5c3a;
  --font-display: "Bai Jamjuree", sans-serif;
  --font-body: "Sarabun", sans-serif;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --radius: 4px;
  --shadow: 0 12px 32px rgba(15, 61, 62, 0.08);
  --max: 1120px;
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(193, 127, 58, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(15, 61, 62, 0.07), transparent 45%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-paper) 40%, var(--color-surface) 100%);
  min-height: 100vh;
}

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

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--color-primary-deep);
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-3);
}

ul, ol {
  margin: 0 0 var(--space-3);
  padding-left: 1.25rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-deep);
  color: #fff;
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

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

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 251, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-3);
}

.site-header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

.site-nav__cta {
  background: var(--color-accent);
  color: #fff !important;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
}

.site-nav__cta:hover {
  background: var(--color-accent-hover);
  color: #fff !important;
}

@media (max-width: 960px) {
  .site-header__toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav.is-open {
    max-height: 420px;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3) 1rem var(--space-4);
    gap: 0.75rem;
  }
}

/* Footer */
.site-footer {
  margin-top: var(--space-6);
  background: var(--color-primary-deep);
  color: #d7e0d8;
  padding: var(--space-6) 0 var(--space-4);
}

.site-footer a {
  color: #eef3ee;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-5);
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}

.site-footer__label {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-2);
}

.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__links li {
  margin-bottom: 0.35rem;
}

.site-footer__copy {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--color-paper);
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
  padding: var(--space-3) 0;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.95rem;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Home hero — full-bleed image composition */
.home-hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: grid;
  align-items: end;
  background-color: var(--color-primary-deep);
  background-image: linear-gradient(120deg, rgba(10, 44, 45, 0.88) 0%, rgba(10, 44, 45, 0.45) 55%, rgba(10, 44, 45, 0.25) 100%),
    url("https://images.unsplash.com/photo-1553413077-190dd305871c?w=1600&h=900&fit=crop");
  background-size: cover;
  background-position: center;
  color: #f4f7f4;
  overflow: hidden;
  animation: hero-in 0.9s ease both;
}

.home-hero__content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto var(--space-6);
  max-width: 36rem;
  padding-bottom: var(--space-4);
}

.home-hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-3);
  color: #fff;
  line-height: 1.05;
}

.home-hero__lead {
  font-size: 1.15rem;
  margin-bottom: var(--space-4);
  color: #e2ebe3;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: var(--space-6) 0;
}

.section--alt {
  background: rgba(230, 235, 228, 0.55);
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  max-width: 22ch;
}

.section__lead {
  color: var(--color-muted);
  max-width: 48ch;
  margin-bottom: var(--space-5);
}

.offer-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}

.offer-strip__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 280px;
}

.offer-strip__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.offer-strip__list {
  list-style: none;
  padding: 0;
}

.offer-strip__list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-line);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.service-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.25s ease;
  animation: rise 0.6s ease both;
}

.service-tile:nth-child(2) { animation-delay: 0.08s; }
.service-tile:nth-child(3) { animation-delay: 0.16s; }
.service-tile:nth-child(4) { animation-delay: 0.24s; }
.service-tile:nth-child(5) { animation-delay: 0.32s; }

.service-tile:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  color: inherit;
}

.service-tile__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.service-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-tile__body {
  padding: var(--space-3);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-tile__body h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}

.service-tile__body p {
  color: var(--color-muted);
  font-size: 0.98rem;
  flex: 1;
}

.service-tile__link {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-accent);
  margin-top: var(--space-2);
}

.quote-block {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-3) var(--space-4);
  background: var(--color-paper);
  margin: var(--space-4) 0;
}

.quote-block__text {
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}

.quote-block__meta {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin: 0;
}

.page-hero {
  position: relative;
  margin-bottom: var(--space-5);
}

.page-hero--image {
  min-height: 280px;
  background-image: linear-gradient(100deg, rgba(10, 44, 45, 0.9), rgba(10, 44, 45, 0.45)), var(--page-hero-image);
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: flex-end;
}

.page-hero--image .page-hero__title,
.page-hero--image .page-hero__eyebrow,
.page-hero--image .page-hero__intro {
  color: #fff;
}

.page-hero--plain {
  padding: var(--space-6) 0 var(--space-4);
  background: linear-gradient(180deg, var(--color-surface-2), transparent);
}

.page-hero__inner {
  padding: var(--space-5) 0;
}

.page-hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--color-accent);
}

.page-hero__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 18ch;
}

.page-hero__intro {
  max-width: 42ch;
  color: var(--color-muted);
  margin: 0;
}

.content-block {
  padding-bottom: var(--space-6);
}

.content-block h2 {
  margin-top: var(--space-5);
}

.legal-content h2 {
  font-size: 1.25rem;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: 0.95rem;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--color-line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background: var(--color-surface-2);
  font-family: var(--font-display);
}

.prose-wide {
  max-width: 68ch;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: var(--space-5);
}

.detail-aside {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  padding: var(--space-4);
  border-radius: var(--radius);
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.detail-aside dt {
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: var(--space-3);
}

.detail-aside dd {
  margin: 0.25rem 0 0;
  color: var(--color-muted);
}

.detail-hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
}

.pricing-table th,
.pricing-table td {
  border-bottom: 1px solid var(--color-line);
  padding: 0.9rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.pricing-table th {
  font-family: var(--font-display);
  color: var(--color-primary);
}

.factor-note {
  background: var(--color-surface-2);
  padding: var(--space-4);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-primary);
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.review-item {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  padding: var(--space-4);
  border-radius: var(--radius);
}

.review-item--wide {
  grid-column: 1 / -1;
}

.review-item__service {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.blog-card {
  text-decoration: none;
  color: inherit;
  display: block;
  border-bottom: 1px solid var(--color-line);
  padding-bottom: var(--space-4);
}

.blog-card:hover {
  color: inherit;
}

.blog-card__meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.blog-card h2 {
  font-size: 1.25rem;
  margin: var(--space-2) 0;
}

.post-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.post-meta {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}

.process-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}

.process-steps li {
  position: relative;
  padding: var(--space-4) var(--space-4) var(--space-4) 4.5rem;
  border-bottom: 1px solid var(--color-line);
  animation: rise 0.55s ease both;
}

.process-steps li:nth-child(2) { animation-delay: 0.1s; }
.process-steps li:nth-child(3) { animation-delay: 0.2s; }
.process-steps li:nth-child(4) { animation-delay: 0.3s; }
.process-steps li:nth-child(5) { animation-delay: 0.4s; }

.process-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-accent);
}

.team-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
  align-items: start;
  margin: var(--space-5) 0;
}

.team-row img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-5);
}

.form-group {
  margin-bottom: var(--space-3);
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.form-error {
  color: var(--color-error);
  font-size: 0.88rem;
  margin-top: 0.3rem;
  display: none;
}

.form-group.is-invalid .form-error {
  display: block;
}

.form-group.is-invalid input,
.form-group.is-invalid select,
.form-group.is-invalid textarea {
  border-color: var(--color-error);
}

.form-status {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius);
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status--success {
  background: #e5f3ea;
  color: var(--color-success);
}

.form-status--error {
  background: #f8eaea;
  color: var(--color-error);
}

.contact-card {
  background: var(--color-primary);
  color: #e8efe9;
  padding: var(--space-4);
  border-radius: var(--radius);
}

.contact-card a {
  color: #fff;
}

.contact-card h2 {
  color: #fff;
}

.cta-band {
  background: var(--color-primary);
  color: #e8efe9;
  padding: var(--space-5) 0;
  margin-top: var(--space-5);
}

.cta-band h2 {
  color: #fff;
}

.cta-band .btn--accent {
  margin-top: var(--space-2);
}

.error-page {
  text-align: center;
  padding: var(--space-6) 0;
}

.error-page h1 {
  font-size: 4rem;
  margin-bottom: var(--space-2);
}

@media (max-width: 900px) {
  .offer-strip,
  .detail-layout,
  .contact-layout,
  .service-grid,
  .blog-grid,
  .review-grid,
  .team-row {
    grid-template-columns: 1fr;
  }

  .team-row img {
    width: 140px;
    height: 140px;
  }
}
