/* MemorySmith main site — extra components on top of styles.css
   (campaign base). Keeps the same colour tokens / fonts. */

/* top utility bar */
.topbar { background: var(--navy); color: #cdd9ee; font-size: .85rem; }
.topbar .wrap { display:flex; justify-content:space-between; align-items:center; min-height:38px; gap:12px; }
.topbar a { color:#fff; }
.topbar .social { display:flex; gap:14px; align-items:center; }
.topbar .social a { opacity:.9; }
@media (max-width:620px){ .topbar .tagline { display:none; } }
/* Give the top-bar phone link a >=24px tap height without changing its look (WCAG 2.5.8). */
.topbar a[href^="tel:"] { display:inline-flex; align-items:center; min-height:24px; }

/* hero trust line */
.trust { display:flex; align-items:center; gap:10px; margin-top:18px; color:var(--slate); font-weight:600; font-size:.98rem; flex-wrap:wrap; }
.stars { color:#f5a623; letter-spacing:2px; font-size:1.05rem; }

/* services chips grid */
.svc-grid { display:grid; gap:14px; grid-template-columns:1fr; align-items:start; }
@media (min-width:560px){ .svc-grid { grid-template-columns:1fr 1fr; } }
@media (min-width:860px){ .svc-grid { grid-template-columns:1fr 1fr 1fr; } }
/* expandable service cards (native <details>) */
.svc { display:block; background:#fff; border:1px solid var(--line); border-radius:16px; color:var(--ink);
  overflow:hidden; transition:border-color .15s, box-shadow .15s; }
.svc:hover { border-color:#d4def0; box-shadow:0 10px 26px rgba(20,35,59,.08); }
.svc[open] { border-color:#cdd3ee; box-shadow:0 14px 32px rgba(79,70,229,.10); }
.svc summary { display:flex; align-items:center; gap:12px; padding:16px 18px; font-weight:600;
  cursor:pointer; list-style:none; }
.svc summary::-webkit-details-marker { display:none; }
.svc .ico { font-size:1.4rem; }
.svc .chev { margin-left:auto; color:var(--accent); font-size:1.4rem; line-height:1;
  transition:transform .2s ease; }
.svc[open] .chev { transform:rotate(90deg); }
.svc p { margin:0; padding:0 18px 18px 48px; color:var(--slate); font-size:.94rem; line-height:1.6; }
@media (prefers-reduced-motion: no-preference){
  .svc[open] p { animation:heroIn .35s ease both; }
}

/* pillars */
.pillars { display:grid; gap:22px; }
@media (min-width:720px){ .pillars { grid-template-columns:1fr 1fr; } }
.pillar { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:26px; }
.pillar h3 { color:var(--accent-dark); }
.pillar p { color:var(--slate); margin:0; }

/* included / care-plan panel */
.included { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:30px; }
.included ul { list-style:none; margin:18px 0 0; padding:0; display:grid; gap:12px; }
@media (min-width:640px){ .included ul { grid-template-columns:1fr 1fr; } }
.included li { position:relative; padding-left:30px; color:var(--body); text-transform:capitalize; }
.included li::before { content:"✓"; position:absolute; left:0; top:0; color:#fff; background:var(--ok);
  width:20px; height:20px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:800; }

/* quote */
.quote { background:var(--bg-alt); border-left:4px solid var(--accent); border-radius:12px; padding:28px 30px; }
.quote p { font-size:1.2rem; color:var(--ink); font-style:italic; margin:0 0 10px; }
.quote .by { color:var(--muted); font-weight:700; font-style:normal; }

/* reviews */
.reviews { display:grid; gap:18px; }
@media (min-width:720px){ .reviews { grid-template-columns:repeat(3,1fr); } }
.review { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:22px; }
.review .stars { font-size:1rem; margin-bottom:8px; }
.review p { color:var(--slate); font-size:.95rem; margin:0 0 12px; }
.review .name { font-weight:700; color:var(--ink); font-size:.95rem; }
.rating-head { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:26px; }
.rating-head .big { font-size:1.6rem; font-weight:800; color:var(--ink); letter-spacing:.5px; }

/* reviews sliding panel (carousel) */
.rev-carousel { position:relative; }
.rev-viewport { overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth;
  -ms-overflow-style:none; scrollbar-width:none; }
.rev-viewport::-webkit-scrollbar { display:none; }
.rev-track { display:flex; gap:18px; padding:4px 2px; }
.rev-track .review { flex:0 0 100%; scroll-snap-align:start; }
@media (min-width:620px){ .rev-track .review { flex-basis:calc((100% - 18px)/2); } }
@media (min-width:960px){ .rev-track .review { flex-basis:calc((100% - 36px)/3); } }
.rev-nav { position:absolute; top:42%; transform:translateY(-50%); z-index:2; width:42px; height:42px;
  border-radius:50%; border:1px solid var(--line); background:#fff; color:var(--accent); font-size:1.5rem;
  line-height:1; cursor:pointer; box-shadow:0 6px 18px rgba(20,35,59,.14);
  display:flex; align-items:center; justify-content:center; transition:background .15s, transform .15s; }
.rev-nav:hover { background:var(--accent-soft); }
.rev-nav:active { transform:translateY(-50%) scale(.94); }
.rev-nav.prev { left:-8px; }
.rev-nav.next { right:-8px; }
.rev-dots { display:flex; gap:2px; justify-content:center; margin-top:14px; }
/* Visible dot stays 9px; padding + content-box give a >=24px clickable target (WCAG 2.5.8). */
.rev-dots button { box-sizing:content-box; width:9px; height:9px; padding:8px; background-clip:content-box;
  border-radius:999px; border:0; background:var(--line); cursor:pointer; transition:width .2s, background .2s; }
.rev-dots button.active { background:var(--accent); background-clip:content-box; width:24px; border-radius:999px; }

/* ===== modern polish (overrides the campaign base) ===== */

/* gradient pill buttons with depth + lift */
.btn { background:linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow:0 10px 24px rgba(79,70,229,.30);
  border-radius:999px; transition:transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { background:linear-gradient(135deg, var(--accent-dark), #6d28d9); transform:translateY(-2px); box-shadow:0 14px 32px rgba(79,70,229,.38); }
.btn.secondary { background:#fff; color:var(--accent); border-radius:999px; box-shadow:0 6px 16px rgba(17,24,58,.07); }
.btn.secondary:hover { background:var(--accent-soft); transform:translateY(-2px); }
.nav .nav-cta { background:linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow:0 6px 16px rgba(79,70,229,.26); }

/* eyebrow pill */
.hero .eyebrow { background:linear-gradient(135deg,#ece9ff,#e7e0ff); color:var(--accent-dark); box-shadow:0 2px 10px rgba(79,70,229,.14); }

/* accent underline beneath section headings */
.section-head h2 { position:relative; }
.section-head h2::after { content:""; display:block; width:56px; height:4px; margin-top:14px;
  border-radius:4px; background:linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* soft corner glow on alternating sections */
.alt { position:relative; }
.alt::before { content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(520px 280px at 100% 0%, rgba(79,70,229,.06), transparent 60%); }
.alt > .wrap { position:relative; z-index:1; }

/* cards: rounder, with an animated gradient top edge */
.card, .pillar, .tool, .review, .svc, .shot { border-radius:16px; }
.card { position:relative; overflow:hidden; }
.card::before { content:""; position:absolute; top:0; left:0; right:0; height:3px; transform:scaleX(0);
  transform-origin:left; transition:transform .25s ease; background:linear-gradient(90deg, var(--accent), var(--accent-2)); }
.card:hover::before { transform:scaleX(1); }

/* hero entrance animation (respects reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  /* heroIn is used by the expandable service cards (.svc[open] p). */
  @keyframes heroIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
  /* Hero entrance animation removed on purpose: above-the-fold entrance animations
     (flagged by Lighthouse as a non-composited animation) can stop it finalising an LCP (NO_LCP).
     The hero now renders statically so the headline is recorded as the LCP. */
}

/* trust / credibility band */
.trust-band { background:#fff; border-bottom:1px solid var(--line); }
.trust-band .wrap { display:grid; gap:18px 26px; grid-template-columns:1fr 1fr; padding:26px 20px; }
@media (min-width:860px){ .trust-band .wrap { grid-template-columns:repeat(3,1fr); } }
.trust-item { display:flex; flex-direction:column; gap:3px; padding-left:16px; border-left:3px solid; border-image:linear-gradient(var(--accent),var(--accent-2)) 1; }
.trust-item strong { color:var(--ink); font-family:var(--font-head); font-size:1.02rem; }
.trust-item span { color:var(--muted); font-size:.9rem; }

/* opening hours table */
.hours { width:100%; max-width:440px; border-collapse:collapse; margin-top:10px; }
.hours th { text-align:left; font-weight:600; color:var(--ink); padding:11px 0; border-bottom:1px solid var(--line); }
.hours td { text-align:right; color:var(--slate); padding:11px 0; border-bottom:1px solid var(--line); white-space:nowrap; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom:0; }

/* cookie consent */
.cc-banner { position:fixed; left:16px; right:16px; bottom:16px; z-index:9999; max-width:760px; margin:0 auto;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 12px 44px rgba(16,24,40,.20);
  padding:18px 20px; display:flex; gap:16px 20px; align-items:center; flex-wrap:wrap; }
.cc-banner h2 { font-size:1.02rem; margin:0 0 4px; }
.cc-banner p { margin:0; color:var(--slate); font-size:.92rem; }
.cc-banner a { color:var(--accent); }
.cc-copy { flex:1 1 300px; }
.cc-actions { display:flex; gap:10px; flex-wrap:wrap; }
.cc-btn { font-family:var(--font-head); font-weight:600; font-size:.9rem; border-radius:999px; padding:11px 20px;
  min-height:44px; cursor:pointer; border:1px solid var(--accent); transition:background .15s, border-color .15s; }
.cc-accept { background:var(--accent); color:#fff; }
.cc-accept:hover, .cc-accept:focus { background:var(--accent-2); border-color:var(--accent-2); }
.cc-decline { background:#fff; color:var(--accent); }
.cc-decline:hover, .cc-decline:focus { background:#f4f4ff; }
.cc-toggle { position:fixed; left:14px; bottom:14px; z-index:9998; min-width:44px; min-height:44px; border-radius:50%;
  border:1px solid var(--line); background:#fff; cursor:pointer; box-shadow:0 4px 16px rgba(16,24,40,.16);
  font-size:1.2rem; line-height:1; color:var(--slate); transition:color .15s, border-color .15s; }
.cc-toggle:hover, .cc-toggle:focus { color:var(--accent); border-color:var(--accent); }
@media (max-width:560px){
  .cc-banner { left:10px; right:10px; bottom:10px; flex-direction:column; align-items:stretch; }
  .cc-actions { justify-content:stretch; }
  .cc-btn { flex:1; }
}

/* breadcrumbs */
.crumbs { font-size:.85rem; color:var(--muted); margin-bottom:14px; }
.crumbs a { color:var(--muted); text-decoration:none; border-bottom:1px solid transparent; }
.crumbs a:hover, .crumbs a:focus { color:var(--accent); border-bottom-color:currentColor; }
.crumbs span[aria-hidden] { margin:0 4px; }

/* areas-we-cover grid */
.areas { display:grid; gap:14px; grid-template-columns:1fr; }
@media (min-width:640px){ .areas { grid-template-columns:1fr 1fr; } }
@media (min-width:900px){ .areas { grid-template-columns:1fr 1fr 1fr; } }
.area-link { display:block; background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px; text-decoration:none; color:var(--ink); font-family:var(--font-head); font-weight:600;
  transition:border-color .15s, transform .15s; }
.area-link:hover, .area-link:focus { border-color:var(--accent); transform:translateY(-2px); }
.area-link span { display:block; color:var(--muted); font-size:.85rem; font-weight:400; font-family:var(--font); margin-top:3px; }

/* support tools cards */
.tools { display:grid; gap:18px; }
@media (min-width:720px){ .tools { grid-template-columns:1fr 1fr; } }
.tool { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:24px; }
.tool h3 { margin-bottom:6px; }
.tool p { color:var(--slate); font-size:.95rem; }

/* ============================================================
   Modern v2 — brings the main site in line with the refreshed
   Crane Valley design language (keeping MemorySmith's own brand).
   Glassy scroll-aware header, mobile menu, squircle icons,
   airier spacing, bolder type, and gentle scroll-reveal.
   ============================================================ */

/* --- Airier type & rhythm --- */
.hero h1 { font-size:clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing:-.03em; }
h2 { font-size:clamp(1.6rem, 3.4vw, 2.4rem); }
section { padding:clamp(54px, 8vw, 92px) 0; }
.section-head { max-width:720px; margin-bottom:42px; }
.section-head p { font-size:1.12rem; }
.hero p.lead { font-size:clamp(1.1rem, 2.2vw, 1.3rem); }

/* --- Glassy, scroll-aware header --- */
.site-header { background:rgba(255,255,255,.82); backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px); border-bottom-color:transparent;
  transition:box-shadow .25s ease, border-color .25s ease, background .25s ease; }
.site-header.scrolled { box-shadow:0 6px 24px rgba(17,24,58,.08); border-bottom-color:var(--line); background:rgba(255,255,255,.9); }
.site-header .wrap { min-height:72px; position:relative; }
.brand-logo { height:42px; }

/* nav: pill hover */
.nav-links { gap:4px; }
.nav-links a { padding:8px 12px; border-radius:999px; transition:color .15s, background .15s; }
.nav-links a:hover { background:var(--accent-soft); text-decoration:none; }
.nav .nav-cta { padding:10px 18px; transition:transform .15s ease, box-shadow .2s ease; }
.nav .nav-cta:hover { transform:translateY(-2px); }

/* eyebrow gets a leading dot (matches Crane Valley) */
.hero .eyebrow { display:inline-flex; align-items:center; gap:8px; }
.hero .eyebrow::before { content:""; width:7px; height:7px; border-radius:50%;
  background:linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* --- Mobile hamburger menu --- */
.nav-toggle { display:none; width:46px; height:46px; border:1px solid var(--line); background:#fff;
  border-radius:12px; cursor:pointer; align-items:center; justify-content:center; flex-direction:column; gap:5px; padding:0; }
.nav-toggle-bar { width:22px; height:2px; background:var(--ink); border-radius:2px; transition:transform .22s ease, opacity .22s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

@media (max-width:820px){
  /* Hamburger shows only when JS can drive it; without JS the nav simply wraps and stays usable. */
  .js .nav-toggle { display:flex; }
  .js .nav { position:absolute; top:calc(100% + 1px); left:0; right:0; z-index:90;
    flex-direction:column; align-items:stretch; gap:6px; background:#fff; border-bottom:1px solid var(--line);
    box-shadow:0 20px 50px rgba(17,24,58,.14); padding:14px 20px 20px;
    max-height:0; overflow:hidden; opacity:0; visibility:hidden;
    transition:max-height .3s ease, opacity .2s ease, visibility .2s ease; }
  .js .nav.open { max-height:84vh; overflow:auto; opacity:1; visibility:visible; }
  .js .nav-links { display:flex; flex-direction:column; gap:2px; }
  .js .nav-links a { padding:13px 12px; font-size:1.02rem; }
  .js .nav .nav-cta { justify-content:center; text-align:center; margin-top:10px; }
  /* no-JS fallback: keep the links visible and wrapping (overrides the base display:none) */
  html:not(.js) .nav-links { display:flex; flex-wrap:wrap; gap:6px 14px; }
}

/* --- Squircle icons on cards / services / tools --- */
.card .icon {
  width:56px; height:56px; border-radius:16px; display:grid; place-items:center;
  font-size:1.55rem; margin-bottom:16px;
  background:linear-gradient(135deg, rgba(79,70,229,.12), rgba(124,58,237,.14));
  box-shadow:inset 0 0 0 1px rgba(79,70,229,.14);
}
.svc .ico {
  width:40px; height:40px; border-radius:12px; display:inline-grid; place-items:center;
  font-size:1.2rem; flex:none;
  background:linear-gradient(135deg, rgba(79,70,229,.12), rgba(124,58,237,.14));
  box-shadow:inset 0 0 0 1px rgba(79,70,229,.12);
}

/* --- Card depth polish --- */
.card:hover, .pillar:hover, .tool:hover { box-shadow:0 18px 44px rgba(20,35,59,.12); transform:translateY(-4px); border-color:#d4def0; }
.pillar, .tool { transition:box-shadow .2s ease, transform .2s ease, border-color .2s ease; }

/* --- Footer accent line --- */
.site-footer { position:relative; }
.site-footer::after { content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* --- Scroll reveal (only active with JS; reduced-motion safe) --- */
.js .reveal { opacity:0; transform:translateY(22px);
  transition:opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); will-change:opacity, transform; }
.js .reveal.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){ .js .reveal { opacity:1; transform:none; } }
