:root {
  --sapphire-900: #070b1f;
  --sapphire-800: #0a0f2d;
  --sapphire-700: #0b1f4d;
  --sapphire-600: #153a8a;
  --sapphire-500: #1e4db8;
  --cyan-300: #5ec8e8;
  --cyan-200: #7ad4f0;
  --cyan-100: #a8e8f5;
  --frost: #f5fbff;
  --white: #ffffff;
  --ink: #0e1633;
  --ink-soft: #334066;
  --glass: rgba(245, 251, 255, 0.08);
  --glass-strong: rgba(245, 251, 255, 0.16);
  --stroke: rgba(168, 232, 245, 0.28);
  --shadow: 0 24px 60px rgba(7, 11, 31, 0.35);
  --radius: 18px;
  --font-sans: "IBM Plex Sans Thai", sans-serif;
  --font-serif: "Noto Serif Thai", serif;
  --shell: min(1120px, calc(100% - 2.5rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(94, 200, 232, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(30, 77, 184, 0.28), transparent 50%),
    linear-gradient(180deg, #eaf6fc 0%, #f5fbff 35%, #e8f1fb 100%);
  line-height: 1.7;
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--sapphire-500);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 31, 0.72);
  border-bottom: 1px solid var(--stroke);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--frost);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--cyan-100), transparent 40%),
    radial-gradient(circle at 70% 70%, var(--sapphire-500), var(--sapphire-800));
  box-shadow: 0 0 0 1px rgba(168, 232, 245, 0.45), 0 0 18px rgba(94, 200, 232, 0.35);
  animation: pulse-crystal 4.5s ease-in-out infinite;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: rgba(245, 251, 255, 0.86);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

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

.nav-cta {
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(168, 232, 245, 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(94, 200, 232, 0.2), rgba(30, 77, 184, 0.35));
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  background: transparent;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.28rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--frost);
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(168, 232, 245, 0.7);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

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

.btn-primary {
  color: var(--frost);
  background: linear-gradient(135deg, var(--sapphire-500), var(--sapphire-700) 55%, #0d2a66);
  box-shadow: 0 10px 30px rgba(21, 58, 138, 0.35);
}

.btn-primary:hover {
  color: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--sapphire-700);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(21, 58, 138, 0.18);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  color: var(--sapphire-800);
  background: rgba(255, 255, 255, 0.8);
}

/* Hero — asymmetric resonance composition */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--frost);
  background:
    linear-gradient(115deg, rgba(7, 11, 31, 0.82) 18%, rgba(11, 31, 77, 0.55) 48%, rgba(7, 11, 31, 0.35) 100%),
    url("https://images.unsplash.com/photo-1556761175-5973dc0f32e7?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(circle at 78% 42%, transparent 0 18px, rgba(94, 200, 232, 0.05) 19px 20px),
    linear-gradient(90deg, transparent, rgba(168, 232, 245, 0.08), transparent);
  pointer-events: none;
  animation: wave-drift 14s linear infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 5.5rem 0 4.5rem;
  max-width: 36rem;
}

.hero-brand {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 10px 40px rgba(7, 11, 31, 0.45);
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.08rem;
  color: rgba(245, 251, 255, 0.9);
  max-width: 28rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: var(--sapphire-800);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sapphire-600);
  font-weight: 600;
}

/* Primary offer band */
.offer-band {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.offer-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 1rem;
  color: var(--sapphire-800);
}

.offer-copy p {
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0 1.5rem;
  color: var(--sapphire-700);
  font-weight: 500;
  font-size: 0.95rem;
}

.offer-visual {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow);
}

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

.offer-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(94, 200, 232, 0.18), transparent 40%),
    linear-gradient(0deg, rgba(7, 11, 31, 0.35), transparent 45%);
  pointer-events: none;
}

/* Service preview list — not cards-as-grid-of-features */
.service-rail {
  display: grid;
  gap: 1.25rem;
}

.service-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(245, 251, 255, 0.4));
  border: 1px solid rgba(21, 58, 138, 0.1);
  box-shadow: 0 10px 30px rgba(11, 31, 77, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-row:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 200, 232, 0.55);
  color: inherit;
}

.service-row img {
  width: 140px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.service-row h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--sapphire-800);
}

.service-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.service-row .price {
  font-weight: 600;
  color: var(--sapphire-600);
  white-space: nowrap;
}

/* Evidence / quotes */
.evidence {
  background:
    linear-gradient(145deg, rgba(11, 31, 77, 0.94), rgba(10, 15, 45, 0.96)),
    radial-gradient(circle at 20% 20%, rgba(94, 200, 232, 0.2), transparent 40%);
  color: var(--frost);
  border-radius: calc(var(--radius) + 8px);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.evidence::before {
  content: "";
  position: absolute;
  width: 220%;
  height: 220%;
  left: -60%;
  top: -60%;
  background: repeating-radial-gradient(circle, transparent 0 28px, rgba(168, 232, 245, 0.05) 29px 30px);
  animation: wave-drift 18s linear infinite;
  pointer-events: none;
}

.evidence-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.75rem;
}

.evidence blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.6;
}

.evidence figcaption {
  margin-top: 0.75rem;
  color: var(--cyan-100);
  font-size: 0.92rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: var(--sapphire-800);
}

.page-hero p {
  margin: 0;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.page-hero-visual {
  margin-top: 2rem;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  max-height: 360px;
  box-shadow: var(--shadow);
}

.page-hero-visual img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

/* Content prose */
.prose {
  max-width: 44rem;
}

.prose h2 {
  font-family: var(--font-serif);
  color: var(--sapphire-800);
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.2rem;
}

/* Service / blog detail */
.detail-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: start;
}

.detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.detail-media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.side-panel {
  position: sticky;
  top: 5.5rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(168, 232, 245, 0.12));
  border: 1px solid rgba(21, 58, 138, 0.12);
}

.side-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-family: var(--font-serif);
  color: var(--sapphire-800);
}

.side-panel ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.side-panel .meta-line {
  margin: 0 0 0.4rem;
  color: var(--sapphire-700);
  font-weight: 500;
}

/* Blog list */
.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(21, 58, 138, 0.12);
}

.blog-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
}

.blog-item h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--sapphire-800);
}

.blog-item .date {
  font-size: 0.85rem;
  color: var(--sapphire-600);
  margin-bottom: 0.4rem;
}

.blog-item p {
  margin: 0;
  color: var(--ink-soft);
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.team-member {
  text-align: left;
}

.team-member img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: 0 16px 40px rgba(11, 31, 77, 0.15);
}

.team-member h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  color: var(--sapphire-800);
}

.team-member .role {
  margin: 0 0 0.5rem;
  color: var(--sapphire-600);
  font-weight: 500;
  font-size: 0.92rem;
}

.team-member p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Process steps */
.process-steps {
  display: grid;
  gap: 0;
  counter-reset: step;
}

.process-step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(21, 58, 138, 0.12);
  counter-increment: step;
}

.process-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--sapphire-500);
  line-height: 1;
}

.process-step h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  color: var(--sapphire-800);
}

.process-step p {
  margin: 0;
  color: var(--ink-soft);
}

/* Forms */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.contact-card,
.form-panel {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(245, 251, 255, 0.5));
  border: 1px solid rgba(21, 58, 138, 0.1);
}

.contact-card h2,
.form-panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  color: var(--sapphire-800);
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: var(--sapphire-800);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(21, 58, 138, 0.2);
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  color: var(--ink);
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid rgba(94, 200, 232, 0.65);
  outline-offset: 1px;
  border-color: var(--sapphire-500);
}

.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #b42318;
}

.field-error {
  display: block;
  min-height: 1.1em;
  margin-top: 0.3rem;
  color: #b42318;
  font-size: 0.85rem;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 500;
}

.form-status.is-success {
  background: rgba(94, 200, 232, 0.2);
  color: var(--sapphire-700);
  border: 1px solid rgba(94, 200, 232, 0.45);
}

.form-status.is-error {
  background: rgba(180, 35, 24, 0.08);
  color: #8a1c14;
  border: 1px solid rgba(180, 35, 24, 0.25);
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 3rem 0 1.5rem;
  background: linear-gradient(180deg, rgba(10, 15, 45, 0.96), var(--sapphire-900));
  color: rgba(245, 251, 255, 0.82);
}

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

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--frost);
  margin: 0 0 0.4rem;
}

.footer-tagline,
.footer-address {
  margin: 0 0 0.5rem;
}

.footer-heading {
  margin: 0 0 0.75rem;
  color: var(--cyan-100);
  font-weight: 600;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: rgba(245, 251, 255, 0.82);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cyan-100);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(168, 232, 245, 0.15);
  font-size: 0.9rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
  background: rgba(7, 11, 31, 0.92);
  border-top: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  color: var(--frost);
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-inner p {
  margin: 0;
  max-width: 46rem;
  font-size: 0.95rem;
}

.cookie-inner a {
  color: var(--cyan-100);
}

.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-banner .btn-ghost {
  color: var(--frost);
  background: transparent;
  border-color: rgba(168, 232, 245, 0.35);
}

.cookie-error {
  width: var(--shell);
  margin: 0.5rem auto 0;
  color: #ffb4a8;
  font-size: 0.85rem;
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin: 0 0 0.75rem;
  color: var(--sapphire-800);
}

/* Animations */
@keyframes crystal-wave {
  0% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0.25);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(14);
  }
}

@keyframes wave-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-40px, 20px, 0);
  }
}

@keyframes pulse-crystal {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(168, 232, 245, 0.45), 0 0 14px rgba(94, 200, 232, 0.28);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(168, 232, 245, 0.7), 0 0 24px rgba(94, 200, 232, 0.5);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .offer-band,
  .detail-layout,
  .contact-grid,
  .footer-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .service-row {
    grid-template-columns: 100px 1fr;
  }

  .service-row .price {
    grid-column: 2;
  }

  .blog-item {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(7, 11, 31, 0.96);
    border-bottom: 1px solid var(--stroke);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(168, 232, 245, 0.12);
  }

  .nav-cta {
    margin-top: 0.5rem;
    text-align: center;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-content {
    padding-top: 4rem;
  }
}
