/* Stewart Painting and Handyman homepage preview. Palette from their current site: Divi blue links (#2ea3f2, darkened for contrast), yellow rating stars, black text; deep blue echoes the painted island in their kitchen work. */
:root {
  --blue: #1b6aa0;
  --blue-dark: #14304a;
  --ink: #2d2d2d;
  --slate: #555a66;
  --light: #f3f7fa;
  --tint: #e2edf4;
  --accent: #e9c94a;
  --accent-dark: #d6b42f;
  --white: #fff;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Poppins", "Inter", system-ui, sans-serif;
  --pad: 2.5rem;
  --section: 6rem;
  --radius: 10px;
  --radius-lg: 20px;
  --ribbon-h: 1.75rem;
  --shadow: 0 16px 40px rgb(0 0 0 / .14);
}
@media (max-width: 991px) { :root { --pad: 2rem; --section: 4.5rem; } }
@media (max-width: 479px) { :root { --pad: 1.25rem; --section: 3.75rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--white); padding-top: var(--ribbon-h); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(2rem, 3.6vw, 2.875rem); color: var(--ink); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
.container { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 var(--pad); }
.muted { color: var(--slate); }
.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* Preview ribbon */
.ribbon {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--ribbon-h);
  display: flex; align-items: center; justify-content: center; padding: 0 .75rem;
  background: #1c1c1f; color: #e6e6ea; 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: 2.1rem; } .ribbon { font-size: .6875rem; white-space: normal; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .75rem 1.5rem; border-radius: var(--radius);
  font: 700 1.0625rem/1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 2.75rem; padding: .5rem 1.1rem; font-size: 1rem; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-white { background: var(--white); color: var(--blue-dark); }
.btn-white:hover { background: var(--tint); }
.btn-block { width: 100%; }

/* Header */
.nav { position: sticky; top: var(--ribbon-h); z-index: 50; background: rgb(255 255 255 / .97); border-bottom: 1px solid #e6e7ee; backdrop-filter: blur(8px); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 5rem; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-svg { height: 3.4rem; width: auto; display: block; }
.nav-links { display: flex; gap: 2rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav-links a:hover { color: var(--blue); }
@media (max-width: 991px) { .nav-links { display: none; } }
@media (max-width: 479px) {
  .nav-bar { height: 4.25rem; gap: .75rem; }
  .logo-svg { height: 2.35rem; }
  .nav-call { padding: .5rem .7rem; font-size: .9rem; gap: .35rem; white-space: nowrap; }
}
@media (max-width: 359px) { .nav-call span { display: none; } }

/* Hero */
.hero { padding: 1.25rem 1.25rem 0; }
.hero-card {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 26px; background: var(--ink);
  min-height: min(44rem, calc(100svh - 8.5rem)); display: flex; align-items: flex-end; padding: 6rem 4rem 4rem;
}
.hero-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(10 26 40 / .72) 0%, rgb(10 26 40 / .35) 50%, rgb(10 26 40 / 0) 78%),
    linear-gradient(180deg, rgb(10 26 40 / 0) 40%, rgb(10 26 40 / .5) 100%);
}
.hero-copy { max-width: 46rem; display: flex; flex-direction: column; gap: 1.25rem; color: var(--white); }
.hero h1 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); text-shadow: 0 2px 16px rgb(0 0 0 / .3); }
.hero .lead { font-size: 1.2rem; max-width: 34rem; color: rgb(255 255 255 / .95); text-shadow: 0 1px 10px rgb(0 0 0 / .35); }
.hero-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .25rem; }
.tagline { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.tagline-light { color: #f3dc80; }
@media (max-width: 767px) {
  .hero { padding: .75rem .75rem 0; }
  .hero-card { min-height: 0; padding: 6rem 1.25rem 1.25rem; border-radius: 20px; }
  .hero-card > img { object-position: 62% 50%; }
  .hero .tagline { font-size: .72rem; }
  .hero-card::before { background: linear-gradient(180deg, rgb(10 26 40 / .05) 0%, rgb(10 26 40 / .35) 30%, rgb(10 26 40 / .85) 62%, rgb(10 26 40 / .92) 100%); }
  .hero-copy { gap: .9rem; }
  .hero h1 { font-size: 1.95rem; }
  .hero .lead { font-size: 1rem; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; min-height: 3rem; }
}

/* Trust strip */
.trust { padding: 2.25rem 0 2.25rem; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.trust-item { display: flex; flex-direction: column; gap: .15rem; padding-left: 1rem; border-left: 3px solid var(--tint); font-size: .95rem; color: var(--slate); text-decoration: none; }
.trust-item strong { color: var(--ink); font-size: 1.05rem; }
.trust-rating { border-left-color: var(--accent); }
.trust-rating strong { font-size: 1.35rem; color: var(--blue-dark); }
.trust-rating:hover strong { text-decoration: underline; }
.stars { color: #c99a00; letter-spacing: .1em; font-size: 1.1rem; line-height: 1; }
@media (max-width: 991px) { .trust-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .trust-grid { gap: 1.1rem; } .trust-item { font-size: .875rem; } }

/* Sections */
.section { padding: var(--section) 0; }
.s-light { background: var(--light); }
.s-white { background: var(--white); }
.s-tint { background: var(--tint); }
.s-dark { background: var(--blue-dark); color: var(--white); }
.s-dark h2 { color: var(--white); }
.section-head { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 3rem; max-width: 46rem; }
.section-head.center { text-align: center; align-items: center; margin-left: auto; margin-right: auto; }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.svc-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 2px 10px rgb(20 48 74 / .07); display: flex; flex-direction: column; }
.svc-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.svc-body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.svc-body h3 { color: var(--blue-dark); }
.svc-body p { color: var(--slate); font-size: .98rem; }
@media (max-width: 1099px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .svc-grid { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15rem; gap: .9rem; }
.gallery figure { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.03); }
.g-wide { grid-column: span 2; }
.gallery figcaption { position: absolute; left: .6rem; bottom: .6rem; padding: .3rem .7rem; border-radius: 999px; background: rgb(10 26 40 / .78); color: #fff; font-size: .8rem; font-weight: 600; }
@media (max-width: 767px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 9.5rem; gap: .6rem; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; gap: .6rem; }
.step-num { font-family: var(--head); font-size: 2.25rem; color: var(--blue); line-height: 1; }
.step p { color: var(--slate); }
@media (max-width: 767px) { .steps { grid-template-columns: 1fr; } .step { padding: 1.5rem; } }

/* Service area */
.area { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.area > div { display: flex; flex-direction: column; gap: .75rem; }
.towns { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.towns li { padding: .6rem 1.1rem; border-radius: 999px; background: var(--light); border: 1px solid #d3e1ea; font-weight: 600; }
.towns li:last-child { background: var(--blue); border-color: var(--blue); color: var(--white); }
@media (max-width: 767px) { .area { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Quote form */
.quote { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
.quote-copy { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.quote-copy p { color: rgb(255 255 255 / .9); }
.quote-or { margin-top: .75rem; font-weight: 600; }
.quote-email a { color: var(--white); overflow-wrap: anywhere; }
.quote-form { background: var(--white); color: var(--ink); border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 1rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); padding: .75rem .9rem;
  border: 1.5px solid #c9cddc; border-radius: 8px; background: var(--white);
}
.field input:focus, .field textarea:focus { outline: 3px solid rgb(27 106 160 / .3); border-color: var(--blue); }
.form-note { background: #fff5e0; border: 1px solid #f3c56b; color: #5a4100; border-radius: 8px; padding: .75rem 1rem; font-weight: 600; font-size: .95rem; }
@media (max-width: 899px) { .quote { grid-template-columns: 1fr; gap: 2rem; } }
@media (max-width: 479px) { .field-row { flex-direction: column; } .quote-form { padding: 1.25rem; } }

/* Footer */
.footer { background: #0e2234; color: #cfd0d6; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-name { font-family: var(--head); font-size: 1.35rem; line-height: 1.25; color: var(--white); margin-bottom: .4rem; }
.footer-head { font-weight: 700; color: var(--white); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.footer-email { overflow-wrap: anywhere; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #24405a; font-size: .85rem; color: #9a9ba3; }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Mobile call bar */
.call-bar { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
    position: fixed; inset: auto 0 0; z-index: 55;
    padding: .7rem 1rem calc(.8rem + env(safe-area-inset-bottom));
    background: rgb(14 34 52 / .94); border-top: 1px solid rgb(255 255 255 / .1);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .call-bar a { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.25rem; border-radius: var(--radius); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
  .call-bar-call { background: var(--accent); color: var(--ink); }
  .call-bar-quote { border: 1.5px solid rgb(255 255 255 / .85); color: var(--white); }
}
