/* Mike's Roofing and Repairs LLC: preview homepage.
   Colours from their logo: purple #5A4AE3, black roof #16131F. */
:root {
  --purple: #5a4ae3;
  --purple-dark: #4436c4;
  --purple-soft: #ecebfc;
  --purple-light: #c4bdfa;
  --ink: #16131f;
  --ink-2: #26223a;
  --slate: #4c4a5c;
  --light: #f6f5fb;
  --line: #e2e0ee;
  --white: #fff;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Roboto Slab", Georgia, serif;
  --container: 76rem;
  --pad: 2rem;
  --section: 6rem;
  --radius: 12px;
  --radius-lg: 22px;
  --ribbon-h: 26px;
}
@media (max-width: 767px) { :root { --pad: 1.25rem; --section: 4rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--light); -webkit-font-smoothing: antialiased; padding-top: var(--ribbon-h); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.875rem, 3.4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.muted { color: var(--slate); }
.measure { max-width: 38rem; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.stack-sm { display: flex; flex-direction: column; gap: .4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 899px) { .grid-2 { grid-template-columns: 1fr; gap: 2.5rem; } }

/* Ribbon */
.ribbon { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--ribbon-h); display: flex; align-items: center; justify-content: center; padding: 0 .75rem; background: #0d0b14; color: #d9d6ea; font-size: .75rem; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) { :root { --ribbon-h: 30px; } .ribbon { font-size: .625rem; white-space: normal; line-height: 1.25; padding: 0 1rem; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .75rem 1.5rem; border-radius: 999px; border: 2px solid var(--purple); background: var(--purple); color: var(--white); font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; }
.btn:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.btn-sm { min-height: 2.75rem; padding: .5rem 1.15rem; font-size: .9375rem; }
.btn-lg { min-height: 3.5rem; padding: .9rem 1.75rem; font-size: 1.0625rem; }
.btn-white { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-white:hover { background: var(--purple-soft); border-color: var(--purple-soft); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.show-xs { display: none; }

/* Nav */
.nav { position: sticky; top: var(--ribbon-h); z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 5rem; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 66px; width: auto; }
.nav-links { display: flex; gap: 2rem; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .975rem; color: var(--ink-2); }
.nav-links a:hover { color: var(--purple); }
@media (max-width: 899px) { .nav-links { display: none; } }
@media (max-width: 479px) {
  .nav-bar { height: 4.25rem; }
  .logo img { height: 48px; }
  .hide-xs { display: none; }
  .show-xs { display: inline; }
}

/* Hero */
.hero { padding: 1rem 1rem 0; }
.hero-card { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg); min-height: min(42rem, calc(100vh - 8.5rem)); display: flex; align-items: flex-end; padding: 3.5rem; }
.hero-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; z-index: -2; }
.hero-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(13 11 20 / .82) 0%, rgb(13 11 20 / .6) 45%, rgb(13 11 20 / .1) 80%), linear-gradient(0deg, rgb(13 11 20 / .45), transparent 50%); }
.hero-copy { max-width: 48rem; display: flex; flex-direction: column; gap: 1.25rem; color: var(--white); }
.eyebrow { align-self: flex-start; padding: .35rem .85rem; border-radius: 999px; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .3); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 800; }
.lead { font-size: 1.1875rem; color: rgb(255 255 255 / .92); max-width: 34rem; }
.hero .btn-row { margin-top: .5rem; }
@media (max-width: 767px) {
  .hero { padding: .6rem .6rem 0; }
  .hero-card { min-height: 0; padding: 6.5rem 1.25rem 1.5rem; border-radius: 16px; }
  .hero-card > img { object-position: 60% center; }
  .hero-card::before { background: linear-gradient(180deg, rgb(13 11 20 / .05) 0%, rgb(13 11 20 / .55) 38%, rgb(13 11 20 / .9) 100%); }
  .hero h1 { font-size: 1.875rem; }
  .hero-copy { gap: 1rem; }
  .eyebrow { font-size: .75rem; }
  .lead { font-size: 1.0625rem; }
  .hero .btn-row .btn { width: 100%; }
}

/* Trust */
.trust { padding: 3rem 0 3.5rem; }
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-list li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: .5rem 1.25rem; }
.trust-list li + li { border-left: 1px solid var(--line); }
.trust-list strong { font-family: var(--display); font-size: 1.375rem; }
.trust-list span { color: var(--slate); font-size: .9375rem; }
.trust-google { display: flex; flex-direction: column; align-items: center; gap: .2rem; text-decoration: none; }
.trust-google:hover strong { color: var(--purple); }
.stars { color: #e7a614; letter-spacing: .1em; font-size: 1.05rem; line-height: 1; }
.trust-list .stars { color: #b97f00; }
.badges { display: flex; justify-content: center; align-items: center; gap: 2.5rem; margin-top: 2.25rem; padding-top: 2.25rem; border-top: 1px solid var(--line); }
.badges img { height: 104px; width: auto; }
.badges .badge-wide { height: 64px; border-radius: 8px; }
@media (max-width: 767px) {
  .trust { padding: 2.25rem 0 2.5rem; }
  .trust-list { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; }
  .trust-list li { padding: .25rem .5rem; }
  .trust-list li:nth-child(3) { border-left: 0; }
  .trust-list strong { font-size: 1.1875rem; }
  .trust-list span { font-size: .875rem; }
  .badges { gap: 1.25rem; margin-top: 1.75rem; padding-top: 1.75rem; }
  .badges img { height: 78px; }
  .badges .badge-wide { height: 46px; }
}

/* Sections */
.section { padding-block: var(--section); }
.s-light { background: var(--light); }
.s-white { background: var(--white); }
.s-dark { background: var(--ink); color: var(--white); }
.section-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem; }
.section-head.center { align-items: center; text-align: center; }
.tagline { font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--purple); }
.tagline-light { color: var(--purple-light); }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.svc-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; gap: .75rem; }
.svc-card p { color: var(--slate); font-size: 1rem; }
.svc-icon { width: 3.25rem; height: 3.25rem; border-radius: 14px; background: var(--purple-soft); display: grid; place-items: center; margin-bottom: .5rem; }
.svc-icon svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.roof-types { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1rem; }
.roof-types-label { font-weight: 600; }
.roof-types ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.roof-types li { padding: .35rem .9rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .9375rem; }
.discount { margin-top: 1.5rem; text-align: center; color: var(--slate); font-weight: 500; }
@media (max-width: 991px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .svc-grid { grid-template-columns: 1fr; } .svc-card { padding: 1.5rem; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15rem; gap: 1rem; }
.gallery figure { position: relative; overflow: hidden; border-radius: var(--radius); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g-wide { grid-column: span 2; }
.gallery .g-tall { grid-row: span 2; }
.gallery figcaption { position: absolute; left: .75rem; bottom: .75rem; padding: .3rem .7rem; border-radius: 999px; background: rgb(13 11 20 / .78); color: var(--white); font-size: .8125rem; font-weight: 500; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 11rem; gap: .6rem; }
  .gallery .g-tall { grid-row: span 1; }
  .gallery figcaption { font-size: .75rem; left: .5rem; bottom: .5rem; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: none; }
.steps li { background: var(--ink-2); border: 1px solid rgb(255 255 255 / .08); border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; gap: .75rem; }
.steps p { color: #cfcce0; font-size: 1rem; }
.step-num { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--purple); display: grid; place-items: center; font-weight: 700; font-size: 1.125rem; margin-bottom: .5rem; }
@media (max-width: 767px) { .steps { grid-template-columns: 1fr; } .steps li { padding: 1.5rem; } }

/* Towns */
.towns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.towns li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; font-weight: 600; display: flex; align-items: center; gap: .6rem; }
.towns li::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--purple); flex: none; }

/* Estimate */
.estimate { align-items: start; }
.contact-list { display: flex; flex-direction: column; gap: .75rem; }
.contact-list a { display: inline-flex; align-items: center; gap: .65rem; font-weight: 600; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.contact-list .ico { color: var(--purple); }
.form { background: var(--light); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .9375rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: .75rem .9rem; border: 1px solid #c9c6da; border-radius: 10px; background: var(--white); color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--purple); outline-offset: 0; border-color: var(--purple); }
.form-note { background: var(--purple-soft); color: var(--ink); border-left: 4px solid var(--purple); padding: .85rem 1rem; border-radius: 8px; font-size: .9375rem; }
@media (max-width: 479px) { .form { padding: 1.25rem; } }

/* Footer */
.footer { background: var(--ink); color: #cfcce0; padding: 3.5rem 0 6rem; font-size: .9375rem; }
.footer strong { color: var(--white); }
.footer-name { font-family: var(--display); font-size: 1.25rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: .8125rem; color: #9d99b3; }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }
@media (min-width: 768px) { .footer { padding-bottom: 3rem; } }

/* Mobile call bar */
.call-bar { display: none; }
@media (max-width: 767px) {
  .call-bar { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: rgb(13 11 20 / .95); }
  .call-bar a { display: flex; align-items: center; justify-content: center; min-height: 3rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
  .call-bar-call { background: var(--purple); color: var(--white); }
  .call-bar-quote { border: 1.5px solid rgb(255 255 255 / .85); color: var(--white); }
}
