/* Unsigned: the security envelope.
   Envelope paper, letter sheets, indigo ink, a security tint that hides content,
   and one wax-red color reserved for the seal and the main action. */

:root {
  --envelope: #FFFFFF;
  --sheet: #FFFFFF;
  --ink: #111111;
  --tint: #B4C2F2;
  --wax: #1F3BB3;
  --faded: #555555;
  --line: #E2E2E2;
  --on-wax: #FFFFFF;
  --good: #1E6B3A;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --envelope: #0E0F12;
    --sheet: #0E0F12;
    --ink: #F2F2F2;
    --tint: #2C3A78;
    --wax: #6F86FF;
    --faded: #A3A3A3;
    --line: #2A2C33;
    --on-wax: #0E0F12;
    --good: #7FCB95;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--envelope); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--envelope);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The security tint: the pattern printed inside envelopes so nobody can read through them. */
.tint {
  background-color: var(--envelope);
  background-image:
    repeating-linear-gradient(45deg, var(--tint) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, var(--tint) 0 1px, transparent 1px 5px);
}

/* ---------- frame ---------- */

.site {
  max-width: 70rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.3rem;
}

.brand svg { width: 30px; height: 30px; color: var(--wax); }

.site nav { font-family: var(--sans); font-size: 0.95rem; }
.site nav a { color: var(--ink); text-decoration: none; margin-left: 1.4rem; }
.site nav a:hover, .site nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

main { max-width: 70rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
main.narrow { max-width: 46rem; }

footer {
  max-width: 70rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--faded);
  border-top: 1px solid var(--line);
}
footer a { color: var(--faded); }

/* ---------- type ---------- */

h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; margin: 0; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); margin-bottom: 1.25rem; font-variation-settings: "opsz" 60; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 1rem; font-variation-settings: "opsz" 40; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
p { max-width: 36em; margin: 0 0 1rem; }
.lead { font-size: 1.28rem; color: var(--faded); line-height: 1.55; }
.muted, .tag { color: var(--faded); font-size: 0.95rem; }
.ui { font-family: var(--sans); }
a { color: var(--wax); text-underline-offset: 3px; }

/* ---------- surfaces ---------- */

.sheet, .card {
  background: var(--sheet);
  border-radius: 3px;
  border: 1px solid var(--ink);
  padding: 2rem 2.25rem;
}
.card { margin: 1.25rem 0; padding: 1.4rem 1.6rem; }

section { padding: 4.5rem 0; border-top: 1px solid var(--line); }

/* ---------- controls ---------- */

.btn, button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.8rem 1.4rem;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.btn-wax, button.btn-wax { background: var(--wax); border-color: var(--wax); color: var(--on-wax); }
.btn:hover, button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.5; cursor: default; }

input, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.6rem 0.7rem;
}
textarea { width: 100%; min-height: 7rem; font-family: var(--serif); line-height: 1.55; }
label { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.98rem; margin: 1.25rem 0 0.4rem; }

a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--wax);
  outline-offset: 3px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3.5rem;
  align-items: center;
  padding: 3.5rem 0 5.5rem;
  border-top: none;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.75rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 2.5rem; } }

/* The one moment: an answer is sealed on click, and only a theme comes out. */
.carousel { display: grid; gap: 1rem; }
.letter { min-height: 21rem; display: flex; flex-direction: column; cursor: pointer; }
.letter .meta { font-family: var(--sans); font-size: 0.88rem; color: var(--faded); margin: 0 0 0.9rem; }
.letter .answer-wrap { position: relative; min-height: 6.4em; display: flex; align-items: center; }
.letter .answer { font-size: 1.35rem; font-style: italic; line-height: 1.45; margin: 0; padding-right: 3.5rem; }
.letter .cover {
  position: absolute; inset: -0.35rem -0.5rem; border-radius: 2px;
  transform-origin: left center; transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.25, 1);
}
.letter .seal {
  position: absolute; right: -0.8rem; top: 50%; width: 92px; height: 92px; margin-top: -46px;
  color: var(--wax); opacity: 0; transform: scale(1.7) rotate(-9deg);
  transition: opacity 0.3s 0.85s, transform 0.45s 0.85s cubic-bezier(0.2, 0.9, 0.25, 1);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.18));
}
.letter .result { display: grid; margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--line); font-family: var(--sans); }
.letter .result > div { grid-area: 1 / 1; display: flex; justify-content: space-between; gap: 1rem; }
.letter .result .muted { display: block; font-size: 0.82rem; }
.letter .result .before { color: var(--faded); transition: opacity 0.3s; }
.letter .result .after { opacity: 0; transition: opacity 0.5s 1.45s; }
.letter.sealed .cover { transform: scaleX(1); }
.letter.sealed .seal { opacity: 1; transform: scale(1) rotate(-9deg); }
.letter.sealed .result .before { opacity: 0; }
.letter.sealed .result .after { opacity: 1; }
.letter.instant .cover, .letter.instant .seal, .letter.instant .result > div { transition: none; }
.carousel-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dots { display: flex; gap: 0.6rem; }
.dots button { width: 0.75rem; height: 0.75rem; padding: 0; border-radius: 50%; border: 1px solid var(--ink); background: transparent; }
.dots button[aria-current="true"] { background: var(--wax); border-color: var(--wax); }
@media (prefers-reduced-motion: reduce) {
  .letter .cover, .letter .seal, .letter .result > div { transition: none; }
}

/* ---------- landing sections ---------- */

.story { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.story blockquote { margin: 0; font-size: 1.35rem; line-height: 1.5; font-style: italic; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; gap: 1.5rem; } }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
ol.steps li { counter-increment: step; }
ol.steps li::before {
  content: counter(step);
  display: block;
  font-size: 3rem;
  line-height: 1;
  font-weight: 300;
  color: var(--wax);
  margin-bottom: 0.75rem;
  font-variation-settings: "opsz" 60;
}
ol.steps p { font-size: 1.02rem; }
@media (max-width: 860px) { ol.steps { grid-template-columns: 1fr; } }

.proof { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.proof ul { margin: 0; padding-left: 1.2rem; }
.proof li { margin-bottom: 0.5rem; }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }

.uses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; margin-top: 1.5rem; }
.uses p { font-size: 1.02rem; }
@media (max-width: 700px) { .uses { grid-template-columns: 1fr; } }

/* ---------- tables, faq ---------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 0.75rem 0.85rem 0; border-bottom: 1px solid var(--line); }
th { font-family: var(--sans); font-weight: 500; font-size: 0.92rem; color: var(--faded); }
td.ours { color: var(--ink); font-weight: 600; }

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.15rem; }
details p { margin-top: 0.75rem; }

.closing { text-align: left; }

/* ---------- results, survey pages ---------- */

.theme { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0.55rem 0; }
.theme:last-child { border-bottom: none; }
.count { font-family: var(--sans); font-weight: 600; color: var(--wax); white-space: nowrap; }
.ok { color: var(--good); }
.bad { color: var(--wax); }
.facts div { margin: 0.2rem 0; }

/* ---------- demo ---------- */

.act { display: grid; grid-template-columns: 14rem 1fr; gap: 2.5rem; }
.act .who { font-family: var(--sans); font-size: 0.95rem; color: var(--faded); }
.act .who strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); font-weight: 600; margin-bottom: 0.3rem; }
@media (max-width: 860px) { .act { grid-template-columns: 1fr; gap: 1rem; } }
.attempts { display: grid; gap: 1rem; margin-top: 1.25rem; }
.attempt { display: grid; grid-template-columns: 15rem 1fr; gap: 1.25rem; align-items: start; }
.attempt .answer-box { font-family: var(--sans); font-size: 0.98rem; min-height: 2.6rem; padding-top: 0.6rem; }
@media (max-width: 700px) { .attempt { grid-template-columns: 1fr; gap: 0.5rem; } }

pre.diagram { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.85rem; line-height: 1.45; overflow-x: auto; background: var(--sheet); padding: 1.25rem; border-radius: 3px; border: 1px solid var(--line); }

.story blockquote { font-size: 1.2rem; }
.story blockquote + blockquote { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* ---------- landing v2 ---------- */
.stories { max-width: 40rem; }
.stories blockquote { margin: 0; padding: 1.4rem 0; border-top: 1px solid var(--line); font-size: 1.25rem; line-height: 1.5; }
.stories blockquote:first-of-type { border-top: none; padding-top: 0.5rem; }
.band { padding: 4.5rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.band .inner { max-width: 70rem; margin: 0 auto; padding: 0 1.5rem; }
.band h2 { background: var(--envelope); display: table; padding: 0.2rem 0.6rem; margin-left: -0.6rem; }
.band .intro { background: var(--envelope); display: table; padding: 0.4rem 0.6rem; margin-left: -0.6rem; max-width: 40rem; }
.received { display: grid; grid-template-columns: 19rem 1fr; gap: 2.5rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 860px) { .received { grid-template-columns: 1fr; } }
.phone { background: var(--sheet); border: 9px solid var(--ink); border-radius: 30px; padding: 1.25rem 1rem 1.5rem; }
.phone .bar { width: 4.5rem; height: 0.35rem; background: var(--ink); border-radius: 1rem; margin: 0 auto 1rem; }
.phone h3 { font-size: 1.05rem; }
.phone label { font-size: 0.85rem; margin-top: 0.9rem; }
.phone .field { border: 1px solid var(--line); border-radius: 2px; min-height: 3.2rem; padding: 0.4rem 0.5rem; font-size: 0.9rem; font-style: italic; color: var(--faded); }
.phone .send { display: block; margin-top: 1rem; text-align: center; background: var(--wax); color: var(--on-wax); font-family: var(--sans); font-size: 0.9rem; padding: 0.55rem; }
.report { background: var(--sheet); border: 1px solid var(--ink); padding: 1.5rem 1.75rem; }
.report h3 { margin-top: 1.25rem; }
.report h3:first-of-type { margin-top: 0.5rem; }
.report .stats { font-family: var(--sans); display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1rem; }
.report .stats strong { color: var(--wax); }
.closing-links { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- anonymous comments ---------- */
.voices h2 { max-width: 30em; }
.comments { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin: 1.75rem 0 2rem; }
@media (max-width: 760px) { .comments { grid-template-columns: 1fr; } }
.comment { background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem 1.25rem 1.25rem; }
.comment header { display: flex; align-items: center; gap: 0.75rem; font-family: var(--sans); margin-bottom: 0.75rem; }
.comment header div { flex: 1; line-height: 1.3; }
.comment header strong { display: block; font-size: 0.98rem; }
.comment header span { font-size: 0.85rem; color: var(--faded); }
.comment .chip { flex: none; font-size: 0.78rem; color: var(--wax); border: 1px solid currentColor; border-radius: 999px; padding: 0.15rem 0.6rem; }
.comment p { margin: 0; font-size: 1.08rem; line-height: 1.55; }
.avatar { width: 40px; height: 40px; flex: none; }
.avatar.a1 { fill: var(--wax); }
.avatar.a2 { fill: #5B6FD6; }
.avatar.a3 { fill: #8A8F98; }
.avatar.a4 { fill: #2B2F3A; }
.after-comments { max-width: 40em; }

/* ---------- short-attention landing ---------- */
ol.steps p strong, .proof p strong, .after-comments strong { font-weight: 600; }
details.fold { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1rem 0; }
details.fold summary { font-size: 1.35rem; font-weight: 600; cursor: pointer; }
details.fold .table-wrap { margin-top: 1rem; }
.sticky-cta { display: none; }
@media (max-width: 700px) {
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    text-align: center; border-radius: 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  body { padding-bottom: 4.5rem; }
}

/* ---------- form: example panel ---------- */
.form-layout { max-width: 70rem; margin: 0 auto; padding: 0 1.5rem 4rem; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; } }
.preview { margin-top: 1.5rem; position: sticky; top: 1.5rem; }
.pv-label { display: block; font-size: 0.8rem; color: var(--faded); margin-bottom: 0.3rem; }
.pv-answer { font-style: italic; margin: 0; }
.pv-seal { position: relative; height: 3.4rem; margin: 1.1rem 0; }
.pv-cover { position: absolute; inset: 0 2.6rem 0 0; border-radius: 2px; }
.pv-seal img { position: absolute; right: 0; top: 50%; margin-top: -32px; transform: rotate(-9deg); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.18)); }
.pv-facts { margin: 1.25rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; }
.pv-facts li { margin: 0.35rem 0; }
