/* Are we a good match? — two sheets of the postcard paper, edge to edge */

/* The sheets scroll in their own area below the menu row, so text never slides under the buttons */
.sheets {
  position: fixed;
  inset: var(--chrome-h) 0 0;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 48px);
  padding: 14px clamp(16px, 4vw, 64px) clamp(24px, 5vh, 56px);
  overflow-y: auto;
  overscroll-behavior: contain;
  outline: none;
}

.sheet {
  min-height: calc(100vh - var(--chrome-h) - 14px - clamp(24px, 5vh, 56px));
  min-height: calc(100dvh - var(--chrome-h) - 14px - clamp(24px, 5vh, 56px));
  flex-shrink: 0; /* grow with long text rather than squeeze it */
  display: flex;
  align-items: safe center;
  padding: clamp(32px, 6vh, 72px) clamp(22px, 6vw, 96px);
  color: var(--ink);
}
.sheet-body { max-width: 46em; }

.sheet h1, .sheet h2 {
  margin: 0 0 .9em;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.sheet p, .sheet li {
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 400;
  line-height: 1.6;
}
.sheet p { margin: 0 0 1em; }
.sheet p:last-child { margin-bottom: 0; }

.checks {
  margin: 0 0 1.6em;
  padding-left: 1.3em;
}
.checks li { margin-bottom: .55em; padding-left: .2em; }
.checks li::marker { content: "•  "; }

/* Privacy policy (privacy.html): numbered headings and smaller sub-headings */
.policy h2 { margin: 1.8em 0 .6em; font-size: clamp(20px, 1.7vw, 24px); }
.policy h3 { margin: 1.2em 0 .5em; font-size: clamp(16px, 1.3vw, 19px); font-weight: 700; }
.policy .policy-date { margin-top: -.4em; font-size: 14px; opacity: .65; }
.policy .checks { margin-bottom: 1em; }
.policy a { color: inherit; font-weight: 700; text-underline-offset: 3px; }

/* Expandable boxes: a white leaning button opens or closes the text beneath it */
.fold + .fold { margin-top: 14px; }
.fold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 15em;
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font: 700 16px / 1 var(--grotesk);
  box-shadow: 0 0 0 1px rgba(16, 40, 76, .16), 0 6px 18px rgba(16, 40, 76, .1);
  cursor: pointer;
  transform: skewX(var(--lean));
  transition: box-shadow .3s;
}
.fold-btn:hover { box-shadow: 0 0 0 1px rgba(16, 40, 76, .4), 0 8px 22px rgba(16, 40, 76, .16); }
.fold-btn > * { transform: skewX(calc(-1 * var(--lean))); }
/* The triangle points down when closed and up when open */
.fold-tri { width: 10px; height: 7px; fill: currentColor; transition: rotate .4s var(--ease); }
.fold-btn[aria-expanded="true"] .fold-tri { rotate: 180deg; }

/* The box grows to its text's height and back */
.fold-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease);
}
.fold-panel.is-open { grid-template-rows: 1fr; }
.fold-inner { min-height: 0; overflow: hidden; }
.fold-inner > :first-child { margin-top: 22px; }
.fold-inner > :last-child { margin-bottom: 8px; }
.fold-inner a { color: inherit; font-weight: 700; text-underline-offset: 3px; }

/* Steps: each number sits on a leaning parallelogram, like the Digital ads framework,
   and its words slide out from behind it as you scroll (match.js sets --shown) */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 1.1em;
}
.steps li:last-child { margin-bottom: 0; }
.step-num {
  position: relative;
  display: grid;
  place-items: center;
  height: 40px;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  isolation: isolate;
}
.step-num::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 6px;
  background: var(--navy);
  transform: skewX(var(--lean));
}
.step-text { overflow: hidden; padding-top: 8px; }
.js .step-text p {
  opacity: var(--shown, 0);
  transform: translateX(calc((var(--shown, 0) - 1) * 100%));
}

/* The footnote sits in the sheet's bottom-left corner */
.sheet-how { flex-direction: column; align-items: stretch; }
.sheet-how .sheet-body { margin: auto 0; }
.sheet-note {
  max-width: 46em;
  margin: 28px 0 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: .7;
}

/* The second sheet rises in as it scrolls into view */
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s ease, transform .9s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .fold-panel, .fold-tri { transition: none; }
  .js .step-text p { opacity: 1; transform: none; }
}
