/* StormShield Roofing — bold, urgent, high-contrast storm/emergency response theme */

:root {
  --ink: #1a1210;
  --panel: #241a17;
  --red: #d62828;
  --red-dark: #a81f1f;
  --amber: #f4a300;
  --paper: #f5f1ee;
  --paper-2: #ffffff;
  --line: #e5ddd6;
  --muted: #6b6560;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: 'Oswald', 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

a { color: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--ink); }
.btn-lg { padding: 1.1rem 2.25rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* button shine sweep */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg); transition: left 0.55s ease; pointer-events: none;
}
.btn:hover::after { left: 130%; }

/* live pulse dot */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #fff;
  margin-right: 0.4rem; box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: obtPulse 1.6s ease-out infinite;
}
@keyframes obtPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* caution stripe divider */
.caution-stripe {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--amber), var(--amber) 14px, var(--ink) 14px, var(--ink) 28px);
}

/* one-time lightning flash on the hero */
.hero::before {
  content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 5;
  animation: obtLightning 1.6s ease-out 0.15s 1;
}
@keyframes obtLightning {
  0% { opacity: 0; } 4% { opacity: 0.55; } 7% { opacity: 0; } 10% { opacity: 0.3; } 14% { opacity: 0; } 100% { opacity: 0; }
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-visible { animation: obtReveal 0.6s ease forwards; animation-delay: var(--reveal-delay, 0s); }
@keyframes obtReveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .btn::after { display: none; }
  .live-dot { animation: none; }
  .hero::before { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- emergency bar ---------- */
.emergency-bar {
  background: var(--red);
  color: #fff;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  position: sticky;
  top: 0;
  z-index: 60;
  transition: padding 0.2s ease;
}
.emergency-bar.is-compact { padding: 0.35rem 1rem; }
.emergency-bar a { text-decoration: underline; font-weight: 700; }

/* ---------- header ---------- */
.site-header {
  background: var(--ink);
  position: sticky;
  /* top:0 (not a hardcoded px offset) — relies on native sticky-stacking so this still lines
     up correctly under the emergency bar even if that bar wraps to two lines on a narrow phone. */
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--red);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1180px; margin: 0 auto; padding: 0.9rem 1.5rem;
}
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-text { color: #fff; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.02em; }
.logo-text span { color: var(--red); }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.main-nav ul a { color: rgba(255,255,255,0.82); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.main-nav ul a:hover { color: var(--amber); }
.nav-cta-row { display: flex; align-items: center; gap: 1.25rem; }
.phone-link { display: flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; font-weight: 700; }
.phone-link svg { flex-shrink: 0; }

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0;
}
.hamburger span { display: block; height: 2px; width: 100%; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem 4.5rem;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center;
}
.hero-eyebrow { color: var(--amber); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: 3rem; margin-top: 0.6rem; }
.hero h1 .hl { color: var(--red); }
.hero-sub { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 480px; margin-top: 1rem; text-transform: none; font-family: 'Inter', sans-serif; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; display: block; border-radius: var(--radius);
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}

/* ---------- trust strip ---------- */
.trust-strip { background: var(--panel); padding: 1.75rem 0; }
.trust-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.trust-item { display: flex; align-items: center; gap: 0.6rem; color: #fff; font-weight: 600; font-size: 0.92rem; }
.trust-item svg { color: var(--amber); flex-shrink: 0; }

/* ---------- services ---------- */
.services { padding: 5rem 0; }
.section-eyebrow { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.section-title { font-size: 2.1rem; margin-top: 0.4rem; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.service-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; border-top: 4px solid var(--red);
}
.service-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--muted); font-size: 0.94rem; margin: 0; text-transform: none; }

/* ---------- insurance steps ---------- */
.insurance-steps { background: var(--paper-2); padding: 5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.5rem; }
.step-item { text-align: center; }
.step-num {
  width: 3rem; height: 3rem; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif;
  font-weight: 700; font-size: 1.3rem; margin: 0 auto 1rem;
}
.step-item h3 { font-size: 1.05rem; }
.step-item p { color: var(--muted); font-size: 0.92rem; text-transform: none; }

/* ---------- gallery ---------- */
.gallery { padding: 5rem 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.25); }
.gallery-item img { width: 100%; height: 260px; object-fit: cover; display: block; }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.9rem 1.1rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  color: #fff; font-weight: 600; font-size: 0.9rem; text-transform: none;
}

/* ---------- quote ---------- */
.quote { background: var(--ink); color: #fff; padding: 5rem 0; }
.quote-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.quote-intro .section-eyebrow { color: var(--amber); }
.quote-intro .section-title { color: #fff; }
.quote-sub { color: rgba(255,255,255,0.72); text-transform: none; font-family: 'Inter', sans-serif; }
.quote-contact-cards { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1.5rem; }
.contact-card {
  display: flex; align-items: center; gap: 0.75rem; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius); padding: 0.9rem 1.1rem;
  color: #fff; text-decoration: none; font-weight: 600;
}
.contact-card svg { color: var(--amber); flex-shrink: 0; }
.map-frame { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.14); }

.quote-form {
  background: var(--paper-2); border-radius: var(--radius); padding: 2rem; color: var(--ink);
}
.form-row { margin-bottom: 1.25rem; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: 4px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.checkbox-item { font-weight: 400; display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; }
.urgency-flag {
  display: flex; align-items: center; gap: 0.6rem; background: #fdf1ee; border: 1.5px solid var(--red);
  border-radius: 4px; padding: 0.75rem 1rem; margin-bottom: 1.25rem; font-weight: 600; font-size: 0.92rem;
}

/* ---------- footer ---------- */
.site-footer { background: var(--panel); color: rgba(255,255,255,0.65); padding: 3rem 0 1.5rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand .logo-text { display: inline-block; margin-bottom: 0.6rem; }
.footer-col h4 { color: #fff; font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-col p { margin: 0 0 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.65); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 1.5rem; font-size: 0.85rem; text-align: center; }

/* ---------- responsive ---------- */
.nav-close { display: none; }
.nav-backdrop { display: none; }
@media (max-width: 900px) {
  .hero-inner, .quote-inner { grid-template-columns: 1fr; }
  .services-grid, .steps-grid, .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .main-nav ul, .nav-cta-row .phone-link span { display: none; }
  .hamburger { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; max-width: 320px;
    background: var(--ink); flex-direction: column; align-items: flex-start; padding: 5rem 2rem 2rem;
    transition: right 0.25s ease; z-index: 70;
  }
  .main-nav.open { right: 0; }
  .main-nav ul.open, .main-nav.open ul { display: flex; flex-direction: column; gap: 1.25rem; }

  .nav-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 1.25rem; right: 1.25rem;
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
  }
  .nav-close:hover { background: rgba(255,255,255,0.2); }

  .nav-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 65; opacity: 0; visibility: hidden; transition: opacity 0.25s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 2.2rem; }
  .services-grid, .steps-grid, .gallery-grid { grid-template-columns: 1fr; }
  .form-row--split, .checkbox-grid { grid-template-columns: 1fr; }
  .trust-inner { justify-content: flex-start; }
  .emergency-bar { font-size: 0.72rem; letter-spacing: 0.02em; line-height: 1.4; }
}

/* Editor mode: keep the sticky emergency bar (and header stacked beneath it)
   clear of the fixed toolbar, and the mobile nav drawer too. */
body.is-editable .emergency-bar { top: 44px; }
body.is-editable .main-nav.open { top: 44px; }
body.is-editable .service-card { position: relative; padding-top: 2.5rem; }
body.is-editable .obt-service-toggle { position: absolute; top: 0.85rem; right: 0.85rem; z-index: 2; }
