@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@400;500;600;700&display=swap');
:root {
  --ink: #152028;
  --muted: #5a6d78;
  --paper: #e8eef1;
  --panel: #f4f8fa;
  --line: rgba(21, 32, 40, 0.12);
  --rain: #3d6a7a;
  --rain-deep: #2a4f5c;
  --steel: #64748b;
  --alert: #b45309;
  --ok: #2f6b4f;
  --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:
    linear-gradient(180deg, #dce7ec 0%, var(--paper) 35%, #eef3f5 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;
}

.mono { font-family: var(--mono); }

.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: #9ec5d1;
  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(--rain);
  border-color: var(--rain);
}

.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.2rem;
  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(--rain);
  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;
  font-size: 0.92rem;
  font-weight: 500;
}

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

.hero {
  position: relative;
  min-height: calc(100svh - var(--demo-h) - var(--header-h));
  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;
  filter: saturate(0.85) contrast(1.05);
  animation: slow-pan 20s ease-in-out infinite alternate;
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(21, 32, 40, 0.82) 0%, rgba(61, 106, 122, 0.45) 55%, rgba(21, 32, 40, 0.55) 100%),
    linear-gradient(to top, rgba(21, 32, 40, 0.8), transparent 50%);
}

.hero__rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -18deg,
    transparent 0 14px,
    rgba(158, 197, 209, 0.08) 14px 15px
  );
  animation: rain-slide 2.8s linear infinite;
  opacity: 0.7;
}

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

.hero__brand {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.8vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.85rem;
}

.hero__brand span {
  display: inline-block;
  margin-left: 0.45rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #9ec5d1;
  font-weight: 500;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.05rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

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

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

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

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

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

.btn--primary {
  background: #9ec5d1;
  color: var(--ink);
  border-color: #9ec5d1;
}

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

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

.section { padding: 5rem 0; }

.section--mist {
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(61, 106, 122, 0.12), transparent),
    #dfe8ec;
}

.section--quote {
  background: var(--ink);
  color: #e8eef1;
}

.section__head {
  max-width: 38rem;
  margin-bottom: 2.2rem;
}

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

.section--quote .eyebrow { color: #9ec5d1; }

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

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

.map-board {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .map-board {
    grid-template-columns: 1.35fr 0.9fr;
    align-items: stretch;
  }
}

.roof-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, minmax(88px, 1fr));
  gap: 0.55rem;
  padding: 1rem;
  background:
    linear-gradient(160deg, #cfdce3, #e8eef1);
  border: 1.5px solid var(--ink);
  clip-path: polygon(8% 0, 92% 0, 100% 18%, 100% 100%, 0 100%, 0 18%);
  min-height: 340px;
}

.zone {
  border: 1.5px solid rgba(21, 32, 40, 0.35);
  background: rgba(255,255,255,0.65);
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.zone.is-active {
  box-shadow: 0 0 0 2px var(--ink);
  border-color: var(--ink);
}

.zone--1 { grid-column: 1 / 3; grid-row: 1; background: color-mix(in srgb, #b45309 22%, white); }
.zone--2 { grid-column: 3; grid-row: 1 / 3; background: color-mix(in srgb, #c9a227 20%, white); }
.zone--3 { grid-column: 1; grid-row: 2; background: color-mix(in srgb, #2f6b4f 16%, white); }
.zone--4 { grid-column: 2; grid-row: 2; background: color-mix(in srgb, #c9a227 18%, white); }
.zone--5 { grid-column: 1 / 3; grid-row: 3; background: color-mix(in srgb, #b45309 20%, white); }
.zone--6 { grid-column: 3; grid-row: 3; background: color-mix(in srgb, #2f6b4f 16%, white); }

.zone__id {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--rain-deep);
}

.zone__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
}

.zone__status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.zone-panel {
  background: var(--panel);
  border: 1.5px solid var(--ink);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.zone-panel .mono {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--rain);
  margin-bottom: 0.45rem;
}

.zone-panel h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.zone-panel p { color: var(--muted); margin-bottom: 0.7rem; }

.zone-panel ul {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

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

.legend {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.3rem;
  border-radius: 1px;
}

.dot--high { background: #b45309; }
.dot--mid { background: #c9a227; }
.dot--low { background: #2f6b4f; }

.check-table {
  border: 1.5px solid var(--ink);
  background: #fff;
  overflow: hidden;
}

.check-row {
  display: grid;
  grid-template-columns: 4.5rem 1.4fr 5.5rem 1fr;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.check-row:last-child { border-bottom: 0; }

.check-row--head {
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.check-row:not(.check-row--head):nth-child(even) {
  background: rgba(61, 106, 122, 0.06);
}

.badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.4rem;
  width: fit-content;
  font-weight: 500;
}

.badge--fail { background: color-mix(in srgb, #b45309 22%, white); color: #8a3d06; }
.badge--warn { background: color-mix(in srgb, #c9a227 28%, white); color: #6b5410; }
.badge--ok { background: color-mix(in srgb, #2f6b4f 18%, white); color: #1f4a36; }

.case-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .case-grid { grid-template-columns: repeat(3, 1fr); }
}

.case-grid figure {
  border: 1.5px solid var(--ink);
  background: #fff;
  overflow: hidden;
}

.case-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.case-grid figcaption {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.quote-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 860px) {
  .quote-layout { grid-template-columns: 0.9fr 1.1fr; }
}

.quote-copy p { color: rgba(232, 238, 241, 0.72); margin-top: 0.5rem; }
.quote-copy strong { color: #9ec5d1; }

.quote-form {
  display: grid;
  gap: 0.85rem;
  background: #1c2a32;
  border: 1px solid rgba(158, 197, 209, 0.3);
  padding: 1.4rem;
}

.field { display: grid; gap: 0.35rem; }

.field label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ec5d1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(232, 238, 241, 0.22);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 0.7rem 0.8rem;
}

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

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

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.footer span { color: var(--muted); }

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

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

@keyframes slow-pan {
  from { transform: scale(1.05) translateX(0); }
  to { transform: scale(1.1) translateX(-1.5%); }
}

@keyframes rain-slide {
  from { background-position: 0 0; }
  to { background-position: 40px 80px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  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(--rain);
  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: 700px) {
  .roof-map {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    clip-path: none;
  }
  .zone--1, .zone--2, .zone--3, .zone--4, .zone--5, .zone--6 {
    grid-column: auto;
    grid-row: auto;
  }
  .check-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }
  .check-row--head { display: none; }
  .check-row span:nth-child(1) { font-weight: 600; }
}

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

    .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.35rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.55rem 0.25rem; }
  .nav-cta { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img,
  .hero__rain,
  .hero__inner,
  .reveal { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
