/* Quiet, editorial interface. The pixel art is the picture; the interface around it stays plain.
   Type: Instrument Sans for text, Departure Mono for small labels and numbers.
   Pixel art is only ever scaled by whole numbers (canvas, sprites, bands) or shown as a smooth illustration. */
@font-face { font-family: "Instrument Sans"; src: url(instrument-sans.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Departure Mono"; src: url(departure-mono.woff2) format("woff2"); font-display: swap; }
@view-transition { navigation: auto; }

:root {
  color-scheme: light;
  --bg: #f5f5f2; --card: #fbfbf8; --ink: #171717; --ink-70: rgba(38, 35, 35, .72); --ink-50: rgba(38, 35, 35, .66); --ink-40: rgba(38, 35, 35, .5);
  --line: rgba(0, 0, 0, .1); --paper: #fdfcf7; --post: #1f3a6b; --wax: #b33a2b; --brass: #a8792a; --ok: #2e7d4f;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Departure Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --raise: 0 0 0 1px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .05);
  --bar: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { overscroll-behavior-y: none; /* no light strip above the dark hero when the page bounces */ scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
body > footer { margin-top: auto; }
h1, h2, h3, p, ul, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 400; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; }
h2 { font-size: clamp(26px, 3.3vw, 40px); line-height: 1.14; }
h3 { font-size: 17px; line-height: 1.3; letter-spacing: -.01em; font-weight: 500; }
p { color: var(--ink-70); max-width: 62ch; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
ul { list-style: none; padding: 0; }
img { max-width: 100%; height: auto; }
canvas, .bird, .dot, .pixel { image-rendering: pixelated; }
.mute { color: var(--ink-50); }
h2 .mute { display: block; color: var(--ink-50); }
.eyebrow { font: 11px/1.6 var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-50); }
.hint { font-size: 14px; color: var(--ink-50); }
:focus-visible { outline: 2px solid #3592e5; outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
main.wrap { padding: 32px 0 80px; display: grid; gap: 32px; align-content: start; }
.stack { display: grid; gap: 14px; align-content: start; }
.stack.m { gap: 32px; }
.stack.l { gap: 88px; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; font: 500 15px var(--sans); white-space: nowrap; text-decoration: none; cursor: pointer;
  background: #474747; color: #fbfbf8; border: 1px solid #383838; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 4px rgba(0, 0, 0, .14); transition: background-color .15s, transform .1s; }
.btn:hover { background: #333; }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #b9b9b4; border-color: #b0b0aa; box-shadow: none; cursor: progress; }
.btn.light { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: 0 2px 3px rgba(0, 0, 0, .06); }
.btn.light:hover { background: #fff; }
.btn.white { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.btn.white:hover { background: #f1f1ee; }
.btn.glass { color: #fff; background: rgba(8, 50, 130, .35); border-color: rgba(255, 255, 255, .7); box-shadow: none; }
.btn.glass:hover { background: rgba(8, 50, 130, .6); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-70); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 20px; min-height: 20px; height: 20px; flex: none; accent-color: #3592e5; }
input, textarea { font: 400 16px var(--sans); color: var(--ink); min-height: 44px; padding: 10px 12px; border: 1px solid rgba(0, 0, 0, .16); border-radius: 8px; background: #fff; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input:hover, textarea:hover { border-color: rgba(0, 0, 0, .3); }
input:focus, textarea:focus { outline: 0; border-color: #3592e5; box-shadow: 0 0 0 3px rgba(53, 146, 229, .2); }
input::placeholder, textarea::placeholder { color: rgba(38, 35, 35, .62); }
textarea { resize: vertical; }
.count { justify-self: end; font: 11px var(--pixel); color: var(--ink-50); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.apart { justify-content: space-between; }
.row input { flex: 1 1 150px; }

/* header */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(245, 245, 242, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transition: background-color .25s, color .25s, border-color .25s; }
.nav { display: flex; align-items: center; gap: 4px; height: var(--bar); }
.logo { display: flex; align-items: center; gap: 8px; margin-right: auto; font: 400 25px/1 var(--serif); letter-spacing: -.02em; text-decoration: none; }
.nav a:not(.btn):not(.logo) { font-size: 15px; font-weight: 500; text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: background-color .15s; }
.nav a:not(.btn):not(.logo):hover { background: rgba(0, 0, 0, .06); }
.nav .btn { margin-left: 8px; }
.bar.over { position: fixed; inset: 0 0 auto; }
.bar.over:not(.solid) { background: transparent; border-color: transparent; color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.bar.over:not(.solid) .nav a:not(.btn):not(.logo):hover { background: rgba(255, 255, 255, .18); }
.bar.over:not(.solid) .btn { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.msg { background: #fff8dc; border: 1px solid #e6d58a; border-radius: 8px; padding: 10px 14px; color: var(--ink); max-width: none; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-50); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
footer a { display: inline-block; padding: 10px 2px; }

/* surfaces */
.card { background: var(--card); border-radius: 12px; box-shadow: var(--raise); padding: 20px; display: grid; gap: 12px; align-content: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (min-width: 901px) { .grid3.examples { grid-template-columns: 1fr 1.6fr 1fr; } } /* the sample letter needs room beside its stamp */
.warn { background: #fdeee8; border-radius: 8px; padding: 10px 12px; font-size: 14px; color: #7a2a1c; max-width: none; }
.tag { font: 11px var(--pixel); letter-spacing: .06em; text-transform: uppercase; background: #e3f1e7; color: var(--ok); padding: 2px 6px; border-radius: 4px; }

/* home: hero */
.hero { position: relative; height: min(760px, 92vh); height: min(760px, 92svh); min-height: 560px; overflow: hidden; background: var(--sky, #238dfd); color: #fff; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: opacity .5s; }
.hero canvas:not(.on) { opacity: 0; } /* the scene fades in once its sky has loaded, never as a bare pigeon on flat blue */
/* a soft blue veil under the words, so white text passes the contrast rule on the bright sky */
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 50, 130, .42), rgba(8, 50, 130, 0) 62%); pointer-events: none; }
.hero-in { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding-top: var(--bar); }
.hero h1 { text-shadow: 0 1px 14px rgba(20, 60, 140, .35); }
.hero p { color: rgba(255, 255, 255, .94); max-width: 44ch; font-size: 17px; text-shadow: 0 1px 8px rgba(20, 60, 140, .45); }
.hero p.wide { max-width: 38em; }
.hero .ch { white-space: nowrap; } /* phrases wrap as wholes on phones */
:lang(ko) { word-break: keep-all; }
.hero small { font-size: 14px; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 6px rgba(20, 60, 140, .5); }
.chips { position: absolute; z-index: 1; right: max(20px, 50% - 540px); bottom: 17%; display: grid; gap: 8px; justify-items: start; }
.chip { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: #fff; background: rgba(8, 40, 110, .62); border: 1px solid rgba(255, 255, 255, .3); font-variant-numeric: tabular-nums; }
.chip i { font: normal 11px var(--pixel); letter-spacing: .1em; text-transform: uppercase; opacity: .78; }

/* home: sections */
.band { padding: 88px 0; }
.band + .band { border-top: 1px solid var(--line); }
.center { text-align: center; justify-items: center; }
.center p { margin-inline: auto; }
.for { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -36px; position: relative; z-index: 2; }
.for .card { padding: 14px 16px; gap: 2px; }
.for b { font-weight: 500; }
.for span { font-size: 13px; color: var(--ink-50); }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.split.flip { grid-template-columns: 7fr 5fr; }
.split.flip > :first-child { order: 2; }
.rows { border-top: 1px solid var(--line); margin-top: 6px; }
.rows li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.rows li:not(:has(> i)) { grid-template-columns: 1fr; }
.rows li i { font: normal 11px/22px var(--pixel); color: var(--ink-50); }
.rows li span { display: block; font-weight: 400; font-size: 14px; color: var(--ink-50); }
.phone { width: min(290px, 80%); margin-inline: auto; padding: 9px; border-radius: 42px; background: #1c1c1c; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 30px 60px -24px rgba(0, 0, 0, .4); }
.phone > div { border-radius: 33px; overflow: hidden; background: var(--card); }
.shot { position: relative; aspect-ratio: 3 / 2; background: #238dfd url(img/sky.png) 30% 100% / auto 256px repeat-x; image-rendering: pixelated; overflow: hidden; }
.shot .bird { position: absolute; left: 34%; top: 8%; }

/* A small scene: one place, and one short story that loops. The story waits off screen (site.js), so it starts when the reader arrives.
   --k is the size of one drawn pixel: 2 on wide screens, 1 on phones, never in between, so the art stays sharp.
   The background (--bw x 256 pixels) is drawn at --k and placed at --bx (0 = left, 1 = right). The stage lies exactly over it and is zoomed
   by --k, so a sprite in the stage is placed in background pixels and stays on its roof, desk or floor at every width. */
.scene { --k: 2; --bx: .5; --bw: 384; position: relative; aspect-ratio: 4 / 3; width: 100%; max-width: 620px; margin-inline: auto; border-radius: 12px; overflow: hidden; box-shadow: var(--raise);
  background: #238dfd url(img/sky.png) calc(var(--bx) * 100%) 100% / auto calc(256px * var(--k)) repeat-x; image-rendering: pixelated; }
.scene.town { background-color: #5aa3fd; background-image: url(img/town.png); }
.scene.desk { --bx: .3; background-color: #421c1d; background-image: url(img/desk.png); }
.scene.roof { --bx: 1; background-color: #2894fd; background-image: url(img/terrace.png); }
.scene.night { --bw: 768; background-color: #000f41; background-image: url(img/night.png); }
.bgpt { position: absolute; bottom: 0; width: 0; height: 0; left: calc(var(--bx) * (100% - var(--bw) * var(--k) * 1px)); }
.stage { position: absolute; left: 0; bottom: 0; width: calc(var(--bw) * 1px); height: 256px; zoom: var(--k); }
.stage > *, .loftbox > * { position: absolute; }
.at { position: absolute; width: 0; height: 0; }                          /* a point in the scene, in percent */
.at > * { position: absolute; left: 0; bottom: 0; zoom: var(--k); }       /* the sprite stands on that point */
.scene .card { position: absolute; image-rendering: auto; gap: 8px; padding: 14px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 18px 40px -18px rgba(0, 20, 60, .5); }
.scene .rows { margin: 0; } .scene .rows li { padding: 8px 0; font-size: 14px; } .scene .rows li:last-child { border-bottom: 0; } .scene .rows li span { font-size: 13px; }
.scene .capsule-text { --st: 46px; font-size: 14px; padding: 10px calc(var(--st) * 1.45 + 18px) 12px 12px; min-height: 0; } .scene .capsule-text footer { display: none; }
.scene .chip { position: absolute; }
.scene.wait *, .scene.wait *::before, .scene.wait *::after { animation-play-state: paused !important; }
.rest { color: transparent; }                                               /* the part of a capsule not typed yet keeps its place */

/* Frames: each strip holds 4 poses side by side. A story moves from pose to pose with step-end keyframes. */
.f { display: block; background-repeat: no-repeat; }
.s-scout { width: 85px; height: 65px; background-image: url(img/pigeon-scout.png); }   /* look, look down, surprised, point */
.s-walk { width: 85px; height: 63px; background-image: url(img/pigeon-walk.png); }     /* a walk with the head bob */
.s-write { width: 88px; height: 95px; background-image: url(img/pigeon-write.png); }   /* write, write, think, done */
.s-seal { width: 80px; height: 73px; background-image: url(img/pigeon-seal.png); }     /* stamp up, stamp down, capsule, wave */
.s-land { width: 84px; height: 100px; background-image: url(img/pigeon-land.png); }    /* glide, brake, touch down, settle */
.s-happy { width: 84px; height: 70px; background-image: url(img/pigeon-happy.png); }   /* proud, bow, hop, blink */
.s-lost { width: 76px; height: 72px; background-image: url(img/pigeon-lost.png); }     /* map, map upside down, scratch, look back */
.s-idle { width: 89px; height: 66px; background-image: url(img/pigeon-idle.png); }     /* preen, shake, stretch, rest */
.s-fly { width: 85px; height: 115px; background-image: url(img/pigeon-fly.png); }
@keyframes walk { to { background-position-x: -340px; } }
@property --on { syntax: "<number>"; inherits: true; initial-value: 1; }
/* a speech bubble: dots while someone writes, then a mark */
.bub { width: 22px; height: 15px; margin-left: -11px; display: grid; place-items: center; border: 1px solid #171717; border-radius: 4px; transform-origin: 50% 140%;
  background: rgb(255, calc(255 - 41 * var(--on)), calc(255 - 165 * var(--on))); font: 10px/1 var(--pixel); color: #171717; }
.bub::after { content: ""; position: absolute; left: 8px; bottom: -4px; width: 4px; height: 4px; background: inherit; border: solid #171717; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.bub b { grid-area: 1 / 1; font-weight: 400; opacity: var(--on); }
.bub i { grid-area: 1 / 1; width: 2px; height: 2px; background: #171717; box-shadow: -4px 0 #171717, 4px 0 #171717; opacity: calc(1 - var(--on)); }

/* 1. Scout: at sunrise, three people post in the town. The spyglass finds each post, and the person joins the list. */
.town .lens { left: 172px; top: 187px; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid #f2c75c; opacity: 0;
  box-shadow: 0 0 0 1px #5a3c10, inset 0 0 0 1px #5a3c10, 0 0 0 999px rgba(14, 22, 60, .4); animation: t-lens 12s ease-in-out infinite; }
@keyframes t-lens { 0% { left: 172px; top: 187px; opacity: 0; } 5%, 30% { left: 172px; top: 187px; opacity: 1; } 37%, 58% { left: 220px; top: 164px; } 65%, 76% { left: 264px; top: 178px; opacity: 1; } 80%, 100% { left: 264px; top: 178px; opacity: 0; } }
.town .b1 { left: 172px; top: 162px; animation: t-b1 12s linear infinite; }
.town .b2 { left: 220px; top: 139px; animation: t-b2 12s linear infinite; }
.town .b3 { left: 264px; top: 153px; animation: t-b3 12s linear infinite; }
@keyframes t-b1 { 0%, 2% { transform: scale(0); --on: 0; } 3.5% { transform: scale(1.2); --on: 0; } 4.5%, 11.5% { transform: scale(1); --on: 0; } 12% { transform: scale(1.25); --on: 1; } 13%, 95% { transform: scale(1); --on: 1; } 97%, 100% { transform: scale(0); --on: 1; } }
@keyframes t-b2 { 0%, 26% { transform: scale(0); --on: 0; } 27.5% { transform: scale(1.2); --on: 0; } 28.5%, 41.5% { transform: scale(1); --on: 0; } 42% { transform: scale(1.25); --on: 1; } 43%, 95% { transform: scale(1); --on: 1; } 97%, 100% { transform: scale(0); --on: 1; } }
@keyframes t-b3 { 0%, 53% { transform: scale(0); --on: 0; } 54.5% { transform: scale(1.2); --on: 0; } 55.5%, 69.5% { transform: scale(1); --on: 0; } 70% { transform: scale(1.25); --on: 1; } 71%, 95% { transform: scale(1); --on: 1; } 97%, 100% { transform: scale(0); --on: 1; } }
.town .s-scout { left: 52px; top: 142px; animation: t-bird 12s step-end infinite; }
@keyframes t-bird { 0% { background-position-x: -85px; } 34% { background-position-x: 0; } 80% { background-position-x: -170px; } 88%, 100% { background-position-x: -255px; } }
.town .card { gap: 4px; padding: 10px 12px; }
.town .rows li { position: relative; padding: 5px 0; font-size: 13px; line-height: 1.35; } .town .rows li span { font-size: 12px; }
.town .rows li > div { opacity: var(--on); transform: translateY(calc((1 - var(--on)) * 6px)); }
.town .rows li::after { content: ""; position: absolute; left: 42px; top: 50%; width: 52%; height: 8px; margin-top: -4px; border-radius: 4px; background: rgba(0, 0, 0, .07); opacity: calc(1 - var(--on)); } /* a place for the next person */
.town .rows li:nth-child(1) { animation: t-r1 12s ease-out infinite; }
.town .rows li:nth-child(2) { animation: t-r2 12s ease-out infinite; }
.town .rows li:nth-child(3) { animation: t-r3 12s ease-out infinite; }
@keyframes t-r1 { 0%, 13% { --on: 0; } 15.5%, 95% { --on: 1; } 98%, 100% { --on: 0; } }
@keyframes t-r2 { 0%, 43% { --on: 0; } 45.5%, 95% { --on: 1; } 98%, 100% { --on: 0; } }
@keyframes t-r3 { 0%, 71% { --on: 0; } 73.5%, 95% { --on: 1; } 98%, 100% { --on: 0; } }

/* 2. Capsule: at the desk the pigeon writes while the capsule types itself (site.js), then seals it, takes it and waves. */
.desk .s-write { left: 40px; top: 128px; animation: d-write 12s step-end infinite; }
@keyframes d-write { 0%, 4%, 8%, 12%, 16%, 20%, 24%, 28%, 32%, 36%, 40%, 44% { background-position-x: 0; opacity: 1; } 2%, 6%, 10%, 14%, 18%, 22%, 26%, 30%, 34%, 38%, 42%, 46% { background-position-x: -88px; }
  48% { background-position-x: -176px; } 55% { background-position-x: -264px; } 62%, 100% { opacity: 0; } }
.desk .s-seal { left: 39px; top: 150px; opacity: 0; animation: d-seal 12s step-end infinite; }
@keyframes d-seal { 0% { opacity: 0; } 62% { opacity: 1; background-position-x: 0; } 68% { background-position-x: -80px; } 74% { background-position-x: -160px; } 85%, 100% { opacity: 1; background-position-x: -240px; } }
.desk .ink { left: 108px; top: 210px; }
.desk .ink i { position: absolute; height: 1px; background: #6b4628; animation: 12s steps(9, end) infinite; }
.desk .ink i:nth-child(1) { left: 4px; top: 0; width: 72px; animation-name: d-l1; }
.desk .ink i:nth-child(2) { left: 3px; top: 4px; width: 76px; animation-name: d-l2; }
.desk .ink i:nth-child(3) { left: 2px; top: 8px; width: 74px; animation-name: d-l3; }
.desk .ink i:nth-child(4) { left: 1px; top: 12px; width: 40px; animation-name: d-l4; }
@keyframes d-l1 { 0%, 3% { clip-path: inset(0 100% 0 0); } 14%, 97% { clip-path: inset(0); } 100% { clip-path: inset(0 100% 0 0); } }
@keyframes d-l2 { 0%, 14% { clip-path: inset(0 100% 0 0); } 25%, 97% { clip-path: inset(0); } 100% { clip-path: inset(0 100% 0 0); } }
@keyframes d-l3 { 0%, 25% { clip-path: inset(0 100% 0 0); } 36%, 97% { clip-path: inset(0); } 100% { clip-path: inset(0 100% 0 0); } }
@keyframes d-l4 { 0%, 36% { clip-path: inset(0 100% 0 0); } 46%, 97% { clip-path: inset(0); } 100% { clip-path: inset(0 100% 0 0); } }
.desk .capsule-text::after { animation: d-post 12s linear infinite; }  /* the postmark falls with the stamp; also the clock of the typing */
@keyframes d-post { 0%, 68.5% { opacity: 0; transform: rotate(-10deg) scale(1.6); } 69.5% { opacity: .85; transform: rotate(-10deg) scale(.94); } 71%, 97% { opacity: .85; transform: rotate(-10deg) scale(1); } 100% { opacity: 0; transform: rotate(-10deg) scale(1); } }

/* 3. Reply: at night the pigeon flies home, lands on the perch, the bell rings, the loft lights up and the answer unrolls. */
.loftbox { width: 182px; height: 244px; background: url(img/loft-big.png) no-repeat; }
.home .s-fly { left: -40px; top: 0; opacity: 0; animation: h-fly 10s linear infinite, flap .45s steps(4) infinite; }
@keyframes h-fly { 0% { left: -270px; top: -60px; opacity: 1; } 15% { left: -150px; top: -12px; } 30% { left: -40px; top: 0; opacity: 1; } 30.1%, 100% { opacity: 0; } }
.home .s-land { left: 27px; top: 13px; opacity: 0; animation: h-land-go 10s ease-out infinite, h-land 10s step-end infinite; }
@keyframes h-land-go { 0%, 30% { left: -40px; top: 5px; } 35% { left: -8px; top: 9px; } 41%, 100% { left: 27px; top: 13px; } }
@keyframes h-land { 0% { opacity: 0; } 30% { opacity: 1; background-position-x: 0; } 35% { background-position-x: -84px; } 41% { background-position-x: -168px; } 46% { background-position-x: -252px; } 50%, 100% { opacity: 0; } }
.home .s-happy { left: 34px; top: 43px; animation: h-happy 10s step-end infinite; }
@keyframes h-happy { 0% { opacity: 0; } 50% { opacity: 1; background-position-x: 0; } 58% { background-position-x: -84px; } 64% { background-position-x: 0; } 68% { background-position-x: -168px; } 71% { background-position-x: 0; } 76% { background-position-x: -252px; } 90% { background-position-x: 0; } 97%, 100% { opacity: 0; } }
.home .glow { top: 80px; width: 25px; height: 30px; border-radius: 12px 12px 0 0; background: radial-gradient(circle at 50% 70%, #ffe9a3, #f4a833 60%, #b8611b); animation: h-glow 10s linear infinite; }
@keyframes h-glow { 0%, 42% { opacity: 0; } 47%, 95% { opacity: .92; } 99%, 100% { opacity: 0; } }
.home .ring { left: 170px; top: 84px; width: 7px; height: 14px; border: 1px solid transparent; border-right-color: #fff4c8; border-radius: 50%; opacity: 0; box-shadow: 3px 0 0 -1px #fff4c8; animation: h-ring 10s step-end infinite; }
.home .ring + .ring { left: 141px; transform: scaleX(-1); }
@keyframes h-ring { 0% { opacity: 0; } 42%, 45%, 48%, 51% { opacity: 1; } 43.5%, 46.5%, 49.5%, 52.5%, 100% { opacity: 0; } }
.home .card { animation: h-card 10s ease-out infinite; }
@keyframes h-card { 0%, 50% { clip-path: inset(0 -60px 100% -60px); opacity: 1; } 56%, 96% { clip-path: inset(0 -60px -60px -60px); opacity: 1; } 99%, 100% { clip-path: inset(0 -60px -60px -60px); opacity: 0; } }

/* 4. Open a loft: a rooftop in Seoul. One pigeon lands on the board and makes itself at home, one is lost with its map, one walks by. */
.roof .s-lost { left: 181px; top: 153px; animation: r-lost 14s step-end infinite; }
@keyframes r-lost { 0% { background-position-x: 0; } 12% { background-position-x: -76px; } 26% { background-position-x: -152px; } 38% { background-position-x: 0; } 50% { background-position-x: -228px; } 66% { background-position-x: 0; } 80% { background-position-x: -76px; } 92%, 100% { background-position-x: -152px; } }
.roof .q { left: 224px; top: 134px; animation: r-q 14s step-end infinite; }
@keyframes r-q { 0% { transform: scale(0); } 12% { transform: scale(1); } 38% { transform: scale(0); } 80%, 100% { transform: scale(1); } }
.roof .walker { left: 104px; top: 178px; width: 85px; height: 63px; animation: r-walk 14s linear infinite; }
@keyframes r-walk { 0%, 24% { left: -21px; opacity: 0; } 25.5% { left: -15px; opacity: 1; } 52%, 66% { left: 104px; } 92% { left: 214px; opacity: 1; } 95%, 100% { left: 225px; opacity: 0; } }
.walker .f { position: absolute; }
.walker .s-walk:first-child { opacity: 0; animation: walk .6s steps(4) infinite, r-go 14s step-end infinite; }
.walker .s-walk + .s-walk { background-position-x: -85px; animation: r-stop 14s step-end infinite; }
@keyframes r-go { 0% { opacity: 1; } 52% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes r-stop { 0% { opacity: 0; } 52% { opacity: 1; } 66%, 100% { opacity: 0; } }
.roof .s-fly { left: 200px; top: 30px; opacity: 0; animation: r-fly 14s linear infinite, flap .45s steps(4) infinite; }
@keyframes r-fly { 0% { left: 20px; top: -70px; opacity: 1; } 18% { left: 200px; top: 30px; opacity: 1; } 18.1%, 100% { opacity: 0; } }
.roof .s-land { left: 249px; top: 48px; opacity: 0; animation: r-land-go 14s ease-out infinite, r-land 14s step-end infinite; }
@keyframes r-land-go { 0%, 18% { left: 200px; top: 35px; } 22% { left: 228px; top: 42px; } 26%, 100% { left: 249px; top: 48px; } }
@keyframes r-land { 0% { opacity: 0; } 18% { opacity: 1; background-position-x: 0; } 22% { background-position-x: -84px; } 26% { background-position-x: -168px; } 29% { background-position-x: -252px; } 32%, 100% { opacity: 0; } }
.roof .s-happy { left: 256px; top: 78px; animation: r-happy 14s step-end infinite; }
@keyframes r-happy { 0% { opacity: 0; } 32% { opacity: 1; background-position-x: 0; } 37% { background-position-x: -84px; } 41% { background-position-x: 0; } 44%, 100% { opacity: 0; } }
.roof .s-idle { left: 255px; top: 82px; opacity: 0; animation: r-idle 14s step-end infinite; }
@keyframes r-idle { 0% { opacity: 0; } 44% { opacity: 1; background-position-x: 0; } 54% { background-position-x: -89px; } 58% { background-position-x: -178px; } 66% { background-position-x: -267px; } 95%, 100% { opacity: 0; } }
.phone .stack { padding: 14px 14px 20px; gap: 10px; }
.cruise { animation: cruise 40s linear infinite; }
@keyframes cruise { from { left: 12%; } to { left: 88%; } }
/* a pixel sky as a band: the strip is drawn at exactly twice its size, and the top color fills the rest */
.sky { color: #fff; border: 0 !important; background: #000d40 url(img/night.png) center bottom / auto 512px repeat-x; image-rendering: pixelated; }
.sky.dusk { background-color: #6043ab; background-image: url(img/dusk.png); }
.sky h2, .sky h3 { color: #fff; }
.sky p { color: rgba(255, 255, 255, .85); text-shadow: 0 1px 6px rgba(0, 0, 40, .45); }
.sky:not(.dusk) { padding-bottom: 460px; } /* the words stay in the clear sky, above the clouds */
.sky .eyebrow { color: rgba(255, 255, 255, .62); }
.sky .hint, .sky .hint b { color: rgba(255, 255, 255, .8); }
.sky .card p, .sky .card .hint { color: var(--ink-50); text-shadow: none; }
.sky .grid3 > div { border-left: 1px solid rgba(255, 255, 255, .3); padding-left: 16px; display: grid; gap: 6px; align-content: start; }
.price { align-content: stretch; grid-template-rows: auto auto 1fr auto; }
.price-head { display: flex; justify-content: space-between; align-items: flex-start; min-height: 104px; }
.price-head b { display: block; font: 400 34px/1.1 var(--sans); letter-spacing: -.02em; margin-top: 6px; }
.price-head b small { font-size: 14px; color: var(--ink-50); letter-spacing: 0; }
.price ul { display: grid; gap: 8px; font-size: 14px; color: var(--ink-70); align-content: start; }
.price li::before { content: "› "; color: var(--ink-50); }
.price form { display: grid; gap: 8px; }

/* the pigeon as a sprite. pigeon-fly.png: 4 frames of 85x115. pigeon-rest.png: stand, peck, sleep, take off, 88x93 each. */
.bird { display: inline-block; width: 88px; height: 93px; background: url(img/pigeon-rest.png) 0 0 no-repeat; }
.bird.sleep { background-position-x: -176px; }
.bird.fly { width: 85px; height: 115px; background-image: url(img/pigeon-fly.png); animation: flap .45s steps(4) infinite; }
@keyframes flap { to { background-position-x: -340px; } }

/* app: parts shared by the keeper page and the flight page */
.stack.s { gap: 6px; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.head h2 { font-size: 26px; }
.head small { font: 11px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-50); }
hr { width: 100%; margin: 2px 0; border: 0; border-top: 1px solid var(--line); }
.facts { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.facts > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
.facts dt { font: 11px/21px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-50); }
.facts dd { margin: 0; color: var(--ink-70); overflow-wrap: anywhere; }
.meter { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--brass); }
textarea.paper { background: var(--paper); border-color: #cfcbbd; color: #1d2433; font-size: 17px; line-height: 1.45; field-sizing: content; min-height: 4lh; }
textarea.paper:focus { border-color: var(--post); box-shadow: 0 0 0 3px rgba(31, 58, 107, .18); }

/* app: keeper */
.keeper-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: start; }
.tally { font-size: 14px; color: var(--ink-70); }
.tally b { font: 400 20px var(--pixel); color: var(--ink); }
.flock { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px; }
.perch { display: grid; justify-items: center; align-content: end; gap: 2px; min-width: 0; padding: 14px 6px 12px; border-radius: 8px; text-align: center; text-decoration: none; transition: background-color .15s; }
a.perch:hover { background: rgba(0, 0, 0, .045); }
.perch b { font-weight: 500; }
.perch small { font-size: 12px; line-height: 1.35; color: var(--ink-50); }
.queries { display: grid; gap: 6px; font-size: 14px; color: var(--ink-70); }
.queries li::before { content: "› "; color: var(--ink-50); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.people li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.row.top { flex-wrap: nowrap; align-items: flex-start; }
.contact { display: grid; grid-template-columns: 1fr 1.3fr 1fr auto; gap: 8px; }
.flights { gap: 0; padding: 4px 20px; }
.flights li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 4px 20px; align-items: center; padding: 14px 0; }
.flights li + li { border-top: 1px solid var(--line); }
.who { display: grid; }
.who b { font-weight: 500; }
.state { --tone: var(--brass); display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-70); }
.state::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.state.wait { --tone: #3592e5; } .state.ok { --tone: var(--ok); } .state.bad { --tone: var(--wax); } .state.off { --tone: rgba(0, 0, 0, .25); }
.mini { flex: none; width: 56px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--brass); }
.watch { font-size: 14px; padding: 10px 0; }

/* app: routes and flights */
.route-head { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; }
.route-head b { font-weight: 500; }
.route-head span { color: var(--ink-50); font-size: 14px; }
.track { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font: 11px var(--pixel); letter-spacing: .06em; text-transform: uppercase; }
.line { position: relative; height: 1px; background: repeating-linear-gradient(90deg, var(--ink-50) 0 4px, transparent 4px 8px); margin: 17px 18px; }
.dot { position: absolute; top: -16px; width: 32px; height: 30px; margin-left: -16px; background: url(img/icon.png) center / 32px auto no-repeat; transition: left 1s linear; }
.dot.on { animation: bob .6s steps(2) infinite; }
.dot.on.cruise { animation: bob .6s steps(2) infinite, cruise 40s linear infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }
/* the flight page: the picture and the log on the left, the message on the right. On a phone the message comes second. */
.flight { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: auto 1fr; grid-template-areas: "scene panel" "trip panel"; gap: 20px; align-items: start; }
.flight canvas { grid-area: scene; width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: var(--raise); background: var(--sky, #238dfd); }
.flight .panel { grid-area: panel; }
.flight .trip { grid-area: trip; gap: 4px; }
.panel { gap: 20px; }
.panel h1 { font-size: clamp(26px, 3vw, 34px); }
.eta { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 16px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.eta > :nth-child(even) { text-align: right; }
.eta b { font: 400 26px/1.2 var(--pixel); color: var(--ink); white-space: nowrap; }
.eta p { grid-column: 1 / -1; margin-top: 6px; font-size: 14px; color: var(--ink-50); }
.answer { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line); }
.answer p { color: var(--ink); }
.panel .facts { border-top: 1px solid var(--line); padding-top: 16px; }
.big { font-size: 19px; color: var(--ink); }
.big b { font: 400 22px var(--pixel); }
/* A capsule is a postcard: the Pigeon stamp in the corner (img/stamp.svg), cancelled by a postmark that prints data-pm, the day it left. */
.capsule-text { --st: 72px; position: relative; margin: 0; background: var(--paper); color: #1d2433; border-radius: 3px; padding: 18px calc(var(--st) * 1.45 + 22px) 18px 20px; min-height: calc(var(--st) * 1.22 + 28px);
  font-size: 18px; line-height: 1.45; box-shadow: 0 0 0 1px rgba(20, 30, 60, .08), 0 10px 24px -14px rgba(20, 30, 60, .35); }
.capsule-text footer, .capsule-text small { display: block; padding: 12px 0 0; font: 12px/1.4 var(--pixel); letter-spacing: .02em; color: #5d6478; border: 0; }
.capsule-text::before { content: ""; position: absolute; top: 14px; right: 14px; width: var(--st); aspect-ratio: 72 / 88; background: url(img/stamp.svg) center / contain no-repeat; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .22)); }
.capsule-text::after { content: attr(data-pm); position: absolute; top: calc(var(--st) * .36 + 14px); right: 12px; width: calc(var(--st) * 1.45); aspect-ratio: 90 / 56; padding-right: calc(var(--st) * .55);
  display: flex; align-items: center; justify-content: center; white-space: pre; text-align: center; font: calc(var(--st) * .115)/1.1 var(--pixel); color: var(--post);
  background: url(img/postmark.svg) left center / contain no-repeat; mix-blend-mode: multiply; opacity: .85; transform: rotate(-10deg); pointer-events: none; }
.capsule-text.unroll { animation: unroll .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes unroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -24px 0); } }
.log { display: grid; gap: 4px; font-size: 14px; color: var(--ink-50); }
.log li::before { content: "› "; }
.log.timed { grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; }
.log.timed li { display: contents; }
.log.timed li::before { content: none; }
.log.timed time { font: 11px/21px var(--pixel); letter-spacing: .04em; }
summary { cursor: pointer; color: var(--ink-50); width: fit-content; padding: 10px 0; font-size: 14px; }
details form { display: grid; gap: 8px; padding-top: 8px; justify-items: start; }
.rip { justify-items: center; text-align: center; max-width: 560px; margin: 0 auto; padding: 36px 24px; }
pre { white-space: pre-wrap; font: 11px/1.6 var(--pixel); margin: 0; }

@media (max-width: 900px) {
  .grid2, .grid3, .flight, .split, .split.flip { grid-template-columns: 1fr; }
  .split { gap: 28px; } .price-head { min-height: 0; } .split.flip > :first-child { order: 0; }
  .for { grid-template-columns: 1fr 1fr; }
  .chips { display: none; }
  .band { padding: 56px 0; } .stack.l { gap: 64px; }
  .flight { grid-template-areas: "scene" "panel" "trip"; grid-template-rows: none; }
  .keeper-head { grid-template-columns: 1fr; gap: 24px; }
  /* narrow screens: the text first, then the sky as a strip. The color above the strip is the top of the sky. */
  .hero { height: auto; min-height: 0; }
  .hero::after { background: linear-gradient(180deg, rgba(8, 50, 130, .42) 0 55%, rgba(8, 50, 130, 0) 78%); }
  .hero canvas { inset: auto 0 0; height: auto; aspect-ratio: 3 / 2; }
  .hero-in { height: auto; padding: calc(var(--bar) + 40px) 0 calc(66.67vw + 20px); }
}
@media (max-width: 360px) { .nav a:not(.btn):not(.logo):not(.lang) { display: none; } }
@media (max-width: 560px) {
  :root { --bar: 56px; }
  .wrap { width: calc(100% - 32px); }
  main.wrap { padding: 20px 0 56px; gap: 24px; }
  .logo { font-size: 22px; } .nav a:not(.btn):not(.logo) { padding: 8px 6px; font-size: 14px; } .nav a.wide { display: none; }
  .hero-in { padding-top: calc(var(--bar) + 28px); gap: 14px; } .hero p { font-size: 16px; }
  .card { padding: 16px; }
  .flock { gap: 0; padding: 4px; } .perch { padding: 10px 2px 8px; } .perch .bird { zoom: .5; } .perch small { font-size: 11px; }
  .contact { grid-template-columns: 1fr 1fr; }
  .eta b { font-size: 20px; }
  .flights { padding: 4px 16px; }
  .flights li { grid-template-columns: minmax(0, 1fr) auto; }
  .flights .state { grid-column: 1 / -1; grid-row: 2; }
  .row .btn { flex: 1 1 auto; }
  .sky .grid3 { gap: 24px; }
  .scene { --k: 1; } .scene .card { padding: 10px; gap: 4px; } .scene .rows li { padding: 5px 0; font-size: 12px; grid-template-columns: 24px 1fr; } .scene .rows li span { display: none; }
  .scene .capsule-text { --st: 38px; font-size: 12px; padding: 8px calc(var(--st) * 1.45 + 16px) 10px 10px; }
  .capsule-text { --st: 56px; font-size: 17px; } .scene .chip { font-size: 11px; padding: 5px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bird.fly, .dot.on, .cruise, .capsule-text.unroll { animation: none; }
  .scene *, .scene *::before, .scene *::after { animation: none !important; }
  .dot { transition: none; } html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
}

/* Korean pages (/ko): Korean fonts after the Latin ones, and line breaks between words, not inside them */
:lang(ko) { --sans: "Instrument Sans", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
:lang(ko) .eyebrow, :lang(ko) .chip i, :lang(ko) .head small, :lang(ko) .tag { letter-spacing: .02em; }

/* A chat after the first answer: mine on the right */
.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.chat li { justify-self: start; max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--line); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat li.mine { justify-self: end; background: var(--post); color: #fff; }
.chat time { display: block; font-size: 11px; opacity: .6; margin-top: 2px; }
