/* ============================================
   webaudit.com — Design System
   Phase 1: Static landing pages + lead capture
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Surface */
  --bg:         #0a0a0a;
  --surface:    #111111;
  --surface-2:  #1a1a1a;
  --border:     #2a2a2a;
  --border-hover: #3a3a3a;

  /* Text */
  --text:       #e8e8e8;
  --text-muted: #888888;
  --text-dim:   #555555;

  /* Accent */
  --gold:       #c9a84c;
  --gold-dim:   rgba(201, 168, 76, 0.15);
  --gold-hover: #d4b65e;

  /* Score colors */
  --score-low:    #B8542E;
  --score-mid:    #c98a2e;
  --score-good:   #7a8c6e;

  /* Typography */
  --font:       'Jost', sans-serif;
  --h1:         clamp(2rem, 5vw, 3.5rem);
  --h2:         clamp(1.5rem, 3vw, 2rem);
  --body:       1rem;
  --small:      0.875rem;
  --tiny:       0.75rem;
  --eyebrow:    0.72rem;

  /* Layout */
  --max-w:      1100px;
  --pad:        clamp(1.5rem, 4vw, 4rem);
  --radius:     8px;
  --radius-lg:  12px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-weight: 300;
  font-size: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }
img { max-width: 100%; display: block; }

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

/* --- Typography --- */
.eyebrow {
  font-size: var(--eyebrow);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--h1);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--h2);
  font-weight: 600;
  line-height: 1.25;
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem var(--pad);
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero .subtitle {
  margin: 0 auto 2.5rem;
}

/* --- Audit Input --- */
.audit-form {
  display: flex;
  gap: 0.5rem;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
}

.audit-form input[type="url"],
.audit-form input[type="text"] {
  flex: 1;
  padding: 0.85rem 1.1rem;
  font-family: var(--font);
  font-size: var(--body);
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.audit-form input:focus {
  border-color: var(--gold);
}

.audit-form input::placeholder {
  color: var(--text-dim);
}

.audit-form select {
  padding: 0.85rem 1rem;
  font-family: var(--font);
  font-size: var(--small);
  font-weight: 400;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
  appearance: none;
  min-width: 140px;
}

.audit-form select:focus {
  border-color: var(--gold);
  color: var(--text);
}

.btn {
  padding: 0.85rem 1.6rem;
  font-family: var(--font);
  font-size: var(--small);
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-gold {
  background: var(--gold);
  color: var(--bg);
}

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

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold-dim);
}

.trust-line {
  font-size: var(--tiny);
  color: var(--text-dim);
  margin-top: 1rem;
}

/* --- Vertical Cards (homepage) --- */
.verticals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.vertical-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.vertical-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  color: var(--text);
}

.vertical-card .card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.vertical-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.vertical-card p {
  font-size: var(--small);
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Lead Capture Form --- */
.lead-form {
  display: none;
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem 0;
}

.lead-form.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

.lead-form h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.lead-form .subtitle {
  font-size: var(--small);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: var(--small);
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.lead-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* --- Thank You --- */
.thank-you {
  text-align: center;
  padding: 2rem 0;
  display: none;
}

.thank-you.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

.thank-you .checkmark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

/* --- Below-the-fold Explainer --- */
.explainer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.explainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.check-item {
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.check-item h4 {
  font-size: var(--small);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.check-item p {
  font-size: var(--tiny);
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-powered {
  font-size: var(--small);
  color: var(--text-dim);
}

.footer-powered a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-powered a:hover {
  color: var(--gold);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 0.75rem;
  font-size: var(--tiny);
}

.footer-links a {
  color: var(--text-dim);
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Loading Spinner --- */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 2rem auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Score Gauge --- */
.gauge {
  width: clamp(140px, 30vw, 180px);
  height: auto;
  margin: 0 auto 1.5rem;
}

.gauge-fill {
  transition: stroke-dashoffset 1.2s ease-out;
}

.gauge-number {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 700;
  fill: var(--text);
}

.gauge-label {
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 400;
  fill: var(--text-dim);
  letter-spacing: 0.05em;
}

.results-hero {
  min-height: auto;
  padding: clamp(4rem, 10vw, 8rem) var(--pad) clamp(2rem, 4vw, 3rem);
}

.results-url {
  font-size: var(--small);
  color: var(--text-muted);
  word-break: break-all;
}

/* --- Score Cards --- */
.score-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
}

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
}

.score-card:hover {
  border-color: var(--border-hover);
}

.score-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.score-card-header h3 {
  font-size: var(--small);
  font-weight: 600;
}

.score-pill {
  font-size: var(--tiny);
  font-weight: 600;
  padding: 0.2em 0.65em;
  border-radius: 20px;
  white-space: nowrap;
}

.score-low  { background: rgba(184, 84, 46, 0.15); color: var(--score-low); }
.score-mid  { background: rgba(201, 138, 46, 0.15); color: var(--score-mid); }
.score-good { background: rgba(122, 140, 110, 0.15); color: var(--score-good); }

.score-finding {
  font-size: var(--small);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.score-weight {
  font-size: var(--tiny);
  color: var(--text-dim);
}

/* --- CTA Box --- */
.cta-box {
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-box h2 {
  margin-bottom: 0.25rem;
}

/* --- Scanning State (landing pages) --- */
.scanning-state {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

.scanning-state.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

.scanning-text {
  font-size: var(--small);
  color: var(--text-muted);
  margin-top: 1rem;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .audit-form {
    flex-direction: column;
  }

  .audit-form select {
    min-width: unset;
  }

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

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

  .score-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .verticals {
    grid-template-columns: 1fr;
  }
}
