:root {
  --bg: #030a06;
  --bg-elev: rgba(6, 20, 12, 0.72);
  --bg-card: rgba(7, 22, 13, 0.78);
  --border: rgba(34, 197, 94, 0.24);
  --border-strong: rgba(74, 222, 128, 0.5);
  --green: #22c55e;
  --green-bright: #4ade80;
  --green-glow: rgba(34, 197, 94, 0.35);
  --text: #ecfdf5;
  --text-muted: #94b8a3;
  --font-sans: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Matrix Canvas & Atmospheric Overlays */
#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(3, 10, 6, 0.38) 0%, rgba(3, 10, 6, 0.78) 65%, rgba(2, 7, 4, 0.94) 100%);
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(74, 222, 128, 0.45) 3px,
    transparent 4px
  );
}

/* Layout */
header,
main,
footer {
  position: relative;
  z-index: 5;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(3, 10, 6, 0.68);
  border-bottom: 1px solid rgba(34, 197, 94, 0.16);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.status-dot,
.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 10px var(--green-bright);
  display: inline-block;
}

.pulse-dot {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--green-bright);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(34, 197, 94, 0.14);
  color: var(--text) !important;
  font-weight: 600 !important;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-nav:hover {
  background: rgba(34, 197, 94, 0.26);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.3);
}

.btn-icon {
  background: rgba(6, 20, 12, 0.8);
  border: 1px solid var(--border);
  color: var(--green-bright);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--green-bright);
  background: rgba(34, 197, 94, 0.15);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 0 48px;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.terminal-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(5, 18, 10, 0.78);
  color: var(--green-bright);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.logo-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(560px, 88vw);
  margin: 0 auto 12px;
}

.logo-aura {
  position: absolute;
  width: 82%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.28) 0%, rgba(34, 197, 94, 0.06) 55%, transparent 75%);
  filter: blur(28px);
  animation: auraBreath 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes auraBreath {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.07); opacity: 1; }
}

@property --fan-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.logo-glow {
  position: relative;
  width: 100%;
  margin-top: -12%;
  margin-bottom: -12%;
  filter: drop-shadow(0 0 18px rgba(34, 197, 94, 0.45)) drop-shadow(0 0 38px rgba(34, 197, 94, 0.2));
  transition: transform 0.35s ease, filter 0.35s ease;
}

.logo-glow:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 26px rgba(74, 222, 128, 0.65)) drop-shadow(0 0 52px rgba(34, 197, 94, 0.32));
}

.logo-fan-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transform-origin: 50% 73%;
  cursor: pointer;
}

.logo-fan-wrap.fan-unfold {
  --fan-angle: 205deg;
  -webkit-mask-image: conic-gradient(
    from 268deg at 50% 74%,
    transparent 0deg,
    #000 3deg,
    #000 var(--fan-angle),
    transparent calc(var(--fan-angle) + 22deg)
  );
  mask-image: conic-gradient(
    from 268deg at 50% 74%,
    transparent 0deg,
    #000 3deg,
    #000 var(--fan-angle),
    transparent calc(var(--fan-angle) + 22deg)
  );
  animation:
    fanUnfold 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    fanPop 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-logo {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 520px;
  object-fit: contain;
  display: block;
}

@keyframes fanUnfold {
  0% {
    --fan-angle: 0deg;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    --fan-angle: 205deg;
    opacity: 1;
  }
}

@keyframes fanPop {
  0% {
    transform: scale(0.86) rotate(-6deg);
  }
  75% {
    transform: scale(1.02) rotate(0.4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-fan-wrap.fan-unfold {
    animation: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.hero-title {
  margin: 10px 0 14px;
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f0fdf4;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.28);
}

.hero-title .prefix {
  color: var(--green-bright);
  margin-right: 8px;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.05em;
  background: var(--green-bright);
  margin-left: 4px;
  vertical-align: -0.15em;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #02140a;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
  box-shadow: 0 0 34px rgba(74, 222, 128, 0.55);
}

.btn-ghost {
  background: rgba(6, 20, 12, 0.72);
  color: var(--text);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(34, 197, 94, 0.16);
  border-color: var(--green-bright);
}

/* Hero Metrics */
.hero-metrics {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 14px 26px;
  border-radius: 14px;
  background: rgba(6, 20, 12, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-val {
  color: var(--green-bright);
  font-weight: 700;
  font-size: 1rem;
}

.metric-lbl {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.metric-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* Scroll Hint */
.scroll-hint {
  margin-top: 34px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  opacity: 0.75;
}

.scroll-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--green-bright), transparent);
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.eyebrow {
  display: inline-block;
  color: var(--green-bright);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

/* Glass Cards */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* Product Showcase */
.product-showcase {
  padding: 34px;
}

.product-second {
  margin-top: 28px;
}

.product-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.18);
  color: var(--green-bright);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.badge-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.product-header h3 {
  margin: 0 0 8px;
  font-size: 1.55rem;
}

.product-lead {
  margin: 0;
  max-width: 640px;
  color: var(--text-muted);
}

.product-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.demo-note {
  font-size: 0.78rem;
  color: var(--green-bright);
  opacity: 0.85;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-item {
  padding: 20px;
  border-radius: 14px;
  background: rgba(3, 12, 7, 0.65);
  border: 1px solid rgba(34, 197, 94, 0.16);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.feature-item h4 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: #f0fdf4;
}

.feature-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.service-num {
  display: inline-block;
  color: var(--green-bright);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.12);
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Contact */
.section-contact {
  padding-bottom: 90px;
}

.contact-box {
  padding: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-color: var(--border-strong);
  background: linear-gradient(135deg, rgba(7, 26, 15, 0.88) 0%, rgba(4, 14, 8, 0.9) 100%);
}

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

.contact-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
}

.contact-copy p {
  margin: 0;
  color: var(--text-muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(34, 197, 94, 0.16);
  background: rgba(2, 8, 5, 0.85);
  padding: 22px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-right {
  color: var(--green);
}

/* Responsive */
@media (max-width: 900px) {
  .feature-grid,
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-cta {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn-nav) {
    display: none;
  }

  .hide-mobile {
    display: none;
  }

  .feature-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .product-showcase,
  .contact-box {
    padding: 22px;
  }

  .metric-sep {
    display: none;
  }
}
