/* About: why the notes were written. The couple's story first, what changes next, the writer last. */

.about {
  --paper: #f6f1e9;
  --paper-2: #ece4d6;
  --sheet: #fffdf8;
  --ink: #1c1915;
  --ink-soft: #4a4239;
  --muted: #8a8075;
  --hair: rgba(28, 25, 21, 0.13);
  --clay: #9a5a32;
  --forest: #23392f;
  --serif: "Newsreader", Georgia, serif;
  /* Fraunces at its softest: rounded serifs, light weights (Cormorant read too sharp) */
  --display: "Fraunces", Georgia, serif;
  --sans: "Sora", system-ui, sans-serif;
  --col: min(620px, calc(100% - 2 * var(--pad)));
  --wide: min(1000px, calc(100% - 2 * var(--pad)));
  font-variation-settings: "SOFT" 100, "WONK" 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.about::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.about-notice { margin: 0; padding: 0.75rem var(--pad); text-align: center; font-size: 0.85rem; background: var(--paper-2); color: var(--ink-soft); }

/* —— Top bar —— */
.topbar {
  width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.topbar__back, .topbar__from {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.topbar__back::before { content: "← "; letter-spacing: 0; }
.topbar__back:hover, .topbar__from:hover { color: var(--clay); }
.topbar__from { margin-left: auto; display: inline-flex; align-items: center; gap: 0.6rem; }
.topbar__avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; filter: saturate(0.85); }

/* —— Opening —— */
.opening {
  width: min(860px, calc(100% - 2 * var(--pad)));
  margin: 0 auto;
  padding: clamp(5rem, 15vh, 9rem) 0 clamp(3rem, 8vh, 4.5rem);
  text-align: center;
  animation: rise 1.4s 0.15s var(--ease) both;
}
.eyebrow {
  margin: 0 0 2rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Lora, like the letter's headings: round, open and easy to read at size */
.title {
  margin: 0 auto;
  max-width: 15ch;
  font-family: "Lora", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5.6vw, 4.3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
  color: var(--ink);
  text-wrap: balance;
}
.dek {
  margin: 1.5rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  color: var(--clay);
}

/* —— The story —— */
.story { width: var(--col); margin: 0 auto; padding-bottom: clamp(2rem, 5vh, 3rem); }
.story p {
  margin: 0 0 1.45rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.18rem, 1.6vw, 1.3rem);
  line-height: 1.8;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.story p:first-child { color: var(--ink); }
.story p:first-child::first-line { font-variant: small-caps; letter-spacing: 0.04em; }
.story p:last-child {
  margin-top: 2.2rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.38;
  color: var(--ink);
}

/* The message itself */
.message {
  margin: 2.6rem auto 2.8rem;
  max-width: 30rem;
  padding: 1.5rem 1.6rem 1.25rem;
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-radius: 14px;
  box-shadow: 0 30px 60px -36px rgba(40, 30, 18, 0.45);
}
.message__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.message__body { margin: 0.9rem 0 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.6; color: var(--ink); }
.message__reply {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
}
.message__reply strong { font-weight: 400; }
.message__after { margin: 1.1rem 0 0; text-align: center; font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--muted); }

/* —— Chapters —— */
.chapter { width: var(--wide); margin: 0 auto; padding: clamp(4.5rem, 12vh, 7rem) 0 0; }
.chapter--narrow { width: var(--col); }
.chapter__head { display: grid; justify-items: center; text-align: center; gap: 0.4rem; margin-bottom: clamp(2.5rem, 6vh, 3.5rem); }
.chapter__head::after { content: ""; width: 40px; height: 1px; background: var(--hair); margin-top: 1.1rem; }
.chapter__n { font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--clay); }
.chapter__head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Numbers */
.numbers {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.numbers div { padding: 2rem 1.25rem 1.8rem; text-align: center; }
.numbers div + div { border-left: 1px solid var(--hair); }
.numbers dt {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: var(--ink);
  white-space: nowrap;
}
.numbers dd { margin: 0.75rem auto 0; max-width: 13rem; font-family: var(--serif); font-weight: 300; font-size: 0.98rem; line-height: 1.5; color: var(--ink-soft); }

/* Outcomes */
.gains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 3.25rem) clamp(2rem, 6vw, 4.5rem);
  max-width: 820px;
  margin: clamp(3rem, 7vh, 4rem) auto 0;
}
.gains h3 { margin: 0 0 0.5rem; font-family: var(--display); font-weight: 400; font-size: 1.65rem; line-height: 1.2; }
.gains p { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 1.06rem; line-height: 1.7; color: var(--ink-soft); }

/* How it unfolds */
.unfold { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.unfold li { position: relative; padding: 0 0 2.4rem 3.4rem; counter-increment: s; }
.unfold li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -0.2rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--clay);
  font-variant-numeric: lining-nums;
}
.unfold li::after { content: ""; position: absolute; left: 0.55rem; top: 2.6rem; bottom: 0.6rem; width: 1px; background: var(--hair); }
.unfold li:last-child::after { display: none; }
.unfold h3 { margin: 0 0 0.4rem; font-family: var(--display); font-weight: 400; font-size: 1.65rem; line-height: 1.2; }
.unfold p { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 1.06rem; line-height: 1.7; color: var(--ink-soft); }

.always {
  margin: 1.5rem 0 0;
  padding: 1.6rem 1.8rem;
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-radius: 4px;
}
.always h3 { margin: 0 0 1rem; font-family: var(--sans); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--clay); }
.always ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.always li { font-family: var(--serif); font-size: 1.05rem; line-height: 1.55; color: var(--ink); padding-left: 1.2rem; position: relative; }
.always li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 1px; background: var(--clay); }

/* —— Who's writing —— */
.me { width: var(--col); margin: 0 auto; padding: clamp(4.5rem, 12vh, 7rem) 0 0; text-align: center; }
.me__card { display: grid; justify-items: center; gap: 1.3rem; }
.me__photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: center 25%; filter: saturate(0.85); box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--hair); }
.me__text { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(1.15rem, 1.6vw, 1.26rem); line-height: 1.78; color: var(--ink-soft); text-wrap: pretty; }
.me__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.8rem; }
.me__links a {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--hair);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.me__links a:hover { color: var(--clay); border-color: var(--clay); }
.me__close {
  margin: 3.2rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.38;
  color: var(--ink);
  text-wrap: balance;
}
.signature { margin: 2rem 0 0; font-family: var(--display); font-size: 1.1rem; color: var(--muted); }
.signature em { display: block; margin-top: 0.1rem; font-size: 2.2rem; font-weight: 400; color: var(--ink); }
.return {
  display: inline-block;
  margin-top: 2.8rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
}
.return::before { content: "← "; letter-spacing: 0; }
.return:hover { color: var(--clay); border-color: var(--clay); }
.colophon {
  padding: clamp(5rem, 12vh, 7rem) var(--pad) 3rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* —— Motion —— */
.about .reveal { opacity: 0; transform: translateY(16px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.about .reveal.is-in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* —— Phones —— */
@media (max-width: 760px) {
  .topbar__from span { display: none; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers div:nth-child(3) { border-left: 0; }
  .numbers div:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .numbers div { padding: 1.6rem 0.75rem 1.4rem; }
  .gains { grid-template-columns: 1fr; }
  .message { padding: 1.25rem 1.2rem 1.1rem; }
  .message__meta, .message__reply { flex-direction: column; gap: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .about .reveal { opacity: 1; transform: none; transition: none; }
  .opening { animation: none; }
}

/* Highlighted lines in the story (==like this== in the dashboard) */
.about mark {
  background: linear-gradient(104deg, transparent 0.6%, rgba(255, 202, 58, 0.45) 2%, rgba(255, 202, 58, 0.45) 97%, transparent 99%);
  background-size: 100% 78%;
  background-position: 0 70%;
  background-repeat: no-repeat;
  color: inherit;
  padding: 0 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
