/* Fowl Language: pigeons, message cylinders and scrolls (see fowl.js) */

/* ---------- the pigeon ---------- */
.pigeon { width: 112px; height: 74px; overflow: visible; display: block; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.pigeon .pg-wing { transform-box: view-box; transform-origin: 60px 38px; }
.pigeon.flying .pg-wing { animation: flap .26s ease-in-out infinite alternate; }
.pigeon.flying .pg-feet { opacity: 0; }
@keyframes flap { from { transform: rotate(-38deg) scaleY(1.1); } to { transform: rotate(22deg) scaleY(.45); } }
.bird { position: absolute; left: 0; top: 0; width: 112px; height: 74px; z-index: 5; will-change: transform; }
.bird .cyl { position: absolute; left: 30px; top: 60px; transform: scale(.62) rotate(-6deg); transform-origin: 0 0; }
.bird.hit .pigeon .pg-wing { animation-duration: .08s; }

/* ---------- the message capsule (stands upright; the pigeon carries it on its leg) ---------- */
.cyl { position: absolute; width: 22px; height: 64px; }
.cyl i { position: absolute; display: block; }
.cyl-body { left: 4px; right: 4px; top: 6px; bottom: 6px; border-radius: 4px; background: #7a4a1e;
  background-image: linear-gradient(90deg, rgba(40,15,0,.45), rgba(255,215,160,.35) 35%, transparent 60%, rgba(40,15,0,.45)); box-shadow: 0 3px 5px rgba(0,0,0,.3); }
.cyl-band { left: 3px; right: 3px; top: 44%; height: 7px; background: var(--brass, #c9a24a); background-image: linear-gradient(90deg, rgba(0,0,0,.3), rgba(255,255,255,.35) 40%, rgba(0,0,0,.25)); border-radius: 1px; }
.cyl-cap, .cyl::before { left: 0; right: 0; height: 11px; border-radius: 6px; background: #5e3412; background-image: linear-gradient(90deg, rgba(40,15,0,.5), rgba(255,215,160,.35) 35%, rgba(40,15,0,.5)); }
.cyl-cap { top: 0; transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .35s; }
.cyl::before { content: ""; position: absolute; bottom: 0; }
.cyl.open .cyl-cap { transform: translate(14px, -24px) rotate(80deg); opacity: 0; }
.cyl.falling { z-index: 4; }
.bird .cyl { left: 48px; top: 54px; transform: scale(.6) rotate(8deg); transform-origin: 50% 0; }

/* ---------- the scroll: paper pulled sideways out of the capsule ---------- */
.scroll { position: relative; display: flex; flex-direction: column; align-items: stretch; width: 100%; }
.scroll-row { position: relative; display: flex; align-items: stretch; padding: 10px 0; }
/* the capsule, standing up on the left (same look as .cyl, stretched to the paper's height) */
.scroll .holder { position: relative; z-index: 2; flex: none; width: 24px; margin: -10px -4px -10px 0; border-radius: 5px; background: #7a4a1e;
  background-image: linear-gradient(90deg, rgba(40,15,0,.45), rgba(255,215,160,.35) 35%, transparent 60%, rgba(40,15,0,.45)); box-shadow: 2px 3px 6px rgba(0,0,0,.35); }
.scroll .holder::before, .scroll .holder::after { content: ""; position: absolute; left: -4px; right: -4px; height: 13px; border-radius: 7px; background: #5e3412;
  background-image: linear-gradient(90deg, rgba(40,15,0,.5), rgba(255,215,160,.35) 35%, rgba(40,15,0,.5)); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.scroll .holder::before { top: -3px; } .scroll .holder::after { bottom: -3px; }
.scroll .paper { position: relative; flex: 1; min-width: 0; display: flex; }
.scroll .sheet { position: relative; flex: 1; min-width: 0; background: #f2dca8; background-image: var(--fibre), linear-gradient(180deg, rgba(255,250,235,.35), transparent 30%, rgba(120,80,30,.12));
  border-radius: 0 2px 2px 0; box-shadow: inset 6px 0 8px -4px rgba(60,30,0,.35), 0 4px 8px rgba(0,0,0,.25); }
.scroll .sheet-in { padding: 18px 22px 18px 24px; }
/* the rest of the roll, curled at the loose end */
.scroll .curl { position: relative; flex: none; width: 18px; margin: -4px 0; border-radius: 9px; background: #e3c78c;
  background-image: linear-gradient(90deg, rgba(120,80,30,.35), rgba(255,250,230,.55) 45%, rgba(120,80,30,.4)); box-shadow: 2px 3px 6px rgba(0,0,0,.3); }
.scroll .curl::after { content: ""; position: absolute; left: 4px; right: 4px; top: 6px; bottom: 6px; border-radius: 5px; border-left: 2px solid rgba(120,80,30,.35); }
.scroll.rolled .paper { clip-path: inset(-12px 100% -12px 0); }
.scroll.archive .sheet { background-color: #f0cf78; }
.scroll.archive .curl { background-color: #d9b45a; }
.scroll.archive .holder { background-color: #8a5a10; }
.scroll.guess .sheet { background-color: #dde3ef; }
.scroll.guess .curl { background-color: #c6cfe2; }
.scroll-tag { align-self: flex-start; margin: 0 0 -2px 34px; position: relative; z-index: 3; }
.scroll-tag .ftag { position: relative; display: inline-block; }

/* the luggage tag tied on with string */
.ftag { position: absolute; z-index: 3; background: var(--manila, #e9d4a0); background-image: var(--fibre); color: var(--type-ink, #241d16); font-family: var(--typewriter); line-height: 1.2;
  padding: 7px 14px 7px 26px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); box-shadow: 0 3px 6px rgba(0,0,0,.3); }
.ftag::before { content: ""; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #2c3a2f; box-shadow: inset 0 0 0 2px #a88a4a; }
.ftag .form { display: block; font-size: .7em; letter-spacing: .1em; opacity: .65; text-transform: uppercase; }

/* ---------- feathers and arrows ---------- */
.feather { position: absolute; width: 10px; height: 22px; margin: -11px 0 0 -5px; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; background: #c9d1dc;
  box-shadow: inset -2px 0 0 #8e9cb0; pointer-events: none; z-index: 6; }
.feather:nth-child(3n) { background: #9aa7b8; }
.arrow { position: absolute; left: 0; top: 0; width: 86px; height: 4px; background: #5a3a1c; border-radius: 2px; z-index: 7; transform-origin: 100% 50%; }
.arrow::before { content: ""; position: absolute; right: -10px; top: -5px; border: 7px solid transparent; border-left: 12px solid #3a3d44; border-right: 0; }
.arrow::after { content: ""; position: absolute; left: -2px; top: -5px; width: 16px; height: 14px; background: linear-gradient(180deg, #e8604c 0 45%, transparent 45% 55%, #e8604c 55%); clip-path: polygon(0 0, 100% 30%, 100% 70%, 0 100%); }

/* ---------- the logo ---------- */
.fowl-logo { display: inline-flex; align-items: center; gap: .18em; line-height: .85; }
.fowl-logo .fl-bird .pigeon { width: 1.5em; height: auto; filter: drop-shadow(0 .05em 0 rgba(0,0,0,.3)); transform: scaleX(-1) rotate(-6deg); }
.fowl-logo .fl-words { display: flex; flex-direction: column; }
.fowl-logo .fl-title { font-family: var(--chunky); font-weight: 900; color: var(--cream, #f7ecd4); text-shadow: 0 .05em 0 var(--clay, #b56a45), 0 .1em 0 rgba(0,0,0,.25); }
.fowl-logo .fl-title span { display: block; }
.fowl-logo .fl-title .fl-lang { color: var(--gold, #e3b54d); text-shadow: 0 .05em 0 #9a6a14, 0 .1em 0 rgba(0,0,0,.25); }
.fowl-logo .fl-sub { margin-top: .3em; font-family: var(--typewriter); font-size: .19em; letter-spacing: .06em; color: var(--legal, #f2e08a); line-height: 1.2; }

@media (prefers-reduced-motion: reduce) { .pigeon.flying .pg-wing { animation: none; } }

/* phone: the airspace where pigeons arrive and leave */
.airspace { position: relative; height: 128px; margin: -4px -16px 0; overflow: hidden; }
.airspace .cyl.rest { left: 22px; bottom: 6px; }
.airspace .cyl.gone { transition: transform .3s, opacity .3s; transform: scale(.4); opacity: 0; }
.scroll.waiting { visibility: hidden; }
.reveal-in { animation: fadeUp .35s ease-out both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.msgtext { font-family: var(--typed); font-weight: 700; color: #3a2414; text-align: center; font-size: 21px; line-height: 1.3; word-break: break-word; }
.scroll .writefield { background: transparent; box-shadow: none; border-bottom: 2px dashed rgba(90,60,20,.35); border-radius: 0; padding: 4px 2px; min-height: 96px; }
.scroll .writefield:focus { box-shadow: none; border-bottom-color: var(--brass); }
.scroll-tag .ftag { font-size: 14px; }

/* ---------- handwriting on the scrolls ---------- */
/* footnote numbers: the handwriting font draws ¹²³ as specks, so they come from a sturdier font (only those characters) */
@font-face { font-family: "FnMarks"; src: local("Georgia"), local("Times New Roman"), local("Noto Serif"), local("Roboto"), local("DejaVu Serif"), local("Arial");
  unicode-range: U+00B9, U+00B2, U+00B3, U+2074-2079; }
.msgtext, .msgbig, .scroll .writefield, .mini .mtext, .report .guessline q, .tut .mtab {
  font-family: "FnMarks", var(--hand) !important; font-weight: 400 !important; color: #2c1a0c; letter-spacing: .01em; }
.msgtext { font-size: 23px; line-height: 1.35; }
.scroll .writefield { font-size: 22px; line-height: 1.4; }
.mini .mtext { font-size: 20px; }

/* ---------- your parchment (public/art/parchment.*): lightened where there's text to read, darkened at the edges ---------- */
body.has-parchment .scroll .sheet { background-image: linear-gradient(rgba(255,249,232,.5), rgba(255,249,232,.5)), var(--parchment); background-size: cover; background-position: center; }
body.has-parchment .scroll .curl { background-image: linear-gradient(90deg, rgba(90,55,20,.45), rgba(255,250,230,.25) 45%, rgba(90,55,20,.5)), var(--parchment); background-size: cover; }
body.has-parchment .scroll.archive .sheet { background-image: linear-gradient(rgba(235,185,60,.4), rgba(235,185,60,.4)), var(--parchment); }
body.has-parchment .scroll.guess .sheet { background-image: linear-gradient(rgba(200,212,236,.55), rgba(200,212,236,.55)), var(--parchment); }
body.has-parchment :is(.warrant:not(.forged), .warrant .wcover, .ftag, .mini, .report, .slip, .jobstrip.slip, .codebox, .foldertab) {
  background-image: linear-gradient(rgba(255,249,232,.38), rgba(255,249,232,.38)), var(--parchment); background-size: cover; }
body.has-parchment .warrant.rare { background-image: linear-gradient(rgba(235,190,70,.3), rgba(235,190,70,.3)), var(--parchment); }

/* things flying over everything */
#sky { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
#sky .cyl { position: absolute; }
/* your own pigeon art: same footprint as the drawn one */
.pigeon-img { width: 112px; height: auto; display: block; filter: none; }
.fowl-logo .fl-bird .pigeon-img { width: 1.5em; height: auto; transform: scaleX(1); }
.pigeon-sprite { background-repeat: no-repeat; }
.bird.sprited { width: var(--spr-w, 120px); height: auto; }
.bird.sprited .pigeon-sprite { width: var(--spr-w, 120px); }
#sky .cyl { transform-origin: 50% 50%; }
.airspace .cyl.falling { transform-origin: 50% 50%; }
body.has-sprites .airspace { height: 150px; }
body.has-sprites .airspace.short { height: 70px; }
@media (prefers-reduced-motion: reduce) { .pigeon-sprite { animation-play-state: paused; } }

/* ---------- footnotes ---------- */
.fnmark { font-family: "FnMarks", var(--typed, serif) !important; font-weight: 700; color: #8a2a1a; }
.fnotes { position: relative; margin-top: .55em; padding-top: .4em; text-align: left; }
.fnotes::before { content: ""; position: absolute; top: 0; left: 0; width: 35%; border-top: 1.5px solid rgba(90,60,20,.45); }
.fnote { font-size: .68em; line-height: 1.3; }
.fnbtn { margin: 8px 0 0; padding: 6px 12px; border-radius: 6px; border: 1.5px dashed rgba(90,60,20,.5); background: rgba(255,250,235,.4);
  font-family: var(--typewriter); font-size: 14px; color: #3a2414; cursor: pointer; }
.fnbtn.on { background: rgba(138,42,26,.12); border-style: solid; }
.fnchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fnchips:empty { display: none; }
.fnhelp { width: 100%; font-family: var(--typewriter); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; opacity: .7; }
.fnchip { padding: 5px 9px; border-radius: 5px; border: 1px solid rgba(90,60,20,.45); background: #fff8e6; font-family: var(--hand); font-size: 18px; color: #2c1a0c; cursor: pointer; }

/* ---------- marks in messages: redaction bars, rain smudges, stamps ---------- */
.redact { background: #17110c; color: transparent; border-radius: 2px; box-shadow: 0 0 0 1px #17110c; font-family: monospace !important; letter-spacing: -.08em; }
.smudge { display: inline-block; color: rgba(70,45,20,.6); filter: blur(.8px); }
.stampmark { display: inline-block; margin: 0 .15em; padding: .02em .35em; border: .12em solid #b3261e; border-radius: .2em; color: #b3261e;
  font-family: var(--chunky) !important; font-size: .55em; letter-spacing: .08em; vertical-align: .25em; transform: rotate(-5deg); opacity: .85;
  -webkit-mask-image: var(--ink-mask, none); mask-image: var(--ink-mask, none); }
.stampmark:nth-of-type(even) { transform: rotate(4deg); border-color: #1f4fa3; color: #1f4fa3; }

/* ---------- the torn scroll: half of it never arrived ---------- */
.scroll.torn .curl { display: none; }
.scroll.torn .paper { filter: drop-shadow(3px 3px 3px rgba(0,0,0,.3)); }
.scroll.torn .sheet { box-shadow: none; padding-right: 26px;
  clip-path: polygon(0 0, 96% 0, 100% 5%, 94% 11%, 99% 17%, 93% 23%, 98% 30%, 92% 36%, 97% 43%, 93% 49%, 99% 56%, 94% 62%, 98% 69%, 92% 75%, 97% 82%, 93% 88%, 99% 94%, 95% 100%, 0 100%); }
.scroll.gone { opacity: .35; }
.glimpseclock { color: #b3261e; font-family: var(--typewriter); }
.nw { white-space: nowrap; }
