/* ==========================================================
   Rovik Roofing — site styles
   Brand tokens live in :root. Change a color once, it updates everywhere.
   ========================================================== */
:root {
  --navy: #14243B;          /* headlines, navigation, footer */
  --navy-deep: #0E1A2C;
  --white: #FFFFFF;         /* primary background */
  --blue: #0062FA;          /* buttons, links, accents — matched to the logo's blue.
                               Brief palette value was #2780D3; swap here if preferred. */
  --blue-dark: #004FCC;
  --gray: #F4F6F8;          /* secondary backgrounds */
  --line: #DDE3EA;
  --ink: #1B2533;           /* body text */
  --muted: #5A6778;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Archivo", "Inter", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-stretch: 112%;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; font-stretch: 105%; letter-spacing: -0.005em; line-height: 1.25; }
p { margin: 0 0 1.1em; max-width: 64ch; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--muted); line-height: 1.6; }
.place {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.95rem; font-weight: 600; color: var(--navy); margin-bottom: 20px;
}
.place svg { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem/1 var(--font-body);
  padding: 17px 26px; border-radius: var(--radius);
  text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-ghost { border-color: var(--line); color: var(--navy); background: var(--white); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--gray); color: var(--navy); }
.btn-outline-light { border-color: rgba(255,255,255,.35); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- Utility bar + header ---------- */
.utility { background: var(--navy); color: #C9D3E0; font-size: 0.86rem; }
.utility .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 9px; padding-bottom: 9px; }
.utility a { color: var(--white); font-weight: 600; text-decoration: none; }
.utility a:hover { text-decoration: underline; color: var(--white); }
.utility .hours { display: none; }
@media (min-width: 760px) { .utility .hours { display: block; } }

.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 20px; }
.brand img { height: 44px; width: auto; }
.nav { display: none; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 10px 10px; font-size: 0.93rem; font-weight: 500; white-space: nowrap;
  color: var(--navy); text-decoration: none; border-radius: var(--radius);
}
.nav a:hover { background: var(--gray); color: var(--navy); }
.nav a[aria-current="page"] { color: var(--blue); }
.header-call { display: none; padding: 13px 18px; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; font: 600 0.95rem var(--font-body); color: var(--navy); cursor: pointer;
}
@media (min-width: 1180px) {
  .nav { display: block; }
  .header-call { display: inline-flex; }
  .menu-toggle { display: none; }
}
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--white); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
.mobile-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--gray); color: var(--navy); font-weight: 600; text-decoration: none; }
.mobile-nav a[aria-current="page"] { color: var(--blue); }
@media (min-width: 1180px) { .mobile-nav { display: none !important; } }

/* ---------- Photo slots ----------
   Each .photo uses --img. If the file isn't there yet, the navy
   shingle-line fallback shows instead, so the layout never breaks. */
.photo {
  position: relative;
  background-color: var(--navy);
  background-image:
    var(--img, none),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 34px),
    linear-gradient(160deg, #1C3150 0%, var(--navy) 60%, var(--navy-deep) 100%);
  background-size: cover, auto, auto;
  background-position: center;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 72px) 0 var(--section); overflow: hidden; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.02fr 1fr; gap: 56px; } }
.hero h1 { margin-bottom: 24px; }
.hero-figure { position: relative; }
.hero-figure .photo {
  aspect-ratio: 5 / 5.4;
  /* The roof gable: the one bold move, taken from the logo's chevron */
  clip-path: polygon(0 30%, 50% 0, 100% 30%, 100% 100%, 0 100%);
}
.hero-figure .ridge {
  position: absolute; left: 0; top: 0; width: 100%; height: 30%;
  pointer-events: none; overflow: visible;
}
.hero-figure .ridge polyline { fill: none; stroke: var(--blue); stroke-width: 14; stroke-linejoin: miter; }
.hero-note {
  position: absolute; left: -12px; bottom: 28px; background: var(--white); padding: 16px 20px;
  border-left: 4px solid var(--blue); box-shadow: 0 12px 30px rgba(20,36,59,.14); max-width: 250px;
  font-size: 0.92rem; line-height: 1.45; color: var(--navy);
}
.hero-note strong { display: block; font-family: var(--font-head); font-size: 1.05rem; }
@media (max-width: 959px) { .hero-figure { max-width: 520px; } .hero-note { left: 12px; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-figure .ridge polyline { stroke-dasharray: 1300; stroke-dashoffset: 1300; animation: draw 1.1s .25s cubic-bezier(.6,0,.2,1) forwards; }
  .hero-figure .photo { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* Page hero (inner pages) */
.page-hero { background: var(--gray); padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -60px; bottom: -2px; width: 420px; height: 150px;
  background: var(--white); clip-path: polygon(0 100%, 50% 0, 100% 100%); opacity: .7;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); max-width: 18ch; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section.tint { background: var(--gray); }
.section.dark { background: var(--navy); color: #D5DDE8; }
.section.dark h2, .section.dark h3 { color: var(--white); }
.section.dark .lead { color: #B8C4D3; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }

/* Three paths: roofing / soft washing / storm */
.paths { display: grid; gap: 0; border-top: 2px solid var(--navy); }
@media (min-width: 860px) { .paths { grid-template-columns: repeat(3, 1fr); } }
.path { padding: 32px 0 8px; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) {
  .path { padding: 36px 36px 12px 0; border-bottom: 0; }
  .path + .path { padding-left: 36px; border-left: 1px solid var(--line); }
}
.path .icon { color: var(--blue); margin-bottom: 18px; }
.path ul { list-style: none; padding: 0; margin: 0 0 22px; color: var(--muted); font-size: 0.97rem; }
.path li { padding: 4px 0; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.text-link:hover { text-decoration: underline; }

/* Split layout */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 920px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } .split.flip > :first-child { order: 2; } }
.split .photo { aspect-ratio: 4 / 3.3; border-radius: var(--radius); }

/* Commitment list */
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.checks svg { color: var(--blue); margin-top: 3px; }
.section.dark .checks svg { color: #5B9BFF; }

/* Soft washing feature */
.feature-soft .photo { aspect-ratio: 4 / 3.6; }
.fine-print { font-size: 0.86rem; color: var(--muted); margin-top: 20px; max-width: 60ch; }
.section.dark .fine-print { color: #93A2B6; }

/* Crew band */
.crew-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .crew-grid { grid-template-columns: repeat(3, 1fr); } }
.crew-grid .icon { color: #5B9BFF; margin-bottom: 14px; }
.crew-grid p { color: #B8C4D3; }

/* Areas */
.areas { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 28px 0 0; }
.areas li {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  font-weight: 600; color: var(--navy); font-size: 0.97rem;
}
.areas li.primary { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Service detail blocks */
.svc { display: grid; gap: 20px; padding: 48px 0; border-top: 1px solid var(--line); }
.svc:first-of-type { border-top: 2px solid var(--navy); }
@media (min-width: 900px) { .svc { grid-template-columns: 300px 1fr; gap: 64px; } }
.svc h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.svc .icon { color: var(--blue); margin-bottom: 16px; }
.svc ul { padding-left: 1.1em; margin: 0 0 1em; }
.svc li { margin-bottom: 6px; max-width: 60ch; }

/* Materials table-like list */
.materials { display: grid; gap: 0; border-top: 2px solid var(--navy); }
.material { display: grid; gap: 10px 48px; padding: 30px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .material { grid-template-columns: 280px 1fr 1fr; } }
.material h3 { margin: 0; }
.material dt { font-size: 0.85rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.material dd { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Steps (a real sequence) */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 28px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; border-top: 2px solid var(--line); padding-top: 18px; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--font-head); font-weight: 800;
  font-size: 1.1rem; color: var(--blue); margin-bottom: 10px;
}
.steps h3 { font-size: 1.12rem; }
.steps p { font-size: 0.97rem; color: var(--muted); }

/* Callout */
.callout {
  border-left: 4px solid var(--blue); background: var(--white); padding: 22px 26px; margin-top: 28px;
  box-shadow: 0 1px 0 var(--line);
}
.tint .callout { background: var(--white); }
.callout p:last-child { margin-bottom: 0; }

/* Emergency band */
.emergency { background: var(--blue); color: var(--white); padding: 40px 0; }
.emergency .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.emergency h2 { color: var(--white); font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 6px; }
.emergency p { margin: 0; color: #DCE8FF; }

/* Contact block */
.contact-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-grid > div { background: var(--white); padding: 34px 30px; }
.contact-grid .icon { color: var(--blue); margin-bottom: 14px; }
.contact-grid a.big { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; color: var(--navy); text-decoration: none; word-break: break-word; }
.contact-grid a.big:hover { color: var(--blue); }

/* CTA band */
.cta-band { background: var(--navy); color: #C9D3E0; padding: clamp(64px, 9vw, 104px) 0; position: relative; overflow: hidden; }
.cta-band .chev { position: absolute; right: -40px; bottom: -40px; width: min(560px, 70vw); opacity: .5; pointer-events: none; }
.cta-band .chev polyline { fill: none; stroke: var(--blue); stroke-width: 16; }
.cta-band .wrap { position: relative; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #B8C4D3; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #A9B6C7; font-size: 0.94rem; padding: 72px 0 110px; }
@media (min-width: 760px) { .site-footer { padding-bottom: 40px; } }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; } }
.site-footer img { height: 40px; width: auto; margin-bottom: 18px; }
.site-footer h4 { color: var(--white); font-size: 0.98rem; font-stretch: 100%; letter-spacing: 0; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: #D5DDE8; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 0.85rem; color: #7F8EA3; }

/* Sticky mobile call bar */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); box-shadow: 0 -6px 20px rgba(20,36,59,.12);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.call-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 10px; font-weight: 700; text-decoration: none; font-size: 0.98rem; }
.call-bar .call { background: var(--blue); color: var(--white); }
.call-bar .mail { background: var(--white); color: var(--navy); }
@media (min-width: 760px) { .call-bar { display: none; } }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound p { margin-left: auto; margin-right: auto; }
.notfound .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.material dl { margin: 0; }
@media (min-width: 900px) { .material.area-row { grid-template-columns: 280px 1fr; } }
.material.area-row p { margin: 0; color: var(--muted); }
a[href^="tel"] { white-space: nowrap; }

/* ---------- Photo additions ---------- */
.photo { background-size: cover, cover, auto, auto; background-position: center; }
.page-hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .page-hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; } }
.hero-figure.small .photo { aspect-ratio: 5 / 4.4; }
.hero-figure.small { max-width: 520px; width: 100%; }
@media (max-width: 899px) { .hero-figure.small { max-width: 440px; } }
.page-hero::after { display: none; }
.svc-photo { aspect-ratio: 4 / 3; border-radius: var(--radius); margin-top: 22px; }
