/* ==========================================================================
   GeoAuditFix — design system (spec §14)
   Warm, editorial light theme. Lora (serif) headings + DM Sans body.
   ========================================================================== */

:root {
  --ink:       #1a1a2e;
  --ink-soft:  #3d3d5c;
  --ink-muted: #7a7a9a;
  --paper:     #faf9f6;
  --paper-2:   #f2f0eb;
  --paper-3:   #e8e4db;
  --accent:    #e05c2a;   /* warm orange — primary */
  --accent-2:  #2a7de0;   /* blue — secondary */
  --accent-3:  #27a368;   /* green — success/positive */
  --accent-ink:#b5461d;
  --rule:      #d8d4ca;
  --font-head: 'Lora', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max:       1160px;
  --r:         6px;
  --shadow:    0 18px 50px -24px rgba(26, 26, 46, 0.35);
  --shadow-sm: 0 6px 20px -12px rgba(26, 26, 46, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 0.85rem; }

p { margin: 0 0 1rem; }
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
strong { font-weight: 500; }

/* Layout ------------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-sm { padding-block: clamp(2rem, 4vw, 3rem); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-muted); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 500;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.8rem;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 var(--r) 0; z-index: 200;
}
.skip-link:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 500; font-size: 1rem;
  padding: 0.78rem 1.4rem; border-radius: var(--r); border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.2s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink-muted); }
.btn-lg { padding: 0.95rem 1.8rem; font-size: 1.05rem; }

/* Header / nav ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 249, 246, 0.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink);
}
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.96rem; font-weight: 400;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent-ink); }
.nav-cta { color: #fff !important; padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.nav-cta:hover { color: #fff !important; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.2s; }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 0.5rem 1.1rem 1.2rem; transform: translateY(-10px); opacity: 0;
    pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 0.85rem 0.2rem; border-bottom: 1px solid var(--rule); }
  .nav-cta { margin-top: 0.9rem; text-align: center; }
}

/* Hero -------------------------------------------------------------------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 span.hl { color: var(--accent); font-style: italic; }
.hero .lead { margin-top: 0.5rem; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.trust-bar {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-top: 1.8rem;
  font-size: 0.9rem; color: var(--ink-muted);
}
.trust-bar span { display: inline-flex; align-items: center; gap: 0.45rem; }
.trust-bar span::before { content: "✓"; color: var(--accent-3); font-weight: 700; }

/* Audit score mockup panel */
.score-panel {
  background: #fff; border: 1px solid var(--rule); border-radius: calc(var(--r) * 2);
  box-shadow: var(--shadow); padding: clamp(1.3rem, 3vw, 1.8rem); position: relative;
}
.score-panel .sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.score-panel .sp-url { font-size: 0.85rem; color: var(--ink-muted); font-family: var(--font-body); }
.score-ring {
  --val: 72; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--val) * 1%), var(--paper-3) 0);
  margin: 0 auto 1.2rem;
}
.score-ring > div {
  width: 70px; height: 70px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
}
.sp-bars { display: grid; gap: 0.9rem; }
.sp-bar .sp-bar-top { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.3rem; }
.sp-track { height: 8px; background: var(--paper-3); border-radius: 99px; overflow: hidden; }
.sp-fill { height: 100%; border-radius: 99px; }
.sp-fill.seo { width: 84%; background: var(--accent-2); }
.sp-fill.geo { width: 61%; background: var(--accent); }
.sp-fill.aeo { width: 48%; background: var(--accent-3); }
.sp-foot { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.82rem; color: var(--ink-muted); }

/* Cards / grids ----------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: #fff; border: 1px solid var(--rule); border-radius: calc(var(--r) * 1.6);
  padding: clamp(1.3rem, 2.6vw, 1.8rem); box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 0.4rem; }
.card.soft { background: var(--paper-2); box-shadow: none; }

/* Panel band (alternating background) */
.band { background: var(--paper-2); border-block: 1px solid var(--rule); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink .lead, .band-ink p { color: #cfcfe0; }
.band-ink .eyebrow { color: #ff9a6b; }

/* Pillars (SEO/GEO/AEO explainer) */
.pillar { position: relative; padding-top: 1.2rem; }
.pillar::before { content: ""; position: absolute; top: 0; left: 0; width: 2.5rem; height: 3px; background: var(--accent); border-radius: 2px; }
.pillar .term { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--accent); }
.pillar .pname { font-weight: 500; display: block; margin: 0.2rem 0 0.5rem; }

/* Stats */
.stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem); }
.stat .stat-val { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--ink); display: block; }
.stat .stat-lab { color: var(--ink-muted); font-size: 0.95rem; max-width: 24ch; }

/* Steps (how it works) */
.steps { counter-reset: step; display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); }
@media (min-width: 760px) { .steps.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.step .step-n {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700; margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.15rem; }

/* Service page bits */
.svc-hero .price-tag {
  display: inline-flex; align-items: baseline; gap: 0.4rem; margin-top: 1rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
}
.svc-hero .price-tag .from { font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-muted); font-weight: 400; }
.deliverables { list-style: none; padding: 0; margin: 0; }
.deliverables li { position: relative; padding: 0.6rem 0 0.6rem 1.8rem; border-bottom: 1px solid var(--rule); }
.deliverables li:last-child { border-bottom: 0; }
.deliverables li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-3); font-weight: 700; }
.answer-box {
  background: var(--paper-2); border-left: 3px solid var(--accent); border-radius: 0 var(--r) var(--r) 0;
  padding: 1.1rem 1.3rem; font-size: 1.12rem; color: var(--ink-soft);
}

/* FAQ accordion */
.faq-group { margin-bottom: 2.2rem; }
.faq-group > h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); font-family: var(--font-body); font-weight: 500; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 0.85rem; font-size: 1.4rem; color: var(--accent); transition: transform 0.2s; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding-bottom: 1.1rem; color: var(--ink-soft); }
.faq-item .faq-a p:last-child { margin-bottom: 0; }

/* Article / prose */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose code { background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }
.article-meta { color: var(--ink-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.topic-tag {
  display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--paper-2); color: var(--accent-ink); border: 1px solid var(--rule);
  padding: 0.2rem 0.6rem; border-radius: 99px;
}

/* Article cards on resources index */
.article-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.article-card:hover { color: inherit; box-shadow: var(--shadow); }
.article-card h3 { color: var(--ink); }
.article-card .read { margin-top: auto; color: var(--accent-ink); font-weight: 500; padding-top: 0.6rem; }

/* Forms ------------------------------------------------------------------- */
.js-form { display: grid; gap: 1rem; }
.audit-form, .contact-form { background: #fff; border: 1px solid var(--rule); border-radius: calc(var(--r)*1.6); padding: clamp(1.3rem, 3vw, 1.8rem); box-shadow: var(--shadow-sm); }
.form-heading { margin-bottom: 0.3rem; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.js-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }
.js-form label.full { grid-column: 1 / -1; }
.js-form label em { color: var(--accent); font-style: normal; }
.js-form input, .js-form select, .js-form textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--r); padding: 0.7rem 0.85rem; width: 100%;
}
.js-form input:focus, .js-form select:focus, .js-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 92, 42, 0.18);
}
.js-form textarea { resize: vertical; }
.js-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-status { margin: 0; font-size: 0.92rem; min-height: 1.2em; }
.form-status.ok { color: var(--accent-3); font-weight: 500; }
.form-status.err { color: #c0392b; }
.form-note { font-size: 0.82rem; color: var(--ink-muted); margin: 0; }

/* Subscribe (inline) */
.subscribe-form { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: start; }
.subscribe-form input { flex: 1; min-width: 220px; padding: 0.78rem 1rem; border: 1px solid var(--rule); border-radius: var(--r); font-size: 1rem; font-family: var(--font-body); }
.subscribe-form .form-status { flex-basis: 100%; }

/* Free-audit form — large, prominent fields */
.audit-tool-form { display: flex; flex-direction: column; gap: 1.3rem; margin-top: 1.8rem; padding: clamp(1.5rem, 4vw, 2.5rem); }
.audit-tool-form .field { display: flex; flex-direction: column; gap: 0.45rem; }
.audit-tool-form label { font-weight: 500; font-size: 1rem; color: var(--ink); }
.audit-tool-form input {
  width: 100%; font-family: var(--font-body); font-size: 1.15rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--rule); border-radius: var(--r);
  padding: 1rem 1.1rem; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.audit-tool-form input::placeholder { color: var(--ink-muted); }
.audit-tool-form input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(224, 92, 42, 0.15);
}
.audit-tool-form .field-hint { font-size: 0.85rem; color: var(--ink-muted); }
.audit-tool-form .audit-submit { width: 100%; padding: 1.05rem 1.4rem; font-size: 1.15rem; margin-top: 0.2rem; }
.audit-tool-form .form-status { text-align: center; margin: 0; min-height: 1.2em; }
.audit-tool-form .form-note { font-size: 0.85rem; text-align: center; color: var(--ink-muted); margin: 0; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .lead { margin-inline: auto; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--rule); padding-block: clamp(2.5rem, 5vw, 3.5rem); margin-top: 2rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-brand p { color: var(--ink-muted); font-size: 0.95rem; max-width: 38ch; margin-top: 0.8rem; }
.foot-email { font-weight: 500; }
.foot-col h4 { text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); font-family: var(--font-body); margin-bottom: 0.9rem; }
.foot-col a { display: block; color: var(--ink-soft); text-decoration: none; padding: 0.28rem 0; font-size: 0.95rem; }
.foot-col a:hover { color: var(--accent-ink); }
.foot-bottom { margin-top: 2.2rem; padding-top: 1.3rem; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--ink-muted); }

/* Breadcrumbs */
.crumbs { font-size: 0.85rem; color: var(--ink-muted); padding-top: 1.5rem; }
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
