/* ========================================
   Origin — Paper Aesthetic
   ======================================== */

:root {
  --bg: #F5F0EB;
  --text: #1A1A1A;
  --text-secondary: #6B6259;
  --accent: #E8853D;
  --divider: #D9D2CA;

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --size-hero: 4rem;
  --size-quote: 1.75rem;
  --size-body: 1.125rem;
  --size-small: 0.875rem;

  --content-width: 680px;
  --section-spacing: 140px;
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: rgba(232, 133, 61, 0.15);
}

/* --- Base --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.7;
  padding: 0 24px;
}

/* --- Layout --- */
main {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Single flow rule: every direct child gets consistent spacing */
main > * + * {
  margin-top: var(--section-spacing);
}

/* hr splits the rhythm — total gap around it equals one section-spacing */
main > * + hr {
  margin-top: 70px;
}

main > hr + * {
  margin-top: 70px;
}

/* --- Typography --- */
h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--size-hero);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 2rem;
}

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

.serif-quote {
  font-family: var(--font-serif);
  font-size: var(--size-quote);
  line-height: 1.35;
  font-weight: 400;
}

.secondary {
  color: var(--text-secondary);
}

/* --- Highlight (sweep animation) --- */
mark {
  color: inherit;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 3px;
  background: linear-gradient(to right, rgba(232, 133, 61, 0.13), rgba(232, 133, 61, 0.13)) no-repeat left center;
  background-size: 0% 100%;
  transition: background-size 0.8s ease;
}

mark.visible {
  background-size: 100% 100%;
}

/* --- The Dot --- */
.dot {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding-top: 120px;
}

.hero .dot {
  margin-bottom: 40px;
}

.hero h1 {
  margin-bottom: 16px;
}

.hero .tagline {
  font-family: var(--font-serif);
  font-size: var(--size-quote);
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* --- Divider --- */
hr {
  border: none;
  width: 120px;
  height: 1px;
  background: var(--divider);
  margin-left: auto;
  margin-right: auto;
}

/* --- Before/After --- */
.pairs {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.pair p {
  font-family: var(--font-serif);
  font-size: var(--size-quote);
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 0;
}

.pair p + p {
  margin-top: 10px;
  font-style: normal;
  min-height: 1.4em;
}

.pair p:first-child {
  color: var(--text-secondary);
}

/* --- Links --- */
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 200ms;
}

a:hover {
  opacity: 0.7;
}

/* --- Footer --- */
footer {
  max-width: var(--content-width);
  margin: var(--section-spacing) auto 0;
  text-align: center;
  padding-bottom: 80px;
}

footer p {
  font-size: var(--size-small);
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --size-hero: 2.5rem;
    --size-quote: 1.35rem;
    --size-body: 1rem;
    --section-spacing: 80px;
  }

  main > * + hr {
    margin-top: 40px;
  }

  main > hr + * {
    margin-top: 40px;
  }

  .hero {
    padding-top: 80px;
  }

  .pairs {
    gap: 40px;
  }
}
