/* J Waite & Son Funeral Directors — site styles */
:root {
  --green: #1a3c34;
  --green-deep: #122b26;
  --green-soft: #2a5348;
  --sage: #e8efe9;
  --cream: #f6f2ea;
  --cream-deep: #ebe4d7;
  --stone: #d4ccc0;
  --stone-dark: #9a9084;
  --brass: #9a7b4f;
  --brass-soft: #c4a574;
  --charcoal: #2a2a28;
  --ink: #3a3a36;
  --muted: #5f5c56;
  --white: #ffffff;
  --line: rgba(26, 60, 52, 0.14);
  --shadow: 0 12px 40px rgba(18, 43, 38, 0.08);
  --radius: 4px;
  --header-h: 4.5rem;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 72rem;
  --content: 42rem;
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green-soft);
}

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--green);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

/* Reassurance bar */
.reassure {
  background: var(--green-deep);
  color: var(--cream);
  text-align: center;
  font-size: 0.95rem;
  padding: 0.55rem 1rem;
}

.reassure a {
  color: var(--brass-soft);
  font-weight: 600;
  text-decoration: none;
}

.reassure a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 242, 234, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--green);
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.brand-tag {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}

.brand img {
  height: 2.4rem;
  width: auto;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--green);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--sage);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
}

.primary-nav a {
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--green);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--green-soft);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-secondary:hover {
  background: var(--sage);
  color: var(--green-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 242, 234, 0.45);
}

.btn-ghost:hover {
  background: rgba(246, 242, 234, 0.12);
  color: var(--white);
}

.btn-phone {
  background: var(--green);
  color: var(--cream);
  white-space: nowrap;
}

.btn-phone:hover {
  background: var(--green-soft);
  color: var(--white);
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.92rem;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

.section-tight {
  padding: 3rem 0;
}

.section-sage {
  background: var(--sage);
}

.section-green {
  background: var(--green);
  color: var(--cream);
}

.section-green a {
  color: var(--brass-soft);
}

.section-cream {
  background: var(--cream);
}

.section-white {
  background: var(--white);
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.section-green .eyebrow {
  color: var(--brass-soft);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-deep);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.section-green h1,
.section-green h2,
.section-green h3 {
  color: var(--cream);
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.55rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

.lede {
  font-size: 1.15rem;
  max-width: 40rem;
  color: var(--muted);
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-intro p {
  margin-top: 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 40rem);
  display: grid;
  align-items: end;
  color: var(--cream);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(18, 43, 38, 0.88) 0%, rgba(18, 43, 38, 0.55) 48%, rgba(18, 43, 38, 0.28) 100%),
    linear-gradient(to top, rgba(18, 43, 38, 0.75), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.25rem 3.5rem;
  width: 100%;
}

.hero h1 {
  color: var(--cream);
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero .lede {
  color: rgba(246, 242, 234, 0.9);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
}

.hero-meta {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: rgba(246, 242, 234, 0.78);
}

/* Cards / grids */
.grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.help-card,
.value-card,
.service-card,
.why-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius);
  height: 100%;
}

.help-card h3,
.value-card h3,
.service-card h3,
.why-card h3 {
  margin-bottom: 0.6rem;
}

.help-card p,
.value-card p,
.service-card p,
.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.service-card .price {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--green);
  margin: 0.85rem 0 0.5rem;
}

.service-card .note {
  font-size: 0.9rem;
  color: var(--muted);
}

.service-card ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink);
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.75rem;
  border-radius: var(--radius);
}

.pdf-frame {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 70vh;
}

.pdf-frame object,
.pdf-frame iframe {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 32rem;
  border: 0;
}

.pdf-fallback {
  margin: 0;
  padding: 1.25rem 1.5rem;
}

.price-summary summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style-position: outside;
}

.price-summary[open] summary {
  margin-bottom: 0.75rem;
}

.panel-soft {
  background: var(--sage);
  border: none;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.split img {
  width: 100%;
  height: 100%;
  max-height: 28rem;
  object-fit: cover;
  border-radius: var(--radius);
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.list-check li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brass);
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-num {
  counter-increment: step;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brass);
  min-width: 2rem;
}

.step-num::before {
  content: counter(step, decimal-leading-zero);
}

.step h3 {
  margin-bottom: 0.35rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

th, td {
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--sage);
  color: var(--green-deep);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

.price-reviewed {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 1rem;
}

.price-breakdown {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.price-row strong {
  white-space: nowrap;
  color: var(--green);
}

.price-total {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green-deep);
  margin: 1rem 0 0.5rem;
}

/* Testimonials */
.testimonials {
  display: grid;
  gap: 1.25rem;
}

.testimonial {
  background: var(--white);
  border-left: 3px solid var(--brass);
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}

.testimonial blockquote {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--charcoal);
}

.testimonial cite {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--muted);
}

.testimonial-carousel {
  position: relative;
}

.testimonial-slides {
  display: grid;
}

.testimonial-slide {
  display: none;
}

.testimonial-slide.is-active {
  display: block;
  animation: fadeIn 0.45s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.carousel-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-controls button {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
}

.carousel-controls button:hover {
  background: var(--sage);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--stone);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: none;
  padding: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.03);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 43, 38, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(960px, 100%);
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid rgba(246, 242, 234, 0.4);
  color: var(--cream);
  font-size: 1.25rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius);
}

/* FAQ */
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.65rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-deep);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--brass);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--charcoal);
}

.req {
  color: var(--brass);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--stone-dark);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--charcoal);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.radio-group {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.radio-group label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.form-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.form-success {
  display: none;
  background: var(--sage);
  border: 1px solid var(--line);
  padding: 1.25rem;
  border-radius: var(--radius);
}

.form-success.is-visible {
  display: block;
}

/* Page hero (inner) */
.page-hero {
  background:
    linear-gradient(120deg, var(--green-deep), var(--green)),
    var(--green);
  color: var(--cream);
  padding: 3.5rem 0 3rem;
}

.page-hero h1 {
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.page-hero .lede {
  color: rgba(246, 242, 234, 0.88);
  margin: 0;
}

.breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: rgba(246, 242, 234, 0.7);
}

.breadcrumbs a {
  color: var(--brass-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* CTA band */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cta-band p {
  margin: 0.35rem 0 0;
  max-width: 36rem;
  color: rgba(246, 242, 234, 0.85);
}

/* Footer */
.site-footer {
  background: var(--green-deep);
  color: rgba(246, 242, 234, 0.85);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.site-footer h2,
.site-footer h3 {
  color: var(--cream);
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
}

.site-footer a {
  color: rgba(246, 242, 234, 0.85);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brass-soft);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--cream);
  margin-bottom: 0.35rem;
}

.footer-bottom {
  border-top: 1px solid rgba(246, 242, 234, 0.15);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.mobile-call {
  display: none;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  box-shadow: var(--shadow);
}

/* Utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.text-center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.team-placeholder {
  border: 1px dashed var(--stone-dark);
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--muted);
}

/* Responsive */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }
  .primary-nav a {
    display: block;
    padding: 0.65rem 0;
    font-size: 1.05rem;
  }
  .header-actions .btn-secondary { display: none; }
  .header-inner { position: relative; }
  .mobile-call { display: inline-flex; }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .form-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; }
  .hero-content { padding-top: 3.5rem; }
  .section { padding: 3.25rem 0; }
  .header-actions .btn-phone span.hide-sm { display: none; }
}
