:root {
  --bg1: #050816;
  --bg2: #050816;
  --text-main: #e5efff;
  --text-sub: #9ca3af;
  --accent: #22d3ee;
  --accent-2: #a855f7;
  --border-soft: rgba(148, 163, 184, 0.25);
  --radius-xl: 22px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.7);
  --shadow-subtle: 0 14px 32px rgba(15, 23, 42, 0.6);
  --nav-height: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background: radial-gradient(900px 600px at 0% 0%, #1d2747 0%, transparent 55%),
    radial-gradient(900px 700px at 100% 0%, #1b2150 0%, transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  min-height: 100vh;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

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

.fade-image {
  -webkit-mask-image: linear-gradient(to circle, black 70%, transparent);
  mask-image: radial-gradient(circle, black 70%, transparent 100%);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  align-items: middle;
}

/* NAV */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(150%);
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.9),
    rgba(6, 8, 20, 0.96)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

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

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  /* border-radius: 18px; */
  /* overflow: hidden; */
  flex-shrink: 0;
}

.nav-logo-word {
  height: 22px;
}

.hero-header {
  text-align: left;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  color: var(--text-sub);
}

.nav-links a {
  padding: 4px 0;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.18s ease-out;
}

.nav-links a:hover::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  flex: 1;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 0;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease,
    opacity 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 42px rgba(56, 189, 248, 0.45);
  color: #020617;
}

.btn-primary:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 20px 54px rgba(37, 99, 235, 0.55);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 6px;
  background: var(--text-main);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 6px;
  background: var(--text-main);
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}
.nav-toggle span::after {
  top: 6px;
}

/* GENERIC 16:9 FRAME */
.frame-16x9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #020617;
}

.frame-16x9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* crop extra bottom height */
}

/* HERO */
.hero {
  padding: 72px 0 56px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 52px;
}

.hero-eyebrow {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin-top: 16px;
  font-size: clamp(42px, 6vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-sub);
  line-height: 0.6cm;
  /* max-width: 480px; */
}

.hero-ctas {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-footnote {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-sub);
}

.hero-visual {
  position: relative;
  height: 280px;
  margin: 24px;
}

.hero-card-main,
.hero-card-side {
  position: absolute;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.24),
      transparent 55%
    ),
    radial-gradient(circle at 100% 0, rgba(168, 85, 247, 0.22), transparent 55%),
    #020617;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: var(--shadow-soft);
}

.hero-card-main {
  inset: 0;
  margin: auto;
  max-width: 360px;
}

.hero-card-inner {
  padding: 10px;
}

.hero-card-side {
  width: 190px;
  top: 18px;
}

.hero-card-side.left {
  left: -8px;
  transform: translateX(-40px) translateY(26px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.hero-card-side.right {
  right: -8px;
  transform: translateX(40px) translateY(54px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.hero-card-label {
  padding: 8px 12px 10px;
  font-size: 11px;
  color: var(--text-sub);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: rgba(15, 23, 42, 0.98);
  display: flex;
  justify-content: space-between;
}

/* SECTIONS */
section {
  padding: 72px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 0px;
}

.section-eyebrow {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  margin-top: 10px;
  font-size: 17px;
  color: var(--text-sub);
  /* max-width: 560px; */
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  line-height: 0.6cm;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.pill-card {
  padding: 24px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.12),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow-subtle);
  font-size: 15px;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.pill-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.pill-card-body p + p {
  margin-top: 6px;
  font-size: 14px;
}

/* CAPABILITIES */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.capability {
  padding: 18px 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.96);
  font-size: 15px;
}

.cap-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 14px;
  margin-bottom: 10px;
  background: radial-gradient(
    circle at 0 0,
    rgba(56, 189, 248, 0.4),
    transparent 65%
  );
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.cap-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cap-body {
  font-size: 12px;
  color: var(--text-sub);
}

/* HOW IT WORKS ARCHITECTURE */
.arch-diagram {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.arch-node {
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.96);
  font-size: 13px;
  text-align: center;
}

.arch-core {
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.25),
      transparent 55%
    ),
    radial-gradient(circle at 100% 0, rgba(168, 85, 247, 0.25), transparent 55%),
    rgba(15, 23, 42, 0.98);
  border-width: 1.2px;
  font-weight: 600;
}

.arch-core span {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--text-sub);
}

.arch-arrow {
  font-size: 18px;
  color: var(--text-sub);
}

.arch-notes {
  margin-top: 24px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
  font-size: 12px;
  color: var(--text-sub);
}

.arch-note {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  max-width: 150px;
  margin: 20px;
  padding: 12px;
  border-radius: 999px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.96);
}

/* INTEGRATION LAYOUT */
.integration-layout {
  display: grid;
  /* grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); */
  gap: 32px;
  margin-top: 30px;
  align-items: center;
}

.integration-steps {
  display: flex;
  flex-direction: row;
  gap: 16px;
  font-size: 14px;
}

.integration-step {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.96);
  flex: 1;

  display: flex;
  flex-direction: column;
  align-items: center; /* Vertically center children */
  gap: 16px; /* Optional: add space between text and image */
}

.integration-step-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.integration-step-title span {
  margin-right: 6px;
  color: var(--accent);
}

/* PRODUCT VIEWER */
.viewer {
  margin-top: 30px;
}

.viewer-frame {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.18),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-subtle);
  padding: 14px 14px 12px;
  align-items: center;
  display: flex;
}

.viewer-images {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;

  /* NEW: give it height */
  aspect-ratio: 16 / 9;
  background: #020617; /* optional, just a dark base */
}

.viewer-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.6s ease;

  /* NEW: ensure each slide fills the area */
  width: 100%;
  height: 100%;
}

.viewer-image-inner {
  width: 100%;
  height: 100%;
}

.viewer-image-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  position: relative;
  z-index: 2;
}

.viewer-image-inner .frame-16x9 {
  border-radius: 16px;
}
.viewer-image.active {
  opacity: 1;
  transform: scale(1);
}

.viewer-caption {
  padding: 10px 4px 4px;
  font-size: 13px;
}

.viewer-caption-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.viewer-caption-text {
  font-size: 15px;
  color: var(--text-sub);
}

.viewer-tabs {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.viewer-tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  font-size: 14px;
  color: var(--text-sub);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.viewer-tab.active {
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.4),
      transparent 65%
    ),
    rgba(15, 23, 42, 1);
  color: var(--text-main);
  border-color: rgba(94, 234, 212, 0.9);
}

/* PROMISE */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.promise-card {
  padding: 16px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.96);
  font-size: 15px;
}

.promise-title {
  font-weight: 600;
  margin-bottom: 6px;
}

/* CONTACT */
.contact-wrap {
  max-width: 720px;
  margin: 30px auto 0;
}

.contact-card {
  padding: 22px 20px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 15px;
  color: #cbd5f5;
}

.form-group span.hint {
  font-size: 11px;
  color: var(--text-sub);
}

input,
textarea {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.95);
  padding: 8px 10px;
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease;
  font-family: inherit;
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.recaptcha-wrap {
  margin: 10px 0 8px;
}

.contact-meta {
  font-size: 15px;
  color: var(--text-sub);
  text-align: center;
}

.contact-meta a {
  color: var(--accent);
  text-decoration: underline;
}

footer {
  padding: 24px 20px 28px;
  font-size: 14px;
  color: var(--text-sub);
  border-top: 1px solid rgba(30, 64, 175, 0.7);
  margin-top: 16px;
}

footer .footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-content {
  background: #0f172a;
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.7);
}

.modal-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.modal-content p {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hero-video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
}

.hero-video {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: #000;
}

/* Hide fallback when video loads */
.hero-video-wrapper:not(.video-failed) + .hero-fallback {
  display: none;
}

/* Show fallback if video fails */
.hero-video-wrapper.video-failed {
  display: none;
}

@media (max-width: 900px) {
  .hero-grid,
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-header {
    text-align: center;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-visual {
    height: 260px;
  }

  .hero-card-main {
    max-width: 320px;
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .promise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-wrap {
    max-width: 100%;
  }
}

@media (max-width: 800px) {
  .nav {
    height: 64px;
  }

  .nav-links {
    position: absolute;
    inset: var(--nav-height) 0 auto 0;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid rgba(30, 64, 175, 0.7);
    padding: 10px 20px 14px;
    display: none;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .btn-primary {
    font-size: 13px;
    padding: 9px 16px;
  }

  section {
    padding: 48px 0;
  }

  .hero-title {
    font-size: 30px;
  }
}

@media (max-width: 640px) {
  .arch-diagram {
    flex-direction: column;
  }

  .arch-arrow {
    rotate: 90deg;
  }

  .arch-notes {
    flex-direction: column;
    align-items: center;
  }

  .arch-mobile {
    display: inline-flex;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  .viewer-frame {
    flex-direction: column;
  }

  .desktop-only {
    display: none !important;
  }

  .capabilities-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .hero-visual {
    height: 240px;
  }

  .integration-steps {
    flex-direction: column;
  }
}
