/* ─────────────────────────────────────────
   DATALENS — style.css
   Aesthetic: Editorial minimalism, founder-led warmth
   Palette: Warm off-white · near-black · single forest-teal accent
   Fonts: Libre Baskerville (serif display) + DM Sans (body)
───────────────────────────────────────── */

/* ── TOKENS ───────────────────────────── */
:root {
  --bg:          #F8F7F3;
  --bg-alt:      #F0EFE9;
  --ink:         #18181A;
  --ink-mid:     #4A4A4D;
  --ink-soft:    #8A8A8F;
  --accent:      #1B6B58;
  --accent-dark: #134F41;
  --rule:        #DDDBD4;

  --serif:  'Libre Baskerville', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  --max-w: 1100px;
  --radius: 4px;
}

/* ── RESET ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

/* ── LAYOUT ───────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ── TYPOGRAPHY ───────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.1rem; font-weight: 700; }

p {
  font-size: 1.0625rem;
  color: var(--ink-mid);
  max-width: 60ch;
}

.section-label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* ── BUTTONS ──────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.btn-large {
  font-size: 1rem;
  padding: 1rem 2.2rem;
}

/* ── RULE LINE ────────────────────────── */
.section { border-top: 1px solid var(--rule); }

/* ── NAV ──────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── HERO ─────────────────────────────── */
.hero {
  padding-block: clamp(5rem, 12vw, 9rem);
}
.hero-inner { max-width: 800px; }
.hero-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.hero-headline {
  margin-bottom: 1.4rem;
}
.hero-headline em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--ink-mid);
  max-width: 54ch;
  margin-bottom: 2.4rem;
  font-weight: 300;
}
.hero-note {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 48ch;
}
.hero-note--secondary {
  margin-top: 0.4rem;
}

/* ── LEAKS GRID ───────────────────────── */
.leaks { padding-block: var(--space-xl); }
.section-header { margin-bottom: var(--space-lg); }
.section-header h2 { margin-top: 0.4rem; }

.leak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.leak-card {
  padding: 2rem 1.8rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s;
}
.leak-card:hover { background: var(--bg-alt); }
.leak-icon {
  display: block;
  font-family: var(--serif);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.leak-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.leak-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: unset;
}

/* ── AUDIT ────────────────────────────── */
.audit {
  background: var(--ink);
  color: var(--bg);
  padding-block: var(--space-xl);
}
.audit-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.audit .section-label { color: #7FBDAD; }
.audit h2 { color: var(--bg); margin-bottom: 1rem; }
.audit p { color: #B8B8BC; max-width: 42ch; margin-bottom: 2rem; }
.audit .btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.audit .btn-primary:hover { background: var(--accent-dark); }

.deliverables-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  max-width: unset;
}
.deliverables-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.deliverables-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: #D8D8DC;
  font-size: 0.975rem;
  line-height: 1.5;
}
.check {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 0.1rem;
}

/* ── PROCESS ──────────────────────────── */
.process { padding-block: var(--space-xl); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr) repeat(4, auto);
  gap: 0 0.5rem;
  align-items: start;
  margin-bottom: var(--space-lg);
  list-style: none;
}

/* Override: simpler flex approach */
.process-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  counter-reset: none;
}
.step {
  flex: 1;
  min-width: 160px;
}
.step-arrow {
  display: none; /* handled in flow bar below */
}
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--accent);
  width: fit-content;
  min-width: 2rem;
}
.step-body h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.step-body p  { font-size: 0.875rem; color: var(--ink-soft); max-width: unset; }

.process-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.3rem;
  align-items: center;
  padding: 1.2rem 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-mid);
  letter-spacing: 0.01em;
  border: 1px solid var(--rule);
}
.flow-arrow { color: var(--accent); font-weight: 700; }

/* ── WHO ──────────────────────────────── */
.who { padding-block: var(--space-xl); }
.who-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.who-text h2 { margin-top: 0.4rem; margin-bottom: 1rem; }
.who-text p { margin-bottom: 0; }

.who-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: center;
}
.who-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.975rem;
  color: var(--ink-mid);
  font-weight: 400;
}
.who-list li:first-child { border-top: 1px solid var(--rule); }
.who-list li::before {
  content: '→ ';
  color: var(--accent);
  font-weight: 500;
}

/* ── WHY ──────────────────────────────── */
.why {
  background: var(--bg-alt);
  padding-block: var(--space-xl);
}
.why-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 720px;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.why-quote::before { content: '\201C'; color: var(--accent); }
.why-quote::after  { content: '\201D'; color: var(--accent); }
.why-body {
  font-size: 1rem;
  color: var(--ink-mid);
  max-width: 56ch;
}

/* ── CONTACT ──────────────────────────── */
.contact { padding-block: var(--space-xl); }
.contact-inner { text-align: center; max-width: 560px; margin-inline: auto; }
.contact h2 { margin-bottom: 0.75rem; }
.contact p  { color: var(--ink-soft); margin-bottom: 2rem; max-width: unset; }

/* ── FOOTER ───────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.footer-email {
  font-size: 0.85rem;
  color: var(--ink-mid);
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s, border-color 0.2s;
}
.footer-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── RESPONSIVE ───────────────────────── */
@media (max-width: 768px) {
  .audit-inner,
  .who-inner {
    grid-template-columns: 1fr;
  }

  .audit .btn-primary { margin-bottom: var(--space-md); }

  .process-steps {
    flex-direction: column;
    gap: 1.5rem;
  }
  .step { min-width: unset; flex: none; width: 100%; }

  .process-flow {
    font-size: 0.72rem;
    gap: 0.25rem;
  }

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

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

  .hero { padding-block: clamp(3.5rem, 10vw, 6rem); }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .why-quote { font-size: 1.3rem; }
  .btn-large { font-size: 0.9rem; padding: 0.9rem 1.5rem; }
}

/* ── SCROLL FADE-IN ───────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .section-header,
  .leak-card,
  .step,
  .deliverables-list li,
  .who-list li {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.55s ease forwards;
  }

  .leak-card:nth-child(1)  { animation-delay: 0.05s; }
  .leak-card:nth-child(2)  { animation-delay: 0.12s; }
  .leak-card:nth-child(3)  { animation-delay: 0.18s; }
  .leak-card:nth-child(4)  { animation-delay: 0.24s; }
  .leak-card:nth-child(5)  { animation-delay: 0.30s; }
  .leak-card:nth-child(6)  { animation-delay: 0.36s; }

  .step:nth-child(1)  { animation-delay: 0.05s; }
  .step:nth-child(3)  { animation-delay: 0.15s; }
  .step:nth-child(5)  { animation-delay: 0.25s; }
  .step:nth-child(7)  { animation-delay: 0.35s; }
  .step:nth-child(9)  { animation-delay: 0.45s; }

  .deliverables-list li:nth-child(1) { animation-delay: 0.05s; }
  .deliverables-list li:nth-child(2) { animation-delay: 0.12s; }
  .deliverables-list li:nth-child(3) { animation-delay: 0.19s; }
  .deliverables-list li:nth-child(4) { animation-delay: 0.26s; }
  .deliverables-list li:nth-child(5) { animation-delay: 0.33s; }

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