@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@400;500;600;700&display=swap');
:root {
  --ink: #0f2430;
  --muted: #4d6b78;
  --paper: #f2f7f9;
  --panel: #ffffff;
  --line: rgba(15, 36, 48, 0.12);
  --cyan: #0e8a9a;
  --cyan-deep: #0a6673;
  --sky: #d7eef3;
  --mint: #b8e6d8;
  --font: 'Anuphan', sans-serif;
  --display: 'Kanit', 'Anuphan', sans-serif;
  --mono: 'IBM Plex Mono', 'Anuphan', monospace;
  --header-h: 4.1rem;
  --demo-h: 2.6rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 12%, rgba(14, 138, 154, 0.1), transparent 42%),
    linear-gradient(180deg, #eef6f8 0%, #f2f7f9 48%, #e8f3f0 100%);
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.wrap {
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
}

.demo-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 1.25rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
}

.demo-bar strong {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ed7e4;
  font-weight: 500;
}

.demo-bar__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.demo-bar a {
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 0.76rem;
  font-weight: 500;
}

.demo-bar a.is-primary {
  background: var(--cyan);
  border-color: var(--cyan);
}

.site-header {
  position: sticky;
  top: var(--demo-h);
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

.brand small {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); }

.nav-cta {
  color: #fff !important;
  background: var(--cyan);
  padding: 0.45rem 0.9rem;
}

.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }

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

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 36, 48, 0.28) 0%, rgba(15, 36, 48, 0.5) 48%, rgba(15, 36, 48, 0.86) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
  padding: 5rem 0 3.5rem;
  max-width: 38rem;
  animation: heroRise 0.9s ease both;
}

.hero__brand {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.hero__brand span {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9fe4ef;
  font-weight: 500;
  margin-top: 0.35rem;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  color: #9fe4ef;
}

.hero__lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.5rem;
  max-width: 34rem;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

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

.btn--primary:hover { background: var(--cyan-deep); }

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}

.btn--block { width: 100%; }

.section { padding: 4.5rem 0; }

.section__head {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.55rem;
}

.section__head h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.55rem;
}

.section__head p { color: var(--muted); }

.map-shell {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1.25rem;
  align-items: stretch;
}

.schematic {
  position: relative;
  min-height: 420px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4fbfd 100%);
  border: 1.5px solid var(--ink);
  overflow: hidden;
}

.schematic::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 138, 154, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 138, 154, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.schematic__pipes {
  position: absolute;
  inset: 8% 6%;
  width: 88%;
  height: 84%;
}

.pipe {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pipe--water { stroke: #2bb3c5; }
.pipe--drain { stroke: #6b8f9a; stroke-dasharray: 10 8; }
.pipe--power { stroke: #e0a100; stroke-width: 4; }

.joint { fill: var(--ink); }

.fault {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  z-index: 2;
  animation: pulsePin 2.4s ease-in-out infinite;
}

.fault__pin {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid var(--cyan);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cyan-deep);
  box-shadow: 0 4px 14px rgba(14, 138, 154, 0.25);
}

.fault.is-active .fault__pin,
.fault:hover .fault__pin {
  background: var(--cyan);
  color: #fff;
}

.fault__label {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255,255,255,0.92);
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.fault-panel {
  background: var(--panel);
  border: 1.5px solid var(--ink);
  padding: 1.4rem 1.35rem;
  min-height: 420px;
}

.fault-panel > div { display: none; }
.fault-panel > div.is-shown { display: block; animation: fadeIn 0.35s ease; }

.fault-panel .mono {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 0.55rem;
}

.fault-panel h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

.fault-panel p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.fault-panel ul {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
  font-size: 0.92rem;
}

.fault-panel li::before {
  content: '▸ ';
  color: var(--cyan);
  font-family: var(--mono);
}

.text-link {
  font-weight: 600;
  color: var(--cyan-deep);
}

.section--air {
  background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 70%, white), transparent);
}

.fault-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.fault-list a {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 0.8rem;
  border: 1.5px solid var(--ink);
  background: var(--panel);
  transition: transform 0.2s ease, background 0.2s ease;
}

.fault-list a:hover {
  transform: translateY(-3px);
  background: var(--sky);
}

.fault-list .mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
}

.fault-list strong { font-size: 0.95rem; }
.fault-list small { color: var(--muted); font-size: 0.8rem; }

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

.photo-pair figure {
  border: 1.5px solid var(--ink);
  overflow: hidden;
  background: var(--panel);
}

.photo-pair img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-pair figure:hover img { transform: scale(1.04); }

.photo-pair figcaption {
  padding: 0.75rem 0.95rem;
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.trace-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.trace-steps li {
  padding: 1.25rem 1.1rem;
  border-top: 3px solid var(--cyan);
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.trace-steps .mono {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.65rem;
}

.trace-steps h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.trace-steps p { color: var(--muted); font-size: 0.9rem; }

.section--book {
  background: var(--ink);
  color: #eef8fa;
}

.section--book .eyebrow { color: #7ed7e4; }
.section--book p { color: rgba(238,248,250,0.75); }

.book {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}

.book h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  margin-bottom: 0.65rem;
}

.form {
  display: grid;
  gap: 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 1.4rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.85rem; font-weight: 600; }

.field input,
.field select,
.field textarea {
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  padding: 0.7rem 0.8rem;
  color: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--cyan) 55%, white);
  border-color: #7ed7e4;
}

.field select option { color: var(--ink); }

.rate-table {
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--panel);
}
.rate-table__row {
  display: grid;
  grid-template-columns: 1.15fr 1.45fr 7rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.rate-table__row:last-child { border-bottom: 0; }
.rate-table__row--head {
  background: var(--ink);
  color: rgba(242, 247, 249, 0.92);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rate-table__row .mono,
.rate-table__row span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--cyan-deep);
}
.rate-table__row--head span:last-child { color: rgba(242, 247, 249, 0.92); }
.rate-table__row.is-accent {
  background: linear-gradient(90deg, rgba(14, 138, 154, 0.1), transparent 70%);
}
.rate-table__row.is-accent span:first-child { font-weight: 700; }
.rate-note { margin-top: 1rem; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) {
  .rate-table__row { grid-template-columns: 1fr auto; gap: 0.35rem 1rem; }
  .rate-table__row--head { display: none; }
  .rate-table__row span:nth-child(2) { grid-column: 1 / -1; color: var(--muted); font-size: 0.88rem; }
  .rate-table__row span:last-child { grid-column: 2; grid-row: 1; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  background: var(--paper);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes pulsePin {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 8px rgba(14, 138, 154, 0.45)); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}


.voice-path {
  list-style: none;
  margin: 0 auto;
  max-width: 42rem;
  width: 100%;
  padding: 0;
  display: grid;
  gap: 0;
  position: relative;
}
#voices .section__head,
#voices header.section__head {
  max-width: 42rem;
  width: 100%;
  margin-inline: auto;
}

.voice-path::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 1px;
  background: var(--line);
}
.voice-path__step {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.85rem 1.25rem;
  align-items: start;
  padding: 1.15rem 0;
  position: relative;
}
.voice-path__mark {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
  padding-top: 0.2rem;
  background: var(--bg, transparent);
  position: relative;
  z-index: 1;
}
.voice-path__step p {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.4;
  margin: 0 0 0.55rem;
}
.voice-path__step cite {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .voice-path::before { left: 0.7rem; }
  .voice-path__step { grid-template-columns: 2rem minmax(0, 1fr); gap: 0.65rem 1rem; }

  .map-shell { grid-template-columns: 1fr; }
  .fault-panel { min-height: 0; }
  .fault-list { grid-template-columns: repeat(2, 1fr); }
  .trace-steps { grid-template-columns: 1fr 1fr; }
  .book { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: calc(var(--demo-h) + var(--header-h));
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.35rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.65rem 0.25rem; }
  .nav-cta { text-align: center; }
  .schematic { min-height: 360px; }
  .photo-pair { grid-template-columns: 1fr; }
  .photo-pair img { height: 210px; }
  .field-row { grid-template-columns: 1fr; }
  .trace-steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero__inner, .fault { opacity: 1; transform: none; animation: none; transition: none; }
  .fault { transform: translate(-50%, -50%); }
}
