/* ---------- The Hoard Herald: what's new as a newspaper (js/guide/newspaper.js) ----------
   Black ink on old newsprint, spun in over the main menu. Everything on the paper is drawn here: the grain, the
   folds, the browned edges, the worn ink and the stains (newspaper-art.js places the stains). */
@font-face { font-family: "UnifrakturMaguntia"; font-weight: 400; font-display: swap; src: url("/fonts/unifraktur-latin.woff2") format("woff2"); }
@font-face { font-family: "Old Standard TT"; font-weight: 400; font-display: swap; src: url("/fonts/oldstandard-latin.woff2") format("woff2"); }
@font-face { font-family: "Old Standard TT"; font-weight: 700; font-display: swap; src: url("/fonts/oldstandard-bold-latin.woff2") format("woff2"); }
@font-face { font-family: "Old Standard TT"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/oldstandard-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 900; font-display: swap; src: url("/fonts/playfair-black-latin.woff2") format("woff2"); }

#gnews { --gn-ink: #161412; --gn-rule: rgba(22, 20, 18, 0.5); --gn-old: "Old Standard TT", Georgia, serif;
  --gn-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .05 0 0 0 .26 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  position: fixed; inset: 0; z-index: 9000; background: rgba(6, 5, 10, 0.45);
  /* (the paper's as tall as its news: a long one scrolls the whole sheet up the screen, stains and all, rather than
     the words sliding under it; a short one sits in the middle, with room under it for the buttons) */
  overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #8a8068 transparent;
  display: flex; flex-direction: column; align-items: center; padding: 22px 0 112px;
  animation: gn-shade 0.25s ease-out both, gn-shake 0.28s linear 0.9s; }
#gnews:after { content: ""; position: fixed; inset: 0; background: #fff6e0; opacity: 0; pointer-events: none; animation: gn-flash 0.35s ease-out 0.9s; }
@keyframes gn-shade { from { background: rgba(6, 5, 10, 0); } }
@keyframes gn-flash { 0% { opacity: 0.16; } 100% { opacity: 0; } }
@keyframes gn-shake { 0%, 100% { transform: none; } 20% { transform: translate(-6px, 5px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-3px, 3px); } 80% { transform: translate(2px, -1px); } }

/* ---- the sheet: spun in like the films, slowing as it comes, then slapped down ---- */
.gn-sheet { position: relative; flex: none; margin: auto 0; width: min(860px, calc(100vw - 28px));
  transform: rotate(-1.2deg); transform-origin: 50% min(50%, 45vh); filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.35)) drop-shadow(0 22px 26px rgba(0, 0, 0, 0.6));
  animation: gn-spin 1.05s both; will-change: transform; }
@keyframes gn-spin {
  0%   { transform: scale(0.03) rotate(-1440deg); opacity: 0; animation-timing-function: cubic-bezier(0.2, 0.55, 0.4, 1); }
  6%   { opacity: 1; }
  80%  { transform: scale(1.14) rotate(-9deg); animation-timing-function: cubic-bezier(0.7, 0, 1, 0.6); }
  86%  { transform: scale(0.965) rotate(1.4deg); animation-timing-function: ease-out; }
  93%  { transform: scale(1.012) rotate(-1.6deg); }
  100% { transform: scale(1) rotate(-1.2deg); } }
#gnews.gone { animation: gn-shade 0.3s ease-in reverse both; }
#gnews.gone .gn-sheet { animation: gn-out 0.36s cubic-bezier(0.5, 0, 1, 0.5) both; }
#gnews.gone .gn-btns { opacity: 0; transition: opacity 0.15s; }
@keyframes gn-out { from { transform: rotate(-1.2deg); } to { transform: translateY(80vh) scale(0.8) rotate(14deg); opacity: 0.4; } }
#gnews.calm, #gnews.calm:after, #gnews.calm .gn-sheet, #gnews.calm .gn-btns, #gnews.calm .gn-pencil path { animation: none !important; }

.gn-paper { position: relative; color: var(--gn-ink); overflow: hidden;
  background: var(--gn-grain), radial-gradient(ellipse at 30% 25%, rgba(255, 252, 240, 0.5), transparent 60%),
    conic-gradient(from 0deg at 50% 50%, #e6dfca 0 25%, #ddd4bc 25% 50%, #e3dbc4 50% 75%, #d9cfb5 75%), #e2dac4; }
.gn-ear { position: absolute; right: 0; bottom: 0; pointer-events: none; filter: drop-shadow(-2px -2px 2px rgba(0, 0, 0, 0.3));
  background: linear-gradient(to bottom right, #cbbf9f 0, #d8ceb2 49.5%, transparent 50%); }
.gn-read { outline: none; }
.gn-page { position: relative; padding: 22px 28px 26px; text-align: left; }
.gn-page > *:not(.gn-fox):not(.gn-wear):not(.gn-stains) { position: relative; z-index: 1; }

/* ---- the print ---- */
.gn-mast { text-align: center; border-bottom: 3px double var(--gn-ink); padding-bottom: 4px; }
.gn-mast h1 { margin: 0; font: 400 clamp(34px, 7vw, 64px)/1.05 "UnifrakturMaguntia", var(--gn-old); color: var(--gn-ink); text-shadow: 0.4px 0.3px 0 rgba(22, 20, 18, 0.6); letter-spacing: 0.5px; }
.gn-dateline { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: italic 12.5px var(--gn-old); border-bottom: 1.5px solid var(--gn-ink); padding: 5px 2px; margin-bottom: 12px; }
.gn-count { position: relative; font-weight: 700; font-style: normal; padding: 0 4px; white-space: nowrap; }
.gn-pencil { position: absolute; left: -14px; top: -9px; width: calc(100% + 28px); height: calc(100% + 18px); overflow: visible; pointer-events: none; }
.gn-pencil path { fill: none; stroke: #4c4a48; stroke-width: 1.7; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.85;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: gn-draw 0.55s ease-in-out 1.35s forwards; }
@keyframes gn-draw { to { stroke-dashoffset: 0; } }
.gn-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; }
.gn-head { margin: 2px 0 8px; font: 900 clamp(26px, 4.2vw, 42px)/1.02 "Playfair Display", var(--gn-old); text-transform: uppercase; letter-spacing: -0.5px; color: var(--gn-ink); }
.gn-photo { float: right; width: 42%; margin: 2px 0 8px 14px; border: 2px solid var(--gn-ink); background: rgba(22, 20, 18, 0.08); }
.gn-dots { height: 140px; background: radial-gradient(circle, var(--gn-ink) 1.25px, transparent 1.6px) 0 0 / 5px 5px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 150'%3E%3Cpath d='M100 30c-22 0-36 14-38 30L18 44l40 34c2 8 6 14 12 18-30 8-44 30-46 54h152c-2-24-16-46-46-54 6-4 10-10 12-18l40-34-44 16c-2-16-16-30-38-30z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 150'%3E%3Cpath d='M100 30c-22 0-36 14-38 30L18 44l40 34c2 8 6 14 12 18-30 8-44 30-46 54h152c-2-24-16-46-46-54 6-4 10-10 12-18l40-34-44 16c-2-16-16-30-38-30z'/%3E%3C/svg%3E") center / contain no-repeat; }
.gn-photo figcaption { font: italic 11.5px/1.25 var(--gn-old); padding: 4px 6px; border-top: 1px solid var(--gn-ink); }
.gn-cols { columns: 2 190px; column-gap: 20px; column-rule: 1px solid var(--gn-rule); font: 14.5px/1.42 var(--gn-old); text-align: justify; hyphens: auto; }
.gn-cols p { margin: 0 0 8px; }
.gn-cols p:first-child:first-letter { float: left; font: 900 54px/0.8 "Playfair Display", var(--gn-old); margin: 4px 6px 0 0; }
.gn-cols b, .gn-side b { font-weight: 700; }
.gn-side { border-left: 1px solid var(--gn-rule); padding-left: 18px; }
.gn-side h3 { margin: 0 0 8px; padding-bottom: 3px; border-bottom: 2px solid var(--gn-ink); font: 700 12px var(--gn-old); letter-spacing: 3px; color: var(--gn-ink); }
.gn-side article { padding-bottom: 8px; margin-bottom: 9px; border-bottom: 1px dotted var(--gn-rule); }
.gn-side h4 { margin: 0 0 3px; font: 700 16px/1.15 var(--gn-old); color: var(--gn-ink); }
.gn-side p { margin: 0; font: 13.5px/1.35 var(--gn-old); }
.gn-more { font-style: italic; margin-bottom: 10px !important; }
.gn-ad { margin-top: 12px; border: 3px double var(--gn-ink); padding: 6px 8px; text-align: center; font: 12.5px/1.3 var(--gn-old); }
.gn-ad b { display: block; font: 900 15px/1.1 "Playfair Display", var(--gn-old); letter-spacing: 0.5px; margin-bottom: 2px; }

/* ---- the life in it: spots, worn ink, stains, folds and browned edges ---- */
.gn-fox, .gn-wear, .gn-stains, .gn-folds, .gn-burn { position: absolute; inset: 0; pointer-events: none; }
.gn-fox { z-index: 0; }
.gn-wear { z-index: 2; opacity: 0.26;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.06' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .89 0 0 0 0 .86 0 0 0 0 .77 0 0 0 7 -4.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"); }
.gn-stains { z-index: 3; overflow: hidden; }
.gn-ring { position: absolute; border-radius: 50%; margin: -65px 0 0 -65px;
  background: radial-gradient(closest-side, transparent 86%, rgba(112, 70, 28, 0.42) 90%, rgba(112, 70, 28, 0.12) 94%, transparent 97%);
  -webkit-mask: conic-gradient(#000 0 70%, rgba(0, 0, 0, 0.25) 78%, #000 92%); mask: conic-gradient(#000 0 70%, rgba(0, 0, 0, 0.25) 78%, #000 92%); }
.gn-drip { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(112, 70, 28, 0.32), rgba(112, 70, 28, 0.12) 60%, transparent 72%); }
.gn-thumb { position: absolute; width: 50px; height: 64px; border-radius: 50%; opacity: 0.2;
  background: repeating-radial-gradient(ellipse at 50% 55%, var(--gn-ink) 0 1.3px, transparent 1.3px 3.4px);
  -webkit-mask: radial-gradient(ellipse at 50% 55%, #000 45%, transparent 70%); mask: radial-gradient(ellipse at 50% 55%, #000 45%, transparent 70%); }
.gn-folds { z-index: 4; background:
  linear-gradient(180deg, transparent calc(50% - 14px), rgba(0, 0, 0, 0.07) calc(50% - 2px), rgba(255, 255, 255, 0.4) 50%, rgba(0, 0, 0, 0.05) calc(50% + 2px), transparent calc(50% + 16px)),
  linear-gradient(90deg, transparent calc(50% - 10px), rgba(0, 0, 0, 0.05) calc(50% - 1px), rgba(255, 255, 255, 0.28) 50%, transparent calc(50% + 10px)); }
.gn-burn { z-index: 5; box-shadow: inset 0 0 46px rgba(130, 88, 34, 0.32), inset 0 0 10px rgba(100, 66, 24, 0.35), inset 0 0 2px rgba(80, 50, 20, 0.5); }

/* ---- the buttons under it (the workshop's plates) ---- */
.gn-btns { position: fixed; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 12px; width: max-content; max-width: calc(100vw - 28px); animation: gn-up 0.3s ease-out 1.05s both; }
@keyframes gn-up { from { opacity: 0; transform: translate(-50%, 12px); } }
.gn-btn { min-height: 48px; padding: 0 20px; font: 800 14px var(--f-ui, system-ui, sans-serif); letter-spacing: 1px; text-transform: uppercase; color: var(--wk-paper, #f0ece0); cursor: pointer;
  border: 3px solid var(--wk-ink, #0a0612); border-radius: 10px; background: var(--wk-plate, #2a2e36); box-shadow: var(--wk-drop, 0 6px 0 #0a0612); transform: rotate(-1deg); white-space: nowrap; }
.gn-btn.gn-go { background: var(--wk-hazard, #f2b632); transform: rotate(1deg); }
.gn-btn.gn-go span { display: inline-block; background: var(--wk-iron, #2a2e36); padding: 5px 10px; border-radius: 6px; border: 2px solid var(--wk-ink, #0a0612); }
.gn-btn:hover, .gn-btn.padfocus { filter: brightness(1.18); }

@media (max-width: 720px) {
  .gn-sheet { width: calc(100vw - 30px); }
  #gnews { padding-top: 14px; }
  .gn-page { padding: 14px 14px 20px; }
  .gn-dateline { font-size: 11px; flex-wrap: wrap; justify-content: center; } .gn-dateline span:first-child { display: none; }
  .gn-grid { grid-template-columns: 1fr; gap: 12px; }
  .gn-side { border-left: 0; padding-left: 0; border-top: 3px double var(--gn-ink); padding-top: 8px; }
  .gn-photo { float: none; width: 100%; margin: 4px 0 10px; } .gn-dots { height: 120px; }
  .gn-btns { width: calc(100vw - 28px); } .gn-btn { flex: 1; padding: 0 8px; font-size: 12.5px; }
}

/* ---- Nib the newsboy's shout: a subtitle plate over the foot of the paper, gone after a few seconds ---- */
.gn-nib { position: fixed; left: 50%; bottom: 82px; transform: translateX(-50%); max-width: calc(100vw - 40px); padding: 6px 14px 7px; text-align: center; pointer-events: none;
  border: 3px solid var(--wk-ink, #0a0612); border-radius: 10px; background: var(--wk-plate, #2a2e36); box-shadow: var(--wk-drop-sm, 0 4px 0 #0a0612); z-index: 2;
  color: var(--wk-brass, #f2b632); font: 400 17px/1.2 var(--f-head, serif); animation: gn-nib 4.2s ease-out both; }
.gn-nib b { font: 800 11px var(--f-ui, system-ui, sans-serif); letter-spacing: 1px; text-transform: uppercase; color: var(--wk-paper, #f0ece0); }
.gn-nib i { display: block; font: italic 500 12.5px var(--f-ui, system-ui, sans-serif); color: var(--wk-paper, #f0ece0); opacity: 0.8; }
@keyframes gn-nib { 0% { opacity: 0; transform: translate(-50%, 8px); } 8%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
#gnews.gone .gn-nib { opacity: 0; }
