/* ==========================================================================
   MasterCoat Painting — mastercoatpainting.com
   ========================================================================== */

:root {
  --ink: #16222e;          /* deep navy — headings, footer */
  --ink-soft: #3d4a57;     /* body text */
  --paper: #f8f5ef;        /* warm off-white background */
  --white: #ffffff;
  --accent: #c9683a;       /* terracotta / copper — CTAs */
  --accent-dark: #a9532c;
  --accent-soft: #f3e2d6;
  --teal: #1f4e5f;         /* secondary accent */
  --gold: #e0a458;         /* stars */
  --line: #e5ded2;
  --radius: 18px;
  --shadow-sm: 0 2px 10px rgba(22, 34, 46, .07);
  --shadow-lg: 0 20px 50px rgba(22, 34, 46, .16);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  font-weight: 600;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -.015em; }
h3 { font-size: 1.3rem; }

h1 em { font-style: italic; color: var(--accent); }

.container { width: min(1180px, 92%); margin-inline: auto; }

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

.section-head { max-width: 720px; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-sub { margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  font-family: var(--font-body);
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(201, 104, 58, .35);
}
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 12px 30px rgba(201, 104, 58, .45); }

.btn-ghost {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }

.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: #fff; }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .25s ease, box-shadow .25s ease;
  padding: .9rem 0;
}
.site-header.scrolled {
  background: rgba(248, 245, 239, .88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  padding: .55rem 0;
}

.header-inner { display: flex; align-items: center; gap: 2rem; }

.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1;
  display: flex;
  flex-direction: column;
}
.hero ~ * .brand-text { color: var(--ink); }
.brand-sub {
  font-family: var(--font-body);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: .25rem;
}

/* header starts transparent over dark hero → light text */
.site-header:not(.scrolled) .brand-text { color: #fff; }
.site-header:not(.scrolled) .site-nav a { color: rgba(255, 255, 255, .85); }
.site-header:not(.scrolled) .header-phone { color: #fff; }

.site-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -5px;
  height: 2px;
  background: var(--accent);
  transition: right .2s ease;
}
.site-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
  white-space: nowrap;
}
.header-phone svg { width: 1.1em; height: 1.1em; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  color: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.site-header:not(.scrolled) .nav-toggle span { background: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 104, 58, .28), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(31, 78, 95, .5), transparent 60%),
    linear-gradient(160deg, #14202c 0%, #1a2b3a 55%, #16222e 100%);
  color: #fff;
  overflow: hidden;
  padding: clamp(7rem, 14vw, 10rem) 0 clamp(3.5rem, 7vw, 6rem);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-stroke {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .14;
}
.stroke-1 { width: 60%; height: 14px; background: var(--accent); top: 22%; left: -10%; transform: rotate(-8deg); }
.stroke-2 { width: 45%; height: 10px; background: var(--gold); top: 60%; right: -8%; transform: rotate(6deg); }
.stroke-3 { width: 30%; height: 8px; background: #7fb3c8; bottom: 12%; left: 15%; transform: rotate(-4deg); }

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  position: relative;
}

.hero-copy h1 { color: #fff; margin-bottom: 1.4rem; }
.hero-eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.hero-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255, 255, 255, .82);
  max-width: 34rem;
  margin-bottom: 2.2rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.8rem; }

.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding-top: 1.6rem;
}
.hero-stats li { display: flex; flex-direction: column; gap: .15rem; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
}
.hero-stats span { font-size: .82rem; color: rgba(255, 255, 255, .65); max-width: 9rem; }

.hero-photo { position: relative; }
.hero-photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: auto;
}
.hero-badge {
  position: absolute;
  bottom: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: .85rem;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}
.hero-badge svg { width: 1.2em; height: 1.2em; color: var(--accent); }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--ink); color: rgba(255, 255, 255, .9); padding: 1.1rem 0; }
.trustbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem 2rem;
  font-size: .92rem;
  font-weight: 500;
}
.trust-item { display: flex; align-items: center; gap: .55rem; }
.trust-icon { font-size: 1.15rem; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card img { width: 100%; height: 200px; object-fit: cover; }
.service-body { padding: 1.5rem 1.6rem 1.8rem; }
.service-body h3 { margin-bottom: .6rem; }
.service-body p { font-size: .95rem; }

/* ---------- Process ---------- */
.process { background: var(--white); }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  list-style: none;
  counter-reset: step;
}
.process-steps li { position: relative; padding-top: .4rem; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.process-steps h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.process-steps p { font-size: .93rem; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 1.2rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1.1rem .9rem;
  background: linear-gradient(transparent, rgba(22, 34, 46, .85));
  color: #fff;
  font-size: .88rem;
  font-weight: 500;
}

/* ---------- Reviews ---------- */
.reviews { background: var(--ink); }
.reviews .eyebrow { color: var(--gold); }
.reviews h2 { color: #fff; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-bottom: 2.4rem;
}
.review-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 1.8rem;
  color: rgba(255, 255, 255, .88);
}
.review-card .stars { color: var(--gold); letter-spacing: .2em; margin-bottom: .9rem; font-size: 1.05rem; }
.review-card p { font-size: .97rem; margin-bottom: 1rem; }
.review-card footer { font-size: .85rem; color: rgba(255, 255, 255, .55); }

.review-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.reviews .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .35); }
.reviews .btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* review form */
.review-form {
  margin-top: 2.2rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 620px;
}
.review-form h3 { color: #fff; margin-bottom: 1.2rem; }
.review-form label { color: rgba(255, 255, 255, .8); }
.review-form input, .review-form textarea {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}
.review-form.hidden { display: none; }

.rating-label { display: block; margin-bottom: 1rem; }
.rating-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: .15rem;
  margin-top: .3rem;
}
.rating-input input { position: absolute; opacity: 0; width: 0; }
.rating-input label {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, .25);
  cursor: pointer;
  transition: color .15s ease;
  margin: 0;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { color: var(--gold); }

/* ---------- About ---------- */
.about { background: var(--white); }
.about-inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-copy p { margin-bottom: 1.1rem; }
.about-points { list-style: none; margin: 1.4rem 0 2rem; display: grid; gap: .6rem; }
.about-points li { padding-left: 1.8rem; position: relative; font-weight: 500; color: var(--ink); }
.about-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Service area ---------- */
.area { text-align: center; }
.area .section-head { margin-inline: auto; }
.area-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem;
  max-width: 820px;
  margin: 0 auto 1.5rem;
}
.area-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5rem 1.2rem;
  font-weight: 500;
  font-size: .93rem;
  color: var(--ink);
}
.area-note a { color: var(--accent); font-weight: 600; }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(800px 400px at 110% 0%, rgba(201, 104, 58, .16), transparent 60%),
    var(--paper);
}
.contact-inner {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.contact-copy h2 { margin-bottom: 1rem; }
.contact-cards { display: grid; gap: .9rem; margin-top: 1.8rem; }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.3rem;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
a.contact-card:hover { border-color: var(--accent); transform: translateX(4px); }
.cc-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.cc-value { font-size: 1.15rem; font-weight: 700; color: var(--ink); }

/* forms (shared) */
form label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 1.1rem; }
form input, form select, form textarea {
  width: 100%;
  margin-top: .4rem;
  padding: .8rem 1rem;
  font: inherit;
  font-size: .97rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 104, 58, .15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.form-status { font-weight: 600; font-size: .92rem; }
.form-status.ok { color: #2e7d4f; }
.form-status.err { color: #c0392b; }
.review-form .form-status.ok { color: #7fd8a4; }
.review-form .form-status.err { color: #f1948a; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

/* honeypot — visually hidden from humans */
.hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .75); padding: 4rem 0 2rem; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-brand .brand-text { color: #fff; font-size: 1.5rem; }
.footer-brand p { margin-top: 1rem; font-size: .92rem; }
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  font-size: .94rem;
  padding: .25rem 0;
}
.footer-col a:hover { color: var(--gold); }
.footer-legal { padding-top: 1.6rem; font-size: .84rem; color: rgba(255, 255, 255, .45); }

/* ---------- Mobile call bar ---------- */
.mobile-callbar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(248, 245, 239, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(22, 34, 46, .12);
  gap: .7rem;
}
.mobile-callbar .btn { flex: 1; justify-content: center; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { max-width: 520px; }
}

@media (max-width: 760px) {
  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    font-size: 1.3rem;
    transform: translateX(100%);
    transition: transform .3s ease;
    margin: 0;
  }
  .site-nav.open { transform: none; }
  .site-nav a { color: #fff !important; }
  .nav-toggle { display: flex; z-index: 110; }
  .nav-toggle.open span { background: #fff; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .header-cta, .header-phone { display: none; }

  /* While the menu is open, the header must not have backdrop-filter:
     it would turn the header into the containing block for the fixed
     full-screen nav, collapsing it to the header's box. */
  .site-header.nav-open,
  .site-header.nav-open.scrolled {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }
  .site-header.nav-open .brand-text { color: #fff; }
  .site-header.nav-open .brand-sub { color: var(--gold); }
  .site-header.nav-open .nav-toggle span { background: #fff; }

  .services-grid, .process-steps, .reviews-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.2rem 2rem; }

  .mobile-callbar { display: flex; }
  body { padding-bottom: 70px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.tall { grid-row: span 1; }
}
