/* =============================================================================
   Spalding Mortuary — concept redesign by rainearcher
   Token-based on the agency design system. Vertical skin: dignified funeral home.
   Honors their existing teal wordmark; warm ivory surfaces, deep teal brand,
   candlelight-gold accent. Mobile-first, reverent, calm.
   ========================================================================== */

:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --bg:           #F7F5F1;
  --surface:      #FFFFFF;
  --surface-alt:  #EEEAE3;
  --line:         #DED8CE;

  --text:         #1B232A;
  --text-muted:   #4F5962;
  --text-faint:   #87909A;

  --inverse-bg:   #15242C;
  --inverse-bg-2: #1E323C;
  --inverse-text: #F7F5F1;
  --inverse-muted:#A8B6BD;

  --brand:        #2C7A9E;
  --brand-strong: #1B5874;
  --brand-hover:  #14455A;
  --accent:       #C2A063;   /* candlelight gold */

  --cta-bg:       var(--brand-strong);
  --cta-text:     #FFFFFF;
  --cta-shadow:   rgba(27, 88, 116, 0.30);

  --radius:       14px;
  --radius-sm:    9px;

  --shadow-soft:  0 2px 20px rgba(21, 36, 44, 0.07);
  --shadow-card:  0 4px 24px rgba(21, 36, 44, 0.10);
  --shadow-hover: 0 10px 38px rgba(21, 36, 44, 0.16);

  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:       0.15s;
  --t-med:        0.30s;

  --glow-1:       rgba(44, 122, 158, 0.14);
  --glow-2:       rgba(194, 160, 99, 0.12);

  --step-eyebrow: 12px;
  --step-h3:  clamp(19px, 3.2vw, 24px);
  --step-h2:  clamp(26px, 5vw, 42px);
  --step-h1:  clamp(30px, 5.4vw, 54px);
  --space-sm: 14px;
  --space-md: 26px;
  --space-lg: 52px;
  --space-xl: 80px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
  overflow-wrap: break-word;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--step-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--step-h3); }

p { margin: 0 0 1em; }
a { color: var(--brand-strong); text-decoration: none; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 12px;
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

section { padding: var(--space-lg) 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 13px 24px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  cursor: pointer; transition: transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  text-align: center;
}
.btn--primary {
  background: var(--cta-bg); color: var(--cta-text);
  box-shadow: 0 6px 20px var(--cta-shadow);
}
.btn--primary:hover { background: var(--brand-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--ghost {
  background: transparent; color: var(--brand-strong); border-color: var(--brand-strong);
}
.btn--ghost:hover { background: var(--brand-strong); color: #fff; }
.btn--light { background: var(--accent); color: #2a2316; border-color: var(--accent); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 64px;
}
.brand-logo img { height: 21px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 10px; }
/* compact header CTA on phones so logo + button never overflow at 360px */
.header-actions .btn--primary { min-height: 42px; padding: 10px 16px; font-size: 15px; }
.header-phone {
  display: none; font-weight: 600; color: var(--text); white-space: nowrap;
}
.header-phone span { color: var(--text-faint); font-weight: 500; font-size: 13px; display: block; line-height: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% -10%, var(--glow-2), transparent 60%),
    radial-gradient(90% 80% at -10% 110%, var(--glow-1), transparent 60%),
    var(--bg);
  padding: var(--space-lg) 0 var(--space-xl);
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); align-items: center; }
.hero .tagline {
  font-family: var(--font-display); font-style: italic; font-size: clamp(18px, 4.4vw, 23px);
  color: var(--brand-strong); margin: 0 0 18px; line-height: 1.4;
}
.hero h1 { margin-bottom: 16px; }
.hero-sub { font-size: clamp(16px, 2.4vw, 19px); color: var(--text-muted); max-width: 54ch; margin-bottom: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-cta .btn { flex: 1 1 auto; min-width: 160px; }
.hero-trust { font-size: 14px; color: var(--text-faint); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hero-trust strong { color: var(--text-muted); font-weight: 600; }
.hero-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); aspect-ratio: 4 / 3;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- trust strip ---------- */
.trust-strip { background: var(--inverse-bg); color: var(--inverse-text); padding: 22px 0; }
.trust-strip .wrap {
  display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: center; text-align: center;
}
.trust-strip .item {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500;
  color: var(--inverse-text);
}
.trust-strip .item svg { flex: none; color: var(--accent); }

/* ---------- section heads ---------- */
.section-head { max-width: 60ch; margin: 0 auto var(--space-md); text-align: center; }
.section-head p { color: var(--text-muted); margin: 0; }

/* ---------- service cards ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow-soft);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-alt); color: var(--brand-strong); margin-bottom: 14px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); margin: 0; font-size: 15.5px; }

/* ---------- why / differentiators ---------- */
.why { background: var(--surface-alt); }
.why-list { display: grid; gap: 14px; grid-template-columns: 1fr; }
.why-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
}
.why-item .chk { flex: none; color: var(--brand); margin-top: 2px; }
.why-item h3 { font-size: 18px; margin-bottom: 4px; }
.why-item p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- chapel band ---------- */
.chapel-band { padding: var(--space-md) 0 0; }
.chapel-figure { max-width: 560px; margin: 0 auto; text-align: center; }
.chapel-figure img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.chapel-figure figcaption {
  font-family: var(--font-display); font-style: italic; color: var(--text-muted);
  font-size: 15px; margin-top: 12px;
}

/* ---------- about / history ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); align-items: center; }
.about-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.about-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.about-body p { color: var(--text-muted); }
.stat-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; }
.stat .n { font-family: var(--font-display); font-size: 34px; color: var(--brand-strong); line-height: 1; }
.stat .l { font-size: 13px; color: var(--text-faint); margin-top: 4px; }

/* ---------- flowers ---------- */
.flowers { background: var(--surface-alt); }
.flower-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.flower {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; text-align: center;
}
.flower h3 { font-size: 17px; margin-bottom: 4px; }
.flower .price { font-weight: 700; color: var(--brand-strong); font-family: var(--font-body); }
.flowers .note { text-align: center; color: var(--text-muted); margin-top: 20px; font-size: 15px; }

/* ---------- pricing / consultation ---------- */
.pricing-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-soft); max-width: 720px; margin: 0 auto;
  text-align: center;
}
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; display: inline-block; }
.pricing-card li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--text-muted); }
.pricing-card li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 8px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

/* ---------- testimonials ---------- */
.testimonials { background: var(--inverse-bg); color: var(--inverse-text); }
.testimonials .eyebrow { color: var(--accent); }
.testimonials .section-head h2 { color: var(--inverse-text); }
.t-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.quote {
  background: var(--inverse-bg-2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 24px 22px;
}
.quote .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; font-size: 15px; }
.quote p { color: var(--inverse-text); font-size: 15.5px; margin: 0 0 14px; }
.quote .who { color: var(--inverse-muted); font-size: 14px; font-weight: 600; }

/* ---------- contact / final ---------- */
.contact { background: var(--surface); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.contact-info p { margin: 0 0 4px; }
.contact-info .lbl { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); font-weight: 600; margin-top: 18px; }
.contact-info a { color: var(--text); font-weight: 600; }
.contact-cta {
  background: var(--inverse-bg); color: var(--inverse-text);
  border-radius: var(--radius); padding: 30px 26px; text-align: center;
  display: flex; flex-direction: column; justify-content: center;
}
.contact-cta h3 { color: var(--inverse-text); }
.contact-cta .big-phone {
  font-family: var(--font-display); font-size: clamp(26px, 6vw, 34px); color: var(--accent);
  margin: 6px 0 16px; display: inline-block;
}
.contact-cta p { color: var(--inverse-muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--inverse-bg-2); color: var(--inverse-muted); padding: 34px 0 96px; font-size: 14px; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: var(--inverse-text); }
.site-footer .legal { color: var(--inverse-muted); font-size: 13px; line-height: 1.6; }
.site-footer .credit { color: var(--accent); font-size: 13px; }

/* ---------- sticky mobile call bar ---------- */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--brand-strong); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 16px; font-weight: 600; font-size: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.18);
}
.call-bar svg { flex: none; }
.call-bar span { color: rgba(255,255,255,0.78); font-weight: 500; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .flower-grid { grid-template-columns: repeat(4, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  body { font-size: 18px; }
  .header-phone { display: block; }
  .brand-logo img { height: 26px; }
  .header-actions .btn--primary { min-height: 48px; padding: 13px 24px; font-size: 16px; }
  .call-bar { display: none; }
  .site-footer { padding-bottom: 34px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-lg); }
  .hero-media { aspect-ratio: 5 / 6; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .why-list { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 0.95fr 1.05fr; }
  .t-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}

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