/* ============================================================
   Revive Pro Solutions — Design System
   Straight off the logo: confident green, deep charcoal, clean white.
   Fonts are loaded via <link> in each page's <head>, not @import here —
   @import blocks font discovery until this whole file downloads first.
   ============================================================ */

:root {
  --ink: #232323;
  --ink-soft: #5a5f5a;
  --paper: #ffffff;
  --paper-dim: #f3f5f2;
  --line: #dfe3de;
  --green: #4f9a3d;
  --green-deep: #2f5c28;
  --green-pale: #e7f2e2;
  --shadow: 0 30px 60px -30px rgba(35, 35, 35, 0.35);

  --serif: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --edge: 1px solid var(--line);
  --rail: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: var(--rail);
  padding-right: var(--rail);
}

/* Always a <p>, and pages.css (loaded after this file) defines several
   "<container> p" rules of equal-or-higher specificity that would win a
   plain ".eyebrow" or even "p.eyebrow" tie by load order — so the class
   is doubled here to force higher specificity regardless of load order. */
.eyebrow.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: none;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--green);
  display: inline-block;
}

.section-head {
  max-width: 760px;
  margin-bottom: 70px;
}
.section-head h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-top: 16px; }

@media (max-width: 640px) {
  .section-head { margin-bottom: 44px; }
}

/* ---------- Trust line ----------
   Reassurance badges under a hero's CTAs. Always a <p>, and some hero
   contexts define a more specific ".page-hero p" / ".image-hero-content p"
   font-size — the class is doubled to force higher specificity than those. */
.trust-line.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  max-width: none;
}
.trust-line span { display: inline-flex; align-items: center; gap: 8px; }
.trust-line span::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.trust-line-light.trust-line-light { color: rgba(255,255,255,0.78); }
.trust-line-light span::before { background: #ffffff; }

@media (max-width: 640px) {
  .trust-line.trust-line { gap: 6px 14px; font-size: 0.7rem; }
}

/* ---------- Emergency modal ---------- */
.emergency-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.emergency-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.emergency-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18,20,17,0.6);
}
.emergency-modal-dialog {
  position: relative;
  background: var(--paper);
  max-width: 440px;
  width: 100%;
  padding: 40px 36px;
  border-radius: 2px;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  transition: transform 0.3s ease;
}
.emergency-modal.is-open .emergency-modal-dialog { transform: translateY(0); }
.emergency-modal-dialog h3 {
  font-size: 1.5rem;
  margin: 14px 0 14px;
}
.emergency-modal-dialog p { color: var(--ink-soft); margin-bottom: 24px; }
.emergency-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.emergency-modal-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
@media (max-width: 480px) {
  .emergency-modal-dialog { padding: 32px 22px; }
  .emergency-modal-actions { flex-direction: column; }
  .emergency-modal-actions .btn { width: 100%; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 26px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(.16,1,.3,1), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: var(--paper);
}
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); }

.btn-line {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-line:hover { background: var(--green); color: var(--paper); border-color: var(--green); transform: translateY(-2px); }

.btn-ghost-light {
  border-color: rgba(255,255,255,0.55);
  color: var(--paper);
}
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.btn-call {
  background: var(--green);
  color: var(--paper);
}
.btn-call:hover { background: var(--green-deep); transform: translateY(-2px); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--rail);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  padding-top: 12px;
  padding-bottom: 12px;
  border-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 34px; width: auto; }

.brand-word {
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.6vw, 34px);
}

.main-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--green-deep);
  transition: width 0.3s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--ink); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-phone {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-phone .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-pale);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  position: absolute; left: calc(50% - 15px);
  width: 30px; height: 2px;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease, top .3s ease;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* Header sitting over a dark full-bleed hero image */
.site-header.on-dark:not(.is-scrolled) .brand img { filter: brightness(0) invert(1); }
.site-header.on-dark:not(.is-scrolled) .main-nav a { color: rgba(255,255,255,0.85); }
.site-header.on-dark:not(.is-scrolled) .main-nav a:hover { color: var(--paper); }
.site-header.on-dark:not(.is-scrolled) .header-phone { color: var(--paper); }
.site-header.on-dark:not(.is-scrolled) .btn-primary { background: var(--paper); color: var(--ink); }
.site-header.on-dark:not(.is-scrolled) .nav-toggle span,
.site-header.on-dark:not(.is-scrolled) .nav-toggle span::before,
.site-header.on-dark:not(.is-scrolled) .nav-toggle span::after { background: var(--paper); }

/* ---------- Mobile nav ---------- */

.mobile-panel {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--rail);
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(.16,1,.3,1);
}
.mobile-panel.is-open { transform: translateY(0); }
.mobile-panel a {
  font-family: var(--serif);
  font-size: 2.1rem;
  padding: 14px 0;
  border-bottom: var(--edge);
  color: var(--ink);
}
.mobile-panel a.btn { margin-top: 26px; align-self: flex-start; color: var(--paper); border-bottom: none; font-family: var(--sans); font-size: 0.95rem; }

/* ---------- Footer ---------- */

footer {
  background: var(--ink);
  color: var(--paper-dim);
  padding: 90px var(--rail) 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.footer-brand img { height: 32px; margin-bottom: 18px; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.92rem; max-width: 30ch; }

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 0.94rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 11px;
}
.footer-col a:hover { color: var(--green); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Reveal animation ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.16,1,.3,1), transform 0.9s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="fade"] { transform: none; }

/* ---------- Utility sections ---------- */

.section { padding: 130px 0; }
.section-tight { padding: 90px 0; }
.section-line-top { border-top: var(--edge); }

.grain {
  position: relative;
}

/* ---------- Logo watermark (large, faint, behind content) ---------- */
.has-watermark {
  position: relative;
  overflow: hidden;
}
.watermark {
  position: absolute;
  top: 50%;
  right: clamp(-140px, -6vw, -40px);
  transform: translateY(-50%);
  width: clamp(320px, 34vw, 560px);
  height: auto;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}
.watermark-light { opacity: 0.07; }
.has-watermark > .wrap,
.has-watermark > .final-cta-inner {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .watermark { width: clamp(240px, 50vw, 360px); }
}

.badge-strip {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Process rail (used on home + service pages) ---------- */
.process-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
}
.process-rail::before {
  content: '';
  position: absolute;
  top: 14px; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.process-step { position: relative; padding-top: 46px; }
.process-num {
  position: absolute;
  top: 0; left: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--paper);
  padding-right: 10px;
  color: var(--green-deep);
}
.process-step h4 { font-size: 1.15rem; margin-bottom: 10px; }
.process-step p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Final CTA (used on every page) ---------- */
.final-cta {
  background: var(--green-deep);
  color: var(--paper);
  padding: 120px 0;
}
.final-cta-inner { text-align: left; max-width: 720px; }
.eyebrow-light.eyebrow-light { color: rgba(255,255,255,0.75); }
.eyebrow-light::before { background: rgba(255,255,255,0.5); }
.final-cta h2 { font-size: clamp(2.1rem, 4vw, 3rem); margin: 20px 0 40px; color: var(--paper); }
.btn-lg { padding: 19px 34px; font-size: 1.05rem; }

/* Sticky call bar (mobile) — the whole bar is tappable, not just the text,
   so the padding lives on the link itself rather than this wrapper. */
.sticky-call {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 95;
  background: var(--ink);
  color: var(--paper);
  display: none;
  font-family: var(--sans);
  font-weight: 600;
}
.sticky-call a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 17px 15px;
  gap: 10px;
}

@media (max-width: 1180px) {
  .main-nav, .header-cta .header-phone, .header-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .sticky-call { display: flex; }
  body { padding-bottom: 58px; }
}

@media (max-width: 980px) {
  .process-rail { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .process-rail::before { display: none; }
}

@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; gap: 34px; }
  .section { padding: 80px 0; }
}
