/* ===================================================================
   Scott Morrisey — Painter & Decorator
   Single stylesheet. No frameworks, no Elementor.
   =================================================================== */

/* ---- Fonts (uses the Montserrat file already in your uploads) ---- */
@font-face {
  font-family: "Montserrat";
  font-display: swap;
  src: url("wp-content/uploads/2024/10/Montserrat-VariableFont_wght.ttf") format("truetype");
}

/* ---- Design tokens ---- */
:root {
  --ink:     #252323;   /* near-black dark sections */
  --grey:    #54595f;   /* header / muted text */
  --blue:    #6ec1e4;   /* brand blue */
  --magenta: #e100ff;   /* accent + buttons */
  --light:   #f2f2f2;   /* light section background */
  --white:   #ffffff;
  --maxw:    80rem;     /* container max width */
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; }
.container.narrow { max-width: 65rem; }
.section { padding: 8rem 2rem; }
.section-dark  { background: var(--ink);  }
.section-light { background: var(--light); }
.centered { text-align: center; }
.light-heading { color: var(--white); }

@media (max-width: 1024px) { .section { padding: 4rem 2rem; } }
@media (max-width: 767px)  { .section { padding: 4rem 1rem; } }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--magenta);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem 2rem;
  border: 0;
  cursor: pointer;
  transition: background .3s;
}
.btn:hover, .btn:focus { background: var(--ink); }

/* ===================================================================
   HEADER
   =================================================================== */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  padding: 1.5rem 3rem;
}
.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.site-logo { display: flex; align-items: center; flex: 0 0 auto; }
.site-logo img { width: 250px; height: auto; display: block; }
.desktop-menu ul {
  display: flex;
  gap: 3rem;
  margin: 0; padding: 0;
  list-style: none;
}
.desktop-menu a {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: 4px 0;
  transition: color .3s;
}
.desktop-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--magenta);
  transition: width .3s;
}
.desktop-menu a:hover::after,
.desktop-menu a.active::after { width: 100%; }

.menu-icon {
  display: none;
  width: 2rem; height: 2rem;
  padding: 0;
  background: none; border: 0;
  color: var(--white);
  cursor: pointer;
}
.menu-icon svg { width: 100%; height: 100%; }

@media (max-width: 1023px) {
  .site-header { padding: 1rem; }
  .desktop-menu { display: none; }
  .menu-icon#open-button { display: block; }
  .btn-contact { display: none; }
  .site-logo img { width: 180px; }
}

/* ---- Mobile fullscreen menu ---- */
.fullscreen-menu {
  position: fixed;
  inset: 0 0 0 -100%;
  width: 100%; height: 100%;
  z-index: 999;
  background: #333;
  transition: left .5s ease-in-out;
  left: -100%;
}
.fullscreen-menu.open { left: 0; }
.fullscreen-menu #close-button {
  display: block;
  position: absolute;
  top: 2rem; right: 1.5rem;
}
.fullscreen-menu nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fullscreen-menu ul {
  list-style: none;
  margin: 0; padding: 0;
  text-align: center;
}
.fullscreen-menu li { margin: 1rem 0; }
.fullscreen-menu a {
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 2rem;
  transition: color .3s;
}
.fullscreen-menu a:hover,
.fullscreen-menu a.active { color: var(--magenta); }
@media (min-width: 1024px) { .fullscreen-menu { display: none; } }

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  text-align: center;
  background: linear-gradient(rgba(37,35,35,.6), rgba(37,35,35,.6)),
              url("wp-content/uploads/2024/10/freshly-painted-kitchen-1024x768.webp") center/cover no-repeat;
}
.hero-content { max-width: 60rem; }
.hero-content h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  line-height: 1.1;
  color: var(--white);
  margin: 0 0 1.25rem;
  animation: heroFadeInUp .9s ease-out both;
}
.hero-sub {
  color: rgba(255,255,255,.92);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.6;
  max-width: 44rem;
  margin: 0 auto 2rem;
  animation: heroFadeInUp .9s ease-out .15s both;
}
.btn-hero {
  font-size: 1rem;
  padding: 1.1rem 2.5rem;
  animation: heroFadeInUp .9s ease-out .3s both;
}
@media (max-width: 1024px) {
  .hero { min-height: 70vh; }
}
@media (max-width: 767px) {
  .hero {
    background-image: linear-gradient(rgba(37,35,35,.6), rgba(37,35,35,.6)),
                      url("wp-content/uploads/2024/10/freshly-painted-kitchen-1-768x576.webp");
    padding: 7rem 1rem 5rem;
    min-height: 80vh;
  }
}

/* ===================================================================
   ABOUT
   =================================================================== */
.about h2 { max-width: none; }
.about p { max-width: none; margin: 0 0 1.5rem; color: #000; }

/* ===================================================================
   PROJECT TILES
   =================================================================== */
.top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.tile {
  position: relative;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.top-grid .tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--ink) 100%);
}
.tile-label {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  padding-bottom: 1rem;
}
@media (max-width: 767px) {
  .top-grid { grid-template-columns: 1fr; gap: 16px; }
  .bottom-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
  }
}

/* ===================================================================
   CAROUSELS (shared)
   =================================================================== */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.carousel-viewport { overflow: hidden; flex: 1; }
.carousel-track {
  display: flex;
  transition: transform .5s ease;
}
.carousel-btn {
  flex: 0 0 auto;
  background: var(--magenta);
  color: var(--white);
  border: 0;
  width: 2.75rem; height: 2.75rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background .3s;
  z-index: 2;
}
.carousel-btn:hover { background: var(--ink); }

/* Recent work: full container width, buttons overlap the outer edges */
.recent .carousel { display: block; position: relative; }
.recent .carousel-viewport { width: 100%; }
.recent .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}
.recent .carousel-btn.prev { left: 0; }
.recent .carousel-btn.next { right: 0; }
.recent .carousel-track { gap: 24px; }            /* 24px gap between images */
.recent .carousel-track > figure {
  flex: 0 0 calc((100% - 48px) / 3);              /* 3 across, 2 gaps of 24px, no outer padding */
  margin: 0;
  padding: 0;
}
.recent .carousel-track img { aspect-ratio: 1; object-fit: cover; width: 100%; }
@media (max-width: 1024px) {
  .recent .carousel-track > figure { flex-basis: calc((100% - 24px) / 2); }
}
@media (max-width: 767px)  {
  .recent .carousel-track > figure { flex-basis: 100%; }
}

/* Testimonials: 1 per view, centred */
.testimonials .carousel { display: block; position: relative; }
.testimonials .carousel-viewport { width: 100%; }
.testimonials .carousel-track > blockquote {
  flex: 0 0 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 clamp(3rem, 8vw, 6rem);
  text-align: center;
  color: var(--white);
  font-size: 1rem;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.testimonials .stars {
  display: block;
  width: 120px;
  margin: 1.25rem auto 0;
}
.testimonials .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: transparent;
  color: var(--white);
  font-size: 2rem;
  width: 2.5rem;
}
.testimonials .carousel-btn.prev { left: 0; }
.testimonials .carousel-btn.next { right: 0; }
.testimonials .carousel-btn:hover { color: var(--magenta); background: transparent; }

/* ===================================================================
   WHY CHOOSE ME  +  CONTACT  (two-column)
   =================================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 1024px) { .two-col { gap: 3rem; } }
@media (max-width: 767px)  { .two-col { grid-template-columns: 1fr; gap: 2rem; } }

.choose-image {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
}
.choose-text h2 { color: var(--ink); }
.choose-text p { margin: 0 0 1.5rem; }

.check-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  color: var(--ink);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--magenta);
  font-weight: 700;
}

/* ===================================================================
   CONTACT FORM
   =================================================================== */
.contact-form .row { display: flex; gap: 2rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: #000;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  padding: .5rem 0 1rem;
  margin-bottom: 2rem;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { opacity: 1; color: var(--grey); }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--magenta); }

.contact-info p { margin: 0 0 1.5rem; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin-bottom: .75rem; }
.contact-link {
  color: var(--ink);
  transition: color .3s;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 700;
}
.contact-link .ico { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; color: var(--magenta); }
.contact-link:hover { color: var(--magenta); }
.contact-link.light { color: var(--white); display: block; font-weight: 400; }
.contact-link.light:hover { color: var(--magenta); }

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 4rem 2rem 4rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
.footer-logo { width: 250px; }
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: var(--white);
  transition: background .3s, color .3s, border-color .3s;
}
.footer-social a:hover { background: var(--magenta); border-color: var(--magenta); color: var(--white); }
.footer-social svg { width: 1.15rem; height: 1.15rem; }
.footer-nav ul { display: flex; flex-direction: column; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.footer-nav a { transition: color .3s; }
.footer-nav a:hover { color: var(--magenta); }
.footer-contact { margin-left: auto; }
.credit {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center;
  font-size: .9rem;
}
.ryan-link { color: var(--white); transition: text-decoration .3s; }
.ryan-link:hover { text-decoration: underline; }
@media (max-width: 767px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-contact { margin-left: 0; }
  .footer-nav ul { justify-content: center; flex-wrap: wrap; }
  .footer-brand { align-items: center; }
  .footer-social { justify-content: center; }
}

/* ===================================================================
   ABOUT PAGE
   =================================================================== */
/* Short page hero with background image + overlay */
.page-hero {
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10rem 2rem 6rem;
  text-align: center;
  background: linear-gradient(rgba(37,35,35,.6), rgba(37,35,35,.6)),
              url("wp-content/uploads/2024/10/461589598_1059203376000314_1788474546148483851_n.jpg") center/cover no-repeat;
}
.page-hero h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--white);
  margin: 0;
  animation: heroFadeInUp .9s ease-out both;
}

/* My Values: image column */
.values-image {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
}
/* Light heading + light text when a two-col block sits on a dark section */
.section-dark h2,
.section-dark p,
.section-dark .check-list li { color: var(--white); }

/* Services grid (6 tiles, 3-up) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.services-grid .tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--ink) 100%);
}
@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .services-grid { grid-template-columns: 1fr; } }

/* ===================================================================
   GALLERY PAGE
   =================================================================== */
.gallery-grid {
  column-count: 4;
  column-gap: 12px;
}
.gallery-item {
  display: block;
  margin: 0 0 12px;
  break-inside: avoid;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform .4s ease, filter .4s ease;
}
.gallery-item:hover img { transform: scale(1.04); filter: brightness(1.05); }
@media (max-width: 1024px) { .gallery-grid { column-count: 3; } }
@media (max-width: 767px)  { .gallery-grid { column-count: 2; } }
@media (max-width: 420px)  { .gallery-grid { column-count: 1; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 19, 19, .94);
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto; height: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox button {
  position: absolute;
  background: none; border: 0;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 1rem;
  transition: color .3s;
}
.lightbox button:hover { color: var(--magenta); }
.lb-close { top: .5rem; right: 1rem; }
.lb-prev  { left: .5rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: .5rem; top: 50%; transform: translateY(-50%); }

/* ===================================================================
   SERVICES PAGE
   =================================================================== */
.service-image {
  aspect-ratio: 4 / 3;
  /*min-height: 300px;*/
  background-size: cover;
  background-position: center;
}
.service-text h2 { color: var(--ink); margin-bottom: 1rem; }
.service-text p  { color: #000; margin: 0 0 1.5rem; }
/* alternate: image on the right for "reverse" sections (desktop only) */
@media (min-width: 768px) {
  .two-col.reverse .service-image { order: 2; }
}

/* ===================================================================
   FORM FEEDBACK + HONEYPOT + ACCESSIBILITY
   =================================================================== */
/* Honeypot field — hidden from people, visible to bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Form status messages (set by script.js after submit) */
.form-status        { margin: .75rem 0 0; font-weight: 600; min-height: 1.2em; }
.form-status.ok     { color: #1a7f37; }
.form-status.err    { color: #c0392b; }

/* Skip-to-content link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #252323;
  color: #fff;
  padding: .6rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ===================================================================
   404 PAGE
   =================================================================== */
.error-404 {
  text-align: center;
  padding: 5rem 1.5rem;
}
.error-404 h1 { font-size: clamp(3rem, 10vw, 6rem); margin: 0 0 .5rem; }
.error-404 p  { margin: 0 0 2rem; }

/* ===================================================================
   HERO TITLE ENTRANCE — fade in + rise on page load
   =================================================================== */
@keyframes heroFadeInUp {
  from { opacity: 0; transform: translateY(1.75rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-content h1,
  .hero-sub,
  .btn-hero,
  .page-hero h1 { animation: none; }
}
