/* =========================================================
   Joe's Roofing, Editorial Craftsman Design System
   Warm paper • deep ink • clay-orange • Fraunces / Outfit
   ========================================================= */

:root {
  --paper:      #F7F3EC;  /* warm cream background        */
  --paper-2:    #F0E9DC;  /* slightly deeper panel        */
  --surface:    #FFFFFF;  /* cards                        */
  --ink:        #1A1714;  /* warm near-black text         */
  --ink-soft:   #3A332C;  /* secondary heading            */
  --muted:      #6B6258;  /* muted body text              */
  --line:       #E6DDCD;  /* hairline borders             */
  --clay:       #E0531F;  /* primary accent (roof clay)   */
  --clay-deep:  #B83E12;  /* hover / pressed              */
  --clay-soft:  #FBE6D8;  /* tint background              */
  --pine:       #1E2A26;  /* deep charcoal-green sections */
  --pine-2:     #16201C;
  --gold:       #C9A24C;  /* small premium accents        */
  --radius:     18px;
  --radius-sm:  12px;
  --maxw:       1200px;
  --shadow-sm:  0 1px 2px rgba(26,23,20,.06);
  --shadow:     0 18px 50px -24px rgba(26,23,20,.35);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
}

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

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1320px; }

section { position: relative; }

/* ---------- Eyebrow / tags ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--clay-deep);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--clay);
  display: inline-block; border-radius: 2px;
}
.eyebrow.center::after {
  content: ""; width: 26px; height: 2px; background: var(--clay);
  display: inline-block; border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 15.5px;
  padding: 15px 26px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: all .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--clay); color: #fff; box-shadow: 0 10px 24px -10px rgba(224,83,31,.7); }
.btn-primary:hover { background: var(--clay-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(224,83,31,.8); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; transform: translateY(-2px); }
.btn-line-light { background: transparent; color: var(--paper); border-color: rgba(247,243,236,.4); }
.btn-line-light:hover { border-color: var(--paper); background: rgba(247,243,236,.08); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,243,236,.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 8px 28px -20px rgba(26,23,20,.5); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: 'Fraunces', serif; font-weight: 600; font-size: 21px; letter-spacing: -.02em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: var(--clay); position: relative; overflow: hidden;
  box-shadow: 0 6px 16px -8px rgba(224,83,31,.8);
}
.brand-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand small { display: block; font-family: 'Outfit', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: -2px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 500; color: var(--ink-soft);
  padding: 9px 14px; border-radius: 999px; transition: all .18s ease; position: relative;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a.active { color: var(--clay-deep); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-phone { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
.nav-phone svg { width: 16px; height: 16px; color: var(--clay); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink); }
.hamburger svg { width: 26px; height: 26px; }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--pine);
  display: flex; flex-direction: column; padding: 24px;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu .mm-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu .mm-top .brand, .mobile-menu a { color: var(--paper); }
.mobile-menu .mm-close { background: none; border: none; color: var(--paper); cursor: pointer; padding: 8px; }
.mobile-menu .mm-close svg { width: 28px; height: 28px; }
.mm-links { display: flex; flex-direction: column; gap: 4px; margin-top: 40px; }
.mm-links a { font-family: 'Fraunces', serif; font-size: 30px; padding: 12px 0; border-bottom: 1px solid rgba(247,243,236,.12); }
.mm-foot { margin-top: auto; color: var(--paper); }
.mm-foot .phone { font-family: 'Fraunces', serif; font-size: 26px; color: var(--gold); }

/* ---------- Sections / headings ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.display {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
}
.h-section { font-size: clamp(2rem, 4.2vw, 3.3rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--muted); line-height: 1.6; }

.ink-section { background: var(--pine); color: var(--paper); }
.ink-section h1, .ink-section h2, .ink-section h3 { color: var(--paper); }
.ink-section .lead, .ink-section p { color: rgba(247,243,236,.72); }
.ink-section .eyebrow { color: var(--gold); }
.ink-section .eyebrow::before, .ink-section .eyebrow.center::after { background: var(--gold); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #ddd1bd; }

.icon-badge {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  background: var(--clay-soft); color: var(--clay-deep); margin-bottom: 20px;
}
.icon-badge svg { width: 28px; height: 28px; }

/* numbered service rows */
.svc-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  padding: 30px 0; border-top: 1px solid var(--line); transition: padding .2s ease;
}
.svc-row:last-child { border-bottom: 1px solid var(--line); }
.svc-row:hover { padding-left: 10px; }
.svc-num { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--clay); width: 54px; }
.svc-row h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.svc-row .svc-desc { color: var(--muted); max-width: 540px; margin-top: 6px; }
.svc-arrow { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; transition: all .2s ease; }
.svc-row:hover .svc-arrow { background: var(--clay); border-color: var(--clay); color: #fff; transform: rotate(-45deg); }
.svc-arrow svg { width: 20px; height: 20px; }

/* stat */
.stat-num { font-family: 'Fraunces', serif; font-size: clamp(2.6rem, 5vw, 3.8rem); color: var(--clay); line-height: 1; }
.stat-label { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* image helpers */
.media { border-radius: var(--radius); overflow: hidden; position: relative; background: var(--paper-2); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.media-fallback {
  position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  background: linear-gradient(135deg, var(--pine), var(--clay-deep));
  color: rgba(255,255,255,.55); font-family: 'Fraunces', serif; font-size: 1.05rem; letter-spacing: .02em;
}

/* tag pill */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.pill svg { width: 15px; height: 15px; color: var(--clay); }

/* testimonial */
.quote { font-family: 'Fraunces', serif; font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.4; }
.stars { display: inline-flex; gap: 3px; color: var(--gold); }
.stars svg { width: 18px; height: 18px; }

/* form */
.field label { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; margin-bottom: 8px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); font-family: 'Outfit', sans-serif; font-size: 15.5px; color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--clay); box-shadow: 0 0 0 4px var(--clay-soft);
}
.field textarea { min-height: 130px; resize: vertical; }

/* footer */
.site-footer { background: var(--pine-2); color: rgba(247,243,236,.7); padding: 72px 0 32px; }
.site-footer h4 { color: var(--paper); font-family: 'Outfit', sans-serif; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; margin-bottom: 18px; }
.site-footer a { color: rgba(247,243,236,.7); transition: color .18s ease; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(247,243,236,.12); margin-top: 48px; padding-top: 24px; font-size: 13.5px; }
.social-ico { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(247,243,236,.18); display: grid; place-items: center; transition: all .2s ease; }
.social-ico:hover { background: var(--clay); border-color: var(--clay); transform: translateY(-3px); }
.social-ico svg { width: 18px; height: 18px; }

/* badge ribbon */
.ribbon {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px;
  background: var(--clay-soft); color: var(--clay-deep); font-weight: 600; font-size: 13.5px;
}
.ribbon svg { width: 16px; height: 16px; }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; }
.marquee-track { display: flex; gap: 56px; white-space: nowrap; width: max-content; animation: marquee 28s linear infinite; }
.marquee-item { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 56px; }
.marquee-item::after { content: "✦"; color: var(--clay); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

/* page hero band */
.page-hero { padding: 120px 0 70px; background: var(--paper-2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.page-hero .crumb a:hover { color: var(--clay-deep); }

/* divider grid bg */
.grid-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .6; pointer-events: none;
}

/* toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: var(--paper); padding: 14px 22px; border-radius: 999px;
  font-weight: 500; font-size: 14.5px; z-index: 90; box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.16,1,.3,1); display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; height: 18px; color: #6BCB77; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .two-col, .cta-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .cards-3 { grid-template-columns: 1fr 1fr !important; }
  .process-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 36px !important; }
}
@media (max-width: 900px) {
  .nav-links, .nav-phone { display: none; }
  .hamburger { display: block; }
  .section { padding: 72px 0; }
  .svc-row { grid-template-columns: 1fr; gap: 8px; }
  .svc-arrow { display: none; }
  .svc-num { width: auto; }
}
@media (max-width: 640px) {
  .cards-3, .process-grid, .footer-grid { grid-template-columns: 1fr !important; }
  .hero-grid .card[style*="absolute"], .hero-grid .pill[style*="absolute"] { display: none !important; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .btn { width: 100%; }
  .nav-cta .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
