@import url("fonts/fonts.css");

:root {
  --paper: #f5efe8;
  --paper-deep: #ece3d9;
  --ink: #1f1a1c;
  --ink-soft: #5f5357;
  --rose: #b4466c;
  --rose-soft: #e9c9d3;
  --line: #d9ccc1;
  --night: #141012;
  --night-ink: #f3ebe6;
  --night-soft: #a99ca1;
  --glow: #f28baa;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper grain: a faint noise layer over everything, never over the text's legibility. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .33 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
}

::selection {
  background: var(--rose);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.serif {
  font-family: var(--serif);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--ink);
}

.masthead .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-variation-settings: "opsz" 72;
}

.wordmark svg {
  width: 15px;
  height: 15px;
  fill: var(--rose);
  transform: translateY(-6px);
}

.masthead .issue {
  color: var(--ink-soft);
  text-align: center;
}

.masthead nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.masthead nav a {
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--rose);
}

.lang {
  display: inline-flex;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.lang a,
.lang span {
  padding: 3px 7px;
  border-radius: 999px;
}

.lang span {
  background: var(--ink);
  color: var(--paper);
}

.lang a {
  color: var(--ink-soft);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 120px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: center;
}

.hero-text {
  grid-column: 1 / span 7;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(3.3rem, 8.6vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144;
}

:lang(en) .hero h1 {
  font-size: clamp(3rem, 7.4vw, 7.2rem);
  line-height: 0.95;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--rose);
}

.hero h1 .indent {
  display: block;
  padding-left: 0.9em;
}

.hero .lede {
  max-width: 30em;
  margin: clamp(28px, 4vw, 44px) 0 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
}

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 34px;
}

.play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px 13px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.play:hover {
  background: var(--rose);
  transform: translateY(-1px);
}

.play svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.play small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.text-link {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.text-link:hover {
  color: var(--rose);
}

.hero-figure {
  grid-column: 9 / span 4;
  position: relative;
}

.hero-figure .phone {
  transform: rotate(3.5deg);
}

.note {
  position: absolute;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.25;
  color: var(--rose);
  font-variation-settings: "opsz" 24;
}

.note svg {
  display: block;
  stroke: var(--rose);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.hero-figure .note {
  left: -128px;
  top: 30%;
  width: 130px;
  text-align: right;
}

.hero-figure .note svg {
  width: 82px;
  height: 40px;
  margin: 4px 0 0 auto;
}

/* ---------- Phone ---------- */

.phone {
  position: relative;
  padding: 8px;
  border-radius: 46px;
  background: #1b1719;
  box-shadow:
    0 0 0 1.5px #4d4448 inset,
    0 40px 60px -30px rgba(70, 30, 45, 0.45),
    0 18px 30px -18px rgba(31, 26, 28, 0.35);
}

.phone::after {
  content: "";
  position: absolute;
  top: 5.2%;
  left: 50%;
  width: 3.4%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0d0b0c;
  transform: translate(-50%, -50%);
}

.phone img {
  width: 100%;
  border-radius: 38px;
  aspect-ratio: 720 / 1600;
  object-fit: cover;
  background: #fff;
}

/* ---------- Index strip ---------- */

.index {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.index ol {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.index li + li {
  border-left: 1px solid var(--line);
}

.index a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 20px;
  text-decoration: none;
  transition: background 0.25s;
}

.index a:hover {
  background: var(--paper-deep);
}

.index .num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--rose);
  font-size: 15px;
}

.index li:first-child a {
  padding-left: 0;
}

/* ---------- Chapters ---------- */

.chapter {
  padding: clamp(72px, 10vw, 140px) 0;
}

.chapter-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--ink);
}

.chapter-head .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--rose);
}

.chapter-head .eyebrow {
  color: var(--ink-soft);
}

.chapter-head .aside {
  margin-left: auto;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 16px;
}

.chapter h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(2.5rem, 5.4vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
}

.chapter h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--rose);
}

.chapter p {
  max-width: 34em;
}

.body-lg {
  font-size: clamp(18px, 1.5vw, 20px);
  color: var(--ink-soft);
}

.dash-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.dash-list li {
  position: relative;
  padding: 12px 0 12px 34px;
  border-top: 1px solid var(--line);
}

.dash-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.dash-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.45em;
  width: 18px;
  height: 1px;
  background: var(--rose);
}

/* Chapter 01: routine */

.routine {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.routine-text {
  grid-column: 1 / span 6;
}

.routine-figure {
  grid-column: 8 / span 4;
}

.routine-figure .sticky {
  position: sticky;
  top: 10vh;
}

.routine-figure .phone {
  transform: rotate(-2deg);
}

.steps {
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: clamp(26px, 4.5vw, 46px) 0;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps .box {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  transition: background 0.35s, border-color 0.35s;
}

.steps .box svg {
  position: absolute;
  inset: 7px;
  stroke: #fff;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.45s 0.1s ease-out;
}

.steps .label {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  position: relative;
  justify-self: start;
}

.steps .label::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 55%;
  height: 2px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease-out;
}

.steps .meta {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  text-align: right;
}

.steps li.done .box {
  background: var(--rose);
  border-color: var(--rose);
}

.steps li.done .box svg {
  stroke-dashoffset: 0;
}

.steps li.done .label {
  color: var(--ink-soft);
}

.steps li.done .label::after {
  transform: scaleX(1);
}

.tally {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 26px;
  font-family: var(--serif);
  color: var(--ink-soft);
}

.tally b {
  font-weight: 400;
  font-size: 44px;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.routine-more {
  margin-top: clamp(56px, 7vw, 96px);
}

/* Chapter 02: shelf */

.shelf {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: start;
}

.shelf-figures {
  grid-column: 1 / span 6;
  position: relative;
  height: clamp(560px, 62vw, 760px);
}

.shelf-figures .phone {
  position: absolute;
  width: 52%;
}

.shelf-figures .phone:first-child {
  left: 0;
  top: 0;
  transform: rotate(-3deg);
  z-index: 1;
}

.shelf-figures .phone:last-child {
  right: 2%;
  top: 14%;
  transform: rotate(2.5deg);
}

.shelf-text {
  grid-column: 8 / span 5;
}

.pao {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 40px;
  padding: 26px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.pao svg {
  width: 96px;
  height: 96px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.pao svg text {
  fill: var(--rose);
  stroke: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
}

.pao p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
}

.pao p b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.levels span {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}

.levels span.on {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}

/* ---------- Night band ---------- */

.night {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--night-ink);
  padding: clamp(88px, 12vw, 170px) 0;
}

.night::after {
  content: "";
  position: absolute;
  right: -10%;
  top: 50%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(242, 139, 170, 0.16), transparent);
  pointer-events: none;
}

.night .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: center;
}

.night-text {
  grid-column: 1 / span 6;
}

.night .eyebrow {
  color: var(--night-soft);
}

.night h2 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144;
}

.night h2 em {
  color: var(--glow);
}

.night p {
  max-width: 30em;
  margin-top: 30px;
  color: var(--night-soft);
  font-size: 18px;
}

.night .dash-list li {
  border-color: #2e272a;
  color: var(--night-ink);
}

.night .dash-list li::before {
  background: var(--glow);
}

.notifs {
  grid-column: 8 / span 5;
  position: relative;
}

.night-phone {
  width: 64%;
  margin-left: auto;
  transform: rotate(4deg);
  background: #000;
  box-shadow:
    0 0 0 1.5px #3a3236 inset,
    0 50px 80px -30px rgba(0, 0, 0, 0.8);
}

.notif-stack {
  position: absolute;
  left: 0;
  right: 14%;
  top: 16%;
  display: grid;
  gap: 14px;
}

.notif {
  padding: 16px 18px 14px;
  border-radius: 24px;
  background: rgba(38, 31, 35, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.7);
  font-size: 15px;
  line-height: 1.4;
}

.notif:nth-child(2) {
  margin-left: 9%;
}

.notif header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--night-soft);
}

.notif header img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.notif h3 {
  margin: 10px 0 2px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
}

.notif p {
  margin: 0;
  font-size: 15px;
  color: var(--night-soft);
}

.notif .actions {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 600;
  color: var(--glow);
}

.sparkle {
  position: absolute;
  fill: var(--glow);
  opacity: 0;
  animation: twinkle 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: scale(1) rotate(12deg);
  }
}

/* ---------- Routine mode: three phones in a row ---------- */

.mode {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Headline runs the full width; the paragraphs keep seven columns */
.mode-intro {
  grid-column: 1 / -1;
}

.mode-intro p {
  max-width: calc((100% - 11 * 24px) * 7 / 12 + 6 * 24px);
}

.mode-figures {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 64px);
  margin-top: clamp(32px, 5vw, 64px);
  align-items: start;
}

.mode-figures figure {
  margin: 0;
  width: 100%;
  max-width: 300px;
  justify-self: center;
}

.mode-figures figure:nth-child(2) {
  margin-top: 56px;
}

/* ---------- Chapter 04: list & spending ---------- */

.pair {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: end;
}

.pair-intro {
  grid-column: 1 / span 5;
  align-self: start;
}

.pair figure {
  margin: 0;
}

.pair figure:nth-of-type(1) {
  grid-column: 7 / span 3;
}

.pair figure:nth-of-type(2) {
  grid-column: 10 / span 3;
  margin-bottom: 12%;
}

figcaption {
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

figcaption i {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 17px;
}

/* ---------- Chapter 04: privacy ---------- */

.privacy {
  background: var(--paper-deep);
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.privacy-grid h2 {
  grid-column: 1 / span 7;
}

.privacy-grid .side {
  grid-column: 9 / span 4;
  align-self: end;
}

.struck {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 34px;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}

.struck li {
  position: relative;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 144;
}

.struck li svg {
  position: absolute;
  left: -4%;
  top: 38%;
  width: 108%;
  height: 0.4em;
  stroke: var(--rose);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 110 130;
  stroke-dashoffset: 110;
  transition: stroke-dashoffset 0.9s ease-out;
}

.struck.in li svg {
  stroke-dashoffset: 0;
}

.struck.in li:nth-child(2) svg {
  transition-delay: 0.15s;
}

.struck.in li:nth-child(3) svg {
  transition-delay: 0.3s;
}

.struck.in li:nth-child(4) svg {
  transition-delay: 0.45s;
}

.struck.in li:nth-child(5) svg {
  transition-delay: 0.6s;
}

/* ---------- Footer ---------- */

.footer {
  padding: clamp(72px, 9vw, 120px) 0 0;
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--ink);
}

.footer-lead {
  grid-column: 1 / span 6;
}

.footer-top .closing {
  margin: 0;
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.footer-top .closing em {
  color: var(--rose);
}

.app-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 10px 22px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf6;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
  transition: border-color 0.2s, transform 0.2s;
}

.app-card:hover {
  border-color: var(--rose);
  transform: translateY(-1px);
}

.app-card img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.app-card b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
}

.app-card small {
  color: var(--ink-soft);
  font-size: 13px;
}

.app-card .go {
  margin-left: 8px;
  color: var(--rose);
  font-size: 20px;
}

.footer-cols {
  grid-column: 8 / span 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  font-size: 15px;
}

.footer-cols h4 {
  margin: 0 0 10px;
  color: var(--ink-soft);
}

.footer-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-cols li {
  padding: 3px 0;
}

.footer-cols ul + h4 {
  margin-top: 22px;
}

/* Follow links: round ink buttons with the brand mark in the paper color. */
.footer-cols .social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-cols .social li {
  padding: 0;
}

.footer-cols .social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  transition: background-color 0.2s ease;
}

.footer-cols .social a:hover,
.footer-cols .social a:focus-visible {
  background: var(--rose);
}

.footer-cols .social svg {
  width: 18px;
  height: 18px;
  fill: var(--paper);
}

.footer-cols a {
  text-decoration: none;
}

.footer-cols a:hover {
  color: var(--rose);
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.giant {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(7rem, 30vw, 26rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  text-align: center;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
  padding-top: 0.08em;
  user-select: none;
}

.giant em {
  color: var(--rose);
}

/* ---------- Day sparkles: the logo's star, slower and softer than at night ---------- */

.sparkled {
  position: relative;
}

.twinkle {
  position: absolute;
  fill: var(--rose);
  pointer-events: none;
  animation: twinkle-soft 6.5s ease-in-out infinite;
}

.hero h1 .twinkle {
  top: 0.36em;
  right: -0.2em;
  width: 0.17em;
  height: 0.17em;
}

.giant .twinkle {
  top: 0.74em;
  right: -0.08em;
  width: 0.08em;
  height: 0.08em;
}

.giant .twinkle + .twinkle {
  top: 0.64em;
  right: -0.17em;
  width: 0.05em;
  height: 0.05em;
  animation-delay: -3.2s;
}

@keyframes twinkle-soft {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.7) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(15deg);
  }
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sparkle,
  .twinkle {
    animation: none;
    opacity: 0.6;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 960px) {
  .masthead .issue {
    display: none;
  }

  .masthead .wrap {
    grid-template-columns: 1fr auto;
  }

  .hero-text,
  .routine-text,
  .shelf-text,
  .night-text,
  .notifs,
  .pair-intro,
  .privacy-grid h2,
  .privacy-grid .side,
  .footer-lead,
  .footer-cols {
    grid-column: 1 / -1;
  }

  .hero-figure {
    grid-column: 3 / span 8;
    margin-top: 40px;
  }

  .hero-figure .note {
    left: -46%;
  }

  .routine-figure {
    display: none;
  }

  .night-phone {
    width: 70%;
    margin-top: 40px;
  }

  .notif-stack {
    right: 8%;
  }

  .shelf-figures {
    grid-column: 1 / -1;
    height: clamp(520px, 120vw, 760px);
    order: 2;
  }

  .pair figure:nth-of-type(1) {
    grid-column: 1 / span 6;
  }

  .pair figure:nth-of-type(2) {
    grid-column: 7 / span 6;
  }

  .index ol {
    grid-template-columns: 1fr 1fr;
  }

  .index li:nth-child(2n + 3) {
    border-left: 0;
  }

  .index li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .index li:nth-child(2n + 3) a {
    padding-left: 0;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .mode-intro p {
    max-width: none;
  }

  .mode-figures {
    grid-template-columns: repeat(3, 72%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .mode-figures figure {
    scroll-snap-align: start;
  }

  .mode-figures figure:nth-child(2) {
    margin-top: 0;
  }

  .masthead nav .nav-link {
    display: none;
  }

  .hero h1 .indent {
    padding-left: 0.5em;
  }

  .hero-figure {
    grid-column: 2 / span 10;
  }

  .hero-figure .note {
    display: none;
  }

  .steps li {
    grid-template-columns: 34px 1fr;
  }

  .steps .meta {
    grid-column: 2;
    text-align: left;
    margin-top: -12px;
  }

  .phone {
    border-radius: 34px;
    padding: 6px;
  }

  .phone img {
    border-radius: 28px;
  }

  .pair figure:nth-of-type(2) {
    margin-bottom: 0;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .chapter-head .aside {
    display: none;
  }
}

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

.faq {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.faq h2 {
  grid-column: 1 / span 4;
  align-self: start;
}

.faq-list {
  grid-column: 6 / span 7;
  border-top: 1px solid var(--ink);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 19px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex: none;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 300;
  color: var(--rose);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.faq-list details[open] summary::after,
.faq-list details.is-open summary::after {
  transform: rotate(45deg);
}

.faq-list .answer {
  overflow: hidden;
}

.faq-list summary:hover {
  color: var(--rose);
}

.faq-list details p {
  margin: 0;
  padding: 0 0 24px;
  max-width: 36em;
  color: var(--ink-soft);
}

/* ---------- Document pages (privacy policy) ---------- */

.doc-hero {
  padding: clamp(48px, 7vw, 100px) 0 clamp(36px, 5vw, 64px);
}

.doc-hero h1 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(3rem, 7.5vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144;
}

.doc-hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--rose);
}

.doc-hero .lede {
  margin: 28px 0 0;
  max-width: 30em;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink-soft);
}

.doc-hero .eyebrow {
  color: var(--ink-soft);
}

.doc {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding-top: 28px;
  padding-bottom: clamp(72px, 9vw, 120px);
  border-top: 1px solid var(--ink);
}

.doc-toc {
  grid-column: 1 / span 3;
}

.doc-toc ol {
  position: sticky;
  top: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.doc-toc li {
  padding: 5px 0;
}

.doc-toc a {
  text-decoration: none;
  color: var(--ink-soft);
}

.doc-toc a:hover {
  color: var(--rose);
}

.doc-body {
  grid-column: 5 / span 7;
}

.doc-body section + section {
  margin-top: 44px;
}

.doc-body h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
}

.doc-body h2 .num {
  font-style: italic;
  font-size: 15px;
  color: var(--rose);
}

.doc-body p,
.doc-body li {
  color: var(--ink-soft);
}

.doc-body p {
  margin: 0 0 12px;
}

.doc-body ul {
  margin: 0;
  padding-left: 1.1em;
}

.doc-body li {
  margin-bottom: 10px;
}

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

.doc-body a {
  color: var(--rose);
}

@media (max-width: 960px) {
  .faq h2,
  .faq-list,
  .doc-toc,
  .doc-body {
    grid-column: 1 / -1;
  }

  .doc-toc {
    display: none;
  }
}
