/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0e17;
  --bg-light: #111827;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --accent: #00d4ff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  overflow-x: hidden;
}

body.loading {
  overflow: hidden;
}

/* === Loader === */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0a0e17;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  width: 120px;
  opacity: 0.8;
}

.loader-bar-track {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s ease;
}

/* === Video Hero Section === */
.hero-scroll-container {
  position: relative;
  /* Height set by JS: 900vh (9x viewport for ~15s video) */
}

.hero-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #0a0e17 url('../assets/img/hero-poster.jpg') center/cover no-repeat;
}

.hero-video,
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* === Fallback (no video) === */
.hero-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 0;
  background: #0a0e17;
}

.hero-fallback img {
  width: 160px;
  opacity: 0.3;
}

/* === ARX Logo Overlay === */
.arx-logo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55vw;
  max-width: 800px;
  z-index: 3;
  pointer-events: none;
  will-change: opacity;
}

/* === Text Overlays === */
.overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8%;
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

.text-overlay p {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--text);
  background: rgba(10, 14, 23, 0.4);
  padding: 12px 28px;
  border-radius: 10px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* === Nav gradient overlay === */
.nav-gradient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 49;
  pointer-events: none;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  transition: opacity 0.3s ease;
}

.nav-logo {
  width: 90px;
  height: auto;
  opacity: 1;
  filter: brightness(1.1);
  object-fit: contain;
}

.nav-cta {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 24px;
  background: #3961F2;
  border: 1px solid #3961F2;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: #5a7ef5;
  border-color: #5a7ef5;
  transform: translateY(-1px);
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  padding: 10px 8px;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.8;
}

.nav-sign-in {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  padding: 10px 8px;
  transition: opacity 0.2s ease;
}

.nav-sign-in:hover {
  opacity: 0.8;
}

/* === Content Sections (below video) === */
.content {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* === Alternating section backgrounds === */
.section-bg-platform {
  background: #122772;
}

.section-bg-howitworks {
  background: #41528E;
}

/* === Section: Value Proposition === */
.section {
  padding: 120px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7B9AF5;
  margin-bottom: 16px;
}

.section-heading {
  font-size: clamp(2rem, 4.5vw, 3.375rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 64px;
  max-width: 900px;
}

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

.column-card h3 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.column-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.column-card-accent {
  width: 40px;
  height: 3px;
  background: #3961F2;
  margin-bottom: 24px;
  border-radius: 2px;
}

/* === Section: How It Works === */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  counter-reset: step;
}

.step {
  counter-increment: step;
}

.step-number {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #3961F2;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number::before {
  content: counter(step, decimal-leading-zero);
  font-size: 2.925rem;
  font-weight: 700;
  color: #7B9AF5;
  line-height: 1;
}

.step h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.step p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* === Section: Trusted By === */
.trusted-section {
  padding: 80px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trusted-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.trusted-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}

.trusted-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
}

.trusted-logo-placeholder {
  width: 140px;
  height: 48px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.08em;
}

/* === Section: CTA === */
.cta-section {
  padding: 40px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #122772;
  text-align: center;
}

.cta-inner {
  max-width: 800px;
  margin: 0 auto;
}

.cta-heading {
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 40px;
}

.cta-button {
  display: inline-block;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #3961F2;
  padding: 16px 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.cta-button:hover {
  background: #5a7ef5;
  transform: translateY(-1px);
}

.cta-button:active {
  transform: translateY(0);
}

/* === Footer === */
.footer {
  padding: 48px 40px;
  background: #41528E;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  width: 60px;
  opacity: 0.6;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-social a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.footer-social a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

/* === Contact Form === */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-input {
  flex: 1;
  width: 100%;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: #3961F2;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  width: 100%;
}

.contact-form .cta-button {
  width: 100%;
  border: none;
  cursor: pointer;
  margin-top: 8px;
}

.contact-form .cta-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.form-status-success {
  color: #34d399;
}

.form-status-error {
  color: #f87171;
}

/* === About / Team Section === */
.section-bg-about {
  background: #122772;
  padding-top: 100px;
}

.team-group-heading {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 40px;
  margin-top: 64px;
}

.team-group-heading:first-of-type {
  margin-top: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}

.team-card {
  text-align: center;
}

.team-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.team-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.team-title {
  font-size: 0.875rem;
  color: #7B9AF5;
  font-weight: 500;
  line-height: 1.4;
}

.team-prior {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.investor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  align-items: center;
}

.investor-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px 32px;
  min-height: 80px;
}

.investor-logo {
  max-width: 140px;
  max-height: 48px;
  object-fit: contain;
  opacity: 0.85;
  filter: brightness(0) invert(1);
}

.team-card[data-bio] {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.team-card[data-bio]:hover {
  transform: translateY(-4px);
}

.team-card[data-bio]:hover .team-photo {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* === Team Bio Modal === */
.team-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.team-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.team-modal {
  background: #1a3080;
  border-radius: 16px;
  padding: 48px;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.team-modal-overlay.active .team-modal {
  transform: translateY(0);
}

.team-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.team-modal-close:hover {
  color: var(--text);
}

.team-modal-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.team-modal-name {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.team-modal-title {
  font-size: 0.95rem;
  color: #7B9AF5;
  font-weight: 500;
  margin-bottom: 24px;
}

.team-modal-bio {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: left;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .investor-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 20px 24px;
  }

  .nav-logo {
    width: 64px;
  }

  .section {
    padding: 80px 24px;
  }

  .section-heading {
    margin-bottom: 48px;
  }

  .columns-3 {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .text-overlay {
    bottom: 10%;
    padding: 0 6%;
  }

  .text-overlay p {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
  }

  .trusted-logos {
    flex-direction: column;
    gap: 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .cta-section {
    padding: 80px 24px;
  }

  .form-row {
    flex-direction: column;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

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

  .team-photo {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 480px) {
  .nav-cta {
    font-size: 0.775rem;
    padding: 8px 16px;
  }

  .nav-sign-in {
    font-size: 0.775rem;
    padding: 8px 12px;
  }

  .nav-buttons {
    gap: 8px;
  }

  .nav-link {
    font-size: 0.775rem;
    padding: 8px 12px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .investor-grid {
    grid-template-columns: 1fr;
  }
}
