/* ── RESET & BASE ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Smooth scroll for any anchor links in the content section */
  scroll-behavior: smooth;
}

body {
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

/* ── HEADER ───────────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  /* Faint gradient so text stays readable without a solid background */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.0) 100%
  );
  backdrop-filter: blur(0px); /* no blur — keeps the animation crisp behind it */
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none; /* pass scroll events through to the page */
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto; /* re-enable clicks on the actual elements */
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  height: 36px;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo img {
  height: 100%;
  width: auto;
  /* invert(1) flips black → white so both tones are visible on the dark
     background. The muted green shifts slightly but stays readable. */
  filter: invert(1);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.header-logo:hover img {
  opacity: 1;
}

/* Right-side nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Instagram icon link */
.header-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-icon-link:hover {
  color: #fff;
}

.header-icon-link svg {
  width: 100%;
  height: 100%;
}

/* Connect button */
.header-connect {
  display: inline-flex;
  align-items: center;
  padding: 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.header-connect:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Header hide / show on scroll */
#site-header {
  transition: transform 0.35s ease;
}

#site-header.header-hidden {
  transform: translateY(-100%);
}

/* ── LOADER ───────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(320px, 80vw);
}

.loader-bar-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.loader-label {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ── SCROLL DRIVER ────────────────────────────────────────────── */
/*
  This tall container is the scroll distance for the animation.
  500vh = ~5 screen heights of scrolling for 145 frames.
  Adjust this value to make the animation faster or slower.
*/
#scrollDriver {
  position: relative;
  height: 500vh;
  background: #000;
}

/* ── CANVAS ───────────────────────────────────────────────────── */
#animCanvas {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  /* Canvas starts hidden — fades in after intro exits */
  opacity: 0;
  transition: opacity 0.8s ease;
}

#animCanvas.visible {
  opacity: 1;
}

/* ── INTRO SCREEN ─────────────────────────────────────────────── */
/*
  Sits inside #scrollDriver, absolutely positioned so it overlays
  the canvas. Both share the same sticky scroll context.
  On first scroll it fades out while the canvas fades in.
*/
#intro {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Pull it up so it sits on top of the canvas in the same space */
  margin-bottom: -100vh;
  z-index: 10;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Fades out on first scroll */
  opacity: 1;
  transition: opacity 0.8s ease;
  pointer-events: none; /* let scroll events pass through */
}

#intro.hidden {
  opacity: 0;
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding: 0 24px;
}

.intro-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  /* Fades in after loader exits */
  opacity: 0;
  transform: translateY(8px);
  animation: introFadeUp 0.7s ease 0.2s forwards;
}

.intro-slogan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.05;
  color: #fff;
}

/* Each word staggers in */
.slogan-word {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: introFadeUp 0.7s ease forwards;
}

.slogan-word:nth-child(1) { animation-delay: 0.35s; }
.slogan-word:nth-child(2) { animation-delay: 0.5s;  }
.slogan-word:nth-child(3) { animation-delay: 0.65s; }

@keyframes introFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll hint arrow */
.scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.3);
  opacity: 0;
  /* Appears after slogan finishes, then breathes */
  animation: hintAppear 0.6s ease 1.2s forwards,
             hintBreathe 2s ease-in-out 1.8s infinite;
}

.scroll-hint svg {
  width: 100%;
  height: 100%;
}

@keyframes hintAppear {
  to { opacity: 1; }
}

@keyframes hintBreathe {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.3; }
  50%       { transform: translateX(-50%) translateY(6px); opacity: 0.7; }
}

/* ── SHARED SECTION STYLES ────────────────────────────────────── */
section {
  background: #000;
  padding: 120px 24px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-inner.centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Eyebrow label above headings */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 24px;
}

.section-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 680px;
  margin: 0 auto 64px;
  text-align: center;
}

.body-text {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 40px;
}

/* Primary button */
.btn-primary {
  display: inline-block;
  margin-top: 40px;
  padding: 16px 36px;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

/* ── HERO TAGLINE ─────────────────────────────────────────────── */
#hero-tagline {
  padding: 160px 24px 120px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-headline {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 28px;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 600px;
}

/* ── STATS BAR ────────────────────────────────────────────────── */
#stats {
  padding: 64px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 140px;
  text-align: center;
}

.stat-number {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .stat-divider { display: none; }
  .stats-grid { justify-content: center; gap: 40px; }
}

/* ── FEATURES ─────────────────────────────────────────────────── */
#features {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 64px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
}

.feature-card {
  padding: 40px 36px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.25s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Remove right border on last in each row */
.feature-card:nth-child(3n) { border-right: none; }
/* Remove bottom border on last row */
.feature-card:nth-last-child(-n+3) { border-bottom: none; }

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.5);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card:nth-child(3n) { border-right: 1px solid rgba(255,255,255,0.07); }
  .feature-card:nth-child(2n) { border-right: none; }
  .feature-card:nth-last-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,0.07); }
  .feature-card:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { border-right: none !important; }
  .feature-card:last-child { border-bottom: none; }
  .feature-card:nth-last-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.07); }
}

/* ── OCR SECTION ──────────────────────────────────────────────── */
#ocr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ocr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.ocr-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ocr-steps li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

.step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
  padding-top: 3px;
  flex-shrink: 0;
  width: 24px;
}

/* OCR visual card */
.ocr-visual {
  display: flex;
  justify-content: center;
}

.ocr-card {
  width: 100%;
  max-width: 340px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ocr-card-header {
  display: flex;
  align-items: center;
}

.ocr-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.07);
  padding: 6px 12px;
  border-radius: 100px;
}

.ocr-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ocr-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  animation: shimmer 1.8s ease-in-out infinite;
}

.ocr-line.long  { width: 100%; animation-delay: 0s; }
.ocr-line.medium { width: 70%; animation-delay: 0.15s; }
.ocr-line.short  { width: 45%; animation-delay: 0.3s; }

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.ocr-card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 20px;
}

.ocr-check {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

@media (max-width: 800px) {
  .ocr-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}

/* ── PLATFORM SECTION ─────────────────────────────────────────── */
#platform {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 0;
}

.platform-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: left;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.platform-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.platform-icon {
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}

.platform-icon svg {
  width: 100%;
  height: 100%;
}

.platform-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.platform-card > p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 28px;
}

.platform-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-list li {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  padding-left: 18px;
  position: relative;
}

.platform-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 700px) {
  .platform-grid { grid-template-columns: 1fr; }
}

/* ── CTA SECTION ──────────────────────────────────────────────── */
#cta {
  padding: 160px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cta-headline {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 24px;
}

/* ── FOOTER ───────────────────────────────────────────────────── */
#footer {
  padding: 40px 24px;
  background: #000;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}

/* Social icons row */
.footer-socials {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-social-link:hover {
  color: #fff;
}

.footer-social-link svg {
  width: 100%;
  height: 100%;
}

/* Footer nav links */
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
}

@media (max-width: 700px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .footer-links {
    justify-content: center;
  }
}
