/* ============================================================
   Difficult to Notice at First — Roberto Tacconelli
   Palette sampled from the printed covers. Monochrome by
   conviction: the book has no accent colour, and neither
   does this page. Emphasis is carried by inversion.
   ============================================================ */

:root {
  /* --- light: the paper --- */
  --paper:        #e8e3dd;   /* front cover ground */
  --paper-warm:   #efebe4;   /* raised surfaces */
  --paper-deep:   #ded7ce;   /* recessed bands */
  --ink:          #14120e;   /* warm near-black */
  --ink-2:        #4a463d;   /* secondary prose */
  --graphite:     #8b8578;   /* the cover's italic grey */
  --rule:         #d0c9be;
  --rule-soft:    #ddd6cc;

  /* inverted block: the letterpress moment */
  --invert-bg:    #14120e;
  --invert-fg:    #e8e3dd;
  --invert-mute:  #8b8578;

  --shadow: 0 2px 4px rgba(20,18,14,.05), 0 18px 40px -12px rgba(20,18,14,.22), 0 40px 80px -30px rgba(20,18,14,.28);

  /* --- type --- */
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* --- measure --- */
  --gut: clamp(1.25rem, 5vw, 4rem);
  --measure: 36rem;
  --maxw: 70rem;
  --label-col: 9.5rem;
  --band-gap: clamp(1.25rem, 3.2vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #131210;
    --paper-warm: #1c1a16;
    --paper-deep: #0d0c0a;
    --ink:        #e8e3dd;
    --ink-2:      #b0a99d;
    --graphite:   #8b8578;
    --rule:       #33302a;
    --rule-soft:  #26241f;
    --invert-bg:  #e8e3dd;
    --invert-fg:  #14120e;
    --invert-mute:#6d6759;
    --shadow: 0 2px 4px rgba(0,0,0,.4), 0 18px 40px -12px rgba(0,0,0,.6), 0 40px 90px -30px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --paper:      #131210;
  --paper-warm: #1c1a16;
  --paper-deep: #0d0c0a;
  --ink:        #e8e3dd;
  --ink-2:      #b0a99d;
  --graphite:   #8b8578;
  --rule:       #33302a;
  --rule-soft:  #26241f;
  --invert-bg:  #e8e3dd;
  --invert-fg:  #14120e;
  --invert-mute:#6d6759;
  --shadow: 0 2px 4px rgba(0,0,0,.4), 0 18px 40px -12px rgba(0,0,0,.6), 0 40px 90px -30px rgba(0,0,0,.7);
}

/* ============================================================ base */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--ink); color: var(--paper); }

/* ============================================================ shared type */

.eyebrow {
  margin: 0 0 1.5rem;
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--graphite);
}

.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.65rem);
  line-height: 1.16;
  letter-spacing: -.014em;
  text-wrap: balance;
}

.prose {
  margin: 1.35rem 0 0;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.72;
}

.hero-head { flex: 0 0 auto; }


/* ============================================================ topbar */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: .85rem var(--gut);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1), border-color .5s ease;
}
.topbar.is-visible {
  opacity: 1;
  transform: none;
  border-bottom-color: var(--rule-soft);
}

.topbar-id {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: .95rem;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.topbar-id img {
  width: 24px; height: 36px;
  object-fit: cover;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 32%, transparent);
}

.topbar-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.topbar-nav a {
  position: relative;
  text-decoration: none;
  color: var(--graphite);
  padding-bottom: 2px;
  transition: color .25s ease;
}
.topbar-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.topbar-nav a:hover { color: var(--ink); }
.topbar-nav a:hover::after { transform: scaleX(1); }

@media (max-width: 940px) { .topbar-nav { display: none; } .topbar { gap: 1rem; } .btn-sm { margin-left: auto; } }

/* ============================================================ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .78rem 1.5rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--ink);
  transition: background-color .3s ease, color .3s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.btn-solid { background: var(--invert-bg); color: var(--invert-fg); }
.btn-solid:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-sm { padding: .5rem 1rem; font-size: .66rem; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ============================================================ hero
   The page opens as the front cover: same line breaks, same rule,
   same italic subtitle. The falling line sits in its own band
   between the subtitle and the author name — exactly where the
   cover puts it — so it can never cross the type. */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.25rem, 8vh, 5.5rem) var(--gut) clamp(1.75rem, 3.5vh, 2.75rem);
}

.hero-title {
  margin: clamp(1.25rem, 3vh, 2.5rem) 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.9rem, 8.6vw, 6.2rem);
  line-height: .99;
  letter-spacing: -.035em;
  display: flex;
  flex-direction: column;
}

.hero-rule {
  height: 1px;
  background: var(--graphite);
  margin: clamp(1.2rem, 2.4vh, 1.9rem) 0 0;
  width: min(28rem, 62%);
}

.hero-sub {
  margin: clamp(1rem, 2.2vh, 1.6rem) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  line-height: 1.45;
  color: var(--graphite);
}

.hero-foot { flex: 0 0 auto; }

.hero-author {
  margin: 0 0 1.25rem;
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: 1.4rem 0 0;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--graphite);
}
.hero-meta span { position: relative; }
.hero-meta span + span::before {
  content: "";
  position: absolute;
  left: -.8rem; top: 50%;
  width: 3px; height: 1px;
  background: currentColor;
}

/* ============================================================ the curve
   Generated in JS from a seeded hand-jitter walk. It appears exactly
   twice on the page — here, and once more at the steep end. Both are
   in-flow blocks, so nothing can sit under them. */

.curve-band {
  flex: 1 1 auto;
  min-height: clamp(84px, 12vh, 190px);
  margin: clamp(1.1rem, 2.6vh, 2.25rem) 0;
  display: flex;
}
.curve { width: 100%; height: 100%; display: block; overflow: visible; }
.curve-line {
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================ bands
   One grid down the whole page: a margin column for the label, a
   content column for everything else. Every section aligns to it. */

.band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.75rem, 9.5vh, 6.5rem) var(--gut);
  border-top: 1px solid var(--rule-soft);
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: 0 var(--band-gap);
  align-items: start;
}
.band > .eyebrow { grid-column: 1; margin: .55rem 0 0; }
.band-body { grid-column: 2; min-width: 0; }

@media (max-width: 860px) {
  .band { grid-template-columns: minmax(0, 1fr); }
  .band > .eyebrow { grid-column: 1; margin: 0 0 1.5rem; }
  .band-body { grid-column: 1; }
}

/* ---------- the claim ---------- */

.statement {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 5.4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  max-width: 20ch;
  text-wrap: balance;
}

.clauses {
  list-style: none;
  margin: clamp(2.25rem, 5vh, 3.5rem) 0 0;
  padding: 0;
  max-width: var(--measure);
}
.clauses li {
  padding: 1.35rem 0;
  border-top: 1px solid var(--rule);
  font-size: 1.09rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.clauses li:last-child { border-bottom: 1px solid var(--rule); }

/* ---------- the object ---------- */

.book-title { max-width: 24ch; }

.book-grid {
  margin-top: clamp(2.25rem, 5vh, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(14rem, 25vw, 22rem);
  gap: clamp(2.5rem, 4.5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) { .book-grid { grid-template-columns: minmax(0, 1fr); } }

.covers {
  position: relative;
  margin: 0;
  align-self: center;
.covers img { background: var(--paper-warm); box-shadow: var(--shadow); }
  padding: 1% 3% 3% 1%;
}
.cover-front {
  position: relative;
  z-index: 2;
  width: 76%;
  transform: rotate(-1.4deg);
}
.cover-back {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 12%;
  width: 52%;
  transform: rotate(2.8deg);
}
@media (max-width: 860px) {
  .covers { max-width: 24rem; margin: 2.5rem auto 0; }
}

.book-text .prose:first-child { margin-top: 0; }

/* ---------- the hinge: the one inverted moment ---------- */

.hinge {
  position: relative;
  z-index: 1;
  background: var(--invert-bg);
  color: var(--invert-fg);
  padding: clamp(4rem, 11vh, 7.5rem) var(--gut);
}
.hinge-inner {
  display: flex;
  flex-direction: column;
  gap: .4em;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: calc(var(--label-col) + var(--band-gap));
}
@media (max-width: 860px) { .hinge-inner { padding-left: 0; } }

.hinge p {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.9vw, 3rem);
  line-height: 1.2;
  letter-spacing: -.022em;
  max-width: 24ch;
}
.hinge-a { color: var(--invert-mute); }

/* ---------- instructions ---------- */

.instructions {
  list-style: none;
  counter-reset: instr;
  margin: clamp(2.5rem, 6vh, 4rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 2.6vw, 2.5rem);
}
@media (max-width: 1100px) { .instructions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .instructions { grid-template-columns: minmax(0, 1fr); } }
.instructions li {
  counter-increment: instr;
  padding: 1.9rem 0;
  border-top: 1px solid var(--rule);
}
.instructions li::before {
  content: counter(instr, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}
.instructions h3 {
  margin: 0 0 .5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -.012em;
}
.instructions p {
  margin: 0;
  color: var(--ink-2);
  font-size: .99rem;
  line-height: 1.62;
}

/* ---------- evidence ---------- */

.figures {
  margin: clamp(2.5rem, 6vh, 4rem) 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.75rem, 3vw, 3rem);
}
@media (max-width: 820px) { .figures { grid-template-columns: minmax(0, 1fr); } }
.figure {
  padding: 2.2rem 0;
  border-top: 1px solid var(--rule);
}
.figure-value {
  margin: 0;
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  line-height: .92;
  letter-spacing: -.045em;
  display: flex;
  align-items: baseline;
  gap: .35rem;
}
.figure-unit {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--graphite);
}
.figure-label {
  margin: 1.1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.4;
  max-width: 22ch;
}
.figure-note {
  margin: .85rem 0 0;
  font-size: .95rem;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 30ch;
}

/* ---------- the close ---------- */

.close {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--gut) clamp(5rem, 13vh, 8.5rem);
  border-top: 1px solid var(--rule-soft);
}
.curve-band-close {
  flex: none;
  min-height: 0;
  height: clamp(90px, 15vw, 190px);
  margin: 0 0 clamp(3rem, 7vh, 5rem);
}
.close-lines { text-align: center; }
.close-line {
  margin: 0 0 .45em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 3vw, 2.15rem);
  line-height: 1.32;
  color: var(--graphite);
  text-wrap: balance;
}
.close-last { color: var(--ink); margin-top: 1.1em; margin-bottom: 0; }

/* ---------- buy + colophon ---------- */

.buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 860px) { .buy-grid { grid-template-columns: minmax(0, 1fr); } }
.buy-text .h2 { max-width: 15ch; }

.buy-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }

.fineprint {
  margin: 1.8rem 0 0;
  max-width: 34ch;
  font-family: var(--sans);
  font-size: .74rem;
  line-height: 1.65;
  color: var(--graphite);
}

.colophon {
  margin: 0;
  font-family: var(--sans);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.colophon > div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .72rem 0;
  border-top: 1px solid var(--rule);
}
.colophon > div:last-child { border-bottom: 1px solid var(--rule); }
.colophon dt {
  color: var(--graphite);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .68rem;
  padding-top: .12em;
}
.colophon dd { margin: 0; text-align: right; }

/* ---------- author ---------- */

.author-name {
  margin: 0 0 1.5rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: .02em;
}
.author-grid .prose { max-width: 38rem; }

/* ============================================================ footer */

.footer {
  padding: clamp(3rem, 7vh, 4.5rem) var(--gut) clamp(2.5rem, 5vh, 3.5rem);
  border-top: 1px solid var(--rule-soft);
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 2.5rem;
}
.footer-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  letter-spacing: -.025em;
  line-height: 1.1;
}
.footer-sub {
  margin: .6rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--graphite);
  font-size: 1rem;
  max-width: 34ch;
}
.footer-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--graphite);
}
.footer-meta a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.footer-meta a:hover { color: var(--ink); border-bottom-color: currentColor; }

/* ============================================================ reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .85s cubic-bezier(.22,1,.36,1), transform .85s cubic-bezier(.22,1,.36,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .topbar { transition: none; }
}
