:root {
  color-scheme: dark;
  --bg: #070908;
  --panel: rgba(12, 18, 17, 0.72);
  --panel-strong: rgba(16, 24, 23, 0.88);
  --text: #f5fffb;
  --muted: #aac1ba;
  --line: rgba(220, 255, 246, 0.14);
  --cyan: #20e7d1;
  --amber: #f5b84b;
  --magenta: #ff4fa3;
  --lime: #b9ff66;
  --shadow: rgba(0, 0, 0, 0.5);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(32, 231, 209, 0.12), transparent 28rem),
    radial-gradient(circle at 80% 8%, rgba(245, 184, 75, 0.12), transparent 22rem),
    radial-gradient(circle at 78% 86%, rgba(255, 79, 163, 0.08), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    "Noto Sans Thai",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.system-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.46;
  mix-blend-mode: screen;
  z-index: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  height: 72px;
  margin: 0 auto;
}

.brand-lockup,
.nav-links,
.button,
.status-panel,
.system-card,
.contact-section {
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  background: rgba(7, 9, 8, 0.68);
  border-radius: 8px;
  box-shadow: 0 18px 60px var(--shadow);
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 231, 209, 0.95), rgba(185, 255, 102, 0.85)),
    #12221f;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(7, 9, 8, 0.72);
  border-radius: 4px;
}

.brand-mark::after {
  inset: 13px 9px;
  border-color: rgba(7, 9, 8, 0.48);
  background: rgba(7, 9, 8, 0.35);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
  line-height: 1.1;
}

.brand-lockup strong {
  font-size: 0.98rem;
  font-weight: 750;
}

.brand-lockup small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem;
  background: rgba(7, 9, 8, 0.58);
  border-radius: 8px;
}

.nav-links a {
  min-width: 82px;
  padding: 0.58rem 0.8rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.nav-links a:hover {
  background: rgba(245, 184, 75, 0.12);
  color: var(--text);
}

.hero-section {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: end;
  gap: 2rem;
  min-height: 88vh;
  padding: 7.5rem max(1rem, calc((100vw - var(--max)) / 2)) 4rem;
  overflow: hidden;
}

.hero-image,
.hero-shade,
.hero-grid {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.58;
  z-index: -3;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 9, 8, 0.96) 0%, rgba(7, 9, 8, 0.73) 39%, rgba(7, 9, 8, 0.38) 73%, rgba(7, 9, 8, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 9, 8, 0.3) 0%, rgba(7, 9, 8, 0.88) 100%);
}

.hero-grid {
  z-index: -1;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(220, 255, 246, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 255, 246, 0.12) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 72%, transparent);
}

.hero-content {
  width: min(100%, 700px);
  padding-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.2rem;
  font-size: 4.7rem;
  line-height: 0.98;
  font-weight: 850;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.1;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.16rem;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 1.7rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.78;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  min-width: 132px;
  padding: 0.78rem 1rem;
  border-radius: 8px;
  font-weight: 750;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

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

.button-primary {
  border-color: rgba(32, 231, 209, 0.55);
  background:
    linear-gradient(135deg, rgba(32, 231, 209, 0.92), rgba(185, 255, 102, 0.82));
  color: #06100e;
  box-shadow: 0 16px 52px rgba(32, 231, 209, 0.2);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.status-panel {
  align-self: end;
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 750;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(185, 255, 102, 0.46);
  animation: pulse 1.8s infinite;
}

.status-panel dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
}

.status-panel div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(220, 255, 246, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.status-panel dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.status-panel dd {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.systems-section {
  position: relative;
  z-index: 2;
  padding: 4rem max(1rem, calc((100vw - var(--max)) / 2));
  background:
    linear-gradient(180deg, rgba(7, 9, 8, 0.42), rgba(7, 9, 8, 0.94)),
    rgba(7, 9, 8, 0.88);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.55rem;
  color: var(--amber);
}

.system-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.system-card {
  min-height: 216px;
  padding: 1.1rem;
  background: var(--panel-strong);
  border-radius: 8px;
  overflow: hidden;
}

.system-card:nth-child(2) {
  border-color: rgba(245, 184, 75, 0.28);
}

.system-card:nth-child(3) {
  border-color: rgba(255, 79, 163, 0.24);
}

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 28px;
  margin-bottom: 2.4rem;
  border: 1px solid rgba(220, 255, 246, 0.16);
  border-radius: 6px;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 800;
}

.system-card p,
.contact-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.contact-section {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 2rem;
  padding: 1.2rem;
  background:
    linear-gradient(135deg, rgba(32, 231, 209, 0.1), transparent 38%),
    rgba(12, 18, 17, 0.86);
  border-radius: 8px;
}

.contact-copy {
  max-width: 720px;
}

.contact-copy .eyebrow {
  color: var(--magenta);
}

.contact-copy p:last-child {
  margin-bottom: 0;
}

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: rgba(245, 255, 251, 0.52);
  font-size: 0.86rem;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(185, 255, 102, 0.44);
  }
  70% {
    box-shadow: 0 0 0 11px rgba(185, 255, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(185, 255, 102, 0);
  }
}

@media (max-width: 860px) {
  .site-header {
    height: 68px;
  }

  .nav-links a {
    min-width: 68px;
    padding-inline: 0.65rem;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: 86vh;
    padding-top: 7rem;
    padding-bottom: 2.8rem;
  }

  h1 {
    font-size: 3.05rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .status-panel {
    width: min(100%, 440px);
    margin-bottom: 0;
  }

  .system-cards {
    grid-template-columns: 1fr;
  }

  .system-card {
    min-height: 176px;
  }

  .card-index {
    margin-bottom: 1.4rem;
  }

  .section-heading,
  .contact-section,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    width: min(100% - 1rem, var(--max));
  }

  .brand-lockup {
    padding: 0.5rem;
  }

  .brand-lockup small {
    display: none;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .nav-links {
    gap: 0.15rem;
  }

  .nav-links a {
    min-width: 58px;
    font-size: 0.82rem;
  }

  .hero-section {
    min-height: 84vh;
    padding-inline: 1rem;
  }

  .hero-image {
    object-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(7, 9, 8, 0.98), rgba(7, 9, 8, 0.72)),
      linear-gradient(180deg, rgba(7, 9, 8, 0.35), rgba(7, 9, 8, 0.92));
  }

  h1 {
    font-size: 2.42rem;
  }

  .hero-actions {
    width: 100%;
  }

  .button {
    flex: 1 1 150px;
  }

  .status-panel dl {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
