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

:root {
  /* Marketing / LP palette */
  --white: #FFFFFF;
  --black: #000000;
  --red: #C61919;
  --gray-black: #333333;
  --light-gray: #F5F5F5;

  /* Shared */
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --slide-transition: 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  --text-reveal: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ==== ANIMATIONS ==== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInSlow {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-100%); opacity: 0; }
}

@keyframes growWidth {
  from { width: 0; }
  to   { width: 48px; }
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(198, 25, 25, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(198, 25, 25, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 25, 25, 0); }
}

@keyframes subtleVibrate {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-1px); }
  75%      { transform: translateX(1px); }
}

@keyframes typeChar {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ==== ACCESSIBILITY ==== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==== SPLASH ==== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
              opacity 0.6s ease;
}

.splash.dismiss {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.splash-inner {
  text-align: center;
}

.splash-line {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  color: var(--white);
  opacity: 0;
  animation: fadeInSlow 0.8s ease-out forwards;
}

.splash-line-2 {
  animation-delay: 0.6s;
}

.splash-divider {
  width: 0;
  height: 2px;
  background: var(--red);
  margin: 20px auto;
  animation: growWidth 0.6s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}


/* ==== NAVBAR ==== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.navbar.visible {
  opacity: 1;
  pointer-events: auto;
}

.navbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 5%;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 36px;
  display: block;
}


/* ==== MAIN CONTENT ==== */
.main-content {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.main-content.visible {
  opacity: 1;
}


/* ==== SECTIONS ==== */
.section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 5%;
}

.section-inner {
  max-width: 900px;
  width: 100%;
}

.section-light {
  background: var(--light-gray);
}

.section-dark {
  background: var(--black);
  color: var(--white);
}

.section-title {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 48px;
}

/* Scroll-triggered children */
[data-scroll-child] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-scroll-section].visible [data-scroll-child] {
  opacity: 1;
  transform: translateY(0);
}

[data-scroll-section].visible [data-scroll-child]:nth-child(2) { transition-delay: 0.1s; }
[data-scroll-section].visible [data-scroll-child]:nth-child(3) { transition-delay: 0.2s; }
[data-scroll-section].visible [data-scroll-child]:nth-child(4) { transition-delay: 0.3s; }
[data-scroll-section].visible [data-scroll-child]:nth-child(5) { transition-delay: 0.4s; }


/* ==== HERO ==== */
.hero {
  min-height: 100vh;
  padding-top: 120px;
}

.hero-headline {
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--gray-black);
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}


/* ==== BUTTONS ==== */
.btn {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  padding: 14px 32px;
}

.section-dark .btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  animation: subtleVibrate 0.3s;
}

.btn-secondary {
  color: var(--black);
  padding: 14px 0;
  position: relative;
}

.btn-secondary::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--red);
}

.btn-secondary:hover {
  color: var(--red);
}


/* ==== VOICE DEMO ==== */
.voice-demo {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.voice-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--black);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.voice-btn:hover {
  background: var(--light-gray);
}

.voice-btn.recording {
  border-color: var(--red);
  animation: pulseRing 1.5s infinite;
}

.voice-demo-panel {
  flex: 1;
  min-height: 80px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.voice-demo-panel.active {
  opacity: 1;
}

.voice-transcript {
  font-size: 1.05rem;
  color: var(--gray-black);
  margin-bottom: 12px;
  min-height: 1.6em;
}

.voice-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.voice-entity {
  display: inline-block;
  background: var(--light-gray);
  border: 1px solid #E0E0E0;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.voice-entity.show {
  opacity: 1;
  transform: translateY(0);
}

.voice-entity.highlight {
  border-color: var(--red);
  color: var(--red);
}

.voice-insight {
  font-size: 0.95rem;
  color: var(--gray-black);
  padding: 12px 16px;
  border-left: 2px solid var(--red);
  background: var(--light-gray);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.voice-insight.show {
  opacity: 1;
  transform: translateX(0);
}


/* ==== PROBLEM SCENARIOS ==== */
.problem-scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}

.scenario-card {
  background: var(--white);
  border: 1px solid #E0E0E0;
  padding: 24px;
  cursor: default;
  transition: transform var(--transition), box-shadow var(--transition);
}

.scenario-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.scenario-q {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gray-black);
}


/* ==== EXTRACTION DEMO ==== */
.extraction-demo {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.extraction-raw,
.extraction-structured,
.extraction-insight {
  flex: 1;
  min-width: 220px;
  padding: 20px;
  border: 1px solid #E0E0E0;
  background: var(--white);
}

.extraction-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 8px;
}

.extraction-raw p,
.extraction-insight p {
  font-size: 1rem;
  color: var(--gray-black);
  line-height: 1.6;
}

.extraction-structured ul {
  list-style: none;
  font-size: 0.95rem;
  color: var(--gray-black);
}

.extraction-structured li {
  margin-bottom: 4px;
}

.extraction-arrow {
  font-size: 1.6rem;
  color: var(--red);
  align-self: center;
  font-weight: 300;
}


/* ==== TRI-PANEL (Capture / Extract / Reason) ==== */
.tri-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.tri-card {
  background: var(--white);
  border: 1px solid #E0E0E0;
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.tri-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.tri-icon {
  margin-bottom: 16px;
  color: var(--black);
}

.tri-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.tri-card p {
  font-size: 0.95rem;
  color: var(--gray-black);
  line-height: 1.6;
}


/* ==== QUERY DEMO ==== */
.query-demo {
  max-width: 640px;
}

.query-input-mock {
  background: var(--light-gray);
  border: 1px solid #E0E0E0;
  padding: 16px 20px;
  font-size: 1.05rem;
  color: var(--gray-black);
  font-style: italic;
  margin-bottom: 20px;
}

.query-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.query-result {
  padding: 16px 20px;
  border-left: 2px solid var(--red);
  background: var(--light-gray);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.query-result.show {
  opacity: 1;
  transform: translateX(0);
}

.query-why {
  display: block;
  font-size: 0.82rem;
  color: #777;
  margin-top: 4px;
}


/* ==== USE CASES ==== */
.use-cases {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.use-case-card {
  background: var(--white);
  border: 1px solid #E0E0E0;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.use-case-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.uc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}

.uc-icon {
  font-size: 1.4rem;
}

.uc-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  flex: 1;
}

.uc-header::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--red);
  transition: transform 0.3s ease;
  font-weight: 300;
}

.use-case-card.open .uc-header::after {
  transform: rotate(45deg);
}

.uc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 24px;
}

.use-case-card.open .uc-body {
  max-height: 400px;
  padding: 0 24px 24px;
}

.uc-query {
  font-style: italic;
  color: var(--gray-black);
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.uc-response {
  font-size: 0.95rem;
  color: var(--gray-black);
  line-height: 1.6;
}

.uc-response ul {
  list-style: none;
  padding-left: 0;
  margin: 8px 0;
}

.uc-response li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.uc-response li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  transform: translateY(-50%);
}

.uc-insight {
  margin-top: 12px;
  font-weight: 500;
  font-style: italic;
}

.uc-prompt-suggestion {
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 2px solid var(--red);
  background: var(--light-gray);
  font-style: italic;
}


/* ==== INSIGHT LAYER ==== */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.insight-tile {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 28px 24px;
  text-align: center;
  transition: border-color var(--transition);
}

.insight-tile:hover {
  border-color: var(--red);
}

.insight-num {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.insight-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.insight-note {
  text-align: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}


/* ==== COMPARISON TABLE ==== */
.comparison-table {
  max-width: 640px;
  margin: 0 auto;
}

.comp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #E0E0E0;
}

.comp-row span {
  padding: 16px 20px;
  font-size: 1rem;
}

.comp-row span:first-child {
  color: #999;
}

.comp-row span:last-child {
  font-weight: 500;
}

.comp-header {
  border-bottom: 2px solid var(--black);
}

.comp-header span {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.comp-header span:first-child {
  color: #999;
}

.comp-header span:last-child {
  color: var(--black);
}


/* ==== FEEDBACK LOOP ==== */
.loop-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.loop-step {
  background: var(--white);
  border: 1px solid #E0E0E0;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 500;
  transition: transform var(--transition), box-shadow var(--transition);
}

.loop-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.loop-arrow {
  display: flex;
  align-items: center;
}


/* ==== PRIVACY ==== */
.privacy-list {
  list-style: none;
  max-width: 480px;
}

.privacy-list li {
  padding: 14px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid #E0E0E0;
  padding-left: 24px;
  position: relative;
}

.privacy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 2px;
  background: var(--red);
  transform: translateY(-50%);
}


/* ==== WAITLIST FORM ==== */
.waitlist-form {
  max-width: 520px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--white);
}

.optional {
  font-weight: 400;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(198, 25, 25, 0.12);
}

.form-check {
  margin-bottom: 32px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: transparent;
  border-color: #C61919;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #C61919;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.btn-submit {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  cursor: pointer;
}

.form-message {
  margin-top: 16px;
  font-size: 0.95rem;
  text-align: center;
  min-height: 1.6em;
}

.form-message.success {
  color: #22C55E;
}

.form-message.error {
  color: #FF4444;
}

.form-message.info {
  color: rgba(255, 255, 255, 0.6);
}

.btn-submit.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.btn-submit.loading::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.section-dark .btn-submit.loading::after {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: var(--white);
}


/* ==== FOOTER ==== */
.footer {
  padding: 60px 5%;
  text-align: center;
  border-top: 1px solid #E0E0E0;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer p {
  font-size: 1.1rem;
  color: var(--gray-black);
  margin-bottom: 4px;
}

.footer-sub {
  font-size: 0.9rem;
  color: #999;
}


/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
  .section-title {
    font-size: 2rem;
  }

  .hero-headline {
    font-size: 2.2rem;
  }

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

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

@media (max-width: 768px) {
  .section {
    padding: 80px 6%;
    min-height: auto;
  }

  .hero {
    min-height: 100vh;
  }

  .hero-headline {
    font-size: 1.8rem;
  }

  .hero-sub {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1.7rem;
    margin-bottom: 32px;
  }

  .splash-line {
    font-size: 1.4rem;
  }

  .nav-logo img {
    height: 32px;
  }

  .extraction-demo {
    flex-direction: column;
  }

  .extraction-arrow {
    align-self: center;
    transform: rotate(90deg);
  }

  .voice-demo {
    flex-direction: column;
    align-items: center;
  }

  .loop-chain {
    flex-direction: column;
  }

  .loop-arrow {
    transform: rotate(90deg);
  }

  .problem-scenarios {
    grid-template-columns: 1fr;
  }
}
