/* ========================================================================
   justcrawl.io — Landing Page Styles
   Design system: DESIGN.md (dark-mode-first, teal accent, Satoshi + Geist)
   ======================================================================== */

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

:root {
  --bg: #0A0A0F;
  --surface: #13131A;
  --surface-hover: #1A1A24;
  --border: #1E1E2A;
  --border-subtle: #16161F;
  --text: #E8E8ED;
  --text-muted: #6B6B80;
  --text-dim: #45455A;
  --accent: #00D4AA;
  --accent-hover: #00E8BB;
  --accent-muted: rgba(0, 212, 170, 0.15);
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-display: 'Satoshi', sans-serif;
  --font-logo: 'Boldonse', sans-serif;
  --font-body: 'Geist', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
}

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

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
}

/* --- Screen reader only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  min-height: 36px;
}

/* --- Logo --- */
.logo-mark {
  font-family: var(--font-logo);
  font-size: 20px;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-dim);
  margin-left: 8px;
}

/* ===================== NAVIGATION ===================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-link {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.nav-link:hover {
  color: var(--text);
}
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-subtle);
}
.nav-mobile-menu:not([hidden]) {
  display: flex;
}
.nav-mobile-link {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 0;
}
.nav-mobile-link--primary {
  color: var(--accent);
}

/* ===================== HERO ===================== */
.hero {
  padding: 160px 24px 80px;
  text-align: center;
  background:
    radial-gradient(ellipse 600px 400px at 50% 40%, rgba(0, 212, 170, 0.06), transparent),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
}
.hero-content {
  max-width: 720px;
  margin: 0 auto;
}
.hero-heading {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
.hero-accent {
  color: var(--accent);
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hero-trust {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* DAG illustration */
.hero-dag {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.dag-svg {
  width: 100%;
  height: auto;
}
.dag-edge {
  stroke-width: 2;
}
.dag-edge--default {
  stroke: var(--text-dim);
}
.dag-edge--split {
  stroke: var(--info);
  opacity: 0.6;
}
.dag-edge--success {
  stroke: var(--success);
  opacity: 0.6;
}
.dag-edge--fail {
  stroke: var(--error);
  opacity: 0.6;
}

/* DAG node stagger animation */
.dag-node {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.dag-edge {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.6s ease-out;
}
.anim-visible .dag-node { opacity: 1; transform: translateX(0); }
.anim-visible .dag-edge { stroke-dashoffset: 0; }

.anim-visible .dag-node--entry   { transition-delay: 0.1s; }
.anim-visible .dag-node--split   { transition-delay: 0.25s; }
.anim-visible .dag-node--service:nth-of-type(4) { transition-delay: 0.4s; }
.anim-visible .dag-node--service:nth-of-type(5) { transition-delay: 0.55s; }
.anim-visible .dag-node--result  { transition-delay: 0.7s; }
.anim-visible .dag-node--failed  { transition-delay: 0.85s; }

.anim-visible .dag-edge--default { transition-delay: 0.15s; }
.anim-visible .dag-edge--split   { transition-delay: 0.3s; }
.anim-visible .dag-edge--success { transition-delay: 0.5s; }
.anim-visible .dag-edge--fail    { transition-delay: 0.65s; }

/* ===================== STRATEGIES ===================== */
.strategies {
  background: var(--bg);
  padding: 96px 24px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.strat-grid {
  max-width: 1100px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.strat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: left;
  transition: border-color 0.15s ease;
}
.strat-card:hover {
  border-color: var(--text-dim);
}
.strat-icon {
  margin-bottom: 16px;
}
.strat-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.strat-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.strat-stat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.strat-stat--success { color: var(--success); background: rgba(34, 197, 94, 0.1); }
.strat-stat--cost { color: var(--info); background: rgba(59, 130, 246, 0.1); }
.strat-stat--reliability { color: #A855F7; background: rgba(168, 85, 247, 0.1); }
.strat-detail {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
  line-height: 1.5;
}

/* ===================== SMART WORKFLOWS ===================== */
.smart-section {
  background: var(--surface);
  padding: 96px 24px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.smart-content {
  max-width: 700px;
  margin: 0 auto;
}
.smart-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  text-align: left;
}
.smart-mode-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.smart-mode-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.smart-mode-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===================== FINAL CTA ===================== */
.final-cta {
  background: var(--bg);
  padding: 120px 24px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.final-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}
.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  min-height: 48px;
}

/* ===================== PROVIDERS LABEL ===================== */
.providers-label {
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* ===================== VALUE PROPS ===================== */
.value-props {
  background: var(--surface);
  padding: 96px 24px;
  border-top: 1px solid var(--border-subtle);
}
.vp-block {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.vp-block + .vp-block {
  margin-top: 96px;
}
.vp-block--reverse {
  direction: rtl;
}
.vp-block--reverse > * {
  direction: ltr;
}
.vp-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.vp-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Mock browser windows */
.vp-mock {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.vp-mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.vp-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.vp-mock-title {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Editor mock */
.vp-mock-body {
  display: flex;
  min-height: 200px;
}
.vp-mock-sidebar {
  width: 90px;
  padding: 12px 8px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vp-mock-sidebar-item {
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 3px;
}
.vp-mock-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.vp-mock-canvas svg {
  width: 100%;
  max-width: 280px;
}

/* Provider mock */
.vp-mock-providers-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vp-provider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.vp-provider-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.vp-provider-status {
  font-size: 11px;
  font-weight: 500;
}
.vp-provider-status--ok { color: var(--success); }
.vp-provider-status--pending { color: var(--info); }
.vp-provider-status--off { color: var(--text-dim); }

/* Analytics mock */
.vp-mock-stats {
  display: flex;
  gap: 24px;
  padding: 16px;
}
.vp-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vp-stat-value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vp-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.vp-mock-chart {
  padding: 0 16px 16px;
}
.vp-mock-chart svg {
  width: 100%;
  height: 60px;
}

/* ===================== HOW IT WORKS ===================== */
.how-it-works {
  background: var(--bg);
  padding: 96px 24px;
  text-align: center;
}
.section-heading {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.hiw-steps {
  max-width: 1000px;
  margin: 48px auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}
.hiw-step {
  flex: 1;
  max-width: 220px;
  text-align: center;
}
.hiw-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-variant-numeric: tabular-nums;
}
.hiw-label {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.hiw-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.hiw-connector {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin-top: 20px;
  flex-shrink: 0;
}

/* ===================== PROVIDERS ===================== */
.providers {
  background: var(--surface);
  padding: 48px 24px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.providers-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.provider-name {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.provider-sep {
  color: var(--border);
  font-size: 14px;
}

/* ===================== PRICING ===================== */
.pricing {
  background: var(--surface);
  padding: 96px 24px;
  text-align: center;
}
.pricing-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.pricing-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.pricing-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.pricing-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 24px;
}
.pricing-cta {
  width: 100%;
  text-align: center;
}

/* Pricing card stagger */
.pricing-card--stagger-1,
.pricing-card--stagger-2,
.pricing-card--stagger-3 {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.anim-visible .pricing-card--stagger-1 { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.anim-visible .pricing-card--stagger-2 { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.anim-visible .pricing-card--stagger-3 { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }

/* ===================== LEGAL PAGES ===================== */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 64px;
}
.legal-content h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.legal-effective {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 48px;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 12px;
}
.legal-content h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 12px;
}
.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-top: 12px;
}
.legal-content li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 4px;
}
.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

/* ===================== FOOTER ===================== */
.footer {
  background: var(--bg);
  padding: 48px 24px;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-domain {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-dim);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text);
}
.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

/* ===================== ANIMATIONS ===================== */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== RESPONSIVE — TABLET (768-1023) ===================== */
@media (max-width: 1023px) {
  .hero-heading {
    font-size: 42px;
  }
  .hero-sub br {
    display: none;
  }
  .strat-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  .smart-modes {
    grid-template-columns: 1fr;
  }
  .vp-block {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .vp-block--reverse {
    direction: ltr;
  }
  .vp-text {
    text-align: center;
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-card:last-child {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ===================== RESPONSIVE — MOBILE (< 768) ===================== */
@media (max-width: 767px) {
  .nav-links {
    display: none;
  }
  .nav-mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 16px 64px;
    min-height: auto;
    gap: 32px;
  }
  .hero-heading {
    font-size: 32px;
  }
  .hero-heading br {
    display: none;
  }
  .hero-sub {
    font-size: 15px;
  }
  .hero-ctas {
    flex-direction: column;
    gap: 8px;
  }
  .hero-ctas .btn {
    width: 100%;
  }

  .value-props {
    padding: 64px 16px;
  }
  .vp-block + .vp-block {
    margin-top: 64px;
  }
  .vp-title {
    font-size: 24px;
  }

  .how-it-works {
    padding: 64px 16px;
  }
  .hiw-steps {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .hiw-connector {
    width: 1px;
    height: 32px;
    margin: 8px auto;
  }
  .hiw-step {
    max-width: 280px;
  }

  .strategies {
    padding: 64px 16px;
  }
  .smart-section {
    padding: 64px 16px;
  }
  .final-cta {
    padding: 80px 16px;
  }
  .providers {
    padding: 32px 16px;
  }
  .provider-sep {
    display: none;
  }
  .providers-row {
    gap: 8px 16px;
  }

  .pricing {
    padding: 64px 16px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-card:last-child {
    max-width: none;
  }

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

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .dag-node {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .dag-edge {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }
  .pricing-card--stagger-1,
  .pricing-card--stagger-2,
  .pricing-card--stagger-3 {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
