/* =========================================================
   PeraNivo — type, colour, and the passbook
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --cocoa: #2a1308;
  --cocoa-2: #3b1b0b;
  --orange: #f25c05;
  --orange-2: #d94a00;
  --gold: #ffc12e;
  --gold-2: #ffd66b;
  --paper: #fff4dc;
  --paper-2: #efdcb9;
  --paper-3: #d9c096;
  --ink: #331706;
  --muted: #75452a;
  --on-dark: #ffe9c7;
  --on-dark-muted: #dcb78c;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-small: 0.8125rem;
  --step-body: 1.125rem;
  --step-lead: 1.3125rem;
  --step-head: clamp(1.875rem, 1.2rem + 2.2vw, 2.5rem);
  --step-display: clamp(2.125rem, 1rem + 4vw, 3.5rem);

  --margin: 16px;
  --book-max: 1120px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cocoa);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p, dl, dd, dt, figure {
  margin: 0;
}

button, select, input {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: var(--gold);
  color: var(--cocoa);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 30;
  padding: 12px 16px;
  background: var(--gold);
  color: var(--cocoa);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-140%);
}

.skip:focus {
  transform: none;
}

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

.body {
  max-width: 48ch;
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.55;
  text-wrap: pretty;
}

.lead {
  max-width: 36ch;
  font-size: var(--step-lead);
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
  text-wrap: pretty;
}

.small,
.caption {
  font-size: var(--step-small);
  line-height: 1.5;
  color: var(--muted);
}

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--t-hover) ease;
}

@media (hover: hover) {
  .link:hover {
    text-decoration-color: currentColor;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--t-press) var(--ease-out),
    background-color var(--t-hover) ease;
}

.btn:active {
  transform: scale(0.97);
}

@media (hover: hover) {
  .btn:hover {
    background: var(--gold-2);
  }
}

.btn--small {
  min-height: 44px;
  padding: 0 18px;
  font-size: var(--step-body);
}

/* ---------- Top bar ---------- */

.topbar {
  background: var(--cocoa);
  color: var(--on-dark);
  padding: 0 var(--margin);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  max-width: var(--book-max);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-dark);
  font-size: var(--step-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.topbar__nav {
  display: none;
  gap: 26px;
  font-size: var(--step-body);
}

.topbar__nav a {
  color: var(--on-dark-muted);
  text-decoration: none;
  transition: color var(--t-hover) ease;
}

@media (hover: hover) {
  .topbar__nav a:hover {
    color: var(--on-dark);
  }
}

@media (min-width: 760px) {
  .topbar__inner {
    min-height: 72px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .topbar__nav {
    display: flex;
  }
}

/* ---------- Cover ---------- */

.hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100svh;
  padding: 20px var(--margin) 0;
  overflow: clip;
  background: var(--cocoa);
  position: relative;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--cocoa);
  opacity: 0.6;
  pointer-events: none;
}

.cover {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  height: calc(100svh - 62px - 20px);
  min-height: 600px;
  background: var(--orange);
  overflow: hidden;
  isolation: isolate;
}

.cover__spine {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cocoa);
}

.cover__spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.cover__label {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 16px;
  left: 32px;
  padding: 20px;
  background: var(--paper);
  border-top: 8px solid var(--gold);
}

.cover__seal {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
}

.cover__title {
  font-family: var(--font-display);
  font-size: var(--step-display);
  font-weight: 750;
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.cover__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.cover__title .line > span {
  display: block;
}

.cover__label .lead {
  margin-top: 14px;
}

.cover__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 14px;
  font-size: var(--step-body);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  color: var(--ink);
}

.cover__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 18px;
}

.cover__actions .btn {
  min-width: 178px;
}

.link-other {
  color: var(--ink);
  font-size: var(--step-body);
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--orange);
}

@media (hover: hover) {
  .link-other:hover {
    text-decoration-color: currentColor;
  }
}

.cover__note {
  margin-top: 14px;
  font-size: var(--step-small);
  line-height: 1.45;
  color: var(--muted);
}

.cover__sms {
  margin-top: 8px;
  font-size: var(--step-small);
  line-height: 1.45;
  color: var(--muted);
}

.cover__foot {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 12px 36px;
  background: var(--cocoa);
  color: var(--on-dark);
  font-size: var(--step-small);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 760px) {
  .hero {
    padding-top: 24px;
  }

  .cover {
    height: calc(100svh - 72px - 24px);
  }

  .cover__spine {
    width: 28px;
  }

  .cover__spine span {
    font-size: var(--step-small);
  }

  .cover__label {
    top: 40px;
    right: 40px;
    left: 44px;
    padding: 28px;
  }

  .cover__seal {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
  }

  .cover__label .lead {
    margin-top: 18px;
  }

  .cover__terms {
    margin-top: 20px;
  }

  .cover__actions {
    margin-top: 22px;
  }

  .cover__note {
    margin-top: 16px;
  }

  .cover__foot {
    padding: 14px 18px 14px 44px;
  }
}

/* ---------- The book ---------- */

.spread {
  padding: 56px var(--margin) 0;
  background: var(--cocoa);
}

.book {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: 1fr;
  max-width: var(--book-max);
  margin: 0 auto;
  background: var(--paper);
}

.book::after {
  content: "";
  position: absolute;
  inset: 6px -6px -6px 6px;
  z-index: -1;
  background: var(--paper-2);
}

.book::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  z-index: -2;
  background: var(--paper-3);
}

.book__ribbon {
  position: absolute;
  top: 0;
  right: 64px;
  z-index: 2;
  width: 12px;
  height: 52px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  pointer-events: none;
}

.book__page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 24px;
  min-width: 0;
}

.book__page + .book__page {
  border-top: 8px solid var(--paper-2);
}

.book__fold {
  display: none;
}

.book.book--single {
  grid-template-columns: 1fr;
}

.book--single .book__page {
  border-top: 0;
}

h2 {
  max-width: 19ch;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-head);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.statement {
  max-width: 22ch;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.status {
  max-width: 44ch;
  padding: 12px 14px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.45;
}

.notice {
  max-width: 390px;
  padding: 18px 20px;
  border-top: 8px solid var(--gold);
  background: var(--paper-2);
  color: var(--ink);
}

.notice__title {
  margin-bottom: 8px;
  font-size: var(--step-body);
  font-weight: 700;
}

.notice__sub {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: var(--step-small);
  font-weight: 700;
}

.notice__list {
  margin: 0;
  padding-left: 18px;
  list-style: square;
  font-size: var(--step-body);
  line-height: 1.45;
}

.notice__list li + li {
  margin-top: 5px;
}

.notice__list ::marker,
.checks ::marker {
  color: var(--orange-2);
}

@media (min-width: 700px) {
  :root {
    --margin: 32px;
  }

  .spread {
    padding-top: 96px;
  }

  .book {
    grid-template-columns: 1fr 1fr;
  }

  .book__page {
    padding: 56px 48px;
    min-height: 76svh;
  }

  .book__page--left {
    padding-right: 56px;
  }

  .book__page--right {
    padding-left: 56px;
  }

  .book__page + .book__page {
    border-top: 0;
  }

  .book__fold {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    display: block;
    width: 12px;
    transform: translateX(-50%);
    background: var(--paper-2);
    pointer-events: none;
  }

  .book::after {
    inset: 8px -8px -8px 8px;
  }
}

@media (min-width: 1000px) {
  .slip {
    transform: rotate(-0.8deg);
  }
}

@media (max-width: 899px) {
  .book {
    grid-template-columns: 1fr;
  }

  .book__fold {
    display: none;
  }

  .book__page,
  .book__page--left,
  .book__page--right {
    min-height: 0;
    padding: 40px 24px;
  }

  .book__page + .book__page {
    border-top: 8px solid var(--paper-2);
  }

  .book::after {
    inset: 6px -6px -6px 6px;
  }

  .book::before {
    inset: 10px -10px -10px 10px;
  }

  .book__ribbon {
    right: 32px;
    width: 10px;
    height: 44px;
  }
}

/* ---------- Install slip ---------- */

.slip-wrap {
  width: 100%;
}

.slip {
  position: relative;
  width: 100%;
  padding: 24px 24px 30px;
  background: var(--gold);
  color: var(--ink);
  transform: none;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 12px),
    87.5% 100%,
    75% calc(100% - 12px),
    62.5% 100%,
    50% calc(100% - 12px),
    37.5% 100%,
    25% calc(100% - 12px),
    12.5% 100%,
    0 calc(100% - 12px)
  );
}

.slip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  background: var(--ink);
  color: var(--gold);
  padding: 10px 12px;
  margin: 0 0 18px;
}

.slip__title {
  font-family: var(--font-display);
  font-size: var(--step-body);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.slip__tag {
  font-size: var(--step-small);
  font-weight: 600;
  white-space: nowrap;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 30px;
  padding-bottom: 20px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step) ".";
  position: absolute;
  top: 0;
  left: 0;
  font-size: var(--step-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.step__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.step__head strong {
  font-size: var(--step-body);
  font-weight: 700;
  line-height: 1.3;
}

.dur {
  flex: none;
  font-size: var(--step-small);
  font-weight: 600;
  white-space: nowrap;
}

.steps p {
  margin-top: 4px;
  max-width: 42ch;
  font-size: var(--step-body);
  line-height: 1.45;
}

.slip .link {
  text-decoration-color: var(--ink);
}

.brand-block {
  margin-top: 14px;
  padding: 14px;
  background: var(--paper);
}

.brand-block label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--step-small);
  font-weight: 700;
}

.brand-block select {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--step-body);
}

.brand-block__path {
  margin-top: 10px;
  font-size: var(--step-body);
  line-height: 1.45;
}

.brand-block__all {
  margin-top: 12px;
  font-size: var(--step-small);
}

.brand-block__all summary {
  padding-block: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.brand-block__all dl {
  margin-top: 10px;
}

.brand-block__all dt {
  margin-top: 10px;
  font-weight: 700;
}

.brand-block__all dd {
  margin: 2px 0 0;
  line-height: 1.45;
}

.brand-block__note {
  margin-top: 10px;
  font-size: var(--step-small);
  line-height: 1.45;
}

.slip__result {
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--gold);
  font-size: var(--step-body);
  font-weight: 600;
}

/* Without JS both platform slips are readable. With JS the detected one is used. */
.js [data-platform]:not(.is-active) {
  display: none;
}

/* ---------- Use ---------- */

.photos {
  position: relative;
  aspect-ratio: 1;
  padding: 12px;
  background: var(--paper-2);
}

.photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.1) saturate(0.94) contrast(1.02);
}

.caption {
  margin-top: 10px;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-small);
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-hover) ease;
}

.thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: sepia(0.1) saturate(0.94) contrast(1.02);
}

.thumb span {
  display: block;
  padding: 2px 2px 0;
}

.thumb.is-active,
.thumb[aria-pressed="true"] {
  background: var(--gold);
}

@media (hover: hover) {
  .thumb:hover {
    background: var(--gold-2);
  }
}

.tabs {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.tab {
  flex: 1;
  min-height: 46px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-size: var(--step-body);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--t-hover) ease;
}

.tab[aria-selected="true"] {
  background: var(--gold);
}

@media (hover: hover) {
  .tab:hover {
    background: var(--gold-2);
  }
}

.panel {
  min-height: 5.4em;
}

.panel p {
  max-width: 44ch;
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.55;
  text-wrap: pretty;
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}

.duo__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--t-hover) ease;
}

.duo__cell--gold {
  background: var(--gold);
  color: var(--ink);
}

@media (hover: hover) {
  .duo__cell:hover {
    background: var(--cocoa-2);
  }

  .duo__cell--gold:hover {
    background: var(--gold-2);
  }
}

/* ---------- Price ---------- */

.ledger {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ledger__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 0;
  font-size: var(--step-body);
  line-height: 1.4;
}

.ledger__row dt {
  flex: none;
}

.ledger__row dd {
  flex: none;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.leader {
  flex: 1;
  min-width: 16px;
  border-bottom: 3px dotted var(--paper-3);
  transform: translateY(-0.24em);
}

.ledger__row--ink {
  padding: 14px;
  background: var(--ink);
  color: var(--gold);
}

.ledger__row--ink dt,
.ledger__row--ink dd {
  color: var(--gold);
}

.ledger__row--ink .leader {
  border-bottom-color: var(--gold);
}

.ledger__note {
  margin-top: 18px;
  max-width: 46ch;
  color: var(--muted);
  font-size: var(--step-body);
  line-height: 1.5;
}

.ledger__lender {
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: var(--step-small);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.calc {
  max-width: 390px;
  padding: 18px 20px;
  border-top: 8px solid var(--gold);
  background: var(--paper-2);
}

.calc__formula {
  max-width: 22ch;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.calc__note {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--step-small);
  line-height: 1.45;
}

/* ---------- Trust ---------- */

.trust__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 120px;
  height: 120px;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  text-align: center;
  font-size: var(--step-small);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  transform: rotate(-6deg);
}

.stamp strong {
  font-size: var(--step-small);
  font-weight: 700;
}

.checks {
  margin: 0;
  padding-left: 20px;
  list-style: square;
}

.checks li {
  max-width: 46ch;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.5;
  text-wrap: pretty;
}

.photo {
  padding: 10px;
  background: var(--paper-2);
}

.photo img {
  width: 100%;
  object-fit: cover;
  filter: sepia(0.1) saturate(0.94) contrast(1.02);
}

.photo--wide img {
  aspect-ratio: 4 / 3;
}

.photo figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--step-small);
  line-height: 1.4;
}

.book__page--right .photo + .photo {
  margin-top: 4px;
}

@media (min-width: 520px) {
  .trust__head {
    grid-template-columns: 1fr auto;
  }

  .stamp {
    width: 150px;
    height: 150px;
  }
}

/* ---------- FAQ ---------- */

.faq p {
  max-width: 52ch;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.55;
  text-wrap: pretty;
}

.faq p:last-child {
  margin-bottom: 0;
}

.faq strong {
  font-weight: 600;
  color: var(--ink);
}

.faq-note {
  max-width: 46ch;
  margin-top: auto;
  padding: 16px 18px;
  border-top: 8px solid var(--gold);
  background: var(--paper-2);
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.45;
}

/* ---------- Final ---------- */

.spread--final {
  padding-bottom: 0;
}

.final {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  background: var(--paper);
}

.final__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: 40px 24px;
}

.final__sentence {
  max-width: 100%;
  font-family: var(--font-display);
  font-size: var(--step-head);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.inline-select {
  min-height: 44px;
  padding: 0 0.45em;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.62em;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: baseline;
  cursor: pointer;
}

.final__btn {
  min-width: 220px;
  margin-top: 4px;
}

.final__copy .small {
  max-width: 46ch;
}

.final__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px 24px;
  background: var(--gold);
  color: var(--ink);
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    0 100%,
    0 60%,
    4% 56%,
    4% 44%,
    0 40%
  );
}

.final__panel img {
  width: 96px;
  height: 96px;
}

.panel-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-size: var(--step-body);
  font-weight: 700;
  text-decoration: none;
}

.panel-link:first-of-type {
  border-top: 2px solid var(--ink);
}

.panel-link span {
  font-size: var(--step-small);
  font-weight: 400;
  color: var(--ink);
  opacity: 0.85;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .panel-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
}

.panel-note {
  max-width: 38ch;
  font-size: var(--step-small);
  line-height: 1.45;
}

@media (min-width: 760px) {
  .final {
    grid-template-columns: 1fr 1fr;
    min-height: 78svh;
  }

  .final__copy {
    justify-content: flex-end;
    padding: 56px 48px;
  }

  .final__panel {
    padding: 56px 48px;
  }

  .final__panel img {
    width: 120px;
    height: 120px;
  }
}

/* ---------- Back cover ---------- */

main {
  position: relative;
  z-index: 1;
  background: var(--cocoa);
}

.backcover {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 96px var(--margin);
  background: var(--cocoa);
  color: var(--on-dark);
}

.backcover__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  text-align: center;
}

.backcover__wordmark {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: var(--step-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.backcover__wordmark a {
  color: inherit;
  text-decoration: none;
}

.backcover__line {
  max-width: 46ch;
  font-size: var(--step-body);
  line-height: 1.45;
}

.backcover__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-size: var(--step-body);
}

.backcover__nav a {
  color: var(--on-dark);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}

@media (hover: hover) {
  .backcover__nav a:hover {
    color: var(--gold);
    text-decoration-color: currentColor;
  }
}

.backcover__legal {
  max-width: 62ch;
  color: var(--on-dark-muted);
  font-size: var(--step-small);
  line-height: 1.5;
}

.backcover__sms {
  font-size: var(--step-body);
  color: var(--on-dark);
}

.backcover__credits,
.backcover__copyright {
  color: var(--on-dark-muted);
  font-size: var(--step-small);
  line-height: 1.45;
}

.backcover__credits a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .cover__title [data-line] {
    transform: translateY(105%);
    animation: line-up 900ms var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 90ms + 120ms);
  }

  .js .cover [data-load] {
    opacity: 0;
    transform: translateY(12px);
    animation: load-rise 500ms var(--ease-out) forwards;
    animation-delay: var(--d);
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 700ms var(--ease-out),
      transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 60ms);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .js .trust__head .stamp {
    opacity: 0;
    transform: rotate(-6deg) scale(1.16);
    transition:
      opacity 500ms var(--ease-out),
      transform 900ms var(--ease-expo);
  }

  .js .trust__head.is-in .stamp {
    opacity: 1;
    transform: rotate(-6deg) scale(1);
  }
}

@keyframes line-up {
  to {
    transform: none;
  }
}

@keyframes load-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .photo--wide img {
      animation: photo-drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }

    @keyframes photo-drift {
      from {
        transform: scale(1) translateY(-2%);
      }
      to {
        transform: scale(1.04) translateY(2%);
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 420px) {
  .cover__actions .btn {
    min-width: 0;
    flex: 1 1 150px;
  }

  .link-other {
    flex: 0 0 100%;
  }

  .duo {
    grid-template-columns: 1fr;
  }

  .step__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}
