/* ── Weatherproof Roof Restorations — Shared Design System ── */

:root {
  /* Palette */
  --bg:       #F4F6F5;
  --surface:  #FFFFFF;
  --surface-muted: #F4F6F5;
  --fg:       #111111;
  --muted:    #58676B;
  --border:   #D7E2E5;
  --accent:   #177487;
  --accent-dark: #0F5360;
  --accent-light: #E7F2F4;
  --accent-ink: #FFFFFF;
  --success:  #17A34A;
  --warn:     #F2B84B;
  --danger:   #DC2626;
  --slate:    #102B32;
  --slate-deep: #0F1F24;
  --header-bg: rgba(255,255,255,0.96);
  --header-bg-solid: rgba(255,255,255,0.99);
  --header-line: rgba(17,17,17,0.14);

  /* Typography */
  --font-display: 'Barlow Condensed', 'Roboto Condensed', 'Arial Narrow', 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    ui-monospace, 'JetBrains Mono', monospace;

  /* Layout */
  --max-w: 1200px;
  --gutter: 24px;
  --radius: 6px;
  --radius-lg: 8px;
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }

.image-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}
.image-feature__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}
.image-feature__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.text-proof-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 32px;
}
.text-proof-panel strong {
  display: block;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.text-proof-panel p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 18px;
}
.text-proof-panel ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.text-proof-panel li {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.image-feature__content p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
.image-feature__list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  list-style: none;
}
.image-feature__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--fg);
  font-weight: 600;
}
.image-feature__list li::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: 9px;
  flex: 0 0 auto;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ── Utility ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 80px 0; }
.section--slate { background: var(--slate); color: #fff; }
.section--slate .muted-text { color: rgba(255,255,255,0.6); }
.section--surface { background: var(--surface); }
.section--accent-light { background: var(--accent-light); }

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section--slate .kicker { color: var(--accent); }

.muted-text { color: var(--muted); }

.centered-section {
  text-align: center;
}
.centered-section h2,
.centered-section p {
  margin-left: auto;
  margin-right: auto;
}
.centered-section h2 {
  max-width: 920px;
}

.centered-section .kicker,
.process-section-header .kicker,
.page-hero .kicker,
div[style*="text-align: center"] > .kicker {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 24px); }

p { max-width: 680px; }
p + p { margin-top: 1em; }
h1, h2, h3, p, a, button { text-wrap: pretty; }

/* Keep content visible even if scroll animation hooks are delayed or disabled. */
body .fade-up {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: none;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-dark); }

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--fg);
}
.btn--outline:hover { border-color: var(--fg); }

.btn--white {
  background: #fff;
  color: var(--slate-deep);
}
.btn--white:hover { background: #f0f0f0; }

.btn--ghost {
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 600;
}
.btn--ghost:hover { opacity: 0.8; }
.btn--ghost svg { transition: transform 0.2s; }
.btn--ghost:hover svg { transform: translateX(3px); }

/* ── Header / Nav ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background:
    linear-gradient(180deg, rgba(23,116,135,0.08), transparent 36px),
    var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-line);
  box-shadow: 0 8px 24px rgba(15,31,36,0.08);
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 6px var(--gutter);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-muted, #F3F6F7);
  letter-spacing: 0.04em;
}
.header-top span { display: flex; align-items: center; gap: 6px; }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
}

.logo {
  color: var(--fg);
  display: flex;
  align-items: center;
  min-width: 240px;
  padding: 4px 0;
}
.logo img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  position: relative;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  border-radius: 6px;
  transition: all 0.15s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-dark);
  background: transparent;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Services dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a {
  padding-right: 28px;
}
.nav-dropdown > a::before {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-62%) rotate(45deg);
  opacity: 0.75;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--fg) !important;
  font-size: 14px;
  border-radius: 6px;
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a:hover {
  background: var(--bg) !important;
  color: var(--fg) !important;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-phone {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-light);
}
.header-cta .btn { padding: 10px 20px; font-size: 14px; }

/* Mobile menu toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  padding: 8px;
}

/* ── Footer ── */
.site-footer {
  background:
    linear-gradient(180deg, rgba(23,116,135,0.10), transparent 120px),
    var(--slate-deep);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
  border-top: 3px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.62);
  margin-top: 16px;
}
.site-footer .logo {
  min-width: 280px;
  color: #fff;
}
.site-footer .logo img {
  width: 320px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}
.footer-contact svg { flex-shrink: 0; margin-top: 2px; }

.footer-contact a {
  overflow-wrap: anywhere;
}

.footer-bottom {
  margin-top: 48px;
  padding: 20px var(--gutter);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a {
  color: rgba(255,255,255,0.56);
  transition: color 0.15s ease;
}
.footer-bottom a:hover { color: #fff; }
.builder-credit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* ── Quote Form (shared CTA strip) ── */
.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field {
  display: grid;
  gap: 7px;
}
.form-field.full-width { grid-column: 1 / -1; }
.form-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}
.required-mark {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}
.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--fg);
  transition: border-color 0.15s;
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.quote-form textarea { grid-column: 1 / -1; min-height: 100px; resize: vertical; }
.quote-form .full-width { grid-column: 1 / -1; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(15,31,36,0.06);
}

/* ── FAQ Accordion ── */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  color: var(--fg);
  cursor: pointer;
  gap: 16px;
}
.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.faq-answer-inner a { color: var(--accent); text-decoration: underline; }

/* ── Process Steps ── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  counter-increment: step;
}
.process-step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.28;
  line-height: 1;
  margin-bottom: 16px;
}
.process-step h3 { font-size: 16px; margin-bottom: 8px; }
.process-step p { font-size: 14px; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .image-feature { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .image-feature__media img { aspect-ratio: 4 / 3; }
}

@media (max-width: 1024px) {
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .process-steps { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1120px) {
  .header-top { display: none; }
  .nav-links { display: none; }
  .header-cta .btn { display: none; }
  .mobile-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: auto;
    height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
    align-items: stretch;
    background:
      linear-gradient(180deg, rgba(23,116,135,0.18), transparent 150px),
      var(--slate-deep);
    padding: 24px;
    gap: 4px;
    z-index: 300;
    overflow-y: auto;
  }
  .nav-links.open > li,
  .nav-links.open .nav-dropdown {
    width: 100%;
  }
  .nav-links.open a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    text-align: left;
    color: #fff;
  }
  .nav-links.open .nav-dropdown > a::before {
    right: 18px;
  }
  .nav-links.open a:hover,
  .nav-links.open a.active {
    background: rgba(23,116,135,0.18);
    color: #fff;
  }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.05);
    padding: 4px 0 4px 16px;
  }
  .nav-dropdown-menu a { color: rgba(255,255,255,0.6) !important; }
  .logo { min-width: 200px; }
  .logo img { width: 200px; }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .section { padding: 40px 0; }
  .header-phone span { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .quote-form { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .header-main { gap: 8px; }
  .logo { min-width: 0; flex: 1; }
  .logo img { width: min(190px, 52vw); }
  .header-cta { gap: 8px; }
  .header-phone {
    width: 40px;
    height: 40px;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0;
    padding: 0;
  }
  .header-phone svg {
    width: 18px;
    height: 18px;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}
