/* RankForge — Variant 2 (modern). Mobile-first, design-system based.
 * Palette + fonts injected via Nunjucks so per-site variation is one-line
 * config. Per-site palette comes from packages/cli/src/generator/templates.ts. */

:root {
  --primary: #b45309;
  --primary-dark: #92400e;
  --accent: #0d9488;
  --bg: #ffffff;
  --bg-alt: #fef7ed;
  --bg-deep: #92400e;
  --ink: #1f1611;
  --ink-soft: #57534e;
  --ink-mute: color-mix(in srgb, #57534e 70%, transparent);
  --line: rgba(15, 23, 42, 0.10);
  --line-soft: rgba(15, 23, 42, 0.05);
  --success: #1a8754;
  --error: #c92a2a;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, 0.06), 0 2px 4px rgba(13, 27, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(13, 27, 42, 0.08), 0 2px 4px rgba(13, 27, 42, 0.05);
  --shadow-lg: 0 12px 32px rgba(13, 27, 42, 0.10), 0 4px 8px rgba(13, 27, 42, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 780px; }

/* ──── Topbar ──── */
.topbar {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.topbar-phone { color: #fff; font-weight: 600; }
.topbar-phone:hover { color: #fff; text-decoration: underline; }
@media (max-width: 640px) { .topbar { display: none; } }

/* ──── Header ──── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 0; gap: 1rem; position: relative;
}
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem; font-weight: 700; color: var(--ink);
}
.brand-sub { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.primary-nav { display: flex; gap: 1.6rem; align-items: center; }
.primary-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: 0.97rem;
  padding: 0.4rem 0; position: relative;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: center;
  transition: transform 0.18s;
}
.primary-nav a:hover { color: var(--ink); text-decoration: none; }
.primary-nav a:hover::after { transform: scaleX(1); }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line);
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 1.1rem; cursor: pointer;
}
@media (max-width: 880px) {
  .menu-toggle { display: block; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: -1.25rem; right: -1.25rem;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line-soft); width: 100%; }
  .primary-nav a:last-child { border-bottom: none; }
  .primary-nav a::after { display: none; }
}

/* ──── Buttons ──── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background-color 0.15s;
  min-height: 48px;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 90%, #000 10%); color: #fff; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--ink); border-color: var(--ink-soft); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f0f3fa; color: var(--ink); }
.btn.big { padding: 1rem 1.75rem; font-size: 1.05rem; }
.btn.block { width: 100%; }

/* ──── Hero ──── */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  background:
    radial-gradient(ellipse at top right, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(ellipse at bottom left, color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 80% 70% at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at center, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero.hero-centered { text-align: center; }
.hero.hero-centered .hero-actions { justify-content: center; }
.hero.slim { padding: 2.5rem 0 2rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.83rem; font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin: 0 0 1rem;
  padding: 0.4rem 0.9rem;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-radius: var(--radius-pill);
}
.hero h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.hero .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 56ch; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-actions.center { justify-content: center; }

.hero-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--accent);
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-sm), 0 0 0 6px color-mix(in srgb, var(--accent) 6%, transparent);
}
.hero-badge svg { width: 28px; height: 28px; }

.hero-scene {
  margin: 2.5rem auto 0;
  max-width: 540px;
  color: var(--primary);
}
.hero-scene svg { width: 100%; height: auto; display: block; }

/* Trust pills */
.trust-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  list-style: none; padding: 0; margin: 2rem 0 0;
}
.trust-pills li {
  font-size: 0.9rem; color: var(--ink-soft);
  background: #fff;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.trust-pills li::before {
  content: "✓"; color: var(--success); font-weight: 700;
}

/* ──── Sections ──── */
section { padding: clamp(3rem, 6vw, 4.5rem) 0; }
section.alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 2.5rem; }

/* ──── How it works ──── */
.how-it-works .lead { text-align: center; max-width: 600px; margin: 0.5rem auto 2.5rem; }
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.how-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.how-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.how-step-icon {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  color: var(--primary);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}
.how-step-icon svg { width: 36px; height: 36px; }
.how-step-icon .how-step-num {
  position: absolute;
  top: -8px; right: -8px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 0.82rem;
  border: 2px solid #fff;
}
/* Legacy fallback: bare .how-step-num still works on older sites that
 * haven't been re-rendered with the new icon block. */
.how-step > .how-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 1.05rem;
  margin-bottom: 1rem;
}
.how-step h3 { margin: 0 0 0.5rem; }
.how-step p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* ──── Intro ──── */
.intro { text-align: center; }
.intro p { font-size: 1.15rem; color: var(--ink-soft); }

/* ──── Service rows ──── */
.service-rows { display: grid; gap: 1.25rem; }
.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.service-row:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.service-row.reverse { background: var(--bg-alt); }
.service-row-num {
  font-family: 'Inter', sans-serif;
  font-size: 2.2rem; color: var(--primary); font-weight: 700;
  align-self: center;
  min-width: 3rem;
}
.service-row-body h3 { margin: 0 0 0.25rem; }
.service-row-body p { margin: 0 0 0.5rem; color: var(--ink-soft); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-weight: 600; color: var(--primary);
}
.link-arrow:hover { gap: 0.5rem; text-decoration: none; }

/* ──── Why-use cards ──── */
.why-cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}
.why-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.why-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; color: var(--primary); }
.why-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ──── Quote / contact band ──── */
.quote-band {
  background: linear-gradient(135deg, var(--bg-deep) 0%, color-mix(in srgb, var(--bg-deep) 75%, var(--primary)) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.quote-band::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.18; pointer-events: none;
}
.quote-band h2, .quote-band h3 { color: #fff; }
.quote-band .lead { color: rgba(255, 255, 255, 0.85); }
.quote-band a { color: #fff; }
.two-col {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative; z-index: 1;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

/* ──── Forms ──── */
.contact-form {
  display: grid; gap: 0.85rem;
}
.contact-form label {
  display: flex; flex-direction: column; gap: 0.3rem;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
}
.card-form {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.card-form label { color: var(--ink-soft); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.contact-form textarea { resize: vertical; min-height: 90px; }
.contact-form .btn { margin-top: 0.5rem; }
.form-status {
  margin: 0.5rem 0 0;
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  display: none;
}
.form-status.success { display: block; background: rgba(26, 135, 84, 0.1); color: var(--success); border-left: 3px solid var(--success); }
.form-status.error { display: block; background: rgba(201, 42, 42, 0.08); color: var(--error); border-left: 3px solid var(--error); }

/* ──── Service / sub pages ──── */
.service-body { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.bulleted { padding-left: 1.25rem; }
.bulleted li { margin-bottom: 0.4rem; }
.neighborhood-list a { font-weight: 500; }

/* ──── Contact-page operator block ──── */
.contact-side .big-phone {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  margin: 0.25rem 0 0.4rem;
}
.contact-side .big-phone a { color: var(--ink); }
.contact-side .muted { color: var(--ink-soft); font-size: 0.95rem; }
.contact-side h2 { margin-bottom: 0.25rem; }
.contact-side h3 { margin-top: 1.5rem; }
.operator-block {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: var(--ink-soft);
  opacity: 0.85;
}
.operator-block-label {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--ink-soft);
}
.operator-block-detail { margin: 0; line-height: 1.5; }

.faq-cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1rem;
}
.faq-card {
  background: var(--bg-alt);
  border-left: 3px solid var(--primary);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
}
.faq-card h3 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--ink); }
.faq-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.legal-body { padding: 3rem 0; }
.legal-body h2 { margin-top: 2rem; }

/* ──── Footer ──── */
.site-footer {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 3rem 0 0;
  margin-top: 4rem;
  font-size: 0.92rem;
}
.footer-inner {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand {
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem; color: #fff; font-weight: 700; margin: 0 0 0.5rem;
}
.footer-address { color: rgba(255, 255, 255, 0.72); margin: 0 0 0.5rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.footer-services { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.4rem; }
.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem;
}
.footer-copy { margin: 0 0 0.5rem; font-size: 0.85rem; }
.footer-disclaimer-text {
  font-size: 0.82rem; color: rgba(255, 255, 255, 0.6);
  max-width: 720px; margin: 0 0 0.75rem;
}
.footer-legal-links { font-size: 0.85rem; margin: 0; }
.footer-legal-links a { color: rgba(255, 255, 255, 0.85); }

/* ──── Sticky mobile call bar ──── */
.mobile-cta-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(13, 27, 42, 0.97);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  padding: 0.6rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}
.mobile-cta-bar-inner { display: flex; gap: 0.5rem; max-width: 600px; margin: 0 auto; }
.mobile-cta-bar .btn { flex: 1; min-height: 50px; font-size: 0.95rem; padding: 0.75rem 1rem; }
@media (max-width: 880px) {
  .mobile-cta-bar { display: block; }
  body { padding-bottom: 76px; }
}

/* ──── Reveal-on-scroll ──── */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ──── Accessibility ──── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ──── Print ──── */
@media print {
  .site-header, .topbar, .mobile-cta-bar, .site-footer .footer-services { display: none; }
}
