/* Impact Roofing — shared styles */

:root {
  --orange-500: #F4770B;
  --orange-600: #D95F04;
  --orange-700: #B34C03;
  --orange-400: #FB923C;
  --orange-100: #FFEDD9;
  --orange-50: #FFF7EF;
  --sun-yellow: #FFC229;
  --sun-gradient: linear-gradient(180deg, #F4770B 0%, #FFC229 100%);

  --slate-900: #2B2724;
  --slate-800: #3A3532;
  --slate-700: #514A45;
  --slate-600: #6B635C;
  --slate-500: #867D75;
  --slate-400: #A69D95;
  --slate-300: #C9C1B9;
  --slate-200: #E2DCD5;
  --slate-100: #F0ECE7;
  --slate-50: #FAF8F5;
  --white: #FFFFFF;

  --success: #2E7D46;
  --warning: #B87905;
  --danger: #C0392B;
  --info: #2563A8;

  --brand: var(--orange-500);
  --brand-hover: var(--orange-600);
  --text-heading: var(--slate-900);
  --text-body: var(--slate-700);
  --text-muted: var(--slate-500);
  --text-on-brand: var(--white);
  --text-inverse: var(--slate-50);
  --surface-page: var(--white);
  --surface-alt: var(--slate-50);
  --surface-card: var(--white);
  --surface-dark: var(--slate-900);
  --surface-brand-tint: var(--orange-50);
  --border-default: var(--slate-200);
  --border-strong: var(--slate-300);
  --focus-ring: 0 0 0 3px rgba(244, 119, 11, 0.35);
  --link: var(--orange-600);
  --link-hover: var(--orange-700);

  --font-display: "Oswald", Impact, "Arial Narrow", sans-serif;
  --font-body: "Public Sans", system-ui, "Segoe UI", sans-serif;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;
  --text-5xl: 64px;

  --display-weight: 600;
  --display-tracking: 0.01em;
  --display-transform: uppercase;
  --display-leading: 1.08;
  --body-leading: 1.6;
  --body-weight: 400;
  --eyebrow-size: 13px;
  --eyebrow-tracking: 0.14em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --container-max: 1160px;
  --section-pad: 96px;
  --gutter: 24px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(43, 39, 36, 0.08);
  --shadow-md: 0 4px 12px rgba(43, 39, 36, 0.1);
  --shadow-lg: 0 12px 32px rgba(43, 39, 36, 0.14);
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --overlay-scrim: rgba(43, 39, 36, 0.55);
  --hero-scrim: linear-gradient(90deg, rgba(43, 39, 36, 0.82) 0%, rgba(43, 39, 36, 0.35) 65%, rgba(43, 39, 36, 0.1) 100%);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  line-height: var(--body-leading);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  background: var(--surface-page);
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  text-transform: var(--display-transform);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
  color: var(--text-heading);
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Responsive helpers */
@media (min-width: 900px) {
  .m-only {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .d-only {
    display: none !important;
  }

  .cta-btn {
    width: 100%;
    box-sizing: border-box;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--orange-500);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-600);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  border-color: #fff;
  color: #fff;
}

.btn-dark {
  background: var(--slate-900);
  color: #fff;
}

.btn-dark:hover {
  background: var(--slate-700);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--slate-800);
  border: 1px solid var(--border-strong);
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

.btn-outline:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

.btn-header {
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
  white-space: nowrap;
}

@media (max-width: 440px) {
  .btn-header {
    padding: 0 12px;
    font-size: 13.5px;
    height: 44px;
  }
}

.btn-block {
  width: 100%;
}

.btn-sticky {
  flex: 1;
  max-width: 230px;
  height: 48px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.hero-reviews a {
  color: #fff;
  text-decoration: underline;
}

.hero-reviews a:hover {
  color: var(--sun-yellow);
}

.footer-link {
  color: var(--slate-300);
}

.footer-link:hover {
  color: #fff;
  text-decoration: none;
}

.footer-muted {
  color: var(--slate-400);
}

.footer-muted:hover {
  color: #fff;
  text-decoration: none;
}

.sticky-reviews {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-800);
  text-decoration: none;
  line-height: 1.3;
}

.sticky-reviews:hover {
  color: var(--slate-900);
  text-decoration: none;
}

.emergency-link {
  color: var(--sun-yellow);
}

.emergency-link:hover {
  color: #fff;
}

/* Forms */
.lead-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-800);
}

.field input,
.field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--slate-800);
  background: #fff;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B635C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: var(--focus-ring);
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.field-check input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--orange-500);
}

.form-success {
  display: none;
  text-align: center;
  padding: 28px 8px;
}

.lead-card.is-submitted .lead-form-wrap {
  display: none;
}

.lead-card.is-submitted .form-success {
  display: block;
}

/* Layout grids */
.wwd-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 1099px) {
  .wwd-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 699px) {
  .wwd-grid {
    grid-template-columns: 1fr;
  }
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
}

@media (max-width: 1099px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1099px) {
  .proj-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .proj-grid {
    grid-template-columns: 1fr;
  }
}

.why-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
}

@media (max-width: 1099px) {
  .why-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .why-grid-4 {
    grid-template-columns: 1fr;
  }
}

.why-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
}

@media (max-width: 1099px) {
  .why-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 699px) {
  .why-grid-5 {
    grid-template-columns: 1fr;
  }
}

.proc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 24px;
}

@media (max-width: 1099px) {
  .proc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 699px) {
  .proc-grid {
    grid-template-columns: 1fr;
  }
}

.materials-grid,
.mat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 999px) {
  .materials-grid,
  .mat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .materials-grid,
  .mat-grid {
    grid-template-columns: 1fr;
  }
}

/* Reviews marquee */
.review-card {
  max-width: 82vw;
}

.rev-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.rev-track {
  display: flex;
  width: max-content;
  animation: revScroll 60s linear infinite;
}

.rev-track:hover {
  animation-play-state: paused;
}

@keyframes revScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rev-track {
    animation: none;
  }

  .insp-line,
  .insp-step,
  .proc-icon {
    animation: none !important;
    opacity: 1 !important;
  }

  .insp-line {
    height: calc(100% - 48px) !important;
  }
}

/* FAQ */
summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

details[open] summary .faq-plus {
  transform: rotate(45deg);
}

.faq-plus {
  color: var(--orange-500);
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--transition-fast);
}

/* Inspection timeline */
.insp-line {
  animation: inspLine 3s ease-out 0.4s forwards;
}

@keyframes inspLine {
  to {
    height: calc(100% - 48px);
  }
}

.insp-step {
  opacity: 0;
  animation: inspFade 0.5s ease forwards;
  position: relative;
}

.insp-step:last-child::after {
  content: "";
  position: absolute;
  left: 0;
  top: 52px;
  bottom: -28px;
  width: 48px;
  background: #fff;
}

@keyframes inspFade {
  to {
    opacity: 1;
  }
}

.insp-step:nth-child(1) {
  animation-delay: 0.2s;
}

.insp-step:nth-child(2) {
  animation-delay: 0.8s;
}

.insp-step:nth-child(3) {
  animation-delay: 1.4s;
}

.insp-step:nth-child(4) {
  animation-delay: 2s;
}

.insp-step:nth-child(5) {
  animation-delay: 2.6s;
}

/* Replacement process interactive */
.proc-icon {
  animation: iconPop 0.5s ease;
}

@keyframes iconPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.proc-step {
  cursor: pointer;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background: transparent;
  padding: 14px 18px;
  text-align: left;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
  width: 100%;
  font: inherit;
  color: inherit;
}

.proc-step.is-active {
  background: #fff;
  border-color: rgba(244, 119, 11, 0.55);
  box-shadow: var(--shadow-md);
}

.proc-step .proc-num {
  color: var(--slate-400);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  width: 34px;
}

.proc-step.is-active .proc-num {
  color: var(--orange-500);
}

.proc-step .proc-body {
  display: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  margin: 8px 0 0 48px;
}

.proc-step.is-active .proc-body {
  display: block;
}

.proc-panel {
  flex: 1 1 340px;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.proc-watermark {
  position: absolute;
  top: 10px;
  right: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 96px;
  line-height: 1;
  color: var(--slate-100);
  user-select: none;
  pointer-events: none;
}

.proc-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  position: relative;
}

.proc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--slate-300);
  cursor: pointer;
  transition: background 0.25s;
}

.proc-dot.is-active {
  background: var(--orange-500);
}

/* Sticky mobile bar spacer */
.sticky-spacer {
  height: 76px;
}

.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--border-default);
  box-shadow: 0 -4px 12px rgba(43, 39, 36, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

/* Append to the design's component stylesheet. */

/* Server-side form feedback (submit.php redirects back with ?sent=0&msg=) */
.lead-form__alert {
  padding: 12px 14px;
  text-align: center;
  border: 1px solid #ddd;
}
.lead-form__alert--error {
  background: #fdecec;
  border-color: #f2b8b8;
  color: #8a1c1c;
}
.lead-form__alert--ok {
  background: #eaf7ee;
  border-color: #b9e2c5;
  color: #1f6b3a;
}

/* Honeypot: hidden from humans, filled by bots. Off-screen rather than
   display:none because some bots skip display:none fields. */
.hp-wrap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
