/* arepublicinink.com: cream paper, iron-gall ink, gilt. Libre Caslon (OFL), self-hosted. No JavaScript anywhere. */
@font-face { font-family: "Caslon Text"; src: url("/fonts/libre-caslon-text.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Caslon Text"; src: url("/fonts/libre-caslon-text-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Caslon Display"; src: url("/fonts/libre-caslon-display.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #efe5cf; --paper-2: #e6d9bb; --paper-edge: #d6c59f;
  --ink: #1f1913; --ink-2: #4a3d2e; --ink-3: #6b5a45;
  --gilt: #8a5e22; --gilt-bright: #d8b06a; --rust: #8b2f1f;
  --night: #15110d; --night-2: #1f1913; --cream: #efe5cf; --cream-dim: #cdbd9c;
  --display: "Caslon Display", "Libre Caslon Display", Georgia, serif;
  --text: "Caslon Text", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --wrap: 1180px; --gutter: clamp(16px, 4vw, 40px);
  --step-0: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  --step-1: clamp(1.25rem, 1.12rem + 0.6vw, 1.55rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.2vw, 2.3rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.62 var(--text); font-kerning: normal;
  font-variant-ligatures: common-ligatures; text-rendering: optimizeLegibility; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gilt-bright); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 0.4em; letter-spacing: 0.005em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1em; }
em { font-style: italic; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
.eyebrow { font: italic 400 1rem/1.4 var(--text); color: var(--gilt); letter-spacing: 0.04em; margin-bottom: 0.4em; }
.night .eyebrow, .hero .eyebrow { color: var(--gilt-bright); }
.sc { font-variant: small-caps; letter-spacing: 0.08em; }
.rule { width: min(420px, 80%); margin: 0.6em auto 1.4em; opacity: 0.85; }
.night .rule { filter: invert(1) sepia(0.4) brightness(1.1); opacity: 0.7; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: 0.9rem; }

/* header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(21, 17, 13, 0.94); color: var(--cream);
  border-bottom: 1px solid rgba(216, 176, 106, 0.35); }
@supports (backdrop-filter: blur(6px)) { .site-head { background: rgba(21, 17, 13, 0.82); backdrop-filter: blur(8px); } }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font: 400 1.15rem/1 var(--display); }
.brand img { width: 52px; height: auto; }
.site-head nav { display: flex; gap: clamp(10px, 2vw, 26px); flex-wrap: wrap; justify-content: flex-end; }
.site-head nav a { color: var(--cream-dim); text-decoration: none; font-size: 0.98rem; padding: 6px 2px; }
.site-head nav a:hover { color: var(--gilt-bright); }
@media (max-width: 720px) { .site-head nav .opt { display: none; } .brand span { display: none; } }

/* hero */
.hero { position: relative; background: var(--night); color: var(--cream); overflow: hidden; isolation: isolate; }
.hero picture.bg, .hero picture.bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 10, 6, 0.94) 0%, rgba(14, 10, 6, 0.82) 42%, rgba(14, 10, 6, 0.35) 75%, rgba(14, 10, 6, 0.2) 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 60px); align-items: center;
  padding-block: clamp(48px, 9vw, 120px); }
.hero h1 { margin: 0 0 0.3em; }
.hero h1 img { width: min(440px, 88%); }
.hero .tagline { font-size: var(--step-1); line-height: 1.45; color: var(--cream); max-width: 34ch; }
.hero .who { color: var(--cream-dim); max-width: 46ch; }
.facts { list-style: none; padding: 0; margin: 1.2em 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.facts li { border: 1px solid rgba(216, 176, 106, 0.55); color: var(--cream); padding: 4px 12px; border-radius: 999px; font-size: 0.92rem; }
.status { display: inline-flex; align-items: center; gap: 10px; font: 400 1.05rem/1.3 var(--display); color: var(--gilt-bright); margin: 0.4em 0 0.3em; letter-spacing: 0.02em; }
.status .seal { width: 12px; height: 12px; border-radius: 50%; background: var(--gilt-bright); box-shadow: 0 0 0 4px rgba(216, 176, 106, 0.18); }
.status-note { color: var(--cream-dim); font-size: 0.95rem; }
.btn { display: inline-block; background: var(--gilt-bright); color: #1a130a; text-decoration: none; font: 600 1rem/1 var(--text);
  padding: 14px 22px; border-radius: 3px; border: 1px solid #b98d45; box-shadow: 0 2px 0 #7a5420; }
.btn:hover { background: #e7c37f; color: #1a130a; }
.btn.ghost { background: transparent; color: var(--cream); border-color: rgba(216, 176, 106, 0.6); box-shadow: none; }
.btn.ghost:hover { color: var(--gilt-bright); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.2em; }
.hero-phone { justify-self: center; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero::after { background: linear-gradient(180deg, rgba(14, 10, 6, 0.75) 0%, rgba(14, 10, 6, 0.9) 55%, rgba(14, 10, 6, 0.96) 100%); }
  .hero h1 img, .hero .tagline, .hero .who { margin-inline: auto; }
  .facts, .cta-row { justify-content: center; }
}

/* phone frame for screenshots and films */
.phone { margin: 0; width: min(300px, 78vw); }
.phone .frame { position: relative; border-radius: 34px; padding: 9px; background: linear-gradient(145deg, #6b5537, #2a2117 60%, #4b3a26);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.phone .frame > * { border-radius: 26px; width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; background: #0e0b08; }
.phone figcaption { text-align: center; font-style: italic; font-size: 0.9rem; margin-top: 12px; color: var(--ink-3); }
.night .phone figcaption, .hero .phone figcaption { color: var(--cream-dim); }
.still-for-reduced { display: none; }
@media (prefers-reduced-motion: reduce) {
  .motion-video { display: none; }
  .still-for-reduced { display: block; }
  html { scroll-behavior: auto; }
}

/* sections */
.section { padding-block: clamp(56px, 9vw, 112px); }
.section.paper2 { background: var(--paper-2); }
.night { background: var(--night); color: var(--cream); }
.night .lead, .night .muted { color: var(--cream-dim); }
.night a { color: var(--gilt-bright); }
.intro { text-align: center; max-width: 760px; margin: 0 auto clamp(28px, 5vw, 56px); }
.intro p:not(.eyebrow) { color: var(--ink-2); }
.night .intro p:not(.eyebrow) { color: var(--cream-dim); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split .phone { justify-self: center; } }
.prose p { max-width: 62ch; }

/* listen */
.listen { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.listen .panel { border: 1px solid var(--paper-edge); background: #f6eedb; padding: clamp(18px, 3vw, 30px); box-shadow: 0 1px 0 #fff inset, 0 14px 30px rgba(60, 40, 10, 0.12); }
.listen audio { width: 100%; margin: 0.6em 0 1em; }
.listen details { border-top: 1px solid var(--paper-edge); padding-top: 0.8em; }
.listen summary { cursor: pointer; color: var(--rust); }
.listen blockquote { margin: 1em 0 0; font-size: 1rem; color: var(--ink-2); max-height: 22em; overflow: auto; padding-right: 8px; }
.listen blockquote p { margin-bottom: 0.8em; }
.listen .bill { text-align: center; font: 400 1.25rem var(--display); letter-spacing: 0.04em; }
.listen figure { margin: 0; }
.listen figure img { border: 1px solid var(--paper-edge); box-shadow: 0 16px 34px rgba(40, 25, 5, 0.25); }
.listen figcaption { font-style: italic; font-size: 0.9rem; color: var(--ink-3); margin-top: 8px; }
@media (max-width: 860px) { .listen { grid-template-columns: 1fr; } }

/* books */
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.book { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: start; }
.book img.cover { border: 3px solid #b98d45; border-radius: 4px; box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45); }
.book h3 { margin-bottom: 0.15em; }
.book .years { color: var(--gilt-bright); font-style: italic; margin-bottom: 0.8em; }
.book p { color: var(--cream-dim); }
@media (max-width: 960px) { .books { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .book { grid-template-columns: 1fr; } .book img.cover { width: 200px; } }

/* acts and chapters */
.act-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: clamp(36px, 5vw, 56px) 0 18px; border-bottom: 1px solid var(--paper-edge); padding-bottom: 10px; }
.act-head h3 { margin: 0; }
.act-head .years { font-style: italic; color: var(--gilt); }
.chapters { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: ch; }
.chapters li { background: #f6eedb; border: 1px solid var(--paper-edge); overflow: hidden; }
.chapters img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.chapters .cap { padding: 12px 14px 14px; }
.chapters small { display: block; color: var(--gilt); font-style: italic; }
.chapters strong { display: block; font: 400 1.18rem/1.2 var(--display); margin: 2px 0 4px; }
.chapters span { font-size: 0.92rem; color: var(--ink-3); }
@media (max-width: 1020px) { .chapters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .chapters { grid-template-columns: 1fr; } }
.book-two-list { columns: 3 220px; column-gap: 32px; padding: 0; list-style: none; margin: 0; }
.book-two-list li { break-inside: avoid; padding: 10px 0; border-bottom: 1px dotted var(--paper-edge); }
.book-two-list small { display: block; color: var(--gilt); font-style: italic; }
.book-two-list strong { font: 400 1.12rem/1.25 var(--display); }
.book-two-list span { display: block; font-size: 0.92rem; color: var(--ink-3); }

/* route map */
.map { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.map > img { grid-column: 1 / -1; border: 1px solid var(--paper-edge); box-shadow: 0 14px 30px rgba(60, 40, 10, 0.15); }
.map img { width: 100%; }
.towns { list-style: none; padding: 0; margin: 0; columns: 2 160px; }
.towns li { padding: 6px 0; border-bottom: 1px dotted var(--paper-edge); break-inside: avoid; }
.towns small { color: var(--ink-3); font-style: italic; }
@media (max-width: 860px) { .map { grid-template-columns: 1fr; } }

/* read listen look */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 3vw, 40px); align-items: start; }
.modes .phone { justify-self: center; }
.feature-list { list-style: none; padding: 0; margin: clamp(28px, 4vw, 48px) auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; max-width: 1000px; }
.feature-list li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; }
.feature-list img { width: 54px; height: auto; filter: invert(1) sepia(0.5) saturate(0.6) brightness(1.05); }
.feature-list strong { display: block; font: 400 1.15rem/1.25 var(--display); color: var(--cream); }
.feature-list span { color: var(--cream-dim); font-size: 0.96rem; }
@media (max-width: 900px) { .modes { grid-template-columns: 1fr; } .feature-list { grid-template-columns: 1fr; } }

/* comic strip */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: #1b150f; padding: 10px; border-radius: 4px; }
.strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid #000; }
@media (max-width: 720px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* history explainer */
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ledger article { background: #f6eedb; border: 1px solid var(--paper-edge); border-top: 5px solid var(--mark, var(--gilt)); padding: 20px 20px 16px; }
.ledger article.doc { --mark: #3d5a3a; } .ledger article.dis { --mark: #9a6a1a; } .ledger article.fic { --mark: #7b2a1c; }
.ledger h3 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.ledger h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--mark); flex: none; }
.ledger p { font-size: 0.98rem; color: var(--ink-2); }
.ledger .src { font-size: 0.85rem; font-style: italic; color: var(--ink-3); border-top: 1px dotted var(--paper-edge); padding-top: 8px; margin: 0; }
@media (max-width: 900px) { .ledger { grid-template-columns: 1fr; } }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; border-radius: 2px; }
.gallery figcaption { font-size: 0.86rem; font-style: italic; color: var(--cream-dim); margin-top: 6px; }
.gallery .wide { grid-column: span 2; grid-row: span 2; }
.gallery .wide img { aspect-ratio: auto; height: 100%; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* films */
.films { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); justify-items: center; }
.films video { width: 100%; aspect-ratio: 9 / 16; background: #0e0b08; border-radius: 10px; }
.films figure { margin: 0; width: min(320px, 100%); }
.films figcaption { text-align: center; font-style: italic; font-size: 0.92rem; color: var(--cream-dim); margin-top: 10px; }
.trailer { margin: clamp(28px, 4vw, 48px) auto 0; max-width: 960px; }
.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #0e0b08; border-radius: 6px; }
@media (max-width: 860px) { .films { grid-template-columns: 1fr; } }

/* screens */
.screens { display: flex; gap: 22px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; }
.screens .phone { flex: 0 0 auto; width: min(240px, 66vw); scroll-snap-align: center; }
.ipads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 28px; }
.ipads img { border-radius: 14px; border: 8px solid #2a2117; box-shadow: 0 20px 40px rgba(40, 25, 5, 0.3); }
@media (max-width: 720px) { .ipads { grid-template-columns: 1fr; } }

/* promise */
.promise ul { list-style: none; padding: 0; margin: 1.4em auto 0; max-width: 760px; text-align: left; }
.promise li { padding: 12px 0 12px 34px; border-bottom: 1px dotted var(--paper-edge); position: relative; }
.promise li::before { content: "❧"; position: absolute; left: 0; top: 10px; color: var(--gilt); font-size: 1.2rem; }
.promise .emblem { width: 120px; margin: 0 auto 10px; }

/* signup */
.closing .logo-c { width: min(380px, 80%); margin: 0 auto 10px; position: relative; container-type: inline-size; }
.closing .logo-c img { display: block; width: 100%; height: auto; }
/* The title is set on the ribbon as type, as the app's TitleLogo does: Caslon Display in ink, centred on the ribbon's face (y 151-266 of 387, optically 50.5%),
   17% of the height tall (the art is 900x387, so 0.17 x 387/900 = 7.3% of the width), within the middle 62%. */
.closing .logo-c span { position: absolute; left: 19%; width: 62%; top: 50.5%; transform: translateY(-50%);
  font-family: "Caslon Display", Georgia, serif; font-size: 7.3cqw; line-height: 1; color: #1f1913; text-align: center;
  white-space: nowrap; letter-spacing: 0.01em; }
.signup { text-align: left; margin: 1.6em auto 0; max-width: 560px; }
.signup label { display: block; font-size: 0.95rem; color: var(--cream-dim); margin-bottom: 6px; }
.signup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input[type=email] { flex: 1 1 240px; font: inherit; padding: 13px 14px; border: 1px solid #b98d45; border-radius: 3px; background: #fbf6ea; color: var(--ink); min-width: 0; }
.signup button { font: 600 1rem/1 var(--text); padding: 14px 20px; border-radius: 3px; border: 1px solid #b98d45; background: var(--gilt-bright); color: #1a130a; cursor: pointer; }
.signup button:hover { background: #e7c37f; }
.signup-fine { font-size: 0.86rem; color: var(--cream-dim); margin-top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.closing-note { color: var(--cream-dim); }

/* footer */
.site-foot { background: #0f0c09; color: var(--cream-dim); padding: 36px 0 44px; font-size: 0.92rem; }
.site-foot .wrap { display: grid; gap: 10px; }
.site-foot .row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.site-foot .mark { display: flex; align-items: center; gap: 12px; }
.site-foot .mark img { width: 44px; height: 44px; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { color: var(--cream-dim); }
.site-foot a:hover { color: var(--gilt-bright); }
.site-foot .fine { font-size: 0.82rem; color: #9d8f74; max-width: 90ch; margin: 0; }

/* inner pages */
.page-hero { background: var(--night); color: var(--cream); padding: clamp(40px, 7vw, 80px) 0 clamp(28px, 5vw, 48px); }
.page-hero h1 { font-size: var(--step-3); }
.page-hero p { color: var(--cream-dim); max-width: 62ch; }
.page-body { padding: clamp(36px, 6vw, 72px) 0; }
.page-body h2 { font-size: var(--step-2); margin-top: 1.4em; }
.page-body li { margin-bottom: 0.5em; }
.page-body dl { display: grid; gap: 0; margin: 0 0 1.6em; }
.page-body dl div { display: grid; grid-template-columns: 12rem 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px dotted var(--paper-edge); }
.page-body dt { color: var(--ink-3); }
.page-body dd { margin: 0; }
@media (max-width: 560px) { .page-body dl div { grid-template-columns: 1fr; gap: 2px; } }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; list-style: none; padding: 0; }
.downloads li { background: #f6eedb; border: 1px solid var(--paper-edge); padding: 12px; }
.downloads img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #e9dcc0; margin-bottom: 8px; }
.downloads a { font-weight: 600; }
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.lost img { width: 220px; margin: 0 auto 18px; }

.page-hero a { color: var(--gilt-bright); }
