/* Stout Funeral Homes and Crematory — site styles */
:root {
  --teal: #2b5164;
  --teal-dark: #1d3a49;
  --ink: #14262f;
  --slate: #8cabb8;
  --slate-soft: #e4edf1;
  --wheat: #b07c32;
  --wheat-soft: #f6efe3;
  --cream: #fbf9f5;
  --text: #26343b;
  --muted: #55646b;
  --line: #d9e2e6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--cream); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .4em; }
:focus-visible { outline: 3px solid var(--wheat); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .7em 1.4em; border-radius: 999px; border: 2px solid var(--teal); background: var(--teal); color: #fff; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; font-family: var(--sans); line-height: 1.2; }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--teal); }
.btn-light:hover { background: var(--wheat-soft); border-color: var(--wheat-soft); color: var(--teal-dark); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.8); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Top bar */
.topbar { background: var(--teal); color: #fff; font-size: .95rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #fff; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar .note { opacity: .92; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 118px; height: auto; }
.brand-text { display: none; font-family: var(--serif); line-height: 1.25; }
.brand-text strong { display: block; font-size: 1rem; font-weight: 600; color: var(--ink); }
.brand-text span { display: block; font-size: .9rem; color: var(--muted); font-style: italic; }
@media (min-width: 560px) { .brand-text { display: block; } }

.nav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: 600 1rem var(--sans); cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; content: ""; }
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }

.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(20,38,47,.12); max-height: calc(100vh - 120px); overflow-y: auto; }
.main-nav.open { display: block; }
.main-nav > ul { list-style: none; margin: 0; padding: 8px 20px 20px; }
.main-nav li { margin: 0; }
.main-nav a, .main-nav .sub-toggle { display: flex; align-items: center; min-height: 44px; padding: 6px 4px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; background: none; border: 0; width: 100%; text-align: left; font-family: var(--sans); cursor: pointer; }
.main-nav > ul > li { border-bottom: 1px solid var(--line); }
.main-nav .sub { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; display: none; }
.main-nav .sub a { font-weight: 500; color: var(--muted); min-height: 40px; }
.main-nav .sub-toggle[aria-expanded="true"] + .sub { display: block; }
.main-nav .sub-toggle::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 6px; }
.main-nav .sub-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
.main-nav a[aria-current="page"] { color: var(--teal); }
.main-nav .nav-cta a { color: var(--wheat); }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .site-header { position: relative; }
  .site-header .wrap { flex-wrap: wrap; justify-content: center; padding-top: 14px; padding-bottom: 6px; gap: 8px; }
  .brand img { width: 150px; }
  .brand-text strong { font-size: 1.1rem; }
  .main-nav { display: block; position: static; box-shadow: none; border: 0; border-top: 1px solid var(--line); max-height: none; overflow: visible; flex-basis: 100%; padding-top: 6px; }
  .main-nav > ul { display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0; }
  .main-nav > ul > li { border: 0; position: relative; }
  .main-nav a, .main-nav .sub-toggle { padding: 6px 10px; font-size: .97rem; width: auto; border-radius: 6px; white-space: nowrap; }
  .main-nav a:hover, .main-nav .sub-toggle:hover { background: var(--slate-soft); }
  .main-nav .sub-toggle::after { width: 6px; height: 6px; margin-left: 8px; margin-right: 0; margin-top: -3px; }
  .main-nav .sub { position: absolute; left: 0; top: 100%; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 30px rgba(20,38,47,.14); padding: 8px; margin: 0; }
  .main-nav .sub a { width: 100%; color: var(--text); }
  .main-nav li.has-sub:hover > .sub, .main-nav li.has-sub:focus-within > .sub { display: block; }
  .main-nav .nav-cta a { background: var(--teal); color: #fff; padding: 6px 16px; border-radius: 999px; margin-left: 6px; }
  .main-nav .nav-cta a:hover { background: var(--teal-dark); color: #fff; }
}

/* Hero */
.hero { position: relative; color: var(--ink); background: var(--wheat-soft) url("/assets/img/wheat-900.webp") center 30% / cover no-repeat; }
@media (min-width: 900px) { .hero { background-image: url("/assets/img/wheat-1800.webp"); } }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(251,249,245,.86) 0%, rgba(251,249,245,.78) 55%, rgba(251,249,245,.35) 100%); }
.hero .wrap { position: relative; padding-top: clamp(48px, 9vw, 110px); padding-bottom: clamp(56px, 10vw, 120px); text-align: center; }
.hero .eyebrow { font-family: var(--serif); font-style: italic; color: var(--teal); font-size: 1.15rem; margin-bottom: .5em; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); margin-bottom: .35em; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 680px; margin: 0 auto 1.6em; color: var(--text); }
.hero .btn-row { justify-content: center; }

.page-hero { background: var(--teal); color: #fff; }
.page-hero .wrap { padding-top: clamp(36px, 6vw, 64px); padding-bottom: clamp(32px, 5vw, 56px); }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { margin: .6em 0 0; max-width: 720px; font-size: 1.1rem; opacity: .95; }
.crumbs { font-size: .95rem; margin-bottom: .6em; }
.crumbs a { color: #fff; opacity: .9; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section.alt { background: #fff; }
.section.tint { background: var(--slate-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head p { color: var(--muted); }
.kicker { display: block; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wheat); font-weight: 700; margin-bottom: .5em; font-family: var(--sans); }

.notice { background: var(--slate); color: var(--ink); }
.notice .wrap { padding-top: 16px; padding-bottom: 16px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.1rem; }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr .9fr; gap: 56px; } .split.flip > :first-child { order: 2; } }
.photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(20,38,47,.14); }
.photo figcaption { background: #fff; padding: 10px 14px; font-size: .95rem; color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.3em; }
.prose > :first-child { margin-top: 0; }

.mission { border-left: 4px solid var(--wheat); background: var(--wheat-soft); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4em 0; }
.mission strong { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); margin-bottom: .3em; }

/* Cards */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); }
.card .more { margin-top: auto; font-weight: 600; text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.card .more::after { content: " →"; white-space: pre; }
.card img { border-radius: 8px; margin-bottom: 16px; }

/* Slider */
.slider { position: relative; max-width: 880px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(20,38,47,.16); background: var(--ink); }
.slides { position: relative; aspect-ratio: 587 / 301; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-controls { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; background: #fff; flex-wrap: wrap; }
.slider-controls button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font: 600 .95rem var(--sans); color: var(--ink); padding: 0 14px; }
.slider-controls button:hover { background: var(--slate-soft); }
.slider-controls .dot { min-width: 36px; padding: 0; }
.slider-controls .dot[aria-current="true"] { background: var(--teal); color: #fff; border-color: var(--teal); }

.loc-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 28px; }
.loc-list a { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.loc-list a:hover { border-color: var(--teal); }
.loc-list strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.loc-list span { color: var(--muted); font-size: .95rem; }

/* Obituaries */
.obits { --hp-ob-accent: #2b5164; }
.obits-actions { text-align: center; margin-top: 28px; }

/* Guide CTA */
.guide-cta { background: var(--teal) url("/assets/img/wheat-900.webp") center / cover; position: relative; color: #fff; }
.guide-cta::before { content: ""; position: absolute; inset: 0; background: rgba(29,58,73,.88); }
.guide-cta .wrap { position: relative; text-align: center; padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(48px, 7vw, 80px); }
.guide-cta h2 { color: #fff; }
.guide-cta p { max-width: 640px; margin: 0 auto 1.4em; font-size: 1.1rem; }
.guide-cta .btn-row { justify-content: center; }
.guide-box { background: var(--wheat-soft); border: 1px solid #e7d9bf; border-radius: var(--radius); padding: 24px; margin: 28px 0; }
.guide-box h2, .guide-box h3 { margin-top: 0; }

/* Testimonials */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin: 0; position: relative; }
.quote::before { content: "\201C"; font-family: var(--serif); font-size: 4rem; line-height: 1; color: var(--slate); position: absolute; top: 8px; left: 18px; }
.quote blockquote { margin: 0; padding-top: 28px; font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption { margin-top: 14px; font-weight: 600; color: var(--teal); }
.quote-grid { display: grid; gap: 20px; }
@media (min-width: 820px) { .quote-grid { grid-template-columns: 1fr 1fr; } }
.quote.feature { max-width: 760px; margin: 0 auto; text-align: center; }
.quote.feature::before { left: 50%; transform: translateX(-50%); }

/* Staff */
.staff-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.staff { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.staff img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 22%; background: var(--slate-soft); }
.staff .body { padding: 18px 20px 22px; }
.staff h3 { margin-bottom: .15em; }
.staff .role { color: var(--wheat); font-weight: 700; font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .7em; }
.staff p { font-size: 1rem; color: var(--muted); margin: 0; }
.staff.memoriam .role { color: var(--muted); text-transform: none; letter-spacing: 0; font-style: italic; font-weight: 500; }

/* Gallery */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.gallery img { border-radius: 8px; aspect-ratio: 700 / 469; object-fit: cover; width: 100%; }

/* Location details */
.loc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.loc-card address { font-style: normal; margin-bottom: 1em; }
.loc-card dl { margin: 0 0 1.2em; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.loc-card dt { font-weight: 600; color: var(--muted); }
.loc-card dd { margin: 0; }
.map { border: 0; width: 100%; height: 340px; border-radius: var(--radius); background: var(--slate-soft); }
.locations-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Services list */
.service-list { display: grid; gap: 18px; }
@media (min-width: 760px) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-list .card h3 { color: var(--teal); }
.products dt { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 1.15rem; margin-top: 1em; }
.products dd { margin: .2em 0 0; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink); min-height: 44px; list-style-position: outside; }
.faq details > div { padding: 0 20px 16px; }

/* Video */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); box-shadow: 0 10px 30px rgba(20,38,47,.16); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-grid { display: grid; gap: 22px; }
@media (min-width: 820px) { .video-grid { grid-template-columns: 1fr 1fr; } }
.video-grid figure { margin: 0; }
.video-grid figcaption { margin-top: 10px; font-weight: 600; color: var(--ink); }

/* Forms */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); }
.form .row { display: grid; gap: 16px; }
@media (min-width: 620px) { .form .row.two { grid-template-columns: 1fr 1fr; } .form .row.three { grid-template-columns: 2fr 1fr 1fr; } }
.form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); font-size: 1rem; }
.form .field { margin-bottom: 16px; }
.form input, .form textarea, .form select { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #b9c7cd; border-radius: 8px; background: #fff; color: var(--text); min-height: 48px; }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--teal); outline: 3px solid rgba(43,81,100,.2); }
.form .hint { font-size: .92rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #d8e3e8; padding: 56px 0 28px; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.25rem; margin-bottom: .8em; }
.footer-top { display: grid; gap: 28px; }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.2fr 3fr; gap: 48px; } }
.footer-brand img { width: 150px; background: #fff; border-radius: 8px; padding: 8px 10px; margin-bottom: 14px; }
.footer-brand p { margin: 0 0 .6em; }
.footer-locs { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer-locs h3 { color: #fff; font-size: 1.05rem; margin-bottom: .3em; }
.footer-locs h3 a { text-decoration: none; }
.footer-locs h3 a:hover { text-decoration: underline; }
.footer-locs address { font-style: normal; line-height: 1.55; }
.footer-locs a.tel, .footer-locs a.dir { display: inline-flex; align-items: center; min-height: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 36px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.15); list-style: none; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 18px; font-size: .95rem; color: #b8c7ce; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; padding-bottom: 24px; }
.footer-bottom p { margin: 0; }

/* Misc */
.center { text-align: center; }
.mt { margin-top: 28px; }
.small { font-size: .95rem; color: var(--muted); }
.pill-links { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 8px; }
.pill-links li { margin: 0; }
.pill-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }
.pill-links a[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.subnav { background: #fff; border-bottom: 1px solid var(--line); }
.subnav .wrap { padding-top: 14px; padding-bottom: 6px; }
.resource-list { list-style: none; padding: 0; }
.resource-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.resource-list h3 { margin-bottom: .3em; font-size: 1.15rem; }
.resource-list p { margin: 0; color: var(--muted); }
.info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-bottom: 28px; }
.info-grid .card { padding: 18px 20px; }
.info-grid h3 { font-size: 1.08rem; }
.info-grid p { margin: 0; color: var(--text); }
.milestones { display: grid; gap: 22px; }
@media (min-width: 760px) { .milestones { grid-template-columns: 1fr 1fr; } }
.milestones figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.milestones img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.milestones figcaption { padding: 16px 20px; }
.milestones figcaption strong { display: block; font-family: var(--serif); font-size: 1.12rem; color: var(--ink); margin-bottom: .3em; }
