/* ===== J&W Custom Painting — shared styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0f1830;
  --navy: #16264f;
  --navy-600: #1f3a72;
  --navy-400: #3a5ba0;
  --accent: #c8202e;
  --accent-600: #a5161f;
  --accent-soft: #e8636d;
  --cream: #eef2fa;
  --paper: #ffffff;
  --line: #d9e0ee;
  --muted: #586079;
  --muted-light: #8a93a0;

  --shadow-sm: 0 1px 2px rgba(15,24,48,.04), 0 2px 6px rgba(22,38,79,.06);
  --shadow-md: 0 4px 10px rgba(22,38,79,.07), 0 14px 28px rgba(22,38,79,.09);
  --shadow-lg: 0 8px 18px rgba(22,38,79,.08), 0 26px 50px rgba(15,24,48,.14);
  --shadow-accent: 0 8px 20px rgba(200,32,46,.22), 0 16px 40px rgba(200,32,46,.16);

  --radius: 18px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }

main { display: block; }

/* accessible skip link for keyboard users (also a small SEO/UX signal) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0; outline: 3px solid #fff; outline-offset: -3px; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { letter-spacing: -0.035em; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---- grain overlay ---- */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---- eyebrow ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-600);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.eyebrow.center::before { display: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  padding: 15px 26px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s var(--ease), color .25s var(--ease);
  will-change: transform;
}
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(200,32,46,.3), 0 22px 50px rgba(200,32,46,.2); }
.btn-primary:active { transform: translateY(-1px) scale(.99); }

.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); }
.btn-ghost:hover { transform: translateY(-3px); background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); }
.btn-ghost:active { transform: translateY(-1px) scale(.99); }

.btn-dark { background: var(--navy); color: #fff; box-shadow: var(--shadow-md); }
.btn-dark:hover { transform: translateY(-3px); background: var(--navy-600); box-shadow: var(--shadow-lg); }
.btn-dark:active { transform: translateY(-1px) scale(.99); }

/* ---- header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(22,38,79,.06); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  display: block;
}
.brand-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; line-height: 1; }
.brand-sub { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--accent-600); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--ink); }

.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--navy); transition: color .25s var(--ease); }
.nav-phone:hover { color: var(--accent-600); }
.nav-links a:focus-visible, .nav-phone:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 5px; }

/* ---- services dropdown ---- */
.nav-dropdown { position: relative; display: flex; }
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 6px; }
.nav-dropdown-trigger .chev { transition: transform .3s var(--ease); margin-top: 1px; }
.nav-dropdown:hover .chev, .nav-dropdown:focus-within .chev { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  min-width: 254px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s;
  z-index: 60;
}
/* invisible hover bridge so the header-to-menu gap doesn't dismiss it */
.dropdown-menu::before { content: ""; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  font-size: 14.5px; font-weight: 600; color: var(--navy);
  padding: 10px 14px; border-radius: 10px; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.dropdown-menu a::after { display: none; }
.dropdown-menu a:hover, .dropdown-menu a:focus-visible {
  background: rgba(200,32,46,.08); color: var(--accent-600); transform: translateX(4px); outline: none;
}

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; margin: 5px 0; transition: transform .3s var(--ease), opacity .3s var(--ease); }

/* mobile drawer — hidden on desktop, revealed via toggle under 880px */
.mobile-menu { display: none; }

/* ---- section scaffolding ---- */
.section { position: relative; padding: 110px 0; }
.section-head { max-width: 640px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-title { font-size: clamp(30px, 4vw, 46px); margin-top: 16px; }
.section-lead { color: var(--muted); font-size: 18px; margin-top: 18px; }

/* ---- cards ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #d2dbed; }

/* ---- reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #c7cdd6; position: relative; overflow: hidden; }
.site-footer a { color: #c7cdd6; transition: color .25s var(--ease); }
.site-footer a:hover { color: var(--accent-soft); }

/* ---- image treatment ---- */
.img-treat { position: relative; overflow: hidden; border-radius: var(--radius); }
.img-treat img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.img-treat::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,24,48,.55), rgba(15,24,48,0) 55%);
}
.img-treat:hover img { transform: scale(1.05); }

/* ---- crisp photo tiles (native 348x348 square sources, shown near 1:1 to stay sharp) ---- */
.photo-grid { display: grid; gap: 14px; }
.photo-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.photo-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.photo-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.photo-tile {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.photo-tile img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .9s var(--ease);
}
.photo-cap { display: none; }
.photo-tile:hover img,
.photo-tile:focus-visible img { transform: scale(1.06); }
.photo-tile:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
@media (max-width: 880px) {
  .photo-grid.cols-3, .photo-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .photo-grid.cols-3, .photo-grid.cols-4 { grid-template-columns: 1fr 1fr; }
}

/* ---- infinite marquee gallery ---- */
.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee-scroll 70s linear infinite;
  will-change: transform;
}
.marquee-track.rev { animation-direction: reverse; }
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee .photo-tile {
  flex: 0 0 clamp(220px, 23vw, 300px);
  width: clamp(220px, 23vw, 300px);
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 600px) {
  .marquee .photo-tile { flex-basis: 70vw; width: 70vw; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---- mobile menu ---- */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    z-index: 49;
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a { font-weight: 600; font-size: 17px; padding: 14px 8px; border-radius: 12px; color: var(--navy); }
  .mobile-menu a:hover { background: rgba(200,32,46,.08); color: var(--accent-600); }
  .mobile-menu a.mm-sub { font-size: 15px; font-weight: 600; color: var(--muted); padding: 9px 8px 9px 24px; position: relative; }
  .mobile-menu a.mm-sub::before { content: ""; position: absolute; left: 10px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); transform: translateY(-50%); opacity: .55; }
  .mobile-menu a.mm-sub:hover { color: var(--accent-600); }
  .section { padding: 76px 0; }
}

/* phones: two-row header so the brand name, phone number + estimate button all stay visible */
@media (max-width: 600px) {
  .nav { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 12px; }
  .brand { order: 1; }
  .nav-toggle { order: 2; margin-left: auto; }
  .nav-cta { order: 3; width: 100%; justify-content: space-between; gap: 14px; }
  .nav-phone { white-space: nowrap; font-size: 15px; }
  .nav-cta .btn-primary { white-space: nowrap; padding: 11px 20px !important; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 17px; }
  .nav-phone { font-size: 14px; }
  .nav-phone svg { display: none; }
  .nav-cta .btn-primary { padding: 10px 15px !important; }
}

/* ---- collapse multi-column layouts on mobile ---- */
@media (max-width: 768px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="order:2"] { order: 0 !important; }
  [style*="bottom:-26px"][style*="left:-26px"] { left: 0 !important; }
}

/* ---- carousel ---- */
.carousel { position: relative; }
.carousel-viewport {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  background: var(--ink);
}
.carousel-track {
  display: flex;
  transition: transform .6s var(--ease);
  will-change: transform;
}
.carousel-slide {
  position: relative;
  min-width: 100%;
  aspect-ratio: 16/9;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,24,48,.78) 0%, rgba(15,24,48,.1) 45%, transparent 70%);
}
.carousel-caption {
  position: absolute;
  left: 28px; bottom: 26px; right: 28px;
  z-index: 2;
  color: #fff;
}
.carousel-caption .tag {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-soft);
  background: rgba(200,32,46,.16);
  border: 1px solid rgba(232,99,109,.4);
  padding: 5px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.carousel-caption h3 { font-size: clamp(22px, 3vw, 30px); }
.carousel-caption p { color: #c7cdd6; font-size: 15px; margin-top: 6px; }

.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.92);
  color: var(--navy);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 3;
  transition: transform .3s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.carousel-btn:hover { background: var(--accent); color: #fff; transform: translateY(-50%) scale(1.08); }
.carousel-btn:active { transform: translateY(-50%) scale(.96); }
.carousel-btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.carousel-btn.prev { left: 18px; }
.carousel-btn.next { right: 18px; }

.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: #c4cfe6;
  transition: transform .3s var(--ease), background .3s var(--ease), width .3s var(--ease);
}
.carousel-dot:hover { background: var(--accent-soft); }
.carousel-dot.active { background: var(--accent); width: 30px; border-radius: 999px; }
.carousel-dot:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }

@media (max-width: 768px) {
  .carousel-btn { width: 42px; height: 42px; }
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }
  .carousel-caption { left: 18px; right: 18px; bottom: 18px; }
}

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