:root {
  --ink: #1c1612;
  --muted: #5e5348;
  --paper: #f6efe2;
  --paper-2: #efe4d0;
  --line: rgba(92, 62, 36, 0.28);
  --wax: #7c2a22;
  --wax-dark: #5c1d18;
  --gold: #6d4e28;
  --top: #140e0b;
  --top-text: #f6efe2;
  --shadow: 0 28px 70px rgba(12, 6, 2, 0.55);
  --serif: "Cormorant Garamond", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: Outfit, "Segoe UI", Helvetica, Arial, sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;
  --sheet: 900px;
  --bar: 58px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
  background: #120c09 url("../img/desk.jpg?v=5") center top / cover no-repeat fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wax-dark); }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--wax); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 8px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: var(--bar);
  padding: 8px 16px;
  background: rgba(20, 14, 11, 0.92);
  color: var(--top-text);
  font-family: var(--sans);
  backdrop-filter: blur(8px);
}
.brand { display: flex; flex-direction: column; min-width: 0; }
.brand strong {
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.brand span { color: rgba(246, 239, 226, 0.72); font-size: 0.75rem; }
.top-actions { display: flex; gap: 8px; flex: none; }
.top-actions a {
  color: var(--top-text);
  text-decoration: none;
  border: 1px solid rgba(246, 239, 226, 0.35);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
}
.top-actions a.solid { background: var(--wax); border-color: var(--wax); }

.stage { position: relative; padding: 28px 16px 48px; }
.pen {
  display: none;
  position: fixed;
  width: 230px;
  bottom: 28px;
  right: 36px;
  transform: rotate(-8deg);
  pointer-events: none;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.45));
  z-index: 2;
}

.sheet {
  width: min(var(--sheet), 100%);
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.55), transparent 90px),
    radial-gradient(120% 80% at 10% 0%, rgba(255, 255, 255, 0.45), transparent 40%),
    var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}
.sheet-inner {
  border: 1px solid var(--line);
  margin: 14px;
  padding: 28px 22px 36px;
}

.mast { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.mast > div { min-width: 0; flex: 1; }
.kicker {
  font-family: var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 8px;
}
h1 {
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}
.deck {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 36rem;
}
.seal {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  box-shadow: 0 10px 18px rgba(60, 16, 10, 0.28);
  transform: rotate(-8deg);
}
.rule {
  height: 1px;
  margin: 22px 0 18px;
  background: var(--wax);
  transform-origin: left center;
}

.folds { display: grid; gap: 10px; margin-top: 8px; }
.clause { scroll-margin-top: calc(var(--bar) + 12px); }
.clause h2 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.fold {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  background: #140e0b;
  color: #f6efe2;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font: inherit;
}
.fold-photo { display: block; height: 240px; overflow: hidden; }
html.js .fold-photo { height: 112px; transition: height 0.5s cubic-bezier(0.22, 0.8, 0.24, 1); }
.fold-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.08);
  transform-origin: center 40%;
  transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.clause.is-unfolding .fold-photo img,
.clause.is-open .fold-photo img { transform: scale(1); }
.fold-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 14px 12px;
  background: linear-gradient(transparent, rgba(12, 8, 5, 0.88));
  font-family: var(--serif);
  font-size: clamp(1.45rem, 4.4vw, 2rem);
  font-weight: 600;
  line-height: 1.05;
  color: #f6efe2;
}
.fold .num { color: #e7c7a4; margin-bottom: 2px; }
.fold-body { overflow: hidden; }
html.js .fold-body { height: 0; transition: height 0.48s cubic-bezier(0.22, 0.8, 0.24, 1); }
.fold-inner {
  padding: 16px 4px 8px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.35), transparent 18px);
}
.num {
  font-family: var(--sans);
  display: block;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--wax);
  margin-bottom: 4px;
}
.clause p { margin: 0 0 12px; }
.clause p:last-child { margin-bottom: 0; }

.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
  background: rgba(255, 252, 246, 0.55);
  border: 1px solid var(--line);
  padding: 10px 12px;
}
.steps b {
  font-family: var(--sans);
  color: var(--wax);
  font-size: 0.95rem;
}
.steps span { font-size: 1.05rem; }

.split { display: grid; gap: 10px; margin-top: 8px; }
.card {
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: rgba(255, 252, 246, 0.45);
}
.card strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.card p { margin: 0; font-size: 1.05rem; }

.note {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  border-left: 3px solid var(--wax);
  padding-left: 12px;
  margin-top: 12px;
}

details.faq { border-top: 1px solid var(--line); }
details.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 12px 0;
  font-size: 1.2rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary:after {
  content: "+";
  font-family: var(--sans);
  color: var(--wax);
  font-size: 1.4rem;
  line-height: 1;
}
details.faq[open] summary:after { content: "–"; }
details.faq p { margin: 0 0 14px; font-size: 1.08rem; }

.signoff {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}
.sign-line {
  height: 1px;
  width: min(280px, 70%);
  background: var(--ink);
  margin: 28px 0 8px;
}
.firm { font-size: 1.45rem; margin: 0; }
.meta { font-family: var(--sans); font-size: 0.92rem; color: var(--muted); margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions a {
  font-family: var(--sans);
  text-decoration: none;
  min-height: 48px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
}
.actions .call { background: var(--wax); color: #fff; }
.actions .ghost { border: 1px solid var(--ink); color: var(--ink); }
.fine {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 8px 0 0;
}

.mobile-call {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  background: var(--top);
}
.mobile-call a {
  flex: 1;
  color: var(--top-text);
  text-decoration: none;
  text-align: center;
  font-family: var(--sans);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-call a + a { background: var(--wax); }

.desk-photos {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  height: 390px;
  margin: -56px auto 12px;
}
.polaroid {
  position: absolute;
  margin: 0;
  background: #fbf8f2;
  padding: 12px 12px 8px;
  width: min(270px, 46vw);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: saturate(0.92);
}
.polaroid figcaption {
  font-family: var(--hand);
  font-size: 2.7rem;
  font-weight: 600;
  text-align: center;
  color: #2a231c;
  line-height: 1;
  padding: 4px 0 8px;
}
.polaroid.jason {
  left: 4%;
  top: 18px;
  transform: rotate(-13deg);
  z-index: 1;
}
.polaroid.jason figcaption { transform: rotate(-2deg); }
.polaroid.matt {
  left: 27%;
  top: 64px;
  transform: rotate(8deg);
  z-index: 2;
}
.polaroid.matt figcaption { transform: rotate(3deg); margin-left: 18px; }

@media (max-width: 759px) {
  body { background-attachment: scroll; }
  .brand span { display: none; }
  .stage { padding-bottom: 78px; }
  .desk-photos { height: 280px; margin-top: -28px; }
  .polaroid { width: 46vw; padding: 8px 8px 4px; }
  .polaroid figcaption { font-size: 2.1rem; }
  .polaroid.jason { left: 2%; top: 8px; }
  .polaroid.matt { left: 36%; top: 42px; }
}

@media (min-width: 760px) {
  .sheet-inner { margin: 18px; padding: 42px 48px 52px; }
  .seal { width: 112px; height: 112px; }
  .split { grid-template-columns: 1fr 1fr; }
  .toc { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .mobile-call { display: none; }
  .stage { padding-bottom: 64px; }
}

@media (min-width: 1520px) {
  .pen { display: block; }
  .stage { padding-top: 42px; }
}

@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: rise 0.7s ease both; }
  .rule { animation: draw 0.8s 0.25s ease both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body { background: white; }
  .topbar, .pen, .prop, .mobile-call, .desk-photos { display: none; }
  .sheet { box-shadow: none; }
}
