/* ================================================================
   Bax Bros. Cemetery Monuments — main stylesheet
   Edit CSS variables below to retheme the site.
   ================================================================ */

:root {
  --navy-topbar: #212a39;
  --navy-footer: #001a33;
  --gold: #bf9101;
  --gold-hover: #d4a520;
  --white: #ffffff;
  --text: #000000;
  --gray-border: #cccccc;
  --gray-bg: #f5f5f5;

  --font-body: "Times New Roman", Times, serif;
  --font-nav: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --topbar-h: 50px;
  --gold-bar-h: 12px;
  --container-max: 960px;

  --z-topbar: 100;
  --z-drawer-backdrop: 190;
  --z-drawer: 200;
}

/* ---------- reset ---------- */

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

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  min-height: 100vh;
  display: flex; flex-direction: column;
  line-height: 1.4;
}

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

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

button { font: inherit; cursor: pointer; }

/* ---------- layout primitives ---------- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.site-main { flex: 1 0 auto; padding: 0 0 40px; }
/* On non-home pages, restore inner padding so page-title has breathing room */
body:not([data-nav="home"]) .site-main { padding: 40px 0 60px; }

/* ---------- topbar (nav) ---------- */

.topbar {
  background: var(--navy-topbar);
  color: var(--white);
  height: var(--topbar-h);
  position: sticky; top: 0; z-index: var(--z-topbar);
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px;
}

.nav-desktop {
  display: flex;
  gap: 90px;
}
.nav-desktop a {
  color: var(--white);
  font-family: var(--font-nav);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s ease;
}
.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--gold);
  text-decoration: none;
}

.burger {
  display: none;
  background: transparent;
  border: 0;
  color: var(--white);
  padding: 8px;
  margin-left: auto;
  width: 42px; height: 42px;
  position: relative;
}
.burger .bar {
  display: block; position: absolute; left: 8px; right: 8px;
  height: 2px; background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease;
}
.burger .bar:nth-child(1) { top: 12px; }
.burger .bar:nth-child(2) { top: 20px; }
.burger .bar:nth-child(3) { top: 28px; }
.burger[aria-expanded="true"] .bar:nth-child(1) { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .bar:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.drawer {
  position: fixed;
  top: var(--topbar-h); left: 0; right: 0;
  background: var(--navy-topbar);
  color: var(--white);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  z-index: var(--z-drawer);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.drawer.is-open { max-height: calc(100vh - var(--topbar-h)); }
.drawer nav { display: flex; flex-direction: column; padding: 6px 0 12px; }
.drawer nav a {
  color: var(--white);
  padding: 14px 24px;
  font-family: var(--font-nav);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.drawer nav a:first-child { border-top: 0; }
.drawer nav a.is-active { color: var(--gold); }

/* ---------- site header (logo + tagline) ---------- */

.site-header {
  padding: 9px 0;
  background: var(--white);
}
.site-header .container {
  display: flex; align-items: center; gap: 40px;
}
.site-header .logo {
  flex: 0 0 auto;
}
.site-header .logo img {
  max-height: 120px;
  width: auto;
}
.site-header .tagline {
  flex: 1;
  text-align: center;
  font-family: var(--font-body);
  font-size: 30px;
  line-height: 1.25;
  color: var(--text);
  padding-right: 80px; /* balance logo width */
}

/* ---------- gold accent bar ---------- */

.gold-bar {
  background: var(--gold);
  height: var(--gold-bar-h);
  width: 100%;
}

/* ---------- home hero (slider) ---------- */

.hero {
  padding: 0 0 20px;
  background: var(--white);
}
.hero .container { max-width: 1000px; }

.slider {
  position: relative;
  overflow: hidden;
  aspect-ratio: 977 / 300;
  background: #000;
}
.slider .slides {
  position: absolute; inset: 0;
}
.slider .slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.slider .slide.is-active { opacity: 1; }
.slider .slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.slider .dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.55);
  border-radius: 12px;
  z-index: 2;
}
.slider .dots button {
  width: 12px; height: 12px;
  padding: 0; border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.2s ease;
}
.slider .dots button.is-active {
  background: var(--gold);
}

.slider .arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: var(--white);
  border: 0; width: 40px; height: 60px;
  font-size: 24px;
  display: grid; place-items: center;
  opacity: 0.5;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
}
.slider:hover .arrow { opacity: 1; }
.slider .arrow:hover { background: rgba(0,0,0,0.6); }
.slider .arrow.prev { left: 0; }
.slider .arrow.next { right: 0; }

/* ---------- home body copy ---------- */

.home-intro {
  padding: 40px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-body);
  font-size: 27px;
  line-height: 1.35;
  color: var(--text);
}
.home-intro p { margin-bottom: 1.4em; }
.home-intro p:last-child { margin-bottom: 0; }
.home-intro a { color: var(--gold); }

/* ---------- page titles ---------- */

.page-title {
  font-family: var(--font-nav);
  font-size: 34px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

/* ---------- about page ---------- */

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
}
.about-cols p { margin-bottom: 1.2em; }
.about-cols ul { list-style: none; padding-left: 1.4em; margin-bottom: 1.2em; }
.about-cols ul li { position: relative; margin-bottom: 4px; }
.about-cols ul li::before { content: "-"; position: absolute; left: -1em; }
.about-cols .staff-note {
  font-style: italic;
  margin-top: 32px;
}

/* ---------- gallery grid ---------- */

.gallery-intro {
  font-family: var(--font-body);
  font-size: 17px;
  margin-bottom: 30px;
  color: var(--text);
  max-width: 800px;
  line-height: 1.5;
}
.gallery-intro p { margin-bottom: 0.8em; }
.gallery-intro p:last-child { margin-bottom: 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 24px;
}
.gallery-grid .card { text-align: center; }
.gallery-grid .card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--gray-bg);
  overflow: hidden;
}
.gallery-grid .card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-grid .card:hover .thumb img { transform: scale(1.03); }
.gallery-grid .card .label {
  display: block;
  margin-top: 10px;
  font-family: Roboto, var(--font-nav);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* ---------- contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-grid h2 {
  font-family: var(--font-nav);
  font-size: 30px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}

.contact-info .rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 20px;
  row-gap: 14px;
  font-family: var(--font-nav);
  font-size: 17px;
  align-items: baseline;
}
.contact-info .rows dt {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
}
.contact-info .rows dt.mixed { text-transform: none; }
.contact-info .rows dd {
  margin: 0;
  color: var(--text);
}
.contact-info .rows dd.gap { grid-column: 1 / -1; height: 8px; }
.contact-info a { color: var(--gold); }
.contact-info .address-block {
  margin-top: 32px;
  font-family: var(--font-nav);
  font-size: 17px;
}
.contact-info .address-block strong {
  display: block;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  font-size: 17px;
}
.contact-info .address-block p {
  font-family: var(--font-body);
  font-size: 18px;
  margin: 0;
  line-height: 1.4;
}

/* ---------- contact form ---------- */

.contact-form .field { margin-bottom: 18px; }
.contact-form label {
  display: block;
  font-family: var(--font-nav);
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}
.contact-form label .required { color: #cc0000; margin-left: 4px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gray-border);
  border-radius: 2px;
  font-family: var(--font-nav);
  font-size: 15px;
  background: var(--white);
  color: var(--text);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: -1px;
  border-color: var(--gold);
}
.contact-form textarea {
  resize: vertical;
  min-height: 180px;
  font-family: var(--font-nav);
}
.contact-form button[type="submit"] {
  background: var(--gold);
  color: var(--white);
  border: 0;
  padding: 12px 32px;
  font-family: var(--font-nav);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 8px;
  transition: background 0.15s ease;
}
.contact-form button[type="submit"]:hover { background: #a37c00; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy-footer);
  color: var(--white);
  padding: 34px 0 30px;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  justify-content: flex-end;
}
.site-footer .footer-info {
  text-align: right;
  min-width: 300px;
}
.site-footer .footer-info h3 {
  font-family: var(--font-nav);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--white);
}
.site-footer .footer-info hr {
  border: 0;
  border-top: 1px dotted rgba(255,255,255,0.45);
  margin: 6px 0;
}
.site-footer .footer-info p {
  font-family: var(--font-nav);
  font-size: 15px;
  margin: 0;
  color: var(--white);
}

/* ---------- thanks page ---------- */

.thanks-page {
  min-height: 60vh;
  display: grid; place-items: center;
  text-align: center; padding: 4rem 1rem;
  font-family: var(--font-body);
}
.thanks-page h1 {
  font-family: var(--font-nav);
  font-size: 30px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.thanks-page p { font-size: 20px; margin-bottom: 10px; }
.thanks-page .btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 28px;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-nav);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 2px;
}
.thanks-page .btn:hover { background: #a37c00; text-decoration: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root { --topbar-h: 44px; }

  .topbar {
    justify-content: flex-end;
    padding: 0 8px 0 20px;
  }
  .nav-desktop { display: none; }
  .burger { display: block; }

  .site-header { padding: 14px 0; }
  .site-header .container {
    flex-direction: row;
    text-align: left;
    gap: 14px;
    padding: 0 14px;
    align-items: center;
    justify-content: flex-start;
  }
  .site-header .logo { flex: 0 0 auto; }
  .site-header .logo img { max-height: 100px; width: auto; }
  .site-header .tagline {
    flex: 1;
    font-size: 18px;
    padding-right: 0;
    text-align: center;
    line-height: 1.25;
  }

  .home-intro { font-size: 20px; padding: 30px 20px 40px; }

  .hero { padding: 0; }
  .hero .container { padding: 0; max-width: none; }

  .about-cols { grid-template-columns: 1fr; gap: 20px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .gallery-grid .card .label { font-size: 16px; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid h2 { font-size: 26px; }
  .page-title { font-size: 28px; }

  .site-footer .container { justify-content: flex-end; padding-right: 20px; }
  .site-footer .footer-info { text-align: right; min-width: 0; }
  .site-footer .footer-info h3 { font-size: 20px; }
  .site-footer .footer-info p { font-size: 14px; }
}

@media (max-width: 560px) {
  .site-header .logo img { max-height: 85px; }
  .site-header .tagline { font-size: 15px; }
  .home-intro { font-size: 18px; }
  .contact-grid h2 { font-size: 22px; }

  .slider .dots { bottom: 6px; }
  .slider .dots button { width: 10px; height: 10px; }
  .slider .arrow { width: 32px; height: 44px; font-size: 18px; }
}

/* body.menu-open — no scroll behind the drawer */
body.menu-open { overflow: hidden; }
