:root {
  --him-ink: #24302a;
  --him-ink-deep: #111614;
  --him-coal: #3b3832;
  --him-paper: #f8f3ea;
  --him-paper-soft: #fbf7ee;
  --him-paper-light: #fffdf7;
  --him-bone: #ede4d6;
  --him-line: #d2c4b3;
  --him-muted: #746e66;
  --him-gum: #647d68;
  --him-gum-dark: #3f574b;
  --him-clay: #9e6752;
  --him-gold: #b49361;
  --him-blue: #496d79;
  --him-shadow: 0 20px 44px rgba(36, 48, 42, 0.12);
  --him-content: 760px;
  --him-wide: 1180px;
  --him-pad: clamp(18px, 4vw, 40px);
  --him-section-pad: clamp(54px, 8vw, 96px);
  --him-radius: 8px;
  --him-body-font: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --him-serif: Georgia, "Times New Roman", serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--him-paper);
  color: var(--him-ink);
  font-family: var(--him-body-font);
  line-height: 1.65;
}

body .wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.72), rgba(248, 243, 234, 0.94) 34rem),
    var(--him-paper);
}

body .wp-site-blocks > main {
  flex: 1 0 auto;
}

body :where(.wp-site-blocks) > * {
  margin-block-start: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--him-gum-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--him-clay);
}

:where(a, button, input, textarea, select, summary, .wp-block-button__link):focus-visible {
  outline: 3px solid rgba(180, 147, 97, 0.52);
  outline-offset: 3px;
}

::selection {
  background: rgba(180, 147, 97, 0.32);
}

.him-site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(210, 196, 179, 0.86);
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(16px);
}

.admin-bar .him-site-header-wrap {
  top: 32px;
}

.him-site-header {
  width: min(var(--him-wide), calc(100% - (var(--him-pad) * 2)));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

.him-brand,
.him-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.him-brand-link {
  color: var(--him-ink);
  text-decoration: none;
}

.him-brand-logo,
.him-brand-mark img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: block;
  box-shadow: 0 10px 20px rgba(17, 22, 20, 0.12);
}

.him-brand-mark {
  margin: 0;
}

.him-brand-text,
.him-site-title {
  margin: 0;
  color: var(--him-ink);
  font-family: var(--him-serif);
  font-size: clamp(1.18rem, 2vw, 1.48rem);
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.him-site-title a,
.him-footer-brand a,
.him-footer-brand {
  color: inherit;
  text-decoration: none;
}

.him-primary-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--him-ink);
  font-size: 0.96rem;
}

.him-primary-navigation .wp-block-navigation__container,
.him-primary-menu,
.him-footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.him-primary-navigation a,
.him-primary-menu a,
.him-footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--him-ink);
  text-decoration: none;
  line-height: 1.2;
}

.him-primary-navigation a:hover,
.him-primary-menu a:hover,
.him-footer-nav a:hover {
  background: rgba(237, 228, 214, 0.72);
  color: var(--him-clay);
}

.him-primary-navigation a[href*="him_action=new"],
.him-primary-menu a[href*="him_action=new"] {
  background: var(--him-clay);
  color: var(--him-paper-light);
  font-weight: 800;
}

.him-primary-navigation a[href*="him_action=new"]:hover,
.him-primary-menu a[href*="him_action=new"]:hover {
  background: var(--him-ink);
  color: var(--him-paper-light);
}

.him-primary-navigation .wp-block-navigation__responsive-container-open,
.him-primary-navigation .wp-block-navigation__responsive-container-close {
  border-radius: 8px;
  padding: 8px;
}

.him-primary-navigation .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--him-paper-light);
  color: var(--him-ink);
  padding: var(--him-pad);
}

.him-site-footer-wrap {
  border-top: 1px solid var(--him-line);
  background: var(--him-ink);
  color: var(--him-paper-light);
}

.him-site-footer {
  width: min(var(--him-wide), calc(100% - (var(--him-pad) * 2)));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 58px) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.him-site-footer p {
  margin: 8px 0 0;
  max-width: 36rem;
  color: rgba(255, 253, 247, 0.74);
}

.him-footer-brand {
  margin: 0;
  color: var(--him-paper-light);
  font-family: var(--him-serif);
  font-size: 1.35rem;
  line-height: 1.1;
  font-weight: 600;
}

.him-footer-nav a,
.him-site-footer .wp-block-navigation-item__content {
  color: var(--him-paper-light);
}

.him-footer-nav a:hover,
.him-site-footer .wp-block-navigation-item__content:hover {
  background: rgba(255, 253, 247, 0.1);
  color: #f3dfc1;
}

.him-main .wp-block-post-content {
  margin-block-start: 0;
}

.him-main .wp-block-post-content > :where(:not(.alignfull)) {
  max-width: var(--him-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--him-pad);
  padding-right: var(--him-pad);
}

.him-main .wp-block-post-content > .alignwide {
  max-width: var(--him-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--him-pad);
  padding-right: var(--him-pad);
}

.him-main .wp-block-post-content > .alignfull {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.him-section {
  padding: var(--him-section-pad) 0;
}

.him-section + .him-section {
  margin-block-start: 0;
}

.him-section--light {
  background: var(--him-paper-light);
}

.him-section--bone {
  background: var(--him-bone);
}

.him-section--ink {
  background: var(--him-ink);
  color: var(--him-paper-light);
}

.him-section--ink h1,
.him-section--ink h2,
.him-section--ink h3,
.him-section--ink p,
.him-section--ink li {
  color: inherit;
}

.him-inner {
  width: min(var(--him-wide), calc(100% - (var(--him-pad) * 2)));
  margin-left: auto;
  margin-right: auto;
}

.him-narrow {
  max-width: var(--him-content);
}

.him-eyebrow {
  margin: 0 0 12px;
  color: var(--him-clay);
  font-size: 0.92rem;
  font-weight: 800;
}

.him-hero-section {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  padding: clamp(44px, 7vw, 86px) 0 clamp(34px, 5vw, 64px);
  border-bottom: 1px solid var(--him-line);
  background:
    linear-gradient(90deg, rgba(248, 243, 234, 0.96) 0%, rgba(248, 243, 234, 0.86) 47%, rgba(248, 243, 234, 0.32) 100%),
    var(--him-paper);
}

.him-hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.him-hero-copy {
  max-width: 660px;
}

.him-hero-copy h1,
.him-page-hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 0.98;
}

.him-hero-copy p,
.him-page-hero p,
.him-section-lead {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.55;
  color: var(--him-muted);
}

.him-hero-copy .wp-block-buttons,
.him-page-hero .wp-block-buttons {
  margin-top: 28px;
}

.him-hero-image {
  position: relative;
  margin: 0;
}

.him-hero-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--him-shadow);
}

.him-hero-note {
  max-width: 44rem;
  margin: clamp(22px, 4vw, 38px) auto 0;
  color: var(--him-muted);
  text-align: center;
}

.wp-block-button__link,
.wp-element-button,
button,
input[type="submit"] {
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--him-clay);
  color: var(--him-paper-light);
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--him-ink);
  color: var(--him-paper-light);
  transform: translateY(-1px);
}

.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button__link.has-background.is-style-outline,
.is-style-outline > .wp-block-button__link {
  border-color: var(--him-line);
  background: var(--him-paper-light);
  color: var(--him-ink);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.is-style-outline > .wp-block-button__link:hover {
  border-color: var(--him-clay);
  background: var(--him-paper-light);
  color: var(--him-clay);
}

.him-section-title {
  max-width: 780px;
  margin: 0 0 clamp(24px, 5vw, 42px);
}

.him-section-title h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.45rem);
}

.him-section-title p {
  margin: 14px 0 0;
  color: var(--him-muted);
  font-size: 1.1rem;
}

.him-card-grid,
.him-price-grid,
.him-step-grid,
.him-stat-grid,
.him-faq-list {
  display: grid;
  gap: 18px;
}

.him-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.him-step-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.him-price-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.him-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.him-feature-card,
.him-price-card,
.him-step,
.him-stat,
.him-faq-item,
.him-contact-panel {
  border: 1px solid var(--him-line);
  border-radius: 8px;
  background: var(--him-paper-light);
  color: var(--him-ink);
}

.him-feature-card,
.him-price-card,
.him-step,
.him-stat,
.him-faq-item {
  padding: clamp(20px, 3vw, 30px);
}

.him-feature-card h3,
.him-price-card h2,
.him-step h3,
.him-stat h3,
.him-faq-item h2 {
  margin: 0 0 10px;
  font-size: clamp(1.28rem, 2.3vw, 1.7rem);
}

.him-feature-card p,
.him-price-card p,
.him-step p,
.him-stat p,
.him-faq-item p,
.him-price-card li {
  color: var(--him-muted);
}

.him-feature-card p:last-child,
.him-step p:last-child,
.him-stat p:last-child,
.him-faq-item p:last-child {
  margin-bottom: 0;
}

.him-card-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--him-bone);
  color: var(--him-clay);
  font-weight: 900;
}

.him-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--him-ink);
  color: var(--him-paper-light);
  font-weight: 900;
}

.him-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}

.him-split--reverse {
  grid-template-columns: minmax(320px, 1fr) minmax(0, 0.92fr);
}

.him-split figure {
  margin: 0;
}

.him-split img,
.him-qr-art img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--him-shadow);
}

.him-qr-art img {
  background: var(--him-paper-light);
  object-fit: contain;
}

.him-soft-callout {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--him-line);
  border-left: 6px solid var(--him-gold);
  border-radius: 8px;
  background: var(--him-paper-light);
}

.him-soft-callout p:last-child {
  margin-bottom: 0;
}

.him-price-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.him-price-card--featured {
  border-color: rgba(158, 103, 82, 0.65);
  background: #fffaf1;
  box-shadow: var(--him-shadow);
}

.him-price {
  margin: 6px 0 18px;
  font-family: var(--him-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--him-clay);
}

.him-price small {
  display: block;
  margin-top: 6px;
  color: var(--him-muted);
  font-family: var(--him-body-font);
  font-size: 0.95rem;
  font-weight: 500;
}

.him-price-card ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.him-price-card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
}

.him-price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--him-gum);
}

.him-price-card .wp-block-buttons {
  margin-top: auto;
}

.him-page-hero {
  padding: clamp(54px, 9vw, 108px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--him-line);
  background: var(--him-paper-light);
}

.him-page-hero .him-inner {
  max-width: 960px;
}

.him-faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.him-faq-item {
  padding: clamp(22px, 4vw, 34px);
}

.him-faq-item h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
}

.him-cta-band {
  padding: clamp(38px, 7vw, 70px);
  border-radius: 0;
  background: var(--him-ink);
  color: var(--him-paper-light);
}

.him-cta-band .him-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.him-cta-band h2 {
  margin: 0;
  color: var(--him-paper-light);
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.him-cta-band p {
  margin: 10px 0 0;
  color: rgba(255, 253, 247, 0.78);
}

.him-cta-band .wp-block-buttons {
  margin: 0;
}

.him-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.him-contact-panel {
  padding: clamp(24px, 4vw, 38px);
}

.him-contact-panel h2 {
  margin-top: 0;
}

.him-contact-panel a {
  font-weight: 800;
}

.him-list-clean {
  margin: 0;
  padding: 0;
  list-style: none;
}

.him-list-clean li {
  margin: 0 0 12px;
}

.him-shortcode-shell {
  padding: var(--him-section-pad) 0;
}

.him-shortcode-shell > .him-inner {
  width: min(var(--him-wide), calc(100% - (var(--him-pad) * 2)));
}

.him-index {
  padding: var(--him-section-pad) var(--him-pad);
}

/* Memorial plugin integration. */
.him-memorial {
  --him-ink: #24302a;
  --him-muted: #746e66;
  --him-line: #d2c4b3;
  --him-paper: #fffdf7;
  --him-accent: #9e6752;
  max-width: none;
  padding: 0;
  color: var(--him-ink);
  background: var(--him-paper-soft);
}

.him-memorial .him-hero {
  width: min(var(--him-wide), calc(100% - (var(--him-pad) * 2)));
  margin: 0 auto;
  padding: clamp(46px, 8vw, 86px) 0;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.him-memorial .him-hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--him-shadow);
}

.him-memorial .him-eyebrow {
  color: var(--him-clay);
}

.him-memorial .him-name {
  margin: 0 0 14px;
  font-family: var(--him-serif);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.98;
  color: var(--him-ink);
}

.him-memorial .him-years,
.him-memorial .him-location {
  margin: 0 0 6px;
  color: var(--him-muted);
  font-size: 1.08rem;
}

.him-memorial .him-layout {
  width: min(var(--him-wide), calc(100% - (var(--him-pad) * 2)));
  margin: 0 auto;
  padding: 0 0 var(--him-section-pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}

.him-memorial .him-content,
.him-memorial .him-panel,
.him-memory-card,
.comment-respond {
  border: 1px solid var(--him-line);
  border-radius: 8px;
  background: var(--him-paper);
}

.him-memorial .him-content {
  padding: clamp(24px, 5vw, 52px);
}

.him-memorial .him-section {
  margin: 0 0 clamp(32px, 5vw, 48px);
  padding: 0;
}

.him-memorial .him-section:last-child {
  margin-bottom: 0;
}

.him-memorial .him-section h2,
.him-memorial .him-panel h2,
.comment-reply-title {
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--him-line);
  font-family: var(--him-serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
}

.him-memorial .him-panel {
  padding: 22px;
}

.him-memorial .him-side {
  display: grid;
  gap: 18px;
}

.him-memorial .him-share-url {
  color: var(--him-clay);
  font-weight: 800;
}

.him-memory-list {
  display: grid;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.him-memory-card {
  padding: 18px 20px;
}

.him-memory-author {
  display: block;
  color: var(--him-ink);
  font-size: 1.08rem;
}

.him-memory-body {
  color: var(--him-coal);
}

.him-memory-meta,
.him-empty {
  color: var(--him-muted);
}

.him-button,
.comment-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--him-clay);
  color: var(--him-paper-light);
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
}

.him-button:hover,
.comment-form input[type="submit"]:hover {
  background: var(--him-ink);
  color: var(--him-paper-light);
}

.him-button--ghost {
  border: 1px solid var(--him-line);
  background: var(--him-paper-light);
  color: var(--him-ink);
}

.comment-respond {
  padding: clamp(20px, 4vw, 34px);
}

.comment-form p {
  margin: 0 0 16px;
}

.comment-form label {
  display: block;
  margin: 0 0 6px;
  color: var(--him-ink);
  font-weight: 800;
}

.comment-form input:not([type="submit"]),
.comment-form textarea,
.comment-form-relationship input,
.him-contact-panel input,
.him-contact-panel textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--him-line);
  border-radius: 8px;
  background: var(--him-paper-light);
  color: var(--him-ink);
  padding: 12px 14px;
  font: inherit;
}

.comment-form textarea {
  min-height: 150px;
}

@media (max-width: 1040px) {
  .him-card-grid,
  .him-price-grid,
  .him-step-grid,
  .him-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .him-hero-grid,
  .him-split,
  .him-split--reverse,
  .him-contact-grid,
  .him-memorial .him-layout {
    grid-template-columns: 1fr;
  }

  .him-split--reverse > :first-child {
    order: 2;
  }

  .him-split--reverse > :last-child {
    order: 1;
  }
}

@media (max-width: 780px) {
  .admin-bar .him-site-header-wrap {
    top: 46px;
  }

  .him-site-header {
    min-height: 70px;
  }

  .him-brand-text,
  .him-site-title {
    font-size: 1.14rem;
  }

  .him-hero-section {
    min-height: 0;
  }

  .him-hero-grid,
  .him-memorial .him-hero {
    grid-template-columns: 1fr;
  }

  .him-card-grid,
  .him-price-grid,
  .him-step-grid,
  .him-stat-grid {
    grid-template-columns: 1fr;
  }

  .him-cta-band .him-inner {
    grid-template-columns: 1fr;
  }

  .him-cta-band .wp-block-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  :root {
    --him-pad: 18px;
  }

  .him-brand-logo,
  .him-brand-mark img {
    width: 40px;
    height: 40px;
  }

  .him-site-title {
    max-width: 12rem;
    white-space: normal;
  }

  .him-hero-copy h1,
  .him-page-hero h1,
  .him-memorial .him-name {
    font-size: clamp(2.25rem, 16vw, 3.2rem);
  }
}
