/* Wayne Burial Vault Co., Inc.
   Letterhead masthead over a double rule. Frame-within-frame insets, radius 0.
   Plaster ground with one very slow luminosity drift. Motion: slow and settled. */

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { overflow-x: clip; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--bronze); color: var(--paper); }

* { scrollbar-color: var(--bronze) var(--paper-2); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--bronze); }

[id] { scroll-margin-top: var(--s4); }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 var(--s2);
  text-wrap: balance;
}

h1 { font-size: clamp(1.85rem, 4.6vw, 2.9rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.17rem; }

p { margin: 0 0 var(--s2); max-width: var(--measure); }

a { color: var(--bronze); text-decoration-color: var(--hairline); text-underline-offset: 3px; }
a:hover { color: var(--bronze-dark); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

/* ---------- ambient: one slow luminosity drift across the plaster ---------- */

.drift {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.drift::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70vw;
  width: 240vw;
  background: linear-gradient(
    100deg,
    rgba(255, 253, 244, 0) 12%,
    rgba(255, 253, 244, 0.5) 34%,
    rgba(58, 48, 32, 0.05) 58%,
    rgba(255, 253, 244, 0) 82%
  );
  will-change: transform;
  animation: drift 35s var(--ease) infinite alternate;
}

@keyframes drift {
  from { transform: translateX(-28vw); }
  to { transform: translateX(28vw); }
}

.page { position: relative; z-index: 1; }

/* ---------- letterhead masthead: name centered over a double rule ---------- */

.skip {
  position: absolute;
  left: 50%;
  top: -64px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  z-index: 60;
  transition: top var(--t-quick) var(--ease);
}
.skip:focus { top: 8px; color: var(--paper); }

.masthead {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s4) var(--s3) 0;
  text-align: center;
}

.masthead p { max-width: none; }

.masthead-name {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  letter-spacing: 0.045em;
}

.masthead-name a { color: var(--ink); text-decoration: none; }
.masthead-name a:hover { color: var(--bronze-dark); }

.masthead-place {
  color: var(--ink-soft);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* the double rule */
.masthead-rule {
  margin-top: var(--s2);
  border-top: 2px solid var(--ink);
  position: relative;
}
.masthead-rule::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  border-top: 1px solid var(--ink);
}

/* nav split left and right on the rule */
.masthead-nav ul {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  display: flex;
  align-items: stretch;
}

.masthead-nav li.split { flex: 1; }

.masthead-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s2);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  background-image: linear-gradient(var(--bronze), var(--bronze));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 50% calc(100% - 8px);
  transition: background-size var(--t-mid) var(--ease), color var(--t-quick) var(--ease);
}

.masthead-nav a:hover,
.masthead-nav a[aria-current="page"] {
  background-size: calc(100% - 32px) 1px;
  color: var(--bronze-dark);
}

.masthead-menu { display: none; }

@media (max-width: 719px) {
  .masthead { padding-top: var(--s3); }

  /* without JS the nav stays open and the menu button never shows */
  html:not(.js) .masthead-menu { display: none; }
  html:not(.js) .masthead-nav { display: block; border-bottom: 1px solid var(--hairline); }

  .masthead-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 4px;
    padding: 0 var(--s3);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.98rem;
    letter-spacing: 0.08em;
    color: var(--ink);
    cursor: pointer;
  }
  .masthead-menu .icon { margin-left: 8px; transition: transform var(--t-mid) var(--ease); }
  .masthead-menu[aria-expanded="true"] .icon { transform: rotate(180deg); }

  .masthead-nav {
    display: none;
    border-bottom: 1px solid var(--hairline);
  }
  .masthead-nav.open { display: block; }
  .masthead-nav ul { flex-wrap: wrap; padding-bottom: var(--s1); }
  .masthead-nav li { width: 50%; }
  .masthead-nav li.split { display: none; }
  .masthead-nav a { width: 100%; justify-content: center; }
}

/* ---------- shared page scaffolding ---------- */

main { display: block; }

.sheet {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--s3);
}

.section { padding: var(--s6) 0; }
.section.tight { padding-top: var(--s5); }

.center { text-align: center; }
.center p, p.center { margin-left: auto; margin-right: auto; }

.mute { color: var(--ink-soft); }

.small { font-size: 0.92rem; }

/* frame-within-frame: a hairline inside a heavier rule, radius 0 */
.frame {
  border: var(--frame-rule);
  padding: 6px;
  background: var(--paper);
}
.frame > .frame-in {
  border: var(--frame-hair);
  padding: 0;
  overflow: hidden;
}
.frame img { width: 100%; transition: transform 900ms var(--ease); }
.frame:hover img { transform: scale(1.012); }

.frame-pad > .frame-in { padding: var(--s4); }

figure { margin: 0; }
figcaption {
  color: var(--ink-soft);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding-top: var(--s1);
}

/* ---------- hero: image with the h1 below it ---------- */

.hero { padding-top: var(--s5); }

.hero-figure { max-width: 940px; margin: 0 auto; }

.hero-copy { text-align: center; padding: var(--s4) var(--s3) 0; }
.hero-copy p { margin-left: auto; margin-right: auto; }

.hero-copy h1 { margin-bottom: var(--s1); }

.est-line {
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}
.est-line::before, .est-line::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--hairline);
  vertical-align: middle;
  margin: 0 12px;
}

@media (max-width: 560px) {
  .est-line { letter-spacing: 0.08em; }
  .est-line::before, .est-line::after { display: none; }
}

/* the single text link with a growing underline */
.cta-line {
  display: inline-block;
  margin-top: var(--s3);
  font-family: var(--display);
  font-size: 1.14rem;
  letter-spacing: 0.02em;
  color: var(--bronze-dark);
  text-decoration: none;
  padding: 8px 2px;
  background-image: linear-gradient(var(--bronze), var(--bronze));
  background-repeat: no-repeat;
  background-size: 34% 2px;
  background-position: 0 100%;
  transition: background-size var(--t-slow) var(--ease), color var(--t-quick) var(--ease);
}
.cta-line:hover, .cta-line:focus-visible { background-size: 100% 2px; color: var(--ink); }

/* ---------- ruled rows (facts, contact) ---------- */

.ruled { border-top: 1px solid var(--hairline); max-width: 720px; margin: 0 auto; }
.ruled-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  border-bottom: 1px solid var(--hairline);
  padding: 14px 2px;
}
.ruled-row .k { color: var(--ink-soft); font-size: 0.92rem; letter-spacing: 0.05em; }
.ruled-row .v { text-align: right; }
.ruled-row a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.ruled-row a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .ruled-row { flex-direction: column; gap: 2px; align-items: flex-start; }
  .ruled-row .v { text-align: left; }
}

/* one line of facts under the signature */
.fact-line {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: var(--s2) var(--s2);
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  max-width: 860px;
  margin: var(--s4) auto 0;
}
.fact-line a { color: var(--ink); text-decoration: none; white-space: nowrap; padding: 6px 2px; display: inline-block; }
.fact-line a:hover { color: var(--bronze-dark); text-decoration: underline; }
.fact-line .sep { margin: 0 10px; color: var(--hairline); }

/* ---------- two-column feature (photo + copy) ---------- */

.duet {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s5);
  align-items: center;
}
.duet.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.duet.flip .duet-copy { order: -1; }

@media (max-width: 820px) {
  .duet, .duet.flip { grid-template-columns: 1fr; gap: var(--s4); }
  .duet.flip .duet-copy { order: 0; }
}

/* ---------- the cross-section signature ---------- */

.xs-scroll { overflow-x: auto; }
.xs-scroll::-webkit-scrollbar { height: 10px; }

.xsection { max-width: 900px; margin: 0 auto; min-width: 740px; }
.xsection svg { width: 100%; height: auto; display: block; }

.xsection .lbl {
  font-family: var(--body);
  font-size: 15px;
  fill: var(--ink);
}
.xsection .lbl-sub { font-size: 12.5px; fill: var(--ink-soft); }
.xsection .leader { stroke: var(--ink-soft); stroke-width: 1; fill: none; }
.xsection .leader-dot { fill: var(--ink-soft); }

.xsection-caption {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  max-width: 560px;
  margin: var(--s2) auto 0;
}

/* ---------- soft button (contact section only) ---------- */

.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s4);
  background: var(--ink);
  color: var(--paper);
  border: 0;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform var(--t-quick) var(--ease), background-color var(--t-quick) var(--ease);
}
.btn-soft:hover { background: var(--bronze-dark); transform: translateY(-1px); }
.btn-soft:active { transform: translateY(1px); }
.btn-soft:disabled { opacity: 0.55; cursor: default; transform: none; }

/* ---------- form ---------- */

.form-grid { display: grid; gap: var(--s3); }

.field label {
  display: block;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
  transition: border-color var(--t-quick) var(--ease), box-shadow var(--t-quick) var(--ease);
}

.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 1px;
  border-color: var(--bronze);
}

.field textarea { min-height: 140px; resize: vertical; }

.form-note {
  border: 1px solid var(--hairline);
  padding: var(--s2) var(--s3);
  background: var(--paper-2);
  max-width: none;
}
.form-note a { white-space: nowrap; }
.form-note[hidden] { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer: the letterhead repeated on umber ---------- */

.foot {
  margin-top: var(--s7);
  background: var(--umber);
  color: var(--paper-on-umber);
  text-align: center;
  padding: var(--s6) var(--s3) var(--s5);
}

.foot p { max-width: none; margin-left: auto; margin-right: auto; }

.foot-name {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.foot-rule {
  max-width: 560px;
  margin: var(--s2) auto 0;
  border-top: 2px solid var(--paper-on-umber);
  position: relative;
}
.foot-rule::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 3px;
  border-top: 1px solid var(--paper-on-umber);
}

.foot-nap { margin-top: var(--s3); font-size: 0.97rem; color: var(--soft-on-umber); }
.foot-nap a { color: var(--paper-on-umber); text-decoration: none; padding: 8px 4px; display: inline-block; }
.foot-nap a:hover { text-decoration: underline; }
.foot-nap .sep { margin: 0 10px; opacity: 0.5; }

.foot-links { margin-top: var(--s2); }
.foot-links a {
  color: var(--soft-on-umber);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.92rem;
}
.foot-links a:hover { color: var(--paper-on-umber); text-decoration: underline; }

.foot-legal {
  margin: var(--s3) auto 0;
  max-width: 640px;
  font-size: 0.85rem;
  color: var(--soft-on-umber);
  line-height: 1.6;
}
.foot-legal a { color: var(--soft-on-umber); }
.foot-legal a:hover { color: var(--paper-on-umber); }

/* ---------- mobile sticky call bar ---------- */

.callbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: none;
  grid-template-columns: 1fr 1fr;
  background: var(--umber);
  border-top: 1px solid rgba(233, 226, 209, 0.25);
  transform: translateY(0);
  transition: transform var(--t-mid) var(--ease);
}
.callbar.hidden-away { transform: translateY(110%); }
.callbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  color: var(--paper-on-umber);
  text-decoration: none;
  font-size: 0.97rem;
  letter-spacing: 0.03em;
}
.callbar a + a { border-left: 1px solid rgba(233, 226, 209, 0.25); }
.callbar .icon { flex: none; }

@media (max-width: 719px) {
  .callbar { display: grid; }
  .foot { padding-bottom: calc(var(--s5) + 60px); }
}

/* ---------- icons ---------- */

.icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; }

/* ---------- reveals, gated on html[data-anim] set by JS ---------- */

html[data-anim] [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}
html[data-anim] [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

/* ---------- reduced motion: the static page is complete ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drift::before { animation: none; }
  *, *::before, *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
