/* =============================================
   Stage 2 Works — Stylesheet
   Colors: #0A0A0F (bg), #4A7BF7 (accent), grayscale
   Typography: Inter, geometric sans-serif
   ============================================= */

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

:root {
  --bg: #0A0A0F;
  --bg-elevated: #111118;
  --bg-card: #13131A;
  --border: #1E1E2A;
  --text-primary: #E8E8ED;
  --text-secondary: #8A8A9A;
  --text-muted: #5A5A6A;
  --accent: #4A7BF7;
  --accent-dim: rgba(74, 123, 247, 0.15);
  --accent-glow: rgba(74, 123, 247, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

.hidden {
  display: none !important;
}

/* --- Container --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Thank You Banner --- */
.thank-you-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.75rem 0;
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}

.thank-you-banner.visible {
  transform: translateY(0);
}

.thank-you-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.thank-you-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.thank-you-close:hover {
  color: #fff;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.4s ease, padding 0.3s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-solid {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(74, 123, 247, 0.3);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero (Full-width video backdrop) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-text {
  position: relative;
  z-index: 3;
  padding: 8rem 4rem 6rem;
  max-width: 680px;
  margin-left: max(2rem, calc((100vw - 1200px) / 2));
  background: rgba(10, 10, 15, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-visual {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

/* Subtle darkening overlay so text box isn't the only contrast */
.hero-visual-fade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(10, 10, 15, 0.7) 0%,
    rgba(10, 10, 15, 0.3) 40%,
    rgba(10, 10, 15, 0.1) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.hero-headline {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-subhead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  padding: 0.75rem 1.75rem;
  border: 1px solid rgba(74, 123, 247, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: translateY(2px);
}

.arrow-down {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.hero-cta:hover .arrow-down {
  transform: translateY(3px);
}

/* --- Sections --- */
.section {
  padding: 8rem 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 3rem;
}

/* --- The Problem --- */
.section-problem {
  border-top: 1px solid var(--border);
}

.problem-content {
  max-width: 680px;
}

.problem-content p {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.problem-content p:first-child {
  font-size: 1.3rem;
  color: var(--text-primary);
  font-weight: 400;
}

/* --- The Engine --- */
.section-engine {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.engine-body {
  max-width: 680px;
  margin-bottom: 4rem;
}

.engine-body p {
  font-size: 1.0625rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.engine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.engine-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.engine-card:hover {
  border-color: rgba(74, 123, 247, 0.25);
  transform: translateY(-2px);
}

.card-visual {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.engine-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.engine-card p {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

.engine-footer {
  max-width: 680px;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.engine-footer p {
  font-size: 1.0625rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Our Approach --- */
.section-approach {
  border-bottom: 1px solid var(--border);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 3rem;
}

.approach-item {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.approach-number {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}

.approach-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.approach-item p {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Partnership --- */
.section-partnership {
  padding-bottom: 10rem;
}

.partnership-content {
  max-width: 640px;
  margin-top: 2rem;
}

.partnership-content p {
  font-size: 1.0625rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

/* --- Floating CTA --- */
.floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(74, 123, 247, 0.25);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-cta:hover {
  box-shadow: 0 6px 32px rgba(74, 123, 247, 0.35);
  transform: translateY(-2px);
}

/* --- Contact Page --- */
.page-contact {
  background: var(--bg);
}

.contact-section {
  padding: 10rem 0 6rem;
  min-height: 100vh;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contact-headline {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.contact-body {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 0.875rem 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.form-submit:hover {
  background: #3A6BE7;
  box-shadow: 0 4px 16px rgba(74, 123, 247, 0.3);
}

/* --- Success Page --- */
.success-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0;
}

.success-content {
  text-align: center;
}

.success-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 2rem;
  width: 80px;
  height: 80px;
  line-height: 80px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.success-content h1 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.success-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand .logo-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

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

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

.footer-legal {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    align-items: flex-end;
  }

  .hero-text {
    padding: 6rem 1.5rem 3rem;
    max-width: none;
    margin: 0 1rem 2rem;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
  }

  .hero-visual-fade {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(
      to top,
      rgba(10, 10, 15, 0.8) 0%,
      rgba(10, 10, 15, 0.3) 50%,
      rgba(10, 10, 15, 0.1) 100%
    );
  }

  .engine-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card-visual {
    aspect-ratio: auto;
    max-height: none;
  }

  .card-video {
    object-fit: contain;
  }

  .approach-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .section {
    padding: 5rem 0;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
  }

  .nav-links.open {
    right: 0;
  }

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

  .hero-headline br {
    display: none;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-section {
    padding: 7rem 0 4rem;
  }

  .floating-cta {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8125rem;
    padding: 0.75rem 1.25rem;
  }
}
