@font-face {
  font-family: "IBM Plex Sans Thai";
  src: url("../fonts/IBMPlexSansThai-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Thai";
  src: url("../fonts/IBMPlexSansThai-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Thai";
  src: url("../fonts/IBMPlexSansThai-SemiBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --midnight: #07111f;
  --harbor: #0c1a2e;
  --harbor-mid: #13263f;
  --harbor-lift: #1a314d;
  --copper: #c47a4a;
  --copper-bright: #d4926a;
  --copper-deep: #9a5a32;
  --ink: #f3eee6;
  --ink-soft: #c8c2b8;
  --ink-mute: #8f98a6;
  --panel: rgba(19, 38, 63, 0.72);
  --panel-solid: #152a44;
  --line: rgba(196, 122, 74, 0.28);
  --warn: #e0b45a;
  --warn-bg: rgba(224, 180, 90, 0.12);
  --focus: #7eb6ff;
  --font: "IBM Plex Sans Thai", "Leelawadee UI", "Tahoma", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 720px;
  --wide: 1100px;
  --accent: var(--copper);
  --dark: var(--ink);
  --mid: var(--ink-mute);
  --bg: var(--midnight);
  --card: var(--panel-solid);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--midnight);
  background-image:
    radial-gradient(1200px 700px at 78% 12%, rgba(196, 122, 74, 0.14), transparent 55%),
    radial-gradient(900px 600px at 12% 8%, rgba(70, 120, 180, 0.14), transparent 50%),
    url("../img/harbor-night.svg");
  background-size: auto, auto, cover;
  background-position: center top, center top, center bottom;
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--copper);
  color: #1a1008;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.draft-banner {
  background: #2a2118;
  color: #f3eee6;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(196, 122, 74, 0.35);
}
.draft-banner [lang="en"] { opacity: 0.9; }

.site-header {
  background: rgba(7, 17, 31, 0.78);
  border-bottom: 1px solid rgba(196, 122, 74, 0.18);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--copper-bright); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.5rem 0.35rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.92rem;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--copper-bright);
  font-weight: 600;
}

.lang-toggle button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(243, 238, 230, 0.22);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.lang-toggle button[aria-pressed="true"] {
  border-color: var(--copper);
  color: var(--copper-bright);
  font-weight: 600;
}
.lang-toggle button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.75rem 1rem 3.5rem;
}

/* —— Home hero: one composition —— */
.hero-stage {
  position: relative;
  overflow: hidden;
  min-height: min(88dvh, 860px);
  display: grid;
  align-items: center;
  padding: 2rem 1rem 3rem;
  isolation: isolate;
}
.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 55% 45% at 72% 48%, rgba(12, 28, 48, 0.55), transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(196, 122, 74, 0.08), transparent 70%),
    linear-gradient(180deg, transparent 70%, rgba(5, 13, 24, 0.85) 100%);
  pointer-events: none;
}
.hero-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent, rgba(4, 12, 22, 0.55)),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(196, 122, 74, 0.035) 18px 19px
    );
  opacity: 0.9;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}
.hero-grid {
  max-width: var(--wide);
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
  }
}

.hero-copy {
  max-width: 34rem;
  animation: rise-in 0.85s ease-out both;
}
.hero-eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}
.hero-brand {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 6vw, 3.35rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-brand .thai {
  color: var(--copper-bright);
  font-weight: 700;
}
.hero-tagline {
  margin: 0 0 0.85rem;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
}
.hero h1 {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.45;
  margin: 0 0 1rem;
  color: var(--ink-mute);
  max-width: 32rem;
}
.hero .lead {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 1.15rem;
  max-width: 30rem;
}
.hero-tagline span,
.hero h1 span,
.hero .lead span,
.draft-note span,
.origin-note span,
.page-lead span {
  display: block;
}
.hero-tagline span + span,
.hero h1 span + span,
.hero .lead span + span,
.draft-note span + span,
.origin-note span + span,
.page-lead span + span {
  margin-top: 0.3rem;
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1.05;
  animation: float-in 1s ease-out 0.15s both;
}
.hero-glow {
  position: absolute;
  inset: 12% 8% 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 122, 74, 0.22), rgba(40, 90, 140, 0.12) 45%, transparent 70%);
  filter: blur(8px);
  z-index: 0;
  animation: pulse-glow 5.5s ease-in-out infinite;
}
.hero-stack {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.hero-card {
  position: absolute;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}
.hero-card--back {
  width: 78%;
  left: 4%;
  top: 8%;
  border: 1px solid rgba(196, 122, 74, 0.55);
  background: linear-gradient(145deg, #121c2c, #0a1420);
  aspect-ratio: 1.68 / 1;
  transform: rotate(-7deg);
}
.hero-card--front {
  width: 82%;
  right: 2%;
  bottom: 10%;
  border: 1px solid rgba(243, 238, 230, 0.12);
  aspect-ratio: 1.68 / 1;
  transform: rotate(3deg);
  background: #f4f1ec;
}
.hero-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-card--back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(196, 122, 74, 0.18));
  pointer-events: none;
}
.hero-visual-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-mute);
  z-index: 2;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-visual,
  .hero-glow {
    animation: none;
  }
}

.page-intro {
  max-width: var(--max);
  margin-bottom: 1.5rem;
}
.page-intro h1 {
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  line-height: 1.25;
  margin: 0 0 0.85rem;
  color: var(--ink);
}
.page-lead {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.band {
  background: rgba(8, 16, 28, 0.55);
  border-top: 1px solid rgba(196, 122, 74, 0.14);
  border-bottom: 1px solid rgba(196, 122, 74, 0.14);
}
.band .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.band-center { text-align: center; max-width: 40rem; margin: 0 auto; }
.band-center h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  margin: 0 0 0.65rem;
  color: var(--ink);
}
.band-center p {
  margin: 0;
  color: var(--ink-mute);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary {
  background: var(--copper);
  color: #1a1008;
}
.btn-primary:hover {
  background: var(--copper-bright);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(243, 238, 230, 0.35);
}
.btn-secondary:hover {
  border-color: var(--copper);
  color: var(--copper-bright);
}
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.btn.is-pending {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

section { margin: 2rem 0; }
section h2 {
  font-size: 1.28rem;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 0.95rem 0 0.95rem 2.85rem;
  position: relative;
  border-bottom: 1px solid rgba(243, 238, 230, 0.08);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 1.85rem;
  height: 1.85rem;
  background: var(--copper);
  color: #1a1008;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.pricing-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  backdrop-filter: blur(6px);
}
.price-card h2,
.price-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--ink); }
.price-card .amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--copper-bright);
  margin: 0.5rem 0;
}
.price-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
}

.faq details {
  background: var(--panel);
  border: 1px solid rgba(243, 238, 230, 0.1);
  border-radius: 8px;
  margin-bottom: 0.65rem;
  padding: 0.35rem 0.85rem;
}
.faq summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--ink);
}
.faq summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.faq p { color: var(--ink-soft); }

.legal-draft {
  border-left: 4px solid var(--warn);
  padding: 0.65rem 0 0.65rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  background: var(--warn-bg);
  color: var(--ink-soft);
}
.legal-draft strong { color: var(--warn); }

.contact-pending {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  background: rgba(243, 238, 230, 0.08);
  border: 1px solid rgba(243, 238, 230, 0.12);
  border-radius: 4px;
  color: var(--ink-mute);
  font-size: 0.9rem;
}

.site-footer {
  background: #050d18;
  color: var(--ink-soft);
  padding: 2.25rem 1rem;
  font-size: 0.88rem;
  border-top: 1px solid rgba(196, 122, 74, 0.2);
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}
.footer-inner a {
  color: var(--copper-bright);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.plain-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}
.plain-list li { margin: 0.55rem 0; }
.plain-list li [lang="en"],
.steps li [lang="en"] {
  display: block;
  color: var(--ink-mute);
  font-size: 0.92rem;
}
.draft-note,
.origin-note {
  border-left: 4px solid var(--warn);
  padding: 0.65rem 0 0.65rem 1rem;
  margin: 0 0 1.25rem;
  background: var(--warn-bg);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
dl { margin: 0; }
dt { font-weight: 600; margin-top: 0.9rem; color: var(--ink); }
dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; color: var(--ink-soft); }
dd a:focus-visible,
.site-nav a:focus-visible,
.site-footer a:focus-visible,
.brand:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

html[data-lang-view="th"] [lang="en"],
html[data-lang-view="en"] [lang="th"],
html[data-lang-view="th"] .nav-sep,
html[data-lang-view="en"] .nav-sep { display: none; }

@media (max-width: 430px) {
  .site-nav { width: 100%; }
  .wrap { padding-left: 0.85rem; padding-right: 0.85rem; }
  .header-inner { min-width: 0; }
  .hero-stage { min-height: auto; padding-top: 1.5rem; }
}
