/* Estate Record Book: warm paper, ink black and the book's gold; Fraunces and Figtree */
:root {
  --bg: #f6f1e6;
  --bg-2: #fffaf0;
  --surface: #fffdf8;
  --surface-2: #f0e8d6;
  --text: #1c1915;
  --muted: #5f574b;
  --line: rgba(28, 25, 21, .12);
  --accent: #9a7428;
  --accent-2: #d9b45f;
  --on-accent: #ffffff;
  --ok: #3f6b3a;
  --bad: #a3302a;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "Figtree", system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 25, 21, .06), 0 24px 50px -28px rgba(70, 50, 20, .35);
}
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; font-variation-settings: "opsz" 120; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.eyebrow { letter-spacing: .18em; font-size: 12px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.brand i { color: var(--accent); }
.btn { background: #1c1915; color: #f6e7bf; }
.btn:hover { box-shadow: 0 14px 30px -12px rgba(28, 25, 21, .45); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(28, 25, 21, .2); }
.card, .faq details { background: var(--surface); box-shadow: var(--shadow); }
.input, .chip span { background: #fff; }
.nav.scrolled { background: rgba(246, 241, 230, .86); }

/* Hero */
.erb-paper { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 75% 45%, rgba(217, 180, 95, .22), transparent 70%), radial-gradient(rgba(28, 25, 21, .06) 1px, transparent 1px) 0 0 / 18px 18px; pointer-events: none; }
.erb-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.erb-h1 { font-size: clamp(44px, 6.4vw, 86px); line-height: 1.02; }
.erb-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.erb-note .i { color: var(--accent); width: 18px; height: 18px; }
.erb-note a { color: var(--text); font-weight: 600; }

/* 3D book */
.erb-book-stage { position: relative; display: grid; place-items: center; perspective: 1600px; padding-block: 20px; }
.erb-book { --w: min(330px, 70vw); --t: 26px; position: relative; width: var(--w); aspect-ratio: 720 / 1056; transform-style: preserve-3d; transform: rotateY(-24deg) rotateX(4deg) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .8s var(--ease-out); animation: erb-float 7s ease-in-out infinite; }
.erb-book[data-tilt] { transform: rotateY(-24deg) rotateX(4deg) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); }
@keyframes erb-float { 50% { translate: 0 -10px; } }
.erb-cover { position: absolute; inset: 0; transform: translateZ(calc(var(--t) / 2)); border-radius: 3px 8px 8px 3px; overflow: hidden; background: radial-gradient(ellipse at 30% 20%, #2f5546, #1f3a30 55%, #152920); box-shadow: inset 8px 0 14px -6px rgba(0, 0, 0, .45), inset -1px 0 0 rgba(255, 255, 255, .08); color: #d9b45f; }
.erb-cover::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); mix-blend-mode: overlay; }
.erb-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .14), transparent 35%, transparent 70%, rgba(255, 255, 255, .05)); pointer-events: none; }
.erb-cover-frame { position: absolute; inset: 7%; border: 1.5px solid rgba(217, 180, 95, .75); border-radius: 4px; box-shadow: inset 0 0 0 5px rgba(217, 180, 95, .12); display: grid; align-content: center; justify-items: center; gap: 6px; text-align: center; padding: 10%; }
.erb-crest { width: 32%; margin-bottom: 10px; }
.erb-c1 { font: italic 400 clamp(26px, 5.2vw, 40px)/1 var(--font-display); color: #e9cd8a; }
.erb-c2 { font: 600 clamp(15px, 2.6vw, 21px)/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: #e9cd8a; }
.erb-rule { width: 40%; height: 1px; background: rgba(217, 180, 95, .7); margin: 10px 0 6px; }
.erb-c3 { font: italic 400 clamp(11px, 1.6vw, 13px)/1.3 var(--font-display); color: rgba(233, 205, 138, .85); }
.erb-pages { position: absolute; top: 4px; bottom: 4px; right: 0; width: var(--t); transform: translateX(calc(var(--t) / 2)) rotateY(90deg); background: repeating-linear-gradient(90deg, #fffaf0 0 2px, #e4dccb 2px 3px); }
.erb-spine { position: absolute; top: 0; bottom: 0; left: 0; width: var(--t); transform: translateX(calc(var(--t) / -2)) rotateY(-90deg); background: #152920; display: grid; place-items: center; }
.erb-spine span { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 10px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #d9b45f; white-space: nowrap; }
.erb-shadow { width: 70%; height: 30px; margin-top: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(28, 25, 21, .35), transparent); filter: blur(4px); }

/* The open book scene */
.erb-open { height: 340vh; background: #1c1915; color: #f6efe0; --text: #f6efe0; --muted: #c8bca6; --line: rgba(246, 239, 224, .14); }
.erb-open .eyebrow { color: var(--accent-2); }
.erb-open h2 em { color: var(--accent-2); }
.erb-pin { display: grid; align-items: center; padding-top: var(--nav-h); }
.erb-open-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.erb-tabs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.erb-tabs li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; transition: background .4s, color .4s; }
.erb-tabs li .i { color: var(--accent-2); opacity: .5; transition: opacity .4s; }
.erb-tabs li.on { background: rgba(217, 180, 95, .12); color: #fff; }
.erb-tabs li.on .i { opacity: 1; }
.erb-spread { position: relative; aspect-ratio: 4 / 5; max-height: 72vh; justify-self: center; width: min(100%, 470px); perspective: 1600px; }
.erb-page { position: absolute; inset: 0; padding: clamp(24px, 4vw, 40px); border-radius: 4px 14px 14px 4px; background: linear-gradient(90deg, #e9e0cc, #fffaf0 6%, #fffaf0); color: #1c1915; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); transform-origin: left center; transform: rotateY(-100deg); opacity: 0; transition: transform 1s var(--ease-out), opacity .6s; }
.erb-page.on { transform: none; opacity: 1; }
.erb-page.done { transform: rotateY(-100deg); opacity: 0; }
.erb-page-n { font: 600 11px var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.erb-page h3 { font-size: clamp(26px, 3vw, 34px); margin: 8px 0 22px; padding-bottom: 14px; border-bottom: 2px solid #1c1915; }
.erb-page ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.erb-page li { display: grid; gap: 10px; }
.erb-page li span { font-size: 14.5px; font-weight: 600; color: #3b352c; }
.erb-page li i { display: block; height: 1px; background: repeating-linear-gradient(90deg, #b9ad95 0 4px, transparent 4px 7px); }
.erb-folio { position: absolute; bottom: 16px; right: 22px; font: italic 14px var(--font-display); color: var(--muted); }
.erb-list-mobile { display: none; }

/* Readiness check */
.erb-check { display: grid; grid-template-columns: 1.4fr .6fr; gap: 18px; align-items: start; }
.erb-qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.erb-q { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.erb-g { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.erb-q p { font-weight: 500; line-height: 1.45; }
.erb-yn { display: flex; gap: 8px; margin-top: auto; }
.erb-yn label { position: relative; flex: 1; }
.erb-yn input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.erb-yn span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; font-size: 15px; transition: background .25s, color .25s, border-color .25s; }
.erb-yn input:checked + span { background: #1c1915; color: #f6e7bf; border-color: #1c1915; }
.erb-yn label:last-child input:checked + span { background: #f0e8d6; color: var(--text); border-color: var(--accent); }
.erb-yn input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.erb-score { position: sticky; top: calc(var(--nav-h) + 16px); display: grid; gap: 16px; justify-items: center; text-align: center; padding: 26px; border-radius: 20px; background: #1c1915; color: #f6efe0; }
.erb-ring { position: relative; width: 170px; }
.erb-ring svg { transform: rotate(-90deg); }
.erb-ring circle { fill: none; stroke-width: 8; }
.erb-ring .t { stroke: rgba(246, 239, 224, .12); }
.erb-ring .p { stroke: #d9b45f; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--score, 0)); transition: stroke-dashoffset .7s var(--ease-spring); }
.erb-ring > div { position: absolute; inset: 0; display: grid; place-content: center; }
.erb-ring b { font: 500 48px/1 var(--font-display); }
.erb-ring span { font-size: 13px; color: #c8bca6; }
.erb-verdict { color: #e7dcc6; font-size: 15.5px; }
.erb-next { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: rgba(217, 180, 95, .12); width: 100%; }
.erb-next[hidden] { display: none; }
.erb-next span { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #d9b45f; }
.erb-next b { font-weight: 600; font-size: 15px; }
.erb-score-btns { display: grid; gap: 8px; width: 100%; }
.erb-score .btn { background: #d9b45f; color: #1c1915; width: 100%; }
.erb-score .btn-ghost { background: transparent; color: #f6efe0; border-color: rgba(246, 239, 224, .25); }

/* Digital */
.erb-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.erb-feat { display: grid; gap: 10px; padding: 22px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.erb-feat .i { color: var(--accent); width: 26px; height: 26px; }
.erb-feat b { display: block; font: 600 19px var(--font-display); }
.erb-feat span { color: var(--muted); font-size: 15px; }

/* Author */
.erb-author { padding-block: 40px; }
.erb-quote { margin: 0; text-align: center; display: grid; gap: 18px; }
.erb-quote blockquote { margin: 0; font: italic 400 clamp(26px, 3.4vw, 40px)/1.25 var(--font-display); }
.erb-quote figcaption b { display: block; }
.erb-quote figcaption span { color: var(--muted); font-size: 14.5px; }

/* Join */
.erb-cta { background: #1c1915; color: #f6efe0; border: 0; --text: #f6efe0; --muted: #c8bca6; --line: rgba(246, 239, 224, .16); --accent: #d9b45f; --on-accent: #1c1915; --ok: #b8d99a; }
.erb-cta h2 em { color: #d9b45f; }
.erb-cta-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.erb-cta-grid > div { display: grid; gap: 18px; }
.erb-cta .btn { background: #d9b45f; color: #1c1915; }
.erb-cta .input { background: rgba(255, 255, 255, .08); color: #fff; }
.erb-cta .chip span { background: rgba(255, 255, 255, .06); color: #f6efe0; }
.erb-cta .chip input:checked + span { background: #d9b45f; color: #1c1915; }
.erb-fs { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }

/* Print: only the checklist */
.erb-print { display: none; }
@media print {
  body > *:not(.erb-print) { display: none !important; }
  .erb-print { display: block; color: #000; font: 12pt/1.5 Georgia, serif; }
  .erb-print h1 { font-size: 22pt; margin-bottom: 4pt; }
  .erb-print li { margin: 8pt 0; }
}

@media (max-width: 980px) {
  .erb-hero-grid, .erb-check, .erb-cta-grid { grid-template-columns: 1fr; }
  .erb-score { position: static; }
  .erb-book-stage { padding-block: 0; }
  .erb-book { --w: min(230px, 56vw); }
}
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .erb-open { height: auto; padding-block: clamp(48px, 6vw, 72px); }
  .erb-pin { position: static; height: auto; overflow: visible; padding-top: 0; }
  .erb-open-grid { grid-template-columns: 1fr; }
  .erb-tabs, .erb-spread { display: none; }
  .erb-list-mobile { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
  .erb-list-mobile .card { background: rgba(246, 239, 224, .05); box-shadow: none; border-color: rgba(246, 239, 224, .14); }
  .erb-list-mobile h3 { color: #fff; }
  .erb-list-mobile ul { margin: 0; padding-left: 18px; color: var(--muted); }
}
@media (max-width: 640px) {
  .erb-qs, .erb-feats { grid-template-columns: 1fr; }
}
