/* Rocky Mountain Painting Contractors: homepage preview.
   Palette from their current site: tab green #3F7652, dark green #1B5B3F, logo blue #0069FF. */
:root {
  --green: #3F7652;
  --green-dark: #173F2C;
  --green-deep: #0F2C1F;
  --blue: #0B5FD6;
  --blue-dark: #0848A6;
  --ink: #15241C;
  --muted: #4A5A51;
  --light: #F2F5F1;
  --tint: #E4ECE5;
  --line: #D3DDD5;
  --white: #fff;
  --radius: 14px;
  --ribbon-h: 26px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.6;
  padding-top: var(--ribbon-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: Archivo, Inter, sans-serif; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

.ribbon {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--ribbon-h);
  display: flex; align-items: center; justify-content: center;
  background: #10181A; color: #D8E0DA;
  font-size: 12px; padding: 0 12px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
  font: 600 16px/1.2 Inter, sans-serif; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-accent { background: var(--blue); color: var(--white); }
.btn-accent:hover { background: var(--blue-dark); }
.btn-white { background: var(--white); color: var(--green-dark); }
.btn-white:hover { background: var(--tint); }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Header */
.nav {
  position: sticky; top: var(--ribbon-h); z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.logo-mark { width: 46px; height: 46px; flex: none; }
.logo-word { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name { font: 800 21px/1.05 Archivo, sans-serif; color: var(--green-dark); letter-spacing: -0.01em; }
.logo-sub { font: 600 11.5px/1.3 Inter, sans-serif; color: var(--green); text-transform: uppercase; letter-spacing: .14em; margin-top: 3px; }
.nav-links { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink); }
.nav-links a:hover { color: var(--green); }

/* Hero */
.hero { padding: 16px; }
.hero-card {
  position: relative; border-radius: 22px; overflow: hidden;
  min-height: min(640px, calc(100vh - 140px));
  display: flex; align-items: flex-end;
}
.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,30,20,.86) 0%, rgba(10,30,20,.6) 45%, rgba(10,30,20,.05) 80%),
              linear-gradient(0deg, rgba(10,30,20,.45), transparent 50%);
}
.hero-copy { position: relative; z-index: 1; color: var(--white); padding: clamp(28px, 5vw, 64px); max-width: 720px; }
.hero-copy h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; margin: 12px 0 16px; }
.lead { font-size: 1.15rem; color: #E9F0EB; max-width: 540px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.tagline { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--green); }
.tagline-light { color: #A9D8B8; }

/* Trust strip */
.trust { padding: 8px 0 28px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trust-item {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--light); border-radius: var(--radius); padding: 18px 20px;
  font-size: 14.5px; color: var(--muted); text-decoration: none;
}
.trust-item strong { color: var(--ink); font-size: 16.5px; }
.trust-rating { background: var(--green-dark); color: #CFE0D4; }
.trust-rating strong { color: var(--white); font-size: 20px; }
.trust-rating:hover { background: var(--green-deep); }
.stars { color: #F5C543; letter-spacing: 2px; font-size: 15px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.s-light { background: var(--light); }
.s-white { background: var(--white); }
.s-tint { background: var(--tint); }
.s-dark { background: var(--green-dark); color: var(--white); }
.section-head { max-width: 720px; margin-bottom: 40px; display: grid; gap: 12px; }
.section-head.center { text-align: center; margin-inline: auto; }
.muted { color: var(--muted); }
.muted-light { color: #CFE0D4; margin-top: 14px; }
.stack { display: grid; gap: 14px; align-content: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.svc-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.svc-body p { color: var(--muted); font-size: 15.5px; }
.svc-body h3 { color: var(--green-dark); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 14px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.g-wide { grid-column: span 2; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--white); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; align-content: start; }
.step-num { font: 800 15px Archivo, sans-serif; color: var(--white); background: var(--green); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.step p { color: var(--muted); }

/* Service area */
.towns { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.towns li { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 9px 18px; font-weight: 600; }
.towns li:first-child { background: var(--white); color: var(--green-dark); }

/* Quote form */
.quote { align-items: start; }
.quote-phone { font: 800 clamp(1.7rem, 3vw, 2.2rem) Archivo, sans-serif; color: var(--green-dark); text-decoration: none; margin-top: 8px; }
.quote-email { color: var(--muted); font-size: 15px; word-break: break-all; }
.form { background: var(--white); border-radius: 18px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); display: grid; gap: 16px; box-shadow: 0 10px 30px rgba(15,44,31,.07); }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-weight: 600; font-size: 14.5px; }
input, textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid #B9C7BD; background: var(--white); color: var(--ink); width: 100%;
}
input:focus, textarea:focus { outline: 3px solid rgba(63,118,82,.3); border-color: var(--green); }
.form-note { background: var(--tint); border-left: 4px solid var(--green); padding: 12px 14px; border-radius: 8px; font-size: 15px; color: var(--green-deep); }

/* Footer */
.footer { background: var(--green-deep); color: #CFE0D4; padding: 48px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1.4fr; gap: 28px; }
.footer-grid p + p { margin-top: 6px; }
.footer a { color: var(--white); text-decoration: none; word-break: break-all; }
.footer a:hover { text-decoration: underline; }
.footer-name { font: 800 18px Archivo, sans-serif; color: var(--white); }
.footer-copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13.5px; }

.call-bar { display: none; }

/* Tablet */
@media (max-width: 1024px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 18px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 600px) {
  body { font-size: 16px; padding-bottom: 76px; }
  :root { --ribbon-h: 34px; }
  .ribbon { font-size: 11px; line-height: 1.3; white-space: normal; padding: 0 16px; }
  .nav-bar { min-height: 64px; gap: 10px; }
  .logo { gap: 9px; }
  .logo-mark { width: 38px; height: 38px; }
  .logo-name { font-size: 17px; }
  .logo-sub { font-size: 9.5px; letter-spacing: .1em; }
  .nav-call { padding: 9px 13px; font-size: 14px; }
  .nav-call span { display: none; }
  .nav-call::after { content: "Call"; }
  .hero { padding: 10px; }
  .hero-card { min-height: 520px; border-radius: 18px; }
  .hero-card img { object-position: 60% center; }
  .hero-card::after { background: linear-gradient(0deg, rgba(10,30,20,.92) 0%, rgba(10,30,20,.72) 55%, rgba(10,30,20,.2) 100%); }
  .hero-copy { padding: 24px 20px; }
  .hero-copy h1 { font-size: 2.15rem; }
  .lead { font-size: 1.02rem; }
  .hero-btns .btn { width: 100%; }
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .trust-item { padding: 14px; font-size: 13.5px; }
  .trust-item strong { font-size: 15px; }
  .trust-rating { grid-column: 1 / -1; }
  .svc-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 210px; }
  .g-wide { grid-column: auto; }
  .field-row { grid-template-columns: 1fr; }
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(0,0,0,.08);
  }
  .call-bar .btn { padding: 13px 10px; }
}
