/**
 * eruditeaudit.com — Main Stylesheet
 * Author: Erudite Intelligence LLC
 * Date: 2026-03-05
 * Purpose: Professional audit firm aesthetic — institutional, authoritative, clean
 *
 * Design system:
 *   Navy:   #0a1628  — primary dark bg
 *   Cream:  #f5f0eb  — primary light bg
 *   Gold:   #c4a052  — accent (used sparingly)
 *   Dark:   #1a1a1a  — near-black text
 *   Light:  #e8e3dc  — warm off-white text
 */

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #0a1628;
  --navy-mid:    #122040;
  --navy-border: #1e3050;
  --cream:       #f5f0eb;
  --cream-dark:  #ece6de;
  --gold:        #c4a052;
  --gold-dark:   #a8883a;
  --charcoal:    #1a1a1a;
  --text-light:  #e8e3dc;
  --text-muted:  #8a9ab5;
  --text-dark:   #1a1a1a;
  --text-muted-light: #6b6560;

  --max-w:       1200px;
  --text-w:      680px;
  --section-pad: 6rem 2rem;
  --section-pad-sm: 4rem 1.5rem;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  max-width: var(--text-w);
  line-height: 1.75;
  font-size: 1.05rem;
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
}

/* ─── Navigation ───────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-border);
  height: 64px;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  color: var(--text-light);
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--gold);
  transition: color 0.2s ease;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-light);
}

.nav-links .nav-cta {
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.4rem 1rem;
  letter-spacing: 0.06em;
}

.nav-links .nav-cta:hover {
  background: var(--gold);
  color: var(--navy);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-light);
  transition: all 0.25s ease;
}

/* Mobile nav overlay */
.nav-mobile {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy);
  z-index: 99;
  flex-direction: column;
  padding: 2rem;
  gap: 0;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  display: block;
  padding: 1rem 0;
  font-size: 1.125rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--navy-border);
  letter-spacing: 0.02em;
  font-family: 'Playfair Display', serif;
}

.nav-mobile a.mobile-cta {
  margin-top: 1.5rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  text-align: center;
  padding: 0.875rem;
  letter-spacing: 0.06em;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  text-transform: uppercase;
}

/* ─── Page Layout ──────────────────────────────────────────────────────────── */

main {
  padding-top: 64px; /* nav height */
}

.section {
  padding: var(--section-pad);
}

.section.dark {
  background: var(--navy);
  color: var(--text-light);
}

.section.light {
  background: var(--cream);
  color: var(--text-dark);
}

.section.mid {
  background: var(--cream-dark);
  color: var(--text-dark);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ─── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  background: var(--navy);
  color: var(--text-light);
  padding: 8rem 2rem 7rem;
  border-bottom: 1px solid var(--navy-border);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

.hero h1 {
  color: var(--text-light);
  margin-bottom: 1rem;
  max-width: 820px;
}

.hero-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  max-width: 600px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn-solid {
  background: var(--gold);
  color: var(--navy);
}

.btn-solid:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

.btn-dark {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-dark:hover {
  background: var(--navy);
  color: var(--cream);
}

/* ─── Section Headers ──────────────────────────────────────────────────────── */

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

.section h2 {
  margin-bottom: 2rem;
}

.section.dark h2 {
  color: var(--text-light);
}

.section.dark .section-label {
  color: var(--gold);
}

.section.light .section-label {
  color: var(--gold-dark);
}

/* ─── Gold Rule ────────────────────────────────────────────────────────────── */

.gold-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 2.5rem;
}

/* ─── What We Do ───────────────────────────────────────────────────────────── */

.prose {
  max-width: var(--text-w);
}

.prose p + p {
  margin-top: 1.25rem;
}

.prose p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.prose.large p {
  font-size: 1.15rem;
}

/* ─── Process Steps ────────────────────────────────────────────────────────── */

.process-steps {
  margin-top: 3rem;
  max-width: 800px;
}

.process-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--navy-border);
  align-items: start;
}

.process-step:last-child {
  border-bottom: 1px solid var(--navy-border);
}

.step-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--gold);
  padding-top: 0.15rem;
}

.step-content h3 {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
}

/* ─── What We Audit (prose list) ──────────────────────────────────────────── */

.audit-list {
  margin-top: 2rem;
  max-width: var(--text-w);
}

.audit-list p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.audit-list .caption {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted-light);
}

.audit-list .caption a {
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}

.audit-list .caption a:hover {
  opacity: 0.7;
}

/* ─── Trust Signals ────────────────────────────────────────────────────────── */

.trust-items {
  margin-top: 3rem;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.trust-item {
  padding: 1.75rem 0;
  border-top: 1px solid var(--navy-border);
  font-size: 1.025rem;
  color: var(--text-light);
  line-height: 1.6;
}

.trust-item:last-child {
  border-bottom: 1px solid var(--navy-border);
}

.trust-item strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
  font-weight: 400;
}

.trust-item span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Intake Form ──────────────────────────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 720px;
  margin-top: 2.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted-light);
}

.form-field.dark label {
  color: var(--text-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #fff;
  border: 1px solid #d4cdc6;
  padding: 0.7rem 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0; /* flat, institutional */
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold);
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6560' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Dark form variant */
.form-field.dark input,
.form-field.dark select,
.form-field.dark textarea {
  background: var(--navy-mid);
  border-color: var(--navy-border);
  color: var(--text-light);
}

.form-field.dark input:focus,
.form-field.dark select:focus,
.form-field.dark textarea:focus {
  border-color: var(--gold);
}

.form-field.dark select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a9ab5' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

.form-note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted-light);
}

.form-response {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: rgba(196, 160, 82, 0.08);
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
}

.form-response.success {
  display: block;
}

.form-response.error {
  display: block;
  border-color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
}

.form-after {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted-light);
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  background: var(--navy);
  border-top: 1px solid var(--navy-border);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.footer-contact {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-contact a {
  color: var(--gold);
  transition: opacity 0.2s;
}

.footer-contact a:hover { opacity: 0.7; }

.footer-copy {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-light);
}

/* ─── Page-specific: Process detail ───────────────────────────────────────── */

.tool-list {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--navy-border);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.severity-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
  border: 1px solid var(--navy-border);
  max-width: 700px;
}

.severity-item {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--navy-border);
  border-bottom: 1px solid var(--navy-border);
}

.severity-item:nth-child(3n) { border-right: none; }
.severity-item:nth-last-child(-n+3) { border-bottom: none; }

.severity-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.sev-critical { color: #c0392b; }
.sev-high     { color: #e67e22; }
.sev-medium   { color: #f1c40f; }
.sev-low      { color: #27ae60; }
.sev-info     { color: var(--text-muted); }

.severity-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Page-specific: Pricing ───────────────────────────────────────────────── */

.pricing-block {
  max-width: var(--text-w);
}

.pricing-block p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.pricing-block p + p {
  margin-top: 1.25rem;
}

/* ─── Page-specific: Portfolio ─────────────────────────────────────────────── */

.portfolio-placeholder {
  max-width: var(--text-w);
  padding: 3rem;
  border: 1px solid var(--cream-dark);
  margin-top: 2rem;
}

.portfolio-placeholder p {
  color: var(--text-muted-light);
  font-style: italic;
}

.case-study {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--cream-dark);
  max-width: 800px;
}

.case-study-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--cream-dark);
}

.case-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.case-meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  font-weight: 500;
}

.case-meta-value {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--text-dark);
}

/* ─── About page ───────────────────────────────────────────────────────────── */

.about-block {
  max-width: var(--text-w);
}

.about-block p + p {
  margin-top: 1.25rem;
}

/* ─── Scroll fade-in ───────────────────────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  :root {
    --section-pad: 4rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 5rem 1.5rem 4rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full {
    grid-column: 1;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
  }

  .process-step {
    grid-template-columns: 2.5rem 1fr;
    gap: 1rem;
  }

  .severity-grid {
    grid-template-columns: 1fr 1fr;
  }

  .severity-item:nth-child(3n) { border-right: 1px solid var(--navy-border); }
  .severity-item:nth-child(2n) { border-right: none; }
  .severity-item:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .hero-sub {
    font-size: 1rem;
  }

  .case-study-meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Audit Track Record ────────────────────────────────────────────────────
   Author: Erudite Intelligence LLC
   Date: 2026-03-13
   Purpose: Credential table — institutional, not a stat counter */

.record-table {
  margin-top: 3rem;
  max-width: 700px;
}

.record-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-top: 1px solid var(--cream-dark);
}

.record-row:last-child {
  border-bottom: 1px solid var(--cream-dark);
}

.record-label {
  font-size: 0.875rem;
  color: var(--text-muted-light);
  letter-spacing: 0.01em;
}

.record-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  text-align: right;
  white-space: nowrap;
}

.record-prose {
  margin-top: 3rem;
}

.record-prose p + p {
  margin-top: 1.25rem;
}

.record-link {
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}

.record-link:hover {
  opacity: 0.7;
}

@media (max-width: 600px) {
  .record-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .record-value {
    text-align: left;
    color: var(--charcoal);
  }
}
