/* The site's look: a resident's card on passport cloth. Green cloth is the cover, mint security paper the pages,
   navy the printed ink, violet the stamp, yellow only for Play. */
@font-face { font-family: Archivo; src: url(/site/fonts/archivo.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'B612 Mono'; src: url(/site/fonts/b612mono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'B612 Mono'; src: url(/site/fonts/b612mono-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --cloth: #0f3b33; --cloth-deep: #0a2c26; --on-cloth: #e4f3e8; --on-cloth-soft: #a5cdb6; --cloth-line: #2c6455;
  --paper: #cfe8d6; --paper-pale: #e1f2e5; --ink: #12233f; --ink-soft: #3a5650; --paper-line: #8fb8a0;
  --stamp: #6a3fb0; --play: #f2c230; --bad: #a3162a; --good: #1d6a3c;
  --sans: Archivo, 'Segoe UI', sans-serif; --mono: 'B612 Mono', Consolas, monospace;
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='18' fill='none' stroke='%2312233f' stroke-opacity='.075'%3E%3Cpath d='M0 9Q24 0 48 9T96 9M0 9Q24 18 48 9T96 9'/%3E%3C/svg%3E");
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scrollbar-color: var(--cloth-line) var(--cloth-deep); scroll-behavior: smooth; }
body {
  margin: 0; color: var(--on-cloth); font: 400 17px/1.55 var(--sans);
  background: var(--cloth);
  background-image: repeating-linear-gradient(0deg, rgb(255 255 255 / .022) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgb(0 0 0 / .05) 0 1px, transparent 1px 3px);
}
::selection { background: var(--stamp); color: #fff; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
main { overflow-x: clip; }
.pixel { image-rendering: pixelated; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--play); outline-offset: 3px; }
.paper :focus-visible, .card :focus-visible { outline-color: var(--stamp); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* type: one family, from extra-condensed labels to expanded headings */
h1, h2, h3 { font-stretch: 125%; font-weight: 800; letter-spacing: -.02em; line-height: 1.04; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 3.9vw, 56px); }
h2 { font-size: clamp(28px, 3.4vw, 46px); }
h3 { font-size: clamp(21px, 2.2vw, 30px); }
h4 { font-stretch: 125%; font-weight: 800; font-size: 20px; margin: 0; }
p { margin: 0; max-width: 62ch; }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--on-cloth-soft); }
.paper .lead { color: var(--ink-soft); }
.label { font-stretch: 62%; font-weight: 600; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1; text-decoration: none; font-stretch: 125%; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.brand .word { font-size: 22px; white-space: nowrap; }
.brand .sub { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .3em; color: var(--on-cloth-soft); }
.brand .sub::before, .brand .sub::after { content: ''; width: 22px; border-top: 1.5px solid currentColor; }
/* the wordmark: its M wears an Orange Mushroom's cap */
.capped { position: relative; display: inline-block; }
.capped::before { content: ''; position: absolute; left: 28%; bottom: 35%; width: 24px; height: 26px; translate: -53% 0; background: url(/site/art/cap.png) center / contain no-repeat; image-rendering: pixelated; pointer-events: none; }
.brand { padding-top: 12px; }
.top nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a:not(.button) { font-weight: 600; text-decoration: none; }
.top nav a:not(.button):hover, .top nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* controls: square, printed */
button, .button {
  font: inherit; font-stretch: 112%; font-weight: 700; font-size: 15px; letter-spacing: .05em; text-transform: uppercase;
  cursor: pointer; border-radius: 2px; border: 1.5px solid currentColor; background: transparent; color: inherit;
  padding: 10px 18px; text-decoration: none; display: inline-block; line-height: 1.2;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
button:hover, .button:hover { background: rgb(228 243 232 / .12); }
.paper button:hover, .paper .button:hover, .card button:hover, .card .button:hover { background: rgb(18 35 63 / .09); }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: default; }
.play { background: var(--play); border-color: var(--play); color: var(--ink); }
.play:hover { background: #ffd95a; }
.play.big { font-size: 19px; padding: 16px 38px; }
.print { background: var(--ink); border-color: var(--ink); color: var(--paper-pale); }
.card .print:hover, .paper .print:hover { background: #1d3760; }

/* first screen: what it is, and the card */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: clamp(28px, 4vw, 56px); align-items: center; padding-top: clamp(24px, 5vw, 64px); padding-bottom: clamp(56px, 8vw, 112px); position: relative; }
.hero::before { content: ''; position: absolute; right: -180px; top: 50%; width: 900px; aspect-ratio: 1; translate: 0 -50%; background: url(/site/art/rosette.svg) center / contain no-repeat; opacity: .17; pointer-events: none; }
.hero > * { position: relative; }
.hero .lead { margin: 22px 0 30px; }
/* the worlds' rates under the headline: a printed line of figures, the label condensed */
.rates-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 20px; padding: 10px 0; border-block: 1px solid var(--cloth-line); max-width: none; width: fit-content; }
.rates-now .label { color: var(--on-cloth-soft); }
.rates-now b { font-stretch: 112%; font-weight: 800; font-size: 21px; }
.rates-now > span:not(.label) { white-space: nowrap; }
.hero .note { margin-top: 16px; font-size: 15px; color: var(--on-cloth-soft); }

/* the card */
.card {
  container-type: inline-size; position: relative; color: var(--ink); border-radius: 14px; overflow: hidden;
  background: var(--paper) var(--waves);
  box-shadow: 0 1px 0 rgb(255 255 255 / .5) inset, 0 22px 44px -18px rgb(0 0 0 / .65), 0 3px 8px rgb(0 0 0 / .3);
  caret-color: var(--stamp); color-scheme: light;
}
.hero .card { rotate: -1.6deg; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; border-bottom: 1.5px solid var(--ink); }
.card-head strong { font-stretch: 125%; font-weight: 800; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.card-head .label { color: var(--ink-soft); }
.card-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; padding: 20px 22px 24px; }
.photo { margin: 0; }
.photo div { height: 176px; display: grid; place-items: end center; padding-bottom: 14px; background: var(--paper-pale) var(--waves); border: 1.5px solid var(--ink); border-radius: 3px; }
.photo img { width: calc(var(--w, 63) * 2px); }
/* the account's character, drawn at twice its size; a tall hat makes it smaller rather than spill out */
.photo canvas { width: calc(var(--w) * 2px); max-height: 148px; object-fit: contain; object-position: bottom; }
.photo figcaption { margin-top: 8px; color: var(--ink-soft); line-height: 1.3; }
.photo figcaption b { display: block; color: var(--ink); font-weight: 700; }

.tabs { display: flex; gap: 18px; margin-bottom: 4px; }
.tabs button { border: 0; border-radius: 0; padding: 4px 0; font-stretch: 62%; font-size: 15px; letter-spacing: .09em; color: var(--ink-soft); border-bottom: 2.5px solid transparent; }
.tabs button:hover { background: none; color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--stamp); }

/* fields are ruled lines, as on a form */
label { display: block; margin: 14px 0 0; color: var(--ink-soft); }
input {
  width: 100%; font: 600 19px/1.3 var(--sans); padding: 5px 0 6px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
}
input:focus-visible { outline: 0; border-bottom-color: var(--stamp); box-shadow: 0 1.5px 0 var(--stamp); }
.hint { font-size: 13.5px; color: var(--ink-soft); margin: 5px 0 0; }
.message { min-height: 1.5em; margin: 12px 0 0; font-size: 15px; font-weight: 600; max-width: 24ch; }
.message.bad { color: var(--bad); } .message.good { color: var(--good); }
form button { margin-top: 18px; }
.printed { font-stretch: 112%; font-weight: 800; font-size: clamp(24px, 7cqw, 38px); line-height: 1.1; margin: 6px 0 10px; overflow-wrap: anywhere; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* the stamp: a dashed ring when blank, a closed ring when the form is right, the seal when it is done */
.stamp { position: absolute; right: 20px; bottom: 76px; width: 128px; aspect-ratio: 1; rotate: -9deg; color: var(--stamp); pointer-events: none; mix-blend-mode: multiply; }
.stamp .ring { position: absolute; inset: 8px; display: grid; place-items: center; text-align: center; border: 2px dashed rgb(106 63 176 / .45); border-radius: 50%; padding: 14px; line-height: 1.15; transition: border-color .35s var(--ease), rotate .5s var(--ease); }
.stamp .ring::after { content: 'Not yet stamped'; }
.stamp[data-state="checked"] .ring { border-style: solid; border-color: var(--stamp); rotate: 8deg; }
.stamp[data-state="checked"] .ring::after { content: 'Ready to stamp'; }
.stamp .seal, .stamp .refused { position: absolute; inset: 0; opacity: 0; }
.stamp .seal { width: 100%; height: 100%; }
.stamp .refused { display: grid; place-items: center; }
.stamp .refused span { filter: url(#ink); border: 3px solid currentColor; padding: 4px 10px; font-stretch: 125%; font-weight: 900; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
.stamp[data-state="stamped"] .ring, .stamp[data-state="refused"] .ring { opacity: 0; }
.stamp[data-state="stamped"] .seal, .stamp[data-state="refused"] .refused { opacity: .92; animation: land .55s var(--ease); }
.stamp.still .seal { animation: none; }
@keyframes land { from { opacity: 0; scale: 1.75; rotate: 10deg; filter: blur(4px); } }

/* the machine-readable strip */
.mrz { margin: 0; padding: 12px 22px 14px; background: var(--paper-pale); border-top: 1.5px solid var(--ink); font: 400 clamp(9px, 3.95cqw, 24px)/1.4 var(--mono); letter-spacing: .07em; white-space: nowrap; overflow: hidden; }
.mrz span { display: block; }

/* pages of the document */
section { padding: clamp(56px, 8vw, 112px) 0; }
.paper { background: var(--paper) var(--waves); color: var(--ink); color-scheme: light; scrollbar-color: var(--paper-line) var(--paper-pale); }
.paper ::selection { background: var(--ink); color: var(--paper-pale); }

.seen { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.seen .lead { margin: 20px 0 14px; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; border: 1.5px solid var(--ink); border-radius: 3px; box-shadow: 0 18px 36px -20px rgb(18 35 63 / .6); }
.shot figcaption { margin-top: 10px; color: var(--ink-soft); }

.comforts > .wrap > .lead, .ironman > .wrap > .lead { margin-top: 16px; }
.comforts .shot img { border-color: var(--cloth-line); box-shadow: 0 22px 40px -22px rgb(0 0 0 / .8); }
.comforts .shot figcaption { color: var(--on-cloth-soft); }
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(48px, 7vw, 96px); }
.feature.flip > .shot, .feature.flip > .sprite { order: 2; }
.sprite { margin: 0; display: grid; place-items: center; }
.sprite img { width: calc(var(--w) * 3px); max-width: 100%; height: auto; display: block; }
.feature h3 { margin-bottom: 14px; }
.feature p { color: var(--on-cloth-soft); }
.paper .feature p { color: var(--ink-soft); }
.feature.towns { grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); }
.counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.counter { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 22px; align-items: end; border-bottom: 3px solid var(--on-cloth); }
.counter img { width: calc(var(--w) * 3px); display: block; }
.counter div { padding-bottom: 18px; }
.counter .label { color: var(--on-cloth-soft); margin-top: 8px; display: block; }
.counter blockquote { margin: 12px 0 0; color: var(--on-cloth-soft); font-style: italic; max-width: 34ch; }

.close { text-align: center; }
.close h2 { margin: 0 auto 28px; max-width: 18ch; }
.close p { margin: 18px auto 0; color: var(--on-cloth-soft); }

footer { border-top: 1px solid var(--cloth-line); padding: 22px 0 36px; color: var(--on-cloth-soft); font-size: 14px; }
footer p { max-width: 80ch; }

/* the account page */
.account { padding-top: clamp(16px, 3vw, 40px); padding-bottom: clamp(56px, 8vw, 96px); }
.account-top { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 22px; align-items: start; }
.account-top .sheets { margin-top: 0; }
.account .card-body { grid-template-columns: 150px minmax(0, 1fr); }
.sheets { display: grid; gap: 22px; margin-top: 30px; }
.sheets.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.sheet { background: var(--paper) var(--waves); color: var(--ink); color-scheme: light; border-radius: 3px; padding: clamp(18px, 3vw, 30px); caret-color: var(--stamp); box-shadow: 0 14px 30px -18px rgb(0 0 0 / .6); }
.sheet h2 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 12px; }
.sheet p { color: var(--ink-soft); }
.sheet .message { max-width: none; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--paper-line); }
th { font-stretch: 62%; font-weight: 600; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 1.5px solid var(--ink); }
td { font-weight: 500; }
.figures td, .uses td { font-variant-numeric: tabular-nums; }
.figures td:first-child { font-weight: 700; }

@media (max-width: 1020px) {
  .hero, .account-top { grid-template-columns: 1fr; }
  .hero .card { rotate: none; max-width: 580px; }
  .hero::before { right: -320px; top: 68%; }
  .seen, .feature, .feature.towns { grid-template-columns: 1fr; }
  .feature.flip > .shot, .feature.flip > .sprite { order: 0; }
}
@media (max-width: 640px) {
  .counters { grid-template-columns: 1fr; }
  .counter img, .sprite img { width: calc(var(--w) * 2px); }
  .card-head { padding: 14px 16px 10px; }
  .card-head strong { font-size: 12px; white-space: nowrap; }
  .card-head .label { font-size: 11.5px; white-space: nowrap; }
  .photo figcaption b + * { display: none; }
  .card-body, .account .card-body { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 16px 16px 20px; }
  .account .card-body { padding-bottom: 92px; }
  .photo div { height: 100px; padding-bottom: 8px; }
  .photo img { width: calc(var(--w, 63) * 1px); }
  .photo canvas { width: calc(var(--w) * 1px); max-height: 84px; }
  .photo figcaption { font-size: 11px; }
  .mrz { padding: 10px 16px 12px; }
  .stamp { width: 92px; right: 10px; bottom: 58px; }
  .stamp .ring { font-size: 10.5px; padding: 8px; }
  .stamp .refused span { font-size: 13px; padding: 3px 7px; }
  .rates-now .label:first-child { flex-basis: 100%; }
  .brand .word { font-size: 18px; }
  .play.big { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
