/* Latin Extended covers č ć š ž đ. */
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/eb-garamond-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/eb-garamond-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/eb-garamond-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/eb-garamond-latin-ext-400-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/eb-garamond-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/eb-garamond-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: "Cormorant SC"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/cormorant-sc-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Cormorant SC"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/cormorant-sc-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }

:root {
  --paper: #f4ead8;
  --paper-2: #eadcc2;
  --ink: #261c16;
  --ink-2: #5a4a3c;
  --red: #8f2015;
  --gold: #9a7228;
  --oxblood: #2f0e0b;
  --oxblood-2: #4a1712;
  --cream: #f5ead6;
  --gilt: #d9b56a;
  --line: #c9b48e;
  --body: "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Cormorant SC", "EB Garamond", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* One rem is 1% of a 16:9 stage fitted to the window. */
html { font-size: min(1vw, 1.7778vh); background: var(--oxblood); }
body { font-family: var(--body); color: var(--ink); background: var(--oxblood); font-size: 2.7rem; line-height: 1.28; -webkit-font-smoothing: antialiased; font-variant-numeric: oldstyle-nums; }
html.js, html.js body { height: 100%; overflow: hidden; }

ol, ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; }
strong { font-weight: 500; color: var(--red); }

.slide { background: var(--paper); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
html.js .slide { position: fixed; inset: 0; display: none; overflow-y: auto; }
html.js .slide.on { display: flex; animation: enter .35s ease-out; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.js .slide.on { animation: none; } }

.inner { position: relative; width: 100rem; height: 56.25rem; padding: 8.6rem 8rem 6.4rem; display: flex; flex-direction: column; justify-content: center; gap: 2.4rem; }

.folio { position: absolute; top: 3.2rem; left: 8rem; right: 8rem; display: flex; justify-content: space-between; padding-bottom: .9rem; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 600; font-size: 1.7rem; letter-spacing: .05em; color: var(--ink-2); white-space: nowrap; }

h2 { font-size: 6rem; color: var(--ink); }
h3 { font-size: 3rem; color: var(--red); }
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 2.5rem; letter-spacing: .05em; color: var(--red); }
.lead { font-size: 3.2rem; line-height: 1.24; }
.note { font-size: 2.6rem; color: var(--ink-2); }
.rule { width: 9rem; height: 2px; background: var(--gold); }

blockquote { font-size: 3.4rem; line-height: 1.2; font-style: italic; padding-left: 2.6rem; border-left: .4rem solid var(--red); }

.initial { font-size: 3.2rem; line-height: 1.24; }
.initial::first-letter { font-family: var(--display); font-weight: 600; font-size: 7.6rem; line-height: .8; float: left; padding: .45rem .35rem 0 0; color: var(--red); }

/* Dark slides */
.dark { background: radial-gradient(120% 120% at 30% 20%, var(--oxblood-2), var(--oxblood) 70%); color: var(--cream); }
.dark h1, .dark h2 { color: var(--cream); }
.dark .eyebrow { color: var(--gilt); }
.dark .folio { color: #d6c2a4; border-color: #6e4a35; }
.dark .rule { background: var(--gilt); }
.dark blockquote { border-color: var(--gilt); }

/* Title */
.title .inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 5rem; padding: 5rem 8rem; }
.title-text { display: flex; flex-direction: column; gap: 2.4rem; }
h1 { font-size: 8.6rem; line-height: .98; }
.tagline { font-size: 3.6rem; font-style: italic; color: #ecd9b4; }
.portrait { flex: none; width: 33rem; height: 44rem; border-radius: 16.5rem 16.5rem 0 0; overflow: hidden; border: .25rem solid var(--gilt); }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; filter: sepia(.35) contrast(1.05); }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; margin-top: 1.6rem; border-top: 2px solid var(--gold); }
.timeline li { position: relative; padding-top: 2.2rem; display: flex; flex-direction: column; gap: .7rem; font-size: 2.4rem; line-height: 1.18; }
.timeline li::before { content: ""; position: absolute; top: -.75rem; left: 0; width: 1.3rem; height: 1.3rem; background: var(--red); transform: rotate(45deg); }
.timeline b { font-family: var(--display); font-weight: 600; font-size: 3.4rem; color: var(--red); font-variant-numeric: lining-nums; }

/* Letter vs epistle */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; }
.versus > div { padding: 2rem 2.6rem; border: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; font-size: 2.5rem; }
.versus .accent { background: var(--oxblood-2); border-color: var(--oxblood-2); color: var(--cream); }
.versus .accent h3 { color: var(--gilt); }
.big { font-size: 3.4rem; font-weight: 500; line-height: 1.12; }

/* Split */
.split { flex-direction: row; align-items: center; gap: 6rem; }
.split > :not(.folio) { flex: 1 1 0; display: flex; flex-direction: column; gap: 2.6rem; }
.panel { padding: 3.6rem; background: var(--paper-2); border-top: .4rem solid var(--red); }
.work { font-size: 3.3rem; line-height: 1.2; }

/* Roman-numbered cards */
.cards { counter-reset: c; display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem 5rem; }
.cards li { counter-increment: c; display: grid; grid-template-columns: 6rem 1fr; align-items: baseline; font-size: 3.1rem; line-height: 1.2; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.cards li::before { content: counter(c, upper-roman); font-family: var(--display); font-weight: 600; font-size: 4.2rem; color: var(--red); }

/* Six parts of an epistle */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 2.4rem; gap: 1.2rem; }
.steps li { counter-increment: s; position: relative; padding-top: 5.8rem; font-size: 2.9rem; line-height: 1.14; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 4.2rem; height: 4.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--cream); font-family: var(--display); font-weight: 600; font-size: 2.6rem; font-variant-numeric: lining-nums; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 2.05rem; left: 0; right: -1.2rem; height: 2px; background: var(--gold); }
.steps li:last-child::after { right: 0; }

/* 332 */
.number .huge { flex: 0 0 auto; font-family: var(--display); font-weight: 600; font-size: 22rem; line-height: .9; color: var(--red); font-variant-numeric: lining-nums; }
.number h2 { font-size: 5.2rem; }

/* Points */
.points { display: grid; gap: 1.1rem 4.5rem; font-size: 2.6rem; line-height: 1.18; }
.points.two { grid-template-columns: 1fr 1fr; }
.points li { position: relative; padding-left: 2.4rem; }
.points li::before { content: ""; position: absolute; left: 0; top: .5em; width: .9rem; height: .9rem; background: var(--red); transform: rotate(45deg); }
.goals { font-size: 3.3rem; gap: 1.4rem; }
.closing-line { margin-top: .8rem; padding: 2.2rem 3rem; background: var(--oxblood-2); color: var(--cream); font-family: var(--display); font-weight: 600; font-size: 4.2rem; line-height: 1.05; text-align: center; }

/* Four verbs */
.verbs { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.verbs li { padding: 1.8rem 0; text-align: center; font-family: var(--display); font-weight: 600; font-size: 4.6rem; color: var(--red); }

/* Poles */
.poles { display: grid; gap: .2rem; }
.poles > div { display: grid; grid-template-columns: 1fr 5rem 1fr; align-items: center; padding: 1.3rem 0; border-bottom: 1px solid #6e4a35; font-size: 3.1rem; line-height: 1.12; }
.poles > div::after { content: "↔"; grid-column: 2; grid-row: 1; text-align: center; color: var(--gilt); font-family: Georgia, serif; font-size: 2.8rem; }
.poles dt { grid-column: 1; grid-row: 1; text-align: right; padding-right: 1rem; }
.poles dd { grid-column: 3; grid-row: 1; padding-left: 1rem; }

/* Three columns */
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.6rem; margin-top: 1rem; }
.columns > div { display: flex; flex-direction: column; gap: 1.3rem; padding-top: 1.6rem; border-top: .3rem solid var(--red); font-size: 2.7rem; line-height: 1.22; }

/* Definitions */
.defs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 4.5rem; }
.defs dt { font-family: var(--display); font-weight: 600; font-size: 3.2rem; line-height: 1.05; color: var(--red); }
.defs dd { font-size: 2.55rem; line-height: 1.16; }

/* End */
.end .inner { align-items: center; text-align: center; gap: 3rem; }
.finale { font-family: var(--display); font-weight: 600; font-size: 9rem; line-height: 1; }
.credit { position: absolute; bottom: 3.4rem; font-size: 1.7rem; color: #c8b393; }

/* Controls */
#nav { display: none; }
html.js #nav { position: fixed; right: 1.4rem; bottom: 1.2rem; z-index: 10; display: flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 99px; background: rgba(38, 20, 14, .82); color: var(--cream); font-size: max(13px, 1.5rem); font-variant-numeric: lining-nums tabular-nums; }
#nav button { width: max(40px, 3.4rem); height: max(40px, 3.4rem); border: 0; border-radius: 50%; background: none; color: inherit; font: inherit; font-size: 1.5em; line-height: 1; cursor: pointer; }
#nav button:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
#nav button:focus-visible { outline: 2px solid var(--gilt); outline-offset: -2px; }
#nav button:disabled { opacity: .3; cursor: default; }
#nav button[hidden] { display: none; }
#count { min-width: 4.2em; text-align: center; }
#progress { display: none; }
html.js #progress { display: block; position: fixed; left: 0; bottom: 0; height: 3px; background: var(--gold); z-index: 10; transition: width .25s; }

/* Phones and other tall screens: stacked layout, slide scrolls if needed. */
@media (max-aspect-ratio: 1/1) {
  html { font-size: 2.35vw; }
  body { font-size: 3rem; }
  .slide { align-items: flex-start; }
  html.js .slide { align-items: safe center; }
  .inner { width: 100%; height: auto; min-height: 100%; padding: 8.5rem 6.8vw 10rem; }
  .folio { left: 6.8vw; right: 6.8vw; font-size: 2.1rem; gap: 2rem; }
  h1 { font-size: 7.4rem; }
  h2 { font-size: 5.4rem; }
  h3 { font-size: 3.6rem; }
  .eyebrow { font-size: 3rem; }
  .lead, .initial, blockquote { font-size: 3.4rem; }
  .note, .credit { font-size: 2.8rem; }
  .title .inner { flex-direction: column-reverse; justify-content: center; padding: 5rem 6.8vw 10rem; gap: 4rem; }
  .title-text { align-self: stretch; }
  .portrait { width: 30rem; height: 39rem; border-radius: 15rem 15rem 0 0; }
  .split { flex-direction: column; align-items: stretch; justify-content: center; gap: 3.6rem; }
  .split > :not(.folio) { flex: none; }
  .number .huge { font-size: 19rem; }
  .number h2 { font-size: 5rem; }
  .timeline { grid-template-columns: 1fr; gap: 0; border-top: 0; border-left: 2px solid var(--gold); margin-left: .6rem; margin-top: 0; }
  .timeline li { padding: 0 0 2.2rem 3rem; font-size: 3rem; }
  .timeline li::before { top: .9rem; left: -.75rem; }
  .timeline b { font-size: 3.8rem; }
  .versus, .cards, .columns, .defs, .points.two { grid-template-columns: 1fr; }
  .versus > div, .points, .cards li, .columns > div, .defs dd { font-size: 3rem; }
  .big { font-size: 3.8rem; }
  .work { font-size: 3.5rem; }
  .goals { font-size: 3.4rem; }
  .cards li { font-size: 3.3rem; }
  .steps { grid-template-columns: 1fr; gap: 2.2rem; margin-top: 0; }
  .steps li { padding: .5rem 0 0 7rem; min-height: 5rem; font-size: 3.5rem; }
  .steps li::after { top: 2rem; bottom: -4.2rem; left: 2.05rem; right: auto; width: 2px; height: auto; }
  .steps li:last-child::after { display: none; }
  .verbs { grid-template-columns: 1fr 1fr; }
  .poles > div { grid-template-columns: 1fr 4rem 1fr; font-size: 2.9rem; }
  .finale { font-size: 8rem; }
  .credit { position: static; }
}

@media print {
  @page { size: 16in 9in; margin: 0; }
  html { font-size: .16in; background: none; }
  html.js, html.js body { height: auto; overflow: visible; }
  html.js .slide, html.js .slide.on { position: relative; display: flex; width: 16in; height: 9in; min-height: 0; overflow: hidden; animation: none; break-after: page; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  html.js #nav, html.js #progress { display: none; }
}
