/* =============================================
   AtlasCore Landing Page — "Editorial Data Bureau"
   ============================================= */

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

:root {
  --bg: #F8F6F1;
  --bg-alt: #F1EDE8;
  --text: #1C1917;
  --text-secondary: #57534E;
  --accent: #065F46;
  --accent-hover: #047857;
  --accent-light: #ECFDF5;
  --border: #D6D3D1;
  --code-bg: #1C1917;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

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

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

/* --- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.wordmark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  color: var(--text);
}

.pill {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  top: -1px;
}

.nav-cta {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1.5px solid var(--accent);
  padding: 8px 20px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--accent);
  color: #fff;
}

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

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 14px 32px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover { background: var(--accent-hover); }

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

/* --- Hero --- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}


.hero-text .btn {
  align-self: stretch;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}

.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-checklist {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-checklist li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.hero-checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.urgency {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Code block */
.hero-code {
  min-width: 0;
  overflow: hidden;
}

.code-block {
  background: var(--code-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #292524;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #44403C;
}

.code-path {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #A8A29E;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #D6D3D1;
}

.ck { color: #93C5FD; }
.cv { color: #86EFAC; }
.cn { color: #FDE68A; }

/* --- Problems --- */
.problems {
  padding: 80px 0;
  background: var(--bg-alt);
}

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

.problem-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.problem-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Features --- */
.features {
  padding: 96px 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 56px;
}

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

.feature-card {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.feature-bar {
  width: 4px;
  flex-shrink: 0;
  background: var(--accent);
}

.feature-content {
  padding: 24px;
}

.feature-content h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.feature-content code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* --- Output Modes --- */
.outputs {
  padding: 80px 0;
  background: var(--bg-alt);
}

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

.output-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  transition: box-shadow 0.2s;
}

.output-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.output-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.output-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.output-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --- Built for Audit --- */
.audit {
  padding: 80px 0;
}

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

.audit-card {
  padding: 24px 20px;
  border-top: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 0 0 8px 8px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.audit-card h3 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.audit-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --- Data Sources --- */
.sources {
  padding: 72px 0;
  background: var(--bg-alt);
}

.sources-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.source-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  min-width: 140px;
}

.source-abbr {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.source-full {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  max-width: 140px;
}

.sources-tagline {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* --- Waitlist --- */
.waitlist {
  padding: 96px 0;
}

.waitlist-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1.0625rem;
}

.waitlist-form {
  max-width: 560px;
  margin: 0 auto;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.required {
  color: var(--accent);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2357534E' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.1);
}

.form-group input:focus-visible,
.form-group select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-group input::placeholder {
  color: #A8A29E;
}

.waitlist-form .btn {
  width: 100%;
}

.form-success {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 24px;
}

.form-success p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
}

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

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

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

/* --- Responsive --- */

/* Tablet */
@media (max-width: 1023px) {
  .hero { padding: 72px 0 56px; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero h1 { font-size: 2.75rem; }

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

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

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

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

  .source-badge { min-width: 120px; }
}

/* Mobile */
@media (max-width: 767px) {
  .nav-cta {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .hero { padding: 56px 0 40px; }

  .hero-grid {
    padding: 0 16px;
  }

  .hero h1 { font-size: 2.25rem; }

  .hero-text {
    padding: 0;
  }

  .subtitle { font-size: 1rem; }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }

  .hero-checklist li {
    font-size: 0.875rem;
  }

  .code-block code {
    font-size: 0.7rem;
    line-height: 1.6;
  }

  .section-heading { font-size: 2rem; }

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

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

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

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

  .sources-row {
    gap: 12px;
  }

  .source-badge {
    min-width: 100px;
    padding: 16px;
  }

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