/* =========================================================================
   b_digital_product — "Two-ink press sheet"
   A one-page product page for a digital download, set like a printed
   field manual: ink + one accent ink, paper sheets on a press-table ground,
   crop marks, registration marks, deliberate plate misregistration.
   No external requests. No slot tokens in this file.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  /* accents are overridden by the inline <style> in each page's <head> */
  --accent: #35507a;
  --accent-soft: #dfe6f0;

  /* neutral press palette (fixed, guarantees AA regardless of accent) */
  --ink: #14171b;
  --ink-2: #3b424c;
  --ink-3: #5d6673;
  --paper: #ffffff;
  --stock: #e2e4e7;
  --stock-deep: #d5d8dc;
  --rule: #c6cad0;
  --rule-soft: #e0e3e7;

  /* derived, contrast-safe accent roles (fallback first, color-mix second) */
  --accent-ink: #2c3a52;
  --accent-ink: color-mix(in srgb, var(--accent) 40%, #14171b);
  --accent-rule: #3f5c8a;
  --accent-rule: color-mix(in srgb, var(--accent) 72%, #262b33);
  --accent-tint: #eef1f6;
  --accent-tint: color-mix(in srgb, var(--accent) 12%, #ffffff);
  --wash: #eef0f3;
  --wash: color-mix(in srgb, var(--accent-soft) 38%, #ffffff);

  --focus: var(--ink);

  --font-display: "Charter", "Bitstream Charter", "Iowan Old Style",
    "Sitka Text", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
    "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono",
    "Segoe UI Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-body: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --text-lead: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --text-h2: clamp(1.6rem, 1.3rem + 1.35vw, 2.35rem);
  --text-h1: clamp(2.35rem, 1.5rem + 3.9vw, 4.4rem);
  --text-price: clamp(2.1rem, 1.6rem + 2.2vw, 3.1rem);

  --gap: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem);
  --band: clamp(3.25rem, 2.2rem + 4.4vw, 6rem);
  --sheet-pad: clamp(1.4rem, 0.9rem + 2.6vw, 3.25rem);

  --shadow-sheet: 0 1px 0 rgba(20, 23, 27, 0.06),
    0 14px 34px -22px rgba(20, 23, 27, 0.5);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stock);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; }

::selection {
  background: var(--accent-tint);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- layout primitives ---------- */
.wrap {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

.band {
  padding-block: var(--band);
}

.band--wash {
  background: var(--wash);
  border-block: 1px solid var(--rule);
}

.sheet {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: var(--shadow-sheet);
  padding: var(--sheet-pad);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 0.9rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  background: var(--accent-rule);
  vertical-align: 0.28em;
  margin-right: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  line-height: 1.08;
  letter-spacing: -0.018em;
  font-weight: 600;
  max-width: 22ch;
}

.section-title--lead {
  margin-bottom: clamp(1.6rem, 1.15rem + 1.6vw, 2.5rem);
}

.lede {
  color: var(--ink-2);
  font-size: var(--text-lead);
  line-height: 1.5;
  max-width: 46ch;
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--stock);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding-block: 0.5rem;
}

.masthead__name {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding-right: 0.25rem;
}

.masthead__spec {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.regmark {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: var(--accent-rule);
  stroke-width: 1.1;
  fill: none;
}

/* ---------- hero ---------- */
.hero {
  background: var(--wash);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 1.6rem + 4vw, 5.25rem)
    clamp(2.75rem, 1.8rem + 4.4vw, 5.5rem);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 6vw, 4.5rem);
  align-items: start;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-weight: 600;
  text-wrap: balance;
  max-width: 16ch;
}

.hero__sub {
  margin-top: 1.35rem;
  color: var(--ink-2);
  font-size: var(--text-lead);
  line-height: 1.48;
  max-width: 44ch;
}

.hero__buy {
  margin-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
}

.pricetag {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.pricetag__amount {
  font-family: var(--font-display);
  font-size: var(--text-price);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.pricetag__note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.hero__assure {
  margin-top: 1.15rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

/* ---------- buy button: ink plate over an offset accent plate ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 56px;
  padding: 0.9rem 1.5rem;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  /* the accent plate sits behind, deliberately out of register */
  box-shadow: 7px 7px 0 0 var(--accent);
  transform: translate(0, 0);
  transition: transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* hover and press bring the two plates back into register */
.btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 4px 4px 0 0 var(--accent);
}

.btn:active {
  transform: translate(7px, 7px);
  box-shadow: 0 0 0 0 var(--accent);
}

.btn__amount {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
}

.btn--paper {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.btn--paper .btn__amount { border-left-color: rgba(20, 23, 27, 0.22); }

/* ---------- product artifact: saddle-stitched booklet, two inks ---------- */
.artifact {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2.4vw, 2.75rem);
  justify-self: center;
  width: 100%;
  max-width: 420px;
}

.artifact::before,
.artifact::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--accent-rule);
  opacity: 0.75;
}

.artifact::before {
  top: 0;
  left: 0;
  border-top-width: 1px;
  border-left-width: 1px;
}

.artifact::after {
  right: 0;
  bottom: 0;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.booklet {
  position: relative;
  transform: rotate(-1.4deg);
}

.booklet__plate,
.booklet__leaf {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  pointer-events: none;
}

.booklet__plate {
  background: var(--accent);
  transform: translate(13px, 13px);
}

.booklet__leaf {
  background: var(--paper);
  border: 1px solid var(--rule);
}

.booklet__leaf--a { transform: translate(7px, 6px); }
.booklet__leaf--b { transform: translate(3px, 3px); }

.booklet__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: clamp(1.15rem, 0.7rem + 1.6vw, 1.9rem);
  padding-left: clamp(1.6rem, 1rem + 2.2vw, 2.5rem);
  box-shadow: 0 22px 44px -28px rgba(20, 23, 27, 0.75);
  overflow: hidden;
}

.booklet__spine {
  position: absolute;
  inset: 0 auto 0 0;
  width: 11px;
  background: var(--ink);
}

.booklet__stitch {
  position: absolute;
  inset: 12% auto 12% 4px;
  width: 3px;
  background: repeating-linear-gradient(
    to bottom,
    var(--paper) 0 9px,
    transparent 9px 20px
  );
  opacity: 0.85;
}

.booklet__kicker {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.booklet__title {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1rem + 1.5vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}

.booklet__rules {
  margin-top: auto;
  display: grid;
  gap: 7px;
  padding-block: 1.25rem;
}

.booklet__rules i {
  display: block;
  height: 1px;
  background: var(--rule);
}

.booklet__rules i:nth-child(1) { width: 88%; }
.booklet__rules i:nth-child(2) { width: 96%; }
.booklet__rules i:nth-child(3) { width: 62%; }

.booklet__tint {
  height: clamp(38px, 9vw, 58px);
  background: var(--accent-soft);
  border: 1px solid var(--accent-rule);
  border-radius: 1px;
}

.booklet__foot {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--ink);
  padding-top: 0.75rem;
}

.booklet__imprint {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.booklet__price {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 1px;
  white-space: nowrap;
}

.artifact__caption {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- what's inside ---------- */
.inside__head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
}

.contents {
  display: grid;
  counter-reset: none;
}

.contents__item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0 1rem;
  align-items: start;
  padding-block: clamp(0.9rem, 0.7rem + 0.6vw, 1.25rem);
  border-top: 1px solid var(--rule-soft);
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.45;
}

.contents__item:first-child { border-top: 0; padding-top: 0; }
.contents__item:last-child { padding-bottom: 0; }

.check {
  width: 26px;
  height: 26px;
  margin-top: 0.15em;
  flex: none;
}

.check__disc { fill: var(--accent-tint); }
.check__ring { fill: none; stroke: var(--accent-rule); stroke-width: 1; }
.check__mark {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- benefits ---------- */
.benefits {
  display: grid;
  gap: clamp(1.75rem, 1rem + 2.6vw, 3rem);
}

.benefit {
  border-top: 2px solid var(--ink);
  padding-top: 1.15rem;
}

.benefit__mark {
  width: 22px;
  height: 22px;
  stroke: var(--accent-rule);
  stroke-width: 1.1;
  fill: none;
  margin-bottom: 0.9rem;
}

.benefit__title {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.benefit__body {
  margin-top: 0.6rem;
  color: var(--ink-2);
}

/* ---------- author note ---------- */
.note {
  position: relative;
  max-width: 62ch;
  margin-inline: auto;
  border-left: 3px solid var(--accent-rule);
  padding-left: clamp(1.15rem, 0.7rem + 2vw, 2.25rem);
}

.note__body {
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.52;
  letter-spacing: -0.008em;
  color: var(--ink);
}

.note__sign {
  width: 148px;
  height: 34px;
  margin-top: 1.6rem;
  stroke: var(--accent-rule);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
}

/* ---------- guarantee slab + second CTA ---------- */
.slab {
  --focus: #ffffff;
  background: var(--ink);
  color: #fff;
  border-radius: 2px;
  padding: clamp(1.75rem, 1.1rem + 3vw, 3.5rem);
  display: grid;
  gap: clamp(1.75rem, 1rem + 2.4vw, 3rem);
  align-items: center;
  box-shadow: 0 20px 44px -30px rgba(20, 23, 27, 0.9);
}

.slab__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.72;
  margin: 0 0 0.9rem;
}

.slab__note {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  line-height: 1.34;
  letter-spacing: -0.012em;
  max-width: 30ch;
}

.slab__buy {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

.slab__price {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- faq ---------- */
.faq {
  display: grid;
  gap: 0;
  max-width: 74ch;
}

.faq__q {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
}

.faq__a {
  margin: 0.55rem 0 clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  color: var(--ink-2);
  max-width: 62ch;
}

.faq__a:last-child { margin-bottom: 0; }

/* ---------- thank-you page ---------- */
.receipt {
  max-width: 640px;
  margin-inline: auto;
  text-align: left;
}

.receipt__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

.receipt__body {
  margin-top: 1.25rem;
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--ink-2);
}

.receipt__steps {
  margin-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  border-top: 2px solid var(--ink);
  display: grid;
}

.receipt__step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule-soft);
}

.receipt__step span { color: var(--ink-2); }

.receipt__contact {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.receipt__contact a { color: var(--accent-ink); }

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid var(--accent-rule);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  margin-bottom: 1.5rem;
}

.stamp .regmark { width: 14px; height: 14px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  background: var(--stock-deep);
  padding-block: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer__links a,
.footer__meta a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer__links a:hover,
.footer__meta a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent-rule);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.footer__meta a { min-height: 0; }

/* ---------- entrance (one staged reveal, motion-safe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 620ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
  }
  .reveal-1 { animation-delay: 40ms; }
  .reveal-2 { animation-delay: 120ms; }
  .reveal-3 { animation-delay: 200ms; }
  .reveal-4 { animation-delay: 300ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- breakpoints ---------- */
@media (min-width: 640px) {
  .wrap { width: min(100% - 3rem, 1120px); }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipt__steps { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
  }
  .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slab { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .slab__buy { justify-items: end; text-align: right; }
  .inside__head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 2.5rem;
  }
}

@media (min-width: 1180px) {
  .wrap { width: min(100% - 4rem, 1120px); }
}

/* very small screens: keep the artifact from crowding */
@media (max-width: 380px) {
  .artifact { padding: 0.75rem; }
  .btn { width: 100%; justify-content: center; }
}
