/* ==========================================================================
   Picture Perfect Painting, LLC — pictureperfectpainting360.com
   One shared stylesheet for the whole site.

   CONTENTS
   1. Design tokens (colors, fonts, spacing)
   2. Base / reset
   3. Layout helpers (container, sections, grids)
   4. Buttons
   5. Header + navigation
   6. Hero
   7. Cards (services, values, process)
   8. Gallery + lightbox
   9. Forms
   10. Footer
   11. Utility + accessibility
   12. Responsive breakpoints
   ========================================================================== */

/* 1. DESIGN TOKENS
   Change a color here and it updates everywhere. */
:root {
  /* Brand palette — "Pacific Northwest craftsman" */
  --paper:       #faf7f1;  /* warm off-white page background */
  --paper-2:     #f2ede2;  /* deeper cream for alternating sections */
  --ink:         #22302a;  /* near-black body text */
  --ink-soft:    #55635c;  /* secondary text */
  --spruce:      #23453a;  /* primary deep green */
  --spruce-deep: #17332b;  /* darker green (hero, footer) */
  --sage:        #9cb5a6;  /* soft green accent */
  --sage-tint:   #e3ebe4;  /* pale green backgrounds */
  --clay:        #a94e2b;  /* terracotta accent (buttons, links) */
  --clay-deep:   #8f411f;  /* button hover */
  --clay-tint:   #f3e2d8;  /* pale clay backgrounds */
  --line:        #e3ddce;  /* hairline borders on cream */
  --white:       #ffffff;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fluid type scale */
  --text-xs:  0.8125rem;
  --text-sm:  0.9375rem;
  --text-md:  1.0625rem;
  --text-lg:  clamp(1.15rem, 1rem + 0.6vw, 1.35rem);
  --text-h3:  clamp(1.25rem, 1.1rem + 0.8vw, 1.55rem);
  --text-h2:  clamp(1.7rem, 1.4rem + 1.6vw, 2.4rem);
  --text-h1:  clamp(2.1rem, 1.6rem + 2.8vw, 3.4rem);

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(23, 51, 43, 0.10);
  --shadow-soft: 0 4px 14px rgba(23, 51, 43, 0.08);
  --max-width: 1120px;
  --header-height: 4.5rem;
}

/* 2. BASE / RESET */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--spruce-deep);
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p { margin: 0 0 var(--space-2); }

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--clay);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--clay-deep); }

ul { padding-left: 1.2rem; }

:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--sage); color: var(--spruce-deep); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 3. LAYOUT HELPERS */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--alt { background: var(--paper-2); }
.section--dark {
  background: var(--spruce-deep);
  color: #e9efe9;
}
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: #cdd9cf; }

.section-intro {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
.section-intro--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: var(--space-1);
}
.section--dark .eyebrow { color: var(--sage); }

.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.lede { font-size: var(--text-lg); color: var(--ink-soft); }

/* 4. BUTTONS — large tap targets, obvious hierarchy */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease,
              border-color 160ms ease, transform 160ms ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--clay); color: var(--white); }
.btn--primary:hover { background: var(--clay-deep); color: var(--white); }

.btn--outline { border-color: var(--spruce); color: var(--spruce); background: transparent; }
.btn--outline:hover { background: var(--spruce); color: var(--white); }

/* outline button on dark backgrounds */
.section--dark .btn--outline,
.hero .btn--outline {
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--white);
}
.section--dark .btn--outline:hover,
.hero .btn--outline:hover { background: var(--white); color: var(--spruce-deep); }

.btn--block { width: 100%; }

/* 5. HEADER + NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--spruce-deep);
  margin-right: auto;
}
.brand svg, .brand img { width: 2.4rem; height: 2.4rem; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.1;
  display: block;
}
.brand-tag {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 600;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: var(--text-sm);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--clay-deep); }
.site-nav a[aria-current="page"] {
  color: var(--spruce-deep);
  border-bottom-color: var(--clay);
  font-weight: 600;
}

.header-cta { min-height: 2.6rem; padding: 0.45rem 1.15rem; font-size: var(--text-sm); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--spruce-deep);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6. HERO */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(156, 181, 166, 0.14) 0%, rgba(156, 181, 166, 0) 55%),
    var(--spruce-deep);
  color: #e9efe9;
  overflow: hidden;
}
.hero::after {
  /* subtle wide brush stroke along the bottom edge */
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 3.5rem;
  background: var(--paper);
  clip-path: ellipse(75% 100% at 50% 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(5.5rem, 10vw, 8rem);
}

.hero h1 { color: var(--white); margin-bottom: var(--space-2); }
.hero .accent {
  color: var(--sage);
  font-style: italic;
}
.hero p {
  color: #cdd9cf;
  font-size: var(--text-lg);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: #b8c9bb;
}
.hero-points li { display: flex; align-items: center; gap: 0.45rem; }
.hero-points svg { width: 1rem; height: 1rem; color: var(--sage); flex: none; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  border: 6px solid rgba(255, 255, 255, 0.08);
}

/* 7. CARDS */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card h3 { margin-bottom: 0; }
.card p { color: var(--ink-soft); font-size: var(--text-sm); margin-bottom: 0; }
.card .card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
}
.card .card-link:hover { text-decoration: underline; }

.card-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--sage-tint);
  color: var(--spruce);
  margin-bottom: 0.35rem;
}
.card-icon svg { width: 1.5rem; height: 1.5rem; }

/* numbered process steps */
.step {
  position: relative;
  padding-top: 0.5rem;
}
.step-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--sage);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--ink-soft); font-size: var(--text-sm); }

/* service detail rows (services.html) */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.service-detail + .service-detail { border-top: 1px solid var(--line); }
.service-detail:nth-of-type(even) .service-detail-media { order: -1; }
.service-detail-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}
.service-detail ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}
.service-detail ul li {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
}
.service-detail ul svg {
  width: 0.9rem; height: 0.9rem;
  color: var(--clay);
  flex: none;
  position: relative;
  top: 0.1rem;
}

/* CTA banner */
.cta-banner {
  background: var(--spruce);
  border-radius: var(--radius);
  color: var(--white);
  padding: clamp(2rem, 5vw, 3.25rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.35rem; }
.cta-banner p { color: #cdd9cf; margin: 0; }
.cta-banner .btn--outline { border-color: rgba(255,255,255,0.6); color: var(--white); }
.cta-banner .btn--outline:hover { background: var(--white); color: var(--spruce-deep); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* 8. GALLERY + LIGHTBOX */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-4);
}
.filter-btn {
  padding: 0.5rem 1.1rem;
  min-height: 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.filter-btn:hover { border-color: var(--spruce); }
.filter-btn[aria-pressed="true"] {
  background: var(--spruce);
  border-color: var(--spruce);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}
.gallery-item { margin: 0; }
.gallery-item.is-hidden { display: none; }
.gallery-item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform 250ms ease;
}
.gallery-item button:hover img { transform: scale(1.03); }
.gallery-item figcaption {
  font-size: var(--text-xs);
  color: var(--ink-soft);
  padding-top: 0.45rem;
}

/* lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1000px);
  width: 100%;
}
.lightbox::backdrop { background: rgba(15, 26, 22, 0.88); }
.lightbox-body {
  position: relative;
  background: var(--spruce-deep);
  border-radius: var(--radius);
  padding: 0.75rem;
}
.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #0f1a16;
}
.lightbox-caption {
  color: #cdd9cf;
  font-size: var(--text-sm);
  text-align: center;
  padding: 0.6rem 3rem 0.35rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { top: 50%; left: 1rem; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 1rem; transform: translateY(-50%); }

/* 9. FORMS */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-3);
}
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field--full { grid-column: 1 / -1; }
.form-field label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--spruce-deep);
}
.form-field .optional {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  min-height: 3rem;
  border: 1px solid #cfc8b6;
  border-radius: var(--radius-sm);
  background: var(--white);
  width: 100%;
}
.form-field textarea { min-height: 8rem; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 3px solid rgba(169, 78, 43, 0.35);
  outline-offset: 0;
  border-color: var(--clay);
}

.form-note { font-size: var(--text-xs); color: var(--ink-soft); }

.form-status {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  display: none;
}
.form-status.is-success { display: block; background: var(--sage-tint); color: var(--spruce-deep); }
.form-status.is-error { display: block; background: var(--clay-tint); color: var(--clay-deep); }

/* honeypot field — hidden from humans, bots fill it in */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* contact info cards */
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-soft);
}
.contact-card h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 0.5rem; }
.contact-card h3 svg { width: 1.15rem; height: 1.15rem; color: var(--clay); }
.contact-card p { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }
.contact-card a { font-weight: 600; font-size: var(--text-md); }

/* 10. FOOTER */
.site-footer {
  background: var(--spruce-deep);
  color: #b8c9bb;
  font-size: var(--text-sm);
  margin-top: var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  padding-block: var(--space-5);
}
.site-footer h3 {
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.site-footer a { color: #dbe6dc; }
.site-footer a:hover { color: var(--white); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-brand svg, .footer-brand img {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.75rem;
}
.footer-brand p { max-width: 26rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: #8aa190;
}

/* 11. UTILITIES + ACCESSIBILITY */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  background: var(--spruce-deep);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 150ms ease;
}
.skip-link:focus { top: 0; color: var(--white); }

.page-hero {
  background: var(--spruce-deep);
  color: #cdd9cf;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.page-hero h1 { color: var(--white); margin-bottom: 0.4rem; }
.page-hero p { max-width: 44rem; margin: 0; font-size: var(--text-lg); }

/* 12. RESPONSIVE BREAKPOINTS
   Tested at 375px, 430px, 768px, 1024px, desktop */
@media (max-width: 1023px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 34rem; }
  .service-detail { grid-template-columns: 1fr; }
  .service-detail:nth-of-type(even) .service-detail-media { order: 0; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* collapse nav into hamburger menu */
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }
  .site-nav a {
    display: block;
    padding: 0.9rem clamp(1.1rem, 4vw, 2rem);
    font-size: var(--text-md);
    border-bottom: 0;
    border-left: 3px solid transparent;
  }
  .site-nav a[aria-current="page"] { border-left-color: var(--clay); background: var(--paper-2); }
}

@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .header-cta { display: none; }         /* keep header uncluttered on small phones… */
  .hero-actions .btn { width: 100%; }    /* …but make hero CTAs full-width and thumb-friendly */
  .cta-banner { text-align: left; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; }
  .brand-tag { display: none; }
  .brand svg, .brand img { width: 2rem; height: 2rem; }
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
}
