:root {
  --ink: #1a2430;
  --muted: #5a6b7a;
  --bg: #e6edf3;
  --bg-soft: #d5e0ea;
  --white: #f4f7fa;
  --line: rgba(26, 36, 48, 0.14);
  --accent: #3a6a86;
  --accent-deep: #2a5168;
  --steel: #7a93a8;
  --on-accent: #f4f8fb;
  --font: 'Anuphan', sans-serif;
  --heading: 'Kanit', 'Anuphan', sans-serif;
  --mono: 'IBM Plex Mono', 'Anuphan', monospace;
  --max: 1100px;
  --demo-h: 48px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  font-synthesis: none;
  background:
    linear-gradient(180deg, rgba(122, 147, 168, 0.12), transparent 40%),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(26, 36, 48, 0.03) 40px, rgba(26, 36, 48, 0.03) 41px),
    var(--bg);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; font-size: 16px; }
ol { list-style: none; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.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.55rem 1.25rem;
  background: #121820; color: #fff; font-size: 0.82rem;
}
.demo-bar strong {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: #9eb6c8; font-weight: 500;
}
.demo-bar__actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.demo-bar a {
  padding: 0.35rem 0.7rem; border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius); font-size: 0.78rem; font-weight: 500;
}
.demo-bar a.is-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.site-header {
  position: sticky; top: var(--demo-h); z-index: 50;
  background: rgba(230, 237, 243, 0.94); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); position: relative;
}
.brand {
  font-family: var(--heading); font-weight: 700; font-size: 1.35rem;
  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(--accent); font-weight: 500;
}
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line);
  padding: 0.45rem 0.8rem; cursor: pointer; border-radius: var(--radius); color: var(--ink);
}
.nav { display: flex; align-items: center; gap: 1.15rem; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav-cta {
  background: var(--accent); color: var(--on-accent) !important;
  padding: 0.55rem 1.05rem; border-radius: var(--radius); font-weight: 700;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 1.4rem; font-weight: 700; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,0.45); background: transparent; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero {
  position: relative; min-height: min(90dvh, 820px);
  display: flex; align-items: flex-end; color: #fff; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  animation: ken 22s var(--ease) both;
  filter: saturate(0.85) contrast(1.05);
}
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(14, 22, 32, 0.92) 0%, rgba(14, 22, 32, 0.55) 55%, rgba(14, 22, 32, 0.3) 100%);
}
.hero__fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.steel-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(158, 182, 200, 0.55), transparent);
  animation: lineSweep 7s var(--ease) infinite;
}
.steel-line--1 { top: 28%; }
.steel-line--2 { top: 48%; animation-delay: 1.4s; opacity: 0.7; }
.steel-line--3 { top: 68%; animation-delay: 2.8s; opacity: 0.5; }
.bolt {
  position: absolute; width: 10px; height: 10px; border: 1.5px solid rgba(158, 182, 200, 0.55);
  border-radius: 50%; animation: boltPulse 4s ease-in-out infinite;
}
.bolt--1 { right: 14%; bottom: 22%; }
.bolt--2 { right: 22%; bottom: 36%; animation-delay: 1s; width: 8px; height: 8px; }
.hero__inner {
  position: relative; z-index: 2; padding: 5rem 0 3.5rem; max-width: 38rem;
  margin-left: max(calc((100% - var(--max)) / 2), 1.25rem);
  width: min(100% - 2.5rem, 38rem);
  animation: rise 0.9s var(--ease) both;
}
.hero__brand {
  font-family: var(--heading); font-size: 1.3rem; font-weight: 700;
  margin-bottom: 1rem; display: flex; gap: 0.5rem; align-items: baseline;
}
.hero__brand span {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #9eb6c8;
}
.hero h1 {
  font-family: var(--heading); font-size: clamp(2.15rem, 5vw, 3.35rem);
  line-height: 1.18; letter-spacing: -0.02em; margin-bottom: 0.9rem;
}
.hero h1 em {
  display: block; font-style: normal; color: #9eb6c8;
  font-size: 0.72em; margin-top: 0.25rem;
}
.hero__lead { color: rgba(255,255,255,0.86); margin-bottom: 1.5rem; }

@keyframes ken { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes lineSweep {
  0% { transform: scaleX(0.2); opacity: 0; }
  40% { opacity: 0.8; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes boltPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.section { padding: 4.5rem 0; }
.section--steel { background: var(--bg-soft); }
.section--dark { background: #141c26; color: #fff; }
.section__head { margin-bottom: 2.25rem; max-width: 40rem; }
.section__head h2 {
  font-family: var(--heading); font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  letter-spacing: -0.02em; line-height: 1.22; margin-bottom: 0.5rem;
}
.section__head p { color: var(--muted); }
.eyebrow {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem;
}
.eyebrow.light { color: #9eb6c8; }

/* BINDERY RAIL — unique to Layout B */
.rail-wrap {
  position: relative;
  width: min(100% - 1.5rem, 1200px);
  margin: 0 auto;
  padding: 0.5rem 0 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rail-track {
  position: absolute;
  left: 1.5rem; right: 1.5rem; top: 7.8rem;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--steel) 0 6px, transparent 6px 12px);
  opacity: 0.55;
  pointer-events: none;
}
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 1rem;
  min-width: min(100%, 1080px);
  padding: 0 0.75rem;
}
.station a {
  display: flex; flex-direction: column; gap: 0.65rem;
  background: var(--white);
  border: 1.5px solid var(--ink);
  padding: 1rem 0.95rem 1.1rem;
  min-height: 100%;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.station a:hover {
  transform: translateY(-4px);
  box-shadow: 5px 5px 0 rgba(26, 36, 48, 0.18);
}
.station__num {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 500;
}
.station__thumb {
  aspect-ratio: 5 / 3; overflow: hidden; border: 1px solid var(--line);
  background: #c5d2de;
}
.station__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease); filter: saturate(0.9);
}
.station a:hover .station__thumb img { transform: scale(1.04); }
.station h3 {
  font-family: var(--heading); font-size: 1.15rem; font-weight: 700;
  letter-spacing: -0.01em;
}
.station__specs {
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.55;
  color: var(--muted); letter-spacing: 0.02em;
}
.station__tag {
  align-self: flex-start;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-deep);
  border-top: 1px dotted var(--steel); padding-top: 0.55rem; margin-top: auto;
}

.finish {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: start;
}
.finish h2 {
  font-family: var(--heading); font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.02em; line-height: 1.22; margin-bottom: 0.75rem;
}
.finish > div > p { color: var(--muted); }
.spec-list {
  display: grid; gap: 0;
  border: 1.5px solid var(--ink); background: var(--white);
}
.spec-list > div {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1rem;
  padding: 1rem 1.15rem; border-bottom: 1px dotted var(--steel);
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); font-weight: 500;
}
.spec-list dd { font-weight: 500; }

.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2.5rem; align-items: start; }
.contact h2 {
  font-family: var(--heading); font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 0.6rem;
}
.contact > .reveal > p { color: rgba(255,255,255,0.75); }
.form {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.18);
  padding: 1.5rem; display: grid; gap: 1rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: #9eb6c8;
}
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.22);
  color: #fff; padding: 0.75rem 0.85rem; border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 96px; }
.field option { color: var(--ink); }

.site-footer {
  border-top: 1px solid var(--line); padding: 1.5rem 0; background: var(--bg-soft);
}
.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.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .finish, .contact { grid-template-columns: 1fr; }
  .rail-track { display: none; }
  .rail {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border: 1px solid var(--line); padding: 0.5rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: 0.35rem; }
  .field-row { grid-template-columns: 1fr; }
  .hero__inner { margin-left: 1.25rem; }
  .spec-list > div { grid-template-columns: 1fr; gap: 0.25rem; }
}
