:root {
  --ink: #102136;
  --ink-soft: #38506a;
  --muted: #687c8d;
  --line: #dbe5eb;
  --line-strong: #b8c8d3;
  --paper: #ffffff;
  --cool: #f2f7fa;
  --cool-2: #e8f2f5;
  --navy: #12385c;
  --teal: #0f7b83;
  --teal-dark: #075f68;
  --gold: #c9a14a;
  --gold-soft: #f1e2bd;
  --shadow: 0 18px 48px rgba(16, 33, 54, 0.14);
  --shadow-soft: 0 10px 30px rgba(16, 33, 54, 0.09);
  --radius: 8px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans Thai", "IBM Plex Sans Thai", "Aptos", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.is-editing {
  padding-bottom: 74px;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 76px;
  padding: 0 44px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(219, 229, 235, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--ink);
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  box-shadow: 0 10px 24px rgba(15, 123, 131, 0.22);
  font-size: 13px;
  letter-spacing: 0;
}

.brand-text {
  white-space: nowrap;
  font-size: 17px;
}

.main-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
}

.main-nav a,
.footer-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after,
.footer-nav a::after {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.footer-nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.mobile-nav {
  display: none;
}

.section-band {
  padding: 96px 0;
}

.section-inner {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
}

.hero-section {
  min-height: calc(100vh - 76px);
  padding-top: 80px;
  padding-bottom: 44px;
  background:
    linear-gradient(90deg, rgba(242, 247, 250, 0.95), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, #ffffff 0%, #f5f9fb 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: 54px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 700px;
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 56px;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.button.primary {
  color: #ffffff;
  background: var(--teal-dark);
  box-shadow: 0 14px 28px rgba(7, 95, 104, 0.22);
}

.button.primary:hover {
  background: #064f58;
}

.button.secondary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line-strong);
}

.hero-notes {
  display: grid;
  gap: 12px;
  margin-top: 36px;
}

.hero-notes span {
  position: relative;
  padding-left: 24px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
}

.hero-notes span::before {
  position: absolute;
  top: 13px;
  left: 0;
  width: 13px;
  height: 2px;
  content: "";
  background: var(--gold);
}

.image-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(184, 200, 211, 0.8);
  border-radius: var(--radius);
  background: var(--cool);
  box-shadow: var(--shadow);
}

.hero-media {
  min-height: 570px;
  aspect-ratio: 1.16 / 1;
}

.hero-media::after {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 110px;
  height: 3px;
  content: "";
  background: var(--gold);
}

.intro-strip {
  padding: 34px 0;
  background: var(--navy);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.intro-item {
  min-height: 170px;
  padding: 28px;
  color: #ffffff;
  background: var(--navy);
}

.intro-item h3 {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.35;
}

.intro-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.services-section {
  background: var(--paper);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
  gap: 62px;
  align-items: start;
}

.section-copy,
.contact-copy {
  position: sticky;
  top: 108px;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 36px;
  font-weight: 740;
  line-height: 1.24;
  letter-spacing: 0;
}

.section-copy p,
.process-grid > div > p,
.section-heading p,
.contact-copy > p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.compact {
  height: 300px;
  margin-top: 34px;
  box-shadow: var(--shadow-soft);
}

.service-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.row-index,
.process-number {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.service-row h3,
.process-step h3,
.portfolio-item h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
}

.service-row p,
.process-step p,
.portfolio-item p,
.proof-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.process-section {
  background: linear-gradient(180deg, var(--cool) 0%, #ffffff 100%);
}

.process-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
}

.process-rail {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--line-strong);
}

.process-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.proof-section {
  background: var(--paper);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 50px;
  align-items: start;
  margin-bottom: 40px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 70px;
  background: var(--line);
  border: 1px solid var(--line);
}

.proof-item {
  min-height: 178px;
  padding: 26px;
  background: var(--cool);
}

.proof-mark {
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 24px;
  background: var(--teal);
}

.portfolio-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.portfolio-media {
  height: 530px;
}

.portfolio-list {
  display: grid;
  gap: 1px;
  margin-top: 26px;
  background: var(--line);
  border: 1px solid var(--line);
}

.portfolio-item {
  padding: 24px 26px;
  background: #ffffff;
}

.contact-section {
  background: linear-gradient(180deg, var(--cool) 0%, var(--cool-2) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
  gap: 62px;
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  color: var(--ink-soft);
  font-style: normal;
}

.contact-details strong {
  color: var(--ink);
  font-size: 18px;
}

.contact-details a {
  color: var(--teal-dark);
  font-weight: 700;
}

.consult-form {
  padding: 34px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.form-field.full {
  margin-top: 18px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.form-field input {
  height: 46px;
  padding: 0 14px;
}

.form-field textarea {
  resize: vertical;
  min-height: 142px;
  padding: 12px 14px;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 123, 131, 0.12);
}

.form-submit {
  margin-top: 20px;
}

.form-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 700;
}

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-grid p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.editor-toolbar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 36px);
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(16, 33, 54, 0.18);
  backdrop-filter: blur(12px);
}

.editor-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: #ffffff;
  background: var(--teal-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.editor-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.editor-button.quiet {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line-strong);
}

.editor-toolbar .editor-button:not([data-editor-toggle]),
.editor-toolbar .editor-state {
  display: none;
}

.is-editing .editor-toolbar .editor-button,
.is-editing .editor-toolbar .editor-state {
  display: inline-flex;
}

.editor-state {
  align-items: center;
  max-width: 170px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-edit-path] {
  border-radius: 4px;
}

.is-editing [data-edit-path] {
  outline: 1px dashed rgba(15, 123, 131, 0.55);
  outline-offset: 4px;
  cursor: text;
}

.image-source-editor {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: none;
  grid-template-columns: auto minmax(150px, 1fr);
  gap: 8px;
  align-items: center;
  max-width: calc(100% - 24px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  color: #ffffff;
  background: rgba(16, 33, 54, 0.86);
  font-size: 12px;
}

.image-source-editor input {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.is-editing .image-source-editor {
  display: grid;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 1020px) {
  .site-header {
    padding: 0 24px;
  }

  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 19;
    display: none;
    padding: 14px 24px 22px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 8px;
  }

  .mobile-nav a {
    padding: 12px 0;
    color: var(--ink);
    font-weight: 700;
  }

  .hero-grid,
  .split-section,
  .process-grid,
  .section-heading,
  .portfolio-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 64px;
  }

  .hero-copy h1 {
    max-width: 760px;
    font-size: 44px;
  }

  .hero-media {
    min-height: 420px;
    aspect-ratio: 1.45 / 1;
  }

  .section-copy,
  .contact-copy {
    position: static;
  }

  .intro-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-media {
    height: 420px;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .site-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .brand-text {
    font-size: 15px;
  }

  .mobile-nav {
    top: 68px;
  }

  .section-inner {
    width: min(100% - 32px, var(--max-width));
  }

  .section-band {
    padding: 68px 0;
  }

  .hero-section {
    padding-top: 48px;
    padding-bottom: 30px;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero-copy h1 {
    font-size: 34px;
    line-height: 1.18;
  }

  .lead {
    font-size: 17px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-media,
  .portfolio-media {
    min-height: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  h2 {
    font-size: 28px;
  }

  .intro-strip {
    padding: 0;
  }

  .intro-item {
    padding: 24px 20px;
  }

  .service-row,
  .process-step {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .consult-form {
    padding: 22px;
  }

  .editor-toolbar {
    right: 10px;
    bottom: 10px;
    left: 10px;
    flex-wrap: wrap;
  }

  .editor-state {
    flex-basis: 100%;
  }
}
