/* Publius post page: shared story styles. Page-specific styles are in index.html. */
:root {
  --paper: #F3ECDC;
  --paper-light: #F8F3E8;
  --ink: #221D19;
  --ink-soft: #5A5048;
  --red: #B22234;
  --blue: #3C3B6E;
  --blue-deep: #26254D;
  --placard: #E8DFCC;
  --rule: #CFC3AA;
  --measure: 660px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  background-color: var(--paper);
  background-image: url(img/paper-grain.webp);
  font-family: "Libre Caslon Text", Georgia, serif; font-size: 19.5px; line-height: 1.7;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.story { max-width: calc(var(--measure) + 32px); margin: 0 auto; padding: 0 16px; }
.body p { margin: 0 0 1.1em; }
.body::after { content: ""; display: table; clear: both; }

/* Boxed decorated initial, as 18th-century printers used */
.factotum {
  float: left; position: relative; margin: .4em 16px 4px 0; width: 100px; height: 100px;
  background: var(--blue); color: var(--paper); display: flex; align-items: center; justify-content: center;
  font-family: "IM Fell English", Georgia, serif; line-height: 1;
  box-shadow: inset 0 0 0 3px var(--blue), inset 0 0 0 4px rgba(243,236,220,.55);
}
.factotum b { font-weight: 400; font-size: 68px; transform: translateY(4px); }
.factotum i { position: absolute; width: 7px; height: 7px; color: var(--paper); opacity: .8; }
.factotum i svg { display: block; width: 100%; height: 100%; }
.factotum i:nth-of-type(1) { top: 7px; left: 7px; }
.factotum i:nth-of-type(2) { top: 7px; right: 7px; }
.factotum i:nth-of-type(3) { bottom: 7px; left: 7px; }
.factotum i:nth-of-type(4) { bottom: 7px; right: 7px; }

/* Map set into the text like a plate in a book */
figure.plate { margin: 6px 0 22px; }
.plate .mat { background: var(--placard); padding: 8px; border: 1px solid var(--rule); box-shadow: 0 8px 22px -14px rgba(34,29,25,.5); }
.plate img { display: block; width: 100%; height: auto; }
.plate figcaption { font-family: "Public Sans", sans-serif; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 9px; padding-left: 10px; border-left: 2px solid var(--blue); }
.plate figcaption .obj { display: block; font-family: "Libre Caslon Text", Georgia, serif; font-style: italic; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.plate figcaption .credit { display: block; margin-top: 5px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.plate figcaption a { color: var(--ink-soft); }
@media (min-width: 700px) { figure.plate { float: right; width: 46%; margin: 8px 0 18px 26px; } }

/* The dog note, set like the document */
.note {
  clear: both; margin: 1.7em 0; padding: 26px 28px 22px; background: var(--paper-light);
  border: 1px solid var(--rule); border-top: 5px solid var(--blue);
  box-shadow: 0 12px 26px -16px rgba(34,29,25,.5);
}
.note p { font-family: "IM Fell English", Georgia, serif; font-style: italic; font-size: 23px; line-height: 1.5; margin: 0; }
.note .from { display: block; margin-top: 14px; font-family: "Public Sans", sans-serif; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); font-weight: 600; }

/* Pull quote */
.pull { clear: both; margin: 2em 0; padding: 24px 0 22px; text-align: center; position: relative; }
.pull p { margin: 0; font-family: "IM Fell English", Georgia, serif; font-style: italic; color: var(--blue); font-size: clamp(28px, 5.4vw, 40px); line-height: 1.2; }
.pull cite { display: block; margin-top: 12px; font-family: "Public Sans", sans-serif; font-style: normal; font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft); }

.signoff { text-align: right; margin: .6em 0 0; font-family: "IM Fell English", Georgia, serif; font-style: italic; color: var(--blue); font-size: 46px; line-height: 1; }

/* Share */
.share { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); }
.btn {
  font-family: "Public Sans", sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .02em;
  border-radius: 3px; padding: 12px 18px; cursor: pointer; border: 1.5px solid var(--blue);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.btn-primary { background: var(--blue); color: var(--paper); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-secondary { background: transparent; color: var(--blue); }
.btn-secondary:hover { background: rgba(60,59,110,.07); }
.btn svg { width: 16px; height: 16px; }

/* Sources */
.sources { margin-top: 34px; font-family: "Public Sans", sans-serif; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.sources h2 { font-size: 12px; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; color: var(--blue); margin: 0 0 8px; }
.sources ol { margin: 0; padding-left: 20px; }
.sources li { margin-bottom: 6px; }
.sources a { color: var(--ink-soft); }

/* Signup */
.signup { max-width: calc(var(--measure) + 32px); margin: 52px auto 0; padding: 0 16px; }
.signup-box {
  position: relative; overflow: hidden; background: var(--blue); color: var(--paper); padding: 34px 28px 30px; display: grid; gap: 14px;
  box-shadow: inset 0 0 0 6px var(--blue), inset 0 0 0 7px rgba(243,236,220,.4);
}
.signup-box .rosette { position: absolute; right: -60px; top: -60px; width: 240px; opacity: .14; pointer-events: none; }
.signup .eyebrow { font-family: "Public Sans", sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; color: rgba(243,236,220,.75); }
.signup h2 { font-family: "Libre Caslon Text", Georgia, serif; font-weight: 700; font-size: 31px; margin: 0; line-height: 1.12; color: var(--paper); }
.signup p { margin: 0; font-size: 17px; color: rgba(243,236,220,.88); }
.signup form { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.signup input {
  flex: 1 1 220px; min-height: 46px; padding: 10px 14px; font-size: 16px; font-family: "Public Sans", sans-serif;
  background: #FBF8F1; border: 1.5px solid #FBF8F1; border-radius: 3px; color: var(--ink);
}
.signup input::placeholder { color: #8b8077; }
.signup .btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.signup .btn-primary:hover { background: #961B2B; }
.signup .fine { font-family: "Public Sans", sans-serif; font-size: 12px; color: rgba(243,236,220,.72); }

/* Star rule used as a section divider */
.star-rule { display: flex; align-items: center; gap: 14px; color: var(--blue); margin: 2em 0; }
.star-rule::before, .star-rule::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .55; }
.star-rule svg { width: 14px; height: 14px; }


@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
