/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:            #0a0b0f;
  --surface:       #12141a;
  --surface-2:     #1c1f28;
  --border:        #2a2d38;
  --accent:        #1a6bff;
  --accent-glow:   rgba(26, 107, 255, 0.18);
  --teal:          #00e5c3;
  --text-primary:  #f0f0ee;
  --text-secondary:#9a9ba8;
  --text-muted:    #5a5c6a;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  38px;
  --text-4xl:  52px;
  --text-hero: clamp(42px, 6vw, 72px);

  --radius-card:   8px;
  --radius-input:  8px;
  --radius-btn:    4px;
  --radius-pill:   100px;

  --max-width: 1080px;
  --page-pad:  24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
}

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

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  border-radius: var(--radius-btn);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.accent { color: var(--accent); }
.teal   { color: var(--teal); }

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-subheading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.section-subtext {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 600px;
}

.body-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.body-text strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
  padding: 64px 0;
  position: relative;
}

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

/* Section separator */
.section::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: var(--max-width);
  height: 1px;
  background: var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #3378ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: rgba(26, 107, 255, 0.5);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

#nav.scrolled {
  background: rgba(10, 11, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--page-pad);
}

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

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.wordmark-ai    { color: var(--accent); }
.wordmark-flows { color: var(--text-primary); font-weight: 400; }

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

.nav-link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  transition: color 0.2s;
}

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

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-cta {
  margin-left: 8px;
  padding: 9px 18px;
  font-size: var(--text-sm);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px;
  border-radius: var(--radius-btn);
  transition: color 0.2s;
}

.hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 120px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(26, 107, 255, 0.15), transparent),
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  opacity: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.92;
}

/* Override: re-layer the gradient on top of the grid fade */
.hero-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(26, 107, 255, 0.18), transparent 60%),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255,255,255,0.025) 47px, rgba(255,255,255,0.025) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(255,255,255,0.025) 47px, rgba(255,255,255,0.025) 48px),
    var(--bg);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 229, 195, 0.08);
  border: 1px solid rgba(0, 229, 195, 0.25);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-primary);
  max-width: 760px;
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.6;
  font-weight: 300;
}

.br-desktop { display: block; }

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   SOCIAL PROOF BAR
   ============================================================ */
.proof-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.proof-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px var(--page-pad);
  gap: 0;
}

.proof-item {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 32px;
  text-align: center;
}

.proof-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================================
   PROBLEM / IMPERATIVE
   ============================================================ */
.imperative-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

/* Contrast card */
.contrast-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.contrast-header {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.contrast-col-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
}

.contrast-col-label.teal {
  color: var(--teal);
}

.contrast-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.contrast-row:last-child {
  border-bottom: none;
}

.contrast-row-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.contrast-before,
.contrast-after {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  padding: 0 8px;
}

.contrast-before { color: var(--text-secondary); }
.contrast-after  { color: var(--teal); }

/* ============================================================
   VALUE PROPOSITION
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(26, 107, 255, 0.5);
  box-shadow: 0 0 32px var(--accent-glow);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  background: var(--surface);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
}

/* Vertical connector on mobile */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 17px;
  width: 1px;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0px,
    var(--border) 6px,
    transparent 6px,
    transparent 12px
  );
}

.step-card {
  background: transparent;
  padding: 28px 28px 28px 52px;
  position: relative;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  margin-left: 17px;
}

.step-card:last-child {
  border-bottom: none;
}

.step-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  position: absolute;
  top: 20px;
  right: 20px;
  user-select: none;
}

.step-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   TEAM
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.team-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.team-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.team-info {
  flex: 1;
}

.team-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.team-role {
  display: block;
  font-size: var(--text-xs);
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 12px;
}

.team-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s;
}

.team-linkedin:hover {
  color: #3378ff;
}

.team-linkedin:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact {
  background: var(--surface);
}

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

.label-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.contact-copy .section-heading {
  margin-bottom: 16px;
}

.reassurance-list {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reassurance-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Form wrapper */
.contact-form-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  resize: vertical;
}

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

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

input:focus-visible,
textarea:focus-visible {
  outline: none;
}

textarea {
  min-height: 110px;
}

.btn-submit {
  width: 100%;
  height: 48px;
  font-size: var(--text-base);
  position: relative;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.loading .btn-text  { display: none; }
.btn-submit.loading .btn-spinner { display: block; }

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

.form-error {
  font-size: var(--text-sm);
  color: #e05555;
  padding: 10px 14px;
  border: 1px solid rgba(224, 85, 85, 0.3);
  border-radius: var(--radius-input);
  background: rgba(224, 85, 85, 0.06);
}

/* Success state */
.form-success {
  text-align: center;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.form-success svg {
  margin-bottom: 4px;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.form-success p {
  font-size: var(--text-base);
  color: var(--text-secondary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

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

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

.footer-logo {
  gap: 8px;
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

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

.footer-domain {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

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

/* Hero staggered fade-up */
.hero .badge    { animation: fadeUp 0.6s ease 0.1s both; }
.hero .hero-headline { animation: fadeUp 0.6s ease 0.2s both; }
.hero .hero-sub      { animation: fadeUp 0.6s ease 0.3s both; }
.hero .hero-ctas     { animation: fadeUp 0.6s ease 0.4s both; }

/* Hero elements are visible immediately via animation, not IntersectionObserver */
.hero .reveal {
  opacity: 0;
}
.hero .reveal.is-visible {
  /* Let the animation handle it */
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   RESPONSIVE — TABLET (640px+)
   ============================================================ */
@media (min-width: 640px) {
  :root {
    --page-pad: 48px;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

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

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

/* ============================================================
   RESPONSIVE — DESKTOP (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .section {
    padding: 100px 0;
  }

  /* Nav */
  .hamburger { display: none; }
  .nav-links  { display: flex !important; }

  /* Imperative */
  .imperative-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  /* Value prop */
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* How it works — horizontal timeline */
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .steps-grid::before {
    display: none;
  }

  .step-card {
    padding: 28px 24px;
    border-left: none;
    border-bottom: none;
    border-top: 3px solid var(--accent);
    margin-left: 0;
    position: relative;
  }

  /* Connector line between steps */
  .step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: -3px;
    right: 0;
    width: calc(100% - 100%);
    height: 1px;
    background: var(--border);
    /* The border-top handles the connector - use a wider pseudo */
  }

  /* Horizontal dashed connector between step cards */
  .steps-grid {
    position: relative;
  }

  .step-card {
    border-right: 1px dashed var(--border);
  }

  .step-card:last-child {
    border-right: none;
  }

  .step-number {
    position: static;
    display: block;
    margin-bottom: 12px;
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 2fr 3fr;
    gap: 64px;
  }

  /* Proof bar */
  .proof-bar-inner {
    gap: 0;
  }
}

/* ============================================================
   MOBILE OVERRIDES
   ============================================================ */
@media (max-width: 639px) {
  .hero-sub .br-desktop { display: none; }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

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

  .proof-bar-inner {
    flex-direction: column;
    gap: 8px;
    padding: 16px var(--page-pad);
  }

  .proof-divider {
    width: 40px;
    height: 1px;
  }

  .proof-item {
    padding: 4px 0;
  }

  .team-card {
    flex-direction: column;
  }
}

/* ============================================================
   MOBILE NAV DRAWER
   ============================================================ */
@media (max-width: 1023px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 11, 15, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px var(--page-pad) 24px;
    gap: 4px;
  }

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

  .nav-link {
    padding: 12px 0;
    font-size: var(--text-base);
    border-bottom: 1px solid var(--border);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
    text-align: center;
  }

  #nav {
    position: fixed;
  }
}
