/* ============================================
   MissingLinkz — Marketing Website Styles
   Light theme — inspired by Relace.ai
   ============================================ */

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

:root {
  --bg-primary: #f5f0ea;
  --bg-secondary: #f2ede7;
  --bg-elevated: #ffffff;
  --border-subtle: #e5e0da;
  --border-card: #e5e0da;
  --border-medium: #d5d0ca;
  --green-accent: #22c55e;
  --green-bright: #16a34a;
  --text-primary: #1a1a1a;
  --text-body: #404040;
  --text-secondary: #6b6b6b;
  --text-muted: #8a8a8a;
  --text-faint: #a0a0a0;
  --code-bg: #1a1a1a;
  --radius: 8px;
  --radius-lg: 12px;
  --container-max: 1200px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--green-accent);
  text-decoration: none;
  transition: color 150ms ease;
}
a:hover { color: var(--green-bright); }

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

p code, .faq__answer code {
  background: #ede8e2;
  padding: 2px 6px;
  border-radius: 4px;
  color: #16a34a;
  font-size: 0.85em;
}

/* --- Section Dividers --- */
.section-divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 150ms ease;
  border: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--green-accent);
  color: #ffffff;
}
.btn--primary:hover {
  background: var(--green-bright);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.btn--secondary {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-medium);
}
.btn--secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn--outline {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-medium);
}
.btn--outline:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 6px;
}

/* --- Section Titles --- */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 60px;
  text-align: center;
  color: var(--text-primary);
}

.section-title strong {
  color: var(--green-accent);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background 150ms ease, border-color 150ms ease;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(245, 240, 234, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-subtle);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.nav__logo:hover { color: var(--text-primary); }
.nav__logo-icon { height: 34px; width: auto; display: inline-block; vertical-align: middle; margin-right: 2px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 150ms ease;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links .btn--primary { color: #ffffff; }
.nav__links .btn--primary:hover { color: #ffffff; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + 116px) 0 140px;
  background: var(--bg-primary);
  overflow: hidden;
}

.hero__grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 840px;
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero__title strong {
  color: var(--green-accent);
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-body);
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 64px;
}

/* --- Code Blocks --- */
.code-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--code-bg);
  border: 1px solid #2a2a2e;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #4ade80;
  max-width: 100%;
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.code-block--hero {
  font-size: 0.95rem;
  padding: 14px 20px;
}

.code-block code {
  white-space: nowrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #71717a;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-family: 'Inter', sans-serif;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: #a1a1aa;
}

.copy-btn--copied {
  opacity: 1;
  color: #4ade80;
  border-color: #4ade80;
}

/* --- Terminal --- */
.terminal {
  background: #0f0f11;
  border: 1px solid #2a2a2e;
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.terminal--sm {
  margin-top: 16px;
  box-shadow: none;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #18181b;
  border-bottom: 1px solid #27272a;
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal__dot--red { background: #ff5f56; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green { background: #27c93f; }

.terminal__title {
  color: #71717a;
  font-size: 0.78rem;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.terminal__body {
  padding: 24px;
  overflow-x: auto;
}

.terminal__body pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.65;
}

.t-prompt { color: #71717a; }
.t-cmd { color: #4ade80; font-weight: 500; }
.t-string { color: #86efac; }
.t-key { color: #6ee7b7; }
.t-bool { color: #fbbf24; }
.t-bracket { color: #a1a1aa; }

/* ============================================
   PROBLEM
   ============================================ */
.problem {
  padding: 140px 0;
  background: var(--bg-secondary);
}

.problem .section-title {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.problem__text {
  text-align: center;
  color: var(--text-body);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.wilderness-divider {
  display: none;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: 140px 0;
  background: var(--bg-primary);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

/* Connecting line between steps */
.steps::before {
  display: none;
}

.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.step__number {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.step__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.step .code-block {
  width: 100%;
}

.step .code-block code {
  white-space: nowrap;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  padding: 140px 0;
  background: var(--bg-secondary);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
  border-color: var(--border-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.feature-card__number {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.feature-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.65;
}

.feature-card code {
  color: #16a34a;
  font-size: 0.85em;
}

/* ============================================
   PRICING
   ============================================ */
.pricing {
  padding: 140px 0;
  background: var(--bg-primary);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pricing-card--popular {
  border-color: var(--green-accent);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.1);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  background: var(--green-accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.pricing-card__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  margin-top: 8px;
  color: var(--text-secondary);
}

.pricing-card__price {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.pricing-card__price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card__links {
  color: var(--text-body);
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.pricing-card__note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.pricing-card .btn {
  margin-top: auto;
  width: 100%;
}

.pricing__footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ============================================
   FOR AGENTS
   ============================================ */
.for-agents {
  padding: 140px 0;
  background: var(--bg-secondary);
}

.agent-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2e;
  border-left: 3px solid #4ade80;
  border-radius: var(--radius-lg);
  padding: 44px;
  max-width: 720px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.agent-card__intro {
  color: #d4d4d8;
  margin-bottom: 28px;
  font-size: 0.95rem;
  font-family: 'JetBrains Mono', monospace;
}

.agent-card__list {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}

.agent-card__list dt {
  font-weight: 600;
  color: #a1a1aa;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.agent-card__list dd {
  margin-left: 0;
}

.agent-card__list .code-block {
  width: 100%;
}

.agent-card__list a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.agent-card__recommend {
  color: #a1a1aa;
  font-size: 0.88rem;
  padding-top: 20px;
  border-top: 1px solid #27272a;
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  padding: 140px 0;
  background: var(--bg-primary);
}

.faq__list {
  max-width: 720px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq__item:first-child {
  border-top: 1px solid var(--border-subtle);
}

.faq__question {
  padding: 22px 0;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 150ms ease;
  color: var(--text-body);
}

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

.faq__question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 300ms ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq__item[open] .faq__question::after {
  content: '\2212';
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__answer {
  padding: 0 0 22px;
  color: var(--text-body);
  line-height: 1.7;
  font-size: 0.95rem;
}

.faq__answer code {
  color: #16a34a;
  font-size: 0.85em;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  position: relative;
  padding: 140px 0;
  overflow: hidden;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
}

.cta-section__bg {
  display: none;
}

.cta-section__content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.cta-section__buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

/* ============================================
   AGENT METADATA
   ============================================ */
/* Agent Technical Details (inside for-agents section) */
.agent-technical__heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
}

.agent-technical {
  background: #1a1a1a;
  border: 1px solid #2a2a2e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.agent-technical__list dt {
  padding: 12px 16px 0;
  font-weight: 500;
  font-size: 0.8rem;
  color: #a1a1aa;
}

.agent-technical__list dd {
  margin: 0;
  padding: 4px 16px 12px;
  border-bottom: 1px solid #27272a;
  word-break: break-all;
  color: #d4d4d8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.agent-technical__list dd:last-child {
  border-bottom: none;
}

.agent-technical__list dd a {
  color: #4ade80;
}
.agent-technical__list dd a:hover {
  color: #22c55e;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  background: var(--bg-primary);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__brand p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer__logo-icon {
  height: 24px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.6;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 150ms ease;
}

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

.footer__meta {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer__meta a {
  color: var(--text-muted);
  transition: color 150ms ease;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps::before {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(245, 240, 234, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav__links.open {
    display: flex;
  }

  .steps {
    max-width: 100%;
  }

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

  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero {
    padding: calc(var(--nav-height) + 64px) 0 80px;
  }

  .hero__title {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 1.75rem);
    margin-bottom: 40px;
  }

  .problem,
  .how-it-works,
  .features,
  .pricing,
  .for-agents,
  .faq,
  .cta-section {
    padding: 80px 0;
  }

  .code-block {
    font-size: 0.78rem;
  }

  .terminal__body pre {
    font-size: 0.72rem;
  }

  .terminal__body {
    padding: 16px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__meta {
    text-align: center;
  }

  .cta-section__buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero__ctas {
    margin-bottom: 48px;
  }

  .agent-card {
    padding: 28px 20px;
  }

  .agent-card__list .code-block {
    display: flex;
  }

  .agent-card__list .code-block code {
    white-space: normal;
    word-break: break-all;
    min-width: 0;
  }

  .agent-technical__list dd {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .code-block--hero {
    font-size: 0.78rem;
    padding: 10px 14px;
  }

  .code-block {
    display: flex;
  }

  .code-block code {
    white-space: normal;
    word-break: break-all;
    min-width: 0;
  }

  .step {
    padding: 24px;
  }

  .agent-card {
    padding: 20px 16px;
  }

  .agent-technical__list dt {
    padding: 10px 12px 0;
  }

  .agent-technical__list dd {
    padding: 4px 12px 10px;
    font-size: 0.7rem;
  }

  .feature-card {
    padding: 28px;
  }

  .pricing-card {
    padding: 28px 24px;
  }
}
