/* ==========================================================================
   Estate Planning: "The legacy map". Paper and ink: sand paper, ruled lines, wax seals, arches.
   Signature: a sticky family tree that grows as the five parts scroll by (js/pg/estate-planning.js),
   then a pile of paper documents whose signature lines draw.
   ========================================================================== */

/* ---------- 1. Hero ---------------------------------------------------- */
.es-hero { padding-block: clamp(40px, 5vw, 80px) clamp(64px, 7vw, 110px); }
.es-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.es-hero .crumbs { margin-bottom: 26px; }
.es-hero .tag { margin-bottom: 22px; }
.es-hero__h { font-size: clamp(3rem, 7.6vw, 7rem); line-height: .94; letter-spacing: -.05em; color: var(--text); }
.es-hero__tag { margin-top: clamp(18px, 2vw, 28px); max-width: 24ch; color: var(--green-ink); }
.es-hero__act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.es-hero__art { position: relative; width: 100%; max-width: 440px; justify-self: center; }
.es-arch { position: relative; aspect-ratio: 4 / 5.7; overflow: hidden; background: var(--mint-2); }
.es-arch__bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.es-arch__bg circle { fill: none; stroke: #fff; stroke-width: 1.5; opacity: .75; }
.es-arch__paper { position: absolute; left: 19%; top: 15%; width: 62%; aspect-ratio: 360 / 450; filter: drop-shadow(0 20px 28px rgba(1, 53, 34, .22)); }
.es-arch__sprig { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; color: var(--green-ink); }
.es-arch__sprig path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.es-tag { position: absolute; z-index: 2; padding: 9px 16px; border-radius: 4px; background: #fff; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: -.01em; box-shadow: 0 12px 28px rgba(1, 53, 34, .16); border-left: 4px solid var(--green); animation: es-bob 7s ease-in-out infinite; }
.es-tag--a { top: 9%; left: -9%; rotate: -5deg; }
.es-tag--b { top: 38%; right: -9%; rotate: 4deg; animation-delay: -2s; }
.es-tag--c { bottom: 21%; left: -12%; rotate: 3deg; animation-delay: -4s; }
.es-tag--d { bottom: 8%; right: -7%; rotate: -3deg; animation-delay: -1s; }
@keyframes es-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (max-width: 899px) {
  .es-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .es-hero__art { max-width: 340px; margin-block: 8px 8px; }
  .es-tag--a { left: -4%; } .es-tag--b { right: -4%; } .es-tag--c { left: -4%; } .es-tag--d { right: -2%; }
}

/* ---------- 2. Intro --------------------------------------------------- */
.es-intro { padding-block: clamp(64px, 8vw, 120px); }
.es-intro__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 7vw, 120px); align-items: end; }
.es-intro .tag { margin-bottom: 26px; }
.es-intro__lead { max-width: 34ch; font-size: clamp(1.45rem, 2.7vw, 2.3rem); line-height: 1.34; letter-spacing: -.025em; }
.es-intro__facts { padding-left: clamp(20px, 2.4vw, 36px); border-left: 1px solid var(--line-dark); }
.es-intro__fl { margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--lime); }
.es-intro__facts li { display: flex; gap: 12px; align-items: flex-start; padding-block: 10px; font-size: 1.05rem; line-height: 1.45; color: var(--on-dark); }
.es-intro__facts li svg { flex: none; margin-top: 4px; color: var(--lime); }
.es-intro__co { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.es-intro__co span { margin-right: 6px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.es-intro__co a { padding: 5px 12px; border: 1px solid var(--line-dark); border-radius: 99px; font-size: 14px; color: var(--on-dark); transition: background .3s var(--ease), color .3s var(--ease); }
.es-intro__co a:hover { background: var(--lime-hi); color: var(--ink); border-color: var(--lime-hi); }
@media (max-width: 899px) { .es-intro__grid { grid-template-columns: minmax(0, 1fr); } .es-intro__facts { padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid var(--line-dark); } }

/* ---------- 3. Tree + parts -------------------------------------------- */
.es-tree { padding-bottom: clamp(48px, 5vw, 80px); }
.es-tree__head { margin-bottom: clamp(28px, 4vw, 56px); }
.es-tree__head .tag { margin-bottom: 18px; }
.es-tree__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.es-tree__side { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.es-tree__panel { position: relative; width: 100%; max-width: 420px; margin-inline: auto; padding: clamp(36px, 5vw, 56px) clamp(20px, 3vw, 36px) 22px; border-radius: 999px 999px 24px 24px; background: var(--sand); box-shadow: 0 30px 70px rgba(0, 0, 0, .3); }
.es-tree__lt { width: 100%; aspect-ratio: 1390 / 1520; max-height: calc(100vh - var(--nav-h) - 190px); margin-inline: auto; }
.es-tree__lt svg { width: 100%; height: 100%; }
.es-tree__count { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-top: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; letter-spacing: .12em; }
.es-tree__count b { font-size: 1.7rem; font-weight: 600; letter-spacing: -.03em; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.es-tree__parts { display: grid; }
.es-part { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: min(66vh, 560px); padding-left: clamp(24px, 3vw, 44px); border-left: 2px solid var(--line-dark); transition: border-color .6s var(--ease); }
.es-part:last-child { min-height: min(52vh, 460px); }
.es-part::before { content: ""; position: absolute; left: -8px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--green-deep); border: 2px solid var(--line-dark); transition: background .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease); }
.es-part.is-on { border-left-color: var(--lime-hi); }
.es-part.is-on::before { background: var(--lime-hi); border-color: var(--lime-hi); transform: scale(1.25); }
.es-part__n { display: block; font-size: clamp(3.4rem, 7vw, 6rem); font-weight: 600; line-height: .9; letter-spacing: -.05em; margin-bottom: 14px; color: transparent; -webkit-text-stroke: 1.5px var(--lime-hi); transition: color .6s var(--ease); }
.es-part.is-on .es-part__n { color: var(--lime-hi); }
.es-part .d2 { max-width: 18ch; font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.es-part .body-lg { margin: 18px 0 22px; max-width: 44ch; }
@media (max-width: 899px) {
  .es-tree__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .es-tree__side { position: static; }
  .es-tree__panel { max-width: 340px; }
  .es-tree__lt { max-height: none; }
  .es-tree__count { display: none; }
  .es-part, .es-part:last-child { min-height: 0; padding-block: 28px; }
}

/* ---------- 4. Documents ------------------------------------------------ */
.es-docs { padding-bottom: clamp(48px, 6vw, 96px); }
.es-docs__head { margin-bottom: clamp(28px, 4vw, 56px); max-width: 720px; }
.es-docs__head .tag { margin-bottom: 18px; }
.es-docs__stack { max-width: 780px; margin-inline: auto; --stack-gap: 12vh; }
.es-paper { min-height: 0; padding: 0; background: transparent; overflow: visible; border-radius: 0; }
.es-paper__sheet { position: relative; min-height: 290px; padding: 36px clamp(24px, 4vw, 48px) 40px clamp(60px, 9vw, 96px); border-radius: 4px; background: #fff; box-shadow: 0 2px 0 rgba(12, 19, 16, .06), 0 28px 60px rgba(12, 19, 16, .18);
  background-image: repeating-linear-gradient(to bottom, transparent 0 35px, #dfe8e2 35px 36px); background-position: 0 14px; }
.es-paper__sheet::before { content: ""; position: absolute; left: clamp(40px, 6.4vw, 70px); top: 0; bottom: 0; width: 1px; background: #bcd3c3; }
.es-paper__sheet--1 { rotate: -1deg; } .es-paper__sheet--2 { rotate: .9deg; } .es-paper__sheet--3 { rotate: -.7deg; } .es-paper__sheet--4 { rotate: 1.1deg; }
.es-paper__no { display: inline-block; margin-bottom: 14px; padding: 3px 10px; background: #fff; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green-ink); }
.es-paper .d2 { background: #fff; display: block; width: fit-content; max-width: calc(100% - 80px); padding-inline: 4px; margin-left: -4px; font-size: clamp(1.8rem, 3.6vw, 2.9rem); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.es-paper .body-lg { margin-top: 18px; max-width: 34ch; }
.es-paper .body-lg { display: block; width: fit-content; background: #fff; padding-right: 8px; color: var(--text-2); }
.es-paper__sig { display: block; width: min(240px, 60%); height: auto; margin: 22px 0 0 auto; color: var(--green-ink); overflow: visible; }
.es-paper__sig path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.es-paper__sig .ln { stroke: #9db8a6; stroke-width: 1.5; }
.es-paper__sig .x { stroke: var(--text-2); stroke-width: 2; }
.es-paper__seal { position: absolute; top: 26px; right: clamp(20px, 3.4vw, 44px); display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: inset 0 0 0 5px var(--green), inset 0 0 0 6.5px rgba(255, 255, 255, .55), 0 8px 18px rgba(0, 82, 47, .35); }
@media (max-width: 899px) { .es-paper { position: relative; top: auto !important; margin-bottom: 18px; } .es-paper__sheet { min-height: 0; } }

/* ---------- 5. Who: wax-seal letters ------------------------------------ */
.es-who__head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 72px); }
.es-who__head .tag { margin-bottom: 18px; }
.es-who__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 40px); align-items: start; }
.es-letter { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(142px, 11vw, 150px) clamp(20px, 2.4vw, 36px) 32px; border-radius: 6px; background: var(--sand); box-shadow: 0 20px 44px rgba(12, 19, 16, .1); overflow: hidden; transition: box-shadow .5s var(--ease), background .4s var(--ease); }
.es-letter:nth-child(2) { margin-top: clamp(24px, 4vw, 56px); }
.es-letter:nth-child(3) { margin-top: clamp(0px, 1.6vw, 24px); }
.es-letter::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 84px; background: var(--sand-2); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.es-letter__seal { position: absolute; left: 50%; top: 56px; display: grid; place-items: center; width: 64px; height: 64px; translate: -50% 0; border-radius: 50%; background: var(--green); color: #fff; box-shadow: inset 0 0 0 5px var(--green), inset 0 0 0 6.5px rgba(255, 255, 255, .55), 0 8px 18px rgba(0, 82, 47, .35); transition: background .4s var(--ease); }
.es-letter .d3 { max-width: 14ch; }
.es-letter p { margin: 12px 0 20px; max-width: 26ch; color: var(--text-2); }
.es-letter:hover { box-shadow: 0 30px 60px rgba(12, 19, 16, .18); background: var(--mint); }
.es-letter:hover .es-letter__seal { background: var(--green-deep); }
.es-who__more { margin-top: clamp(36px, 4vw, 56px); text-align: center; }
@media (max-width: 800px) { .es-who__row { grid-template-columns: minmax(0, 1fr); max-width: 380px; margin-inline: auto; } .es-letter:nth-child(n) { margin-top: 0; } }

/* ---------- 6. FAQ ------------------------------------------------------ */
.es-faq__head { max-width: 640px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.es-faq__head .tag { margin-bottom: 18px; }
.es-faq__list { max-width: 820px; margin-inline: auto; border-top: 0; display: grid; gap: 12px; }
.es-faq__list details { border: 0; border-radius: 6px; background: #fff; padding-inline: clamp(16px, 2.4vw, 28px); box-shadow: 0 8px 22px rgba(1, 53, 34, .07); }
.es-faq__list details:nth-child(odd) { rotate: -.25deg; } .es-faq__list details:nth-child(even) { rotate: .25deg; }
.es-faq__list summary { gap: 16px; justify-content: flex-start; }
.es-faq__list summary::after { margin-left: auto; }
.es-faq__q { flex: none; width: 2.4em; font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--green-ink); font-variant-numeric: tabular-nums; }

/* ---------- 7. CTA ------------------------------------------------------ */
.es-cta { text-align: center; padding-block: clamp(80px, 10vw, 150px); }
.es-cta__in { display: flex; flex-direction: column; align-items: center; }
.es-cta__seal { display: grid; place-items: center; width: 92px; height: 92px; margin-bottom: 28px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: inset 0 0 0 7px var(--green), inset 0 0 0 9px rgba(255, 255, 255, .55), 0 0 0 14px rgba(54, 180, 72, .16), 0 0 0 30px rgba(54, 180, 72, .08); }
.es-cta .body-lg { margin: 20px auto 0; color: var(--on-dark-2); }
.es-cta__act { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.es-cta__fine { margin-top: 24px; font-size: 14px; color: var(--on-dark-2); }
.es-cta__fine a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 8. Other services (index) + next ---------------------------- */
.es-tail { padding-block: clamp(56px, 7vw, 110px); }
.es-tail__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 100px); align-items: start; }
.es-tail__lbl { margin-bottom: 18px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark); }
.es-next { position: relative; display: block; padding: 28px 28px 32px; padding-right: 100px; border-radius: 6px; background: var(--green-deep); color: var(--on-dark); overflow: hidden; isolation: isolate; }
.es-next::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform .5s var(--ease); }
.es-next:hover::before { transform: none; }
.es-next__lbl { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--lime-hi); }
.es-next__name { display: block; font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.es-next__arw { position: absolute; right: 24px; bottom: 24px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--lime-hi); color: var(--ink); transition: transform .5s var(--ease); }
.es-next:hover .es-next__arw { transform: translateX(6px); }
.es-tail__list { border-top: 1px solid rgba(246, 248, 246, .28); }
.es-tail__list a { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 20px 14px; border-bottom: 1px solid rgba(246, 248, 246, .28); transition: background .35s var(--ease), padding-left .35s var(--ease); }
.es-tail__list a:hover { background: rgba(246, 248, 246, .1); padding-left: 24px; }
.es-tail__list i { font-style: normal; font-size: 14px; font-weight: 500; letter-spacing: .1em; padding-top: 6px; color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.es-tail__list b { display: block; font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--on-dark); }
.es-tail__list em { display: block; margin-top: 4px; font-style: normal; font-size: 15px; line-height: 1.5; color: var(--on-dark-2); max-width: 52ch; }
@media (max-width: 899px) { .es-tail__grid { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .es-tag { animation: none; }
  .es-tree__count { display: none; }
  .es-part, .es-part::before, .es-part__n, .es-next::before, .es-next__arw, .es-tail__list a { transition: none; }
}

@media (max-width: 600px) {
  .es-hero__act .btn, .es-cta__act .btn { white-space: normal; justify-content: center; text-align: center; width: 100%; padding-inline: 20px; }
}
