/* ============================================================
   Pisasale & Son's Home Remodeling — design system
   Warm premium: cream/white, deep charcoal, bronze accent
   ============================================================ */

:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --ink: #1C1917;
  --ink-soft: #44403C;
  --ink-mute: #78716C;
  --line: #E7E0D5;
  --accent: #A16207;
  --accent-deep: #854D0E;
  --accent-tint: #FDF3E3;
  --shadow-sm: 0 1px 2px rgb(28 25 23 / 0.06), 0 2px 8px rgb(28 25 23 / 0.05);
  --shadow-md: 0 2px 4px rgb(28 25 23 / 0.07), 0 12px 28px rgb(28 25 23 / 0.10);
  --radius: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
  text-decoration: none;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }

.kicker {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.lead {
  font-size: 1.1875rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-deep); box-shadow: var(--shadow-md); }

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

.btn--light {
  background: #fff;
  color: var(--ink);
}
.btn--light:hover { background: var(--accent-tint); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(250 247 242 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.2;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9375rem;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] {
  color: var(--accent-deep);
  font-weight: 600;
}
.nav-cta { white-space: nowrap; padding: 0.6rem 1.25rem; font-size: 0.9375rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
    padding: 0.5rem 0 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.55rem clamp(1.25rem, 4vw, 2.5rem); }
  .nav-links a { font-size: 1.0625rem; display: block; }
  .nav-cta { margin-inline: clamp(1.25rem, 4vw, 2.5rem); justify-content: center; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
}

.hero-media, .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgb(15 12 8 / 0.82) 0%, rgb(15 12 8 / 0.35) 45%, rgb(15 12 8 / 0.25) 100%);
}

.hero-inner { padding-block: clamp(3rem, 7vw, 5.5rem); width: 100%; }

.hero .kicker { color: #F5C56B; }

.hero h1 { max-width: 17ch; color: #fff; }

.hero p {
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  max-width: 52ch;
  color: rgb(255 255 255 / 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* ---------- Trust bar ---------- */

.trust {
  background: var(--ink);
  color: #E7E5E4;
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem clamp(1.5rem, 5vw, 4rem);
  padding-block: 1.1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.trust-inner span { display: inline-flex; align-items: center; gap: 0.55rem; }
.trust-inner svg { color: #F5C56B; flex: none; }
.trust a { color: inherit; }

/* ---------- Service cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.card-body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; }
.card-body h3 { margin-bottom: 0.5rem; }
.card-body p { color: var(--ink-soft); font-size: 0.975rem; }

/* ---------- Feature split (services page) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split + .split { margin-top: clamp(3rem, 7vw, 5.5rem); }
.split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.split h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.75rem; }
.split p { color: var(--ink-soft); }
.split ul { margin: 1rem 0 0 1.2rem; color: var(--ink-soft); }
.split ul li { margin-bottom: 0.35rem; }

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split.flip .split-media { order: -1; }
}
@media (min-width: 801px) {
  .split.flip .split-media { order: 1; }
}

/* ---------- Featured work strip (home) ---------- */

.work-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.work-strip a {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.work-strip img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  transition: transform 0.35s ease;
}
.work-strip a:hover img { transform: scale(1.04); }
.work-strip a::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(15 12 8 / 0.45), transparent 45%);
}
.work-strip figcaption {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 0.9rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  z-index: 1;
}
@media (max-width: 700px) {
  .work-strip { grid-template-columns: 1fr; }
  .work-strip img { aspect-ratio: 4 / 3; }
}

/* ---------- Pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.pillar { text-align: center; padding: 0 0.5rem; }
.pillar-icon {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid; place-items: center;
  background: var(--accent-tint);
  color: var(--accent-deep);
  border-radius: 50%;
}
.pillar h3 { margin-bottom: 0.4rem; font-size: 1.2rem; }
.pillar p { color: var(--ink-soft); font-size: 0.975rem; }

/* ---------- Video tour ---------- */

.video-split {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 800px) {
  .video-split { grid-template-columns: 1fr; }
  .video-split .phone-frame { margin-inline: auto; }
}

.phone-frame {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 0 8px var(--ink);
  background: var(--ink);
  max-width: 380px;
  width: 100%;
}
.phone-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--ink);
}

/* ---------- Testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}
.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.quote .stars { color: var(--accent); letter-spacing: 0.15em; margin-bottom: 0.9rem; font-size: 0.9rem; }
.quote blockquote {
  font-size: 1rem;
  color: var(--ink-soft);
  flex: 1;
}
.quote cite {
  display: block;
  margin-top: 1.1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  color: #fff;
  isolation: isolate;
  text-align: center;
}
.cta-band .cta-media, .cta-band .cta-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: rgb(15 12 8 / 0.72);
}
.cta-band h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.cta-band p { color: rgb(255 255 255 / 0.9); margin-top: 0.9rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Gallery (projects) ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
}
.filter-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.gallery {
  columns: 3 300px;
  column-gap: 1.25rem;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: none;
  padding: 0;
  background: var(--line);
  cursor: zoom-in;
  display: block;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item .tag {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  background: rgb(15 12 8 / 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.gallery-item.hidden { display: none; }

.gallery-count { color: var(--ink-mute); font-size: 0.9375rem; margin-bottom: 1.25rem; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgb(12 10 8 / 0.94);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgb(255 255 255 / 0.85);
  font-size: 0.9375rem;
  text-align: center;
  max-width: 80ch;
  padding-inline: 1rem;
}
.lightbox button {
  position: absolute;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.25);
  color: #fff;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}
.lightbox button:hover { background: rgb(255 255 255 / 0.22); }
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }
  .lightbox img { max-width: 100vw; max-height: 78vh; }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 850px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(161 98 7 / 0.15);
}
.field textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }

.contact-info h3 { margin-bottom: 0.4rem; }
.contact-info .info-block { margin-bottom: 1.75rem; }
.contact-info a.big {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--ink);
}
.contact-info a.big:hover { color: var(--accent-deep); text-decoration: none; }
.contact-info p { color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #D6D3D1;
  padding-block: 3rem 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.site-footer .brand { color: #fff; }
.site-footer .brand small { color: #A8A29E; }
.site-footer p { font-size: 0.9375rem; color: #A8A29E; max-width: 40ch; }
.site-footer h4 {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.8rem;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.45rem; }
.site-footer a { color: #D6D3D1; font-size: 0.9375rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #A8A29E;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.page-hero p { margin-top: 0.9rem; }

/* ---------- Form success note ---------- */
.form-note {
  background: var(--accent-tint);
  border: 1px solid #EACB8A;
  color: var(--accent-deep);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9375rem;
  margin-bottom: 1.15rem;
  display: none;
}
.form-note.show { display: block; }
