/* playtinyroads.com. The "Town notebook" look: A's paper and full-screen
   opening, F's sign stickers and news ticker, G's map, legend and pinned
   places, D's post-its, B's signs. */
:root {
  --bg: #f6f1e7;
  --bg-2: #ede5d6;
  --card: #fffdf8;
  --ink: #2a2f40;
  --soft: #646a7d;
  --line: #dccfb9;
  --red: #e4553f;
  --red-deep: #b8433a;
  --blue: #3d7fd1;
  --sun: #ffcc4d;
  --pencil: #3b5cc4;
  --note-y: #fff1a8;
  --note-p: #ffd9df;
  --note-b: #d6ecf7;
  --note-g: #dcefc9;
  --grass: #cfe6b8;
  --grass-2: #b9d99d;
  --water: #bfe1ef;
  --road-edge: #e0c68f;
  --main: #ffd27a;
  --main-edge: #e3a94a;
}
/* the fonts, served from the site itself (site/fonts, copied by build.py):
   Fredoka and Nunito as variable fonts in Google's latin and latin-ext cuts,
   Caveat cut by build.py to the letters of the .hand notes. */
@font-face { font-family: Fredoka; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/fredoka-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Fredoka; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/fredoka-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Nunito; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(/fonts/nunito-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Nunito; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(/fonts/nunito-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Caveat; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/caveat-hand.woff2) format("woff2"); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg) var(--paper); color: var(--ink); font: 18px/1.6 Nunito, system-ui, sans-serif; overflow-x: hidden; }
/* the paper's texture: a fine warm grain over soft, uneven fibres. Both are
   noise (feTurbulence, stitched at the tile's edges), so nothing repeats you
   can see. */
:root {
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .34 0 0 0 0 .22 0 0 0 .16 0'/%3E%3C/filter%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .03' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .3 0 0 0 .22 -.07'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pencil); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, .btn, nav, .brand, .tick { font-family: Fredoka, sans-serif; }
.hand { font-family: Caveat, cursive; color: var(--pencil); font-weight: 700; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--card); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* header, over the opening picture */
header { position: absolute; inset: 0 0 auto; z-index: 4; padding: 18px 0; }
header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 25px; text-decoration: none; color: #fffdf8; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.brand img { width: 44px; height: 44px; transform: rotate(-6deg); }
nav { display: flex; gap: 26px; font-weight: 500; font-size: 17px; align-items: center; }
nav a { text-decoration: none; color: #fffdf8; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
nav a:not(.go):hover { text-decoration: underline wavy var(--sun); text-underline-offset: 5px; }
nav a.go { background: var(--red); padding: 8px 18px; border-radius: 999px; text-shadow: none; }
@media (max-width: 640px) { nav a:not(.go) { display: none; } }
header.solid { position: static; }
header.solid .brand, header.solid nav a:not(.go) { color: var(--ink); text-shadow: none; }

/* the opening: the postcard full screen, drifting, headline over it */
.hero { position: relative; min-height: 92vh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero .bg, .hero .bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .bg { z-index: -2; transform: scale(1.06); animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.12) translate(-1.5%, -1%); } }
.hero.off .bg, .ticker.off .tick { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .hero .bg { animation: none; } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,30,24,.35) 0%, rgba(20,30,24,0) 28%, rgba(20,30,24,0) 45%, rgba(20,30,24,.68) 100%); }
.hero .wrap { padding: 120px 0 72px; color: #fffdf8; }
/* below 1100px the signs sit in a row under the menu: keep the headline clear of it */
@media (max-width: 1099px) { .hero .wrap { padding-top: 190px; } }
@media (max-width: 699px) { .hero .wrap { padding-top: 160px; padding-bottom: 48px; } }
.hero h1 { font-size: clamp(46px, 7.4vw, 92px); line-height: .98; margin: 0 0 18px; font-weight: 700; letter-spacing: -.01em; max-width: 22ch; }
.hero h1 .r { color: var(--sun); }
.hero .sub { font-size: clamp(18px, 2.2vw, 22px); max-width: 34ch; margin: 0 0 28px; opacity: .95; }
.hero .note { position: absolute; right: 8%; top: 16%; transform: rotate(3deg); font-size: 26px; white-space: nowrap; pointer-events: none; z-index: 3;
  background: var(--card); padding: 0 12px; border-radius: 10px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.3); }
@media (max-width: 1099px) { .hero .note { right: auto; left: 8%; top: 150px; transform: rotate(-2deg); font-size: 22px; } }
@media (max-width: 700px) { .hero .note { display: none; } }
.sticker-sign { position: absolute; cursor: grab; touch-action: none; user-select: none; filter: drop-shadow(0 8px 8px rgba(0,0,0,.3)); z-index: 2; }
.sticker-sign:active { cursor: grabbing; }
.sticker-sign svg { width: 100%; height: 100%; display: block; }

.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { font-weight: 600; font-size: 19px; padding: 14px 26px; border-radius: 16px; text-decoration: none; border: 0; cursor: pointer; transition: transform .12s; display: inline-block; }
.btn:hover { transform: translateY(-2px); }
.btn.red { background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-deep); }
.btn.glass { background: rgba(255,253,248,.16); color: #fffdf8; backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255,253,248,.45); }

/* the news ticker, like the game's own news bar */
.ticker { border-block: 2px solid var(--line); overflow: hidden; white-space: nowrap; font-size: 15px; background: var(--card); }
.ticker .tick { display: inline-block; padding: 9px 0; animation: tick 50s linear infinite; font-weight: 500; }
.ticker .tick span { margin: 0 26px; }
.ticker .tick b { color: var(--red); font-weight: 600; margin-right: 8px; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .tick { animation: none; } }

section { padding: 100px 0; }
h2 { font-size: clamp(36px, 4.8vw, 56px); line-height: 1.02; margin: 0 0 12px; font-weight: 700; }
.lede { color: var(--soft); font-size: 20px; max-width: 46ch; margin: 0; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.band { background: var(--bg-2) var(--paper); }

/* post-it features, each with its road sign */
.notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 56px; padding: 0; list-style: none; }
@media (max-width: 920px) { .notes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .notes { grid-template-columns: 1fr; } }
.postit { position: relative; padding: 34px 24px 28px; min-height: 250px; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 14px 22px -14px rgba(70,50,20,.4); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.postit::before { content: ""; position: absolute; left: 50%; top: -12px; width: 86px; height: 24px; margin-left: -43px; background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.05); transform: rotate(-3deg); }
.postit:nth-child(1) { background: var(--note-y); transform: rotate(-2deg); }
.postit:nth-child(2) { background: var(--note-p); transform: rotate(1.5deg); }
.postit:nth-child(3) { background: var(--note-b); transform: rotate(-1deg); }
.postit:nth-child(4) { background: var(--note-g); transform: rotate(2deg); }
.postit:hover { transform: rotate(0) translateY(-6px); }
.postit svg { width: 64px; height: 64px; display: block; margin-bottom: 14px; }
.postit h3 { margin: 0 0 6px; font-size: 23px; }
.postit p { margin: 0; color: #4f5466; font-size: 16px; }

/* the town map and its legend */
.atlas { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: center; }
@media (max-width: 920px) { .atlas { grid-template-columns: 1fr; gap: 30px; } }
.atlas-note { font-size: 24px; margin: 18px 0 0; transform: rotate(-2deg); }
.map { position: relative; border-radius: 22px; background: var(--grass); box-shadow: 0 0 0 10px var(--card), 0 0 0 12px var(--line), 0 30px 50px -28px rgba(70,50,20,.45); transform: rotate(-1deg); overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.map .fold { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 49.7%, rgba(0,0,0,.05) 50%, transparent 50.3%), linear-gradient(transparent 49.6%, rgba(0,0,0,.05) 50%, transparent 50.4%); }
.map .note { position: absolute; font-size: 22px; white-space: nowrap; pointer-events: none; }
@media (max-width: 520px) { .map .note { font-size: 17px; } }
.legend { list-style: none; margin: 56px 0 0; border: 2px solid var(--ink); border-radius: 18px; padding: 10px 30px; background: var(--card); display: grid; grid-template-columns: 1fr 1fr; column-gap: 50px; position: relative; }
.legend::before { content: "LEGEND"; position: absolute; top: -13px; left: 26px; background: var(--bg-2) var(--paper); padding: 0 10px; font: 800 14px Nunito; letter-spacing: .2em; }
@media (max-width: 760px) { .legend { grid-template-columns: 1fr; padding: 10px 18px; } }
.key { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 2px dashed var(--line); }
.key:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 760px) { .key:nth-last-child(2) { border-bottom: 2px dashed var(--line); } }
.key h3 { margin: 0; font-size: 20px; }
.key p { margin: 2px 0 0; color: var(--soft); font-size: 16px; }

/* places to visit */
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
@media (max-width: 920px) { .places { grid-template-columns: 1fr; } }
.place { position: relative; margin: 0; background: var(--card); border-radius: 22px; padding: 12px; box-shadow: 0 0 0 2px var(--line), 0 16px 30px -24px rgba(70,50,20,.5); }
.place:nth-child(2) { transform: translateY(22px); }
@media (max-width: 920px) { .place:nth-child(2) { transform: none; } }
.place img { border-radius: 14px; aspect-ratio: 4/3; object-fit: cover; width: 100%; height: auto; }
.place .pin { position: absolute; top: -16px; left: 22px; width: 40px; height: 40px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--red); display: grid; place-items: center; box-shadow: 0 3px 0 var(--red-deep); }
.place .pin b { transform: rotate(45deg); color: #fff; font: 700 18px Fredoka; }
.place h3 { margin: 14px 8px 2px; font-size: 21px; }
.place p { margin: 0 8px 8px; color: var(--soft); font-size: 15px; }

/* sign-up */
.mail { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; background: var(--note-y); border-radius: 34px; padding: 50px; box-shadow: 0 14px 26px -18px rgba(70,50,20,.5); }
@media (max-width: 760px) { .mail { grid-template-columns: 1fr; text-align: center; padding: 36px 22px; } .mail .octa { margin: 0 auto; } }
.mail h2 { margin-bottom: 6px; }
.mail .lede { color: #4f5466; }
/* an SVG, not a clip-path: a rotated clip-path leaves a hairline of its box */
.octa { width: 150px; height: 150px; display: block; transform: rotate(-8deg); filter: drop-shadow(0 6px 8px rgba(70,50,20,.18)); }
.mail form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 760px) { .mail form { justify-content: center; } }
.mail input[type=email] { font: 600 18px Nunito; padding: 14px 20px; border-radius: 16px; border: 2px solid rgba(0,0,0,.08); width: min(320px, 100%); color: var(--ink); background: var(--card); }
.mail .trap { position: absolute; left: -9999px; }
.mail .said { margin: 14px 0 0; font-weight: 700; min-height: 1.6em; }
.mail > .hand { position: absolute; right: 44px; top: -30px; font-size: 27px; transform: rotate(-4deg); }

footer { padding: 40px 0 54px; color: var(--soft); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 2px dashed var(--line); padding-top: 26px; }
footer a { margin-left: 18px; }

/* the lost page */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.lost .sign { width: 180px; margin: 0 auto 24px; transform: rotate(-6deg); filter: drop-shadow(0 8px 8px rgba(0,0,0,.2)); }
.lost h1 { font-size: clamp(40px, 6vw, 64px); margin: 0 0 10px; }
.lost p { color: var(--soft); font-size: 20px; margin: 0 0 28px; }
