/* Hallmark · macrostructure: studied-DNA (Where Worlds Take Shape, paodao.fr, Awwwards SOTD) · tone: cinematic-premium · anchor hue: flamingo #ff3d8b on night #140a26 · nav: slim logo + CA/Buy/icons strip · footer: none, a bottom dock inside the world */
@font-face { font-family: "Anton"; src: url(/assets/fonts/anton.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/assets/fonts/barlow-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/assets/fonts/barlow-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/assets/fonts/barlow-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/assets/fonts/barlow-condensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #140a26; --dusk: #2a1450; --ink: #0d0614;
  --flamingo: #ff3d8b; --orange: #ff8a3d; --gold: #ffc94a; --teal: #19c3b4; --cream: #ede6d6; --cash: #7cf06b;
  --glass: rgba(20, 10, 38, .78); --line: rgba(237, 230, 214, .22);
  --ease: cubic-bezier(.22, .8, .2, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
  --bar-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--night); color: var(--cream); font: 400 16px/1.45 "Barlow", system-ui, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--cream); color: var(--ink); padding: 8px 14px; border-radius: 99px; }
.skip:focus { top: 12px; }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 18px; background: #1a1424; transition: opacity .9s var(--ease), visibility .9s; }
.loader__disc { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.loader__disc::before { content: ""; position: absolute; left: 10px; right: 10px; bottom: 18px; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, #f1c79a, #c98a55 70%, transparent); opacity: .85; }
.loader__disc img { position: relative; border-radius: 18px; box-shadow: 0 14px 30px rgba(0,0,0,.45); animation: bob 1.6s var(--ease-io) infinite alternate; }
.loader__word { margin: 0; font: 600 13px/1 "Barlow"; letter-spacing: .02em; }
.loader__tip { position: fixed; bottom: 34px; left: 0; right: 0; margin: 0; text-align: center; font-size: 14px; color: rgba(237,230,214,.82); padding: 0 24px; transition: opacity .5s; }
@keyframes bob { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-10px) rotate(2deg); } }
body:not(.is-loading) .loader { opacity: 0; visibility: hidden; }

/* ---------- header strip ---------- */
.bar { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(14px, 2.4vw, 36px); background: linear-gradient(rgba(20,10,38,.82), rgba(20,10,38,.55)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(237,230,214,.08); }
.bar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.bar__brand img { border-radius: 9px; }
.bar__brand span { font: 400 24px/1 "Anton"; letter-spacing: .01em; text-transform: uppercase; }
.bar__right { display: flex; align-items: center; gap: 8px; }
.ca { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(13,6,20,.4); font-size: 14px; }
.ca__k { font-weight: 600; color: var(--gold); }
.ca__v { font-variant-numeric: tabular-nums; }
.buy { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 99px; background: var(--cream); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; transition: background .3s var(--ease), transform .3s var(--ease); }
.buy:hover { background: var(--gold); transform: translateY(-1px); }
.ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(13,6,20,.4); transition: border-color .3s, background .3s; }
.ico:hover { border-color: var(--cream); background: rgba(237,230,214,.12); }
.ico svg { width: 17px; height: 17px; fill: var(--cream); }

/* ---------- the world ---------- */
.world { position: fixed; inset: 0; overflow: hidden; }
.world__cam { position: absolute; inset: -4%; transform-origin: 50% 50%; will-change: transform; transition: transform 1.8s var(--ease); }
body.is-intro .world__cam { transform: scale(1.1) translateY(2%); }
.world__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.world__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.vignette { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(180deg, rgba(20,10,38,.72) 0%, rgba(20,10,38,0) 30%, rgba(20,10,38,0) 70%, rgba(20,10,38,.78) 100%),
  radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(20,10,38,.55)); transition: opacity 1.4s var(--ease); }
body.is-city .vignette { opacity: .7; }

/* ---------- district pins ---------- */
.pins { position: absolute; inset: 0; }
.pin { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; background: none; border: 0; padding: 0; text-align: center;
  opacity: 0; transition: opacity .7s var(--ease), transform .7s var(--ease); transform-origin: 50% 0; }
body.is-city .pin { opacity: 1; }
.pin__ring { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--c, var(--cream)); background: rgba(13,6,20,.55); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c, #ede6d6) 22%, transparent), 0 6px 18px rgba(0,0,0,.5); transition: border-color .8s, box-shadow .8s; }
.pin__ring::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--c, var(--cream)); opacity: 0; animation: ping 2.8s var(--ease) infinite; animation-delay: var(--d, 0s); }
.pin--free .pin__ring { border-style: dashed; }
.pin__card { min-width: 150px; padding: 9px 14px 10px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(237,230,214,.14); border-top: 3px solid var(--c, rgba(237,230,214,.4));
  transition: transform .45s var(--ease), background .3s; }
.pin__name { display: block; font: 700 19px/1.05 "Barlow Condensed"; text-transform: uppercase; letter-spacing: .01em; }
.pin__theme { display: block; font-size: 13px; color: rgba(237,230,214,.75); }
.pin__holder { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--c, var(--cream)); }
.pin:hover .pin__card, .pin:focus-visible .pin__card { transform: translateY(-4px); background: rgba(237,230,214,.94); color: var(--ink); }
.pin:hover .pin__theme, .pin:focus-visible .pin__theme { color: rgba(13,6,20,.7); }
.pin:hover .pin__holder, .pin:focus-visible .pin__holder { color: var(--ink); }
.pin.is-flip .pin__ring { animation: flip 1.2s var(--ease) 2; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes flip { 50% { transform: scale(1.8); } }

/* ---------- intro: centred title over the world ---------- */
.intro { position: absolute; z-index: 10; left: 0; right: 0; top: calc(var(--bar-h) + clamp(24px, 6vh, 80px)); text-align: center; padding: 0 20px; pointer-events: none;
  transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.intro__title { margin: 0; font: 400 clamp(46px, 7.2vw, 132px)/.95 "Anton"; text-transform: uppercase; letter-spacing: .005em; color: var(--cream);
  -webkit-text-stroke: clamp(1.5px, .18vw, 3px) var(--ink); paint-order: stroke fill; text-shadow: .045em .06em 0 var(--ink), 0 0 60px rgba(255,61,139,.35); }
.intro__title .ln { display: inline-block; white-space: nowrap; }
.intro__title .ln:last-child { color: var(--gold); }
.intro__sub { max-width: 36em; margin: clamp(14px, 2vh, 22px) auto 0; font-size: clamp(15px, 1.15vw, 19px); color: rgba(237,230,214,.92); text-shadow: 0 1px 12px rgba(13,6,20,.8); }
.intro__sub b { font-weight: 600; color: var(--cream); }
.cta { position: absolute; z-index: 10; left: 0; right: 0; bottom: clamp(28px, 7vh, 72px); display: grid; justify-items: center; gap: 14px; transition: opacity .8s var(--ease), transform 1s var(--ease); }
.pill { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 28px; border-radius: 99px; border: 1px solid rgba(237,230,214,.75); background: rgba(13,6,20,.42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-weight: 500; font-size: 17px; transition: background .45s var(--ease), color .45s var(--ease), border-color .45s; }
.pill svg { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.pill:hover { background: var(--cream); color: var(--ink); }
.pill:hover svg { transform: translateX(4px); }
.link { background: none; border: 0; padding: 4px 2px; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(237,230,214,.5); color: rgba(237,230,214,.9); }
.link:hover { text-decoration-color: var(--gold); color: var(--cream); }
body.is-city .intro { opacity: 0; transform: translateY(-30px); }
body.is-city .cta { opacity: 0; transform: translateY(20px); pointer-events: none; }
body.is-loading .intro, body.is-loading .cta { opacity: 0; transform: translateY(16px); }

/* ---------- dock and notes ---------- */
.dock { position: absolute; z-index: 20; left: 50%; bottom: clamp(18px, 3.5vh, 34px); transform: translate(-50%, 30px); opacity: 0; display: flex; gap: 6px; padding: 6px; border-radius: 99px;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(237,230,214,.12); transition: opacity .8s var(--ease) .5s, transform .8s var(--ease) .5s; }
body.is-city .dock { opacity: 1; transform: translate(-50%, 0); }
.dock__b { height: 42px; padding: 0 18px; border: 0; border-radius: 99px; background: transparent; font-weight: 500; font-size: 15px; white-space: nowrap; transition: background .3s, color .3s; }
.dock__b:hover { background: rgba(237,230,214,.14); }
.dock__b--main { background: var(--cream); color: var(--ink); font-weight: 600; }
.dock__b--main:hover { background: var(--gold); }
.note { position: absolute; z-index: 19; left: 50%; bottom: calc(clamp(18px, 3.5vh, 34px) + 70px); transform: translateX(-50%); width: min(460px, calc(100vw - 28px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: rgba(13,6,20,.86); border: 1px solid rgba(237,230,214,.12); box-shadow: 0 14px 40px rgba(0,0,0,.4);
  animation: toastIn .6s var(--ease) both; font-size: 14px; pointer-events: auto; }
.toast.out { animation: toastOut .5s var(--ease) both; }
.toast img { border-radius: 9px; flex: none; }
.toast b { font-weight: 600; }
.toast .t-when { display: block; font-size: 12px; color: rgba(237,230,214,.6); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- sheet (pause-menu panel) ---------- */
.sheet { position: fixed; z-index: 50; top: calc(var(--bar-h) + 14px); right: 14px; bottom: 14px; width: min(460px, calc(100vw - 28px)); display: flex; flex-direction: column;
  border-radius: 20px; background: rgba(16, 8, 30, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(237,230,214,.12); box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transform: translateX(calc(100% + 30px)); transition: transform .7s var(--ease); outline: none; }
.sheet.open { transform: none; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 14px; border-bottom: 1px solid rgba(237,230,214,.1); }
.sheet__title { margin: 0; font: 400 clamp(30px, 2.6vw, 40px)/1 "Anton"; text-transform: uppercase; }
.sheet__x { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: none; }
.sheet__x svg { width: 16px; height: 16px; }
.sheet__x:hover { background: var(--cream); color: var(--ink); }
.sheet__body { flex: 1; overflow-y: auto; padding: 16px 22px 26px; overscroll-behavior: contain; scrollbar-width: thin; }
.sheet__body > * + * { margin-top: 18px; }
.lede { margin: 0; color: rgba(237,230,214,.86); }
.lede strong { color: var(--cream); font-weight: 600; }
.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(237,230,214,.1); border-radius: 14px; overflow: hidden; }
.stat > div { background: rgba(16,8,30,.95); padding: 12px 12px 10px; }
.stat .v { display: block; font: 700 26px/1 "Barlow Condensed"; font-variant-numeric: tabular-nums; }
.stat .v.cash { color: var(--cash); }
.stat .k { display: block; margin-top: 4px; font-size: 13px; color: rgba(237,230,214,.7); }
.h3 { margin: 0 0 8px; font: 700 20px/1.1 "Barlow Condensed"; text-transform: uppercase; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border-radius: 10px; background: rgba(0,0,0,.35); text-align: left; width: 100%; border: 0;
  transition: background .25s, color .25s; }
button.row:hover, button.row:focus-visible, .row.me { background: var(--cream); color: var(--ink); }
button.row:hover .muted, button.row:focus-visible .muted, .row.me .muted { color: rgba(13,6,20,.65); }
.row .n { font: 700 18px/1 "Barlow Condensed"; font-variant-numeric: tabular-nums; text-align: center; }
.row .nm { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 600; }
.row .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; background: var(--c); box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.muted { color: rgba(237,230,214,.62); font-weight: 400; font-size: 13px; }
.bars { display: grid; gap: 8px; }
.barline { display: grid; gap: 4px; }
.barline .top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.barline .track { height: 8px; border-radius: 99px; background: rgba(237,230,214,.1); overflow: hidden; }
.barline .fill { height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 1.2s var(--ease); }
.coins { display: grid; gap: 4px; }
.coin { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; background: rgba(0,0,0,.3); text-decoration: none; transition: background .25s; }
.coin:hover { background: rgba(237,230,214,.12); }
.coin img, .coin .ph { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--dusk); }
.coin .s { font-weight: 600; }
.coin .m { text-align: right; font-size: 13px; color: rgba(237,230,214,.75); font-variant-numeric: tabular-nums; }
.up { color: var(--cash); } .down { color: #ff7a7a; }
.empty { padding: 16px; border-radius: 12px; border: 1px dashed rgba(237,230,214,.25); color: rgba(237,230,214,.82); font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 99px; border: 0; background: var(--cream); color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; transition: background .3s, transform .3s var(--ease); }
.btn:hover { background: var(--gold); transform: translateY(-1px); }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.btn--ghost { background: transparent; color: var(--cream); border: 1px solid rgba(237,230,214,.5); }
.btn--ghost:hover { background: rgba(237,230,214,.12); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field input { height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(237,230,214,.25); background: rgba(0,0,0,.35); color: var(--cream); font: 600 18px "Barlow"; }
.field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 38px; height: 38px; border-radius: 10px; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.swatch[aria-pressed="true"] { border-color: var(--cream); transform: scale(1.1); box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--cream); }
.msg { margin: 0; font-size: 14px; min-height: 1.4em; }
.msg.err { color: #ff9a9a; }
.msg.ok { color: var(--cash); }
.copy { display: flex; gap: 6px; }
.copy input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(237,230,214,.2); background: rgba(0,0,0,.35); color: var(--cream); font: 500 14px "Barlow"; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: rgba(237,230,214,.88); }
.steps b { color: var(--cream); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.feed li { padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.28); }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  :root { --bar-h: 56px; }
  .bar__brand span { display: none; }
  .ca { padding: 0 10px; font-size: 13px; }
  .ca__v { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .buy { padding: 0 14px; font-size: 14px; }
  .intro__title { font-size: clamp(40px, 12.6vw, 64px); }
  .intro__title .ln { display: block; }
  .pin__card { min-width: 0; padding: 6px 9px 7px; }
  .pin__name { font-size: 15px; }
  .pin__theme { display: none; }
  .pin__holder { font-size: 12px; margin-top: 2px; }
  .dock { width: calc(100vw - 20px); justify-content: space-between; overflow-x: auto; }
  .dock__b { padding: 0 12px; font-size: 14px; }
  .sheet { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 78dvh; transform: translateY(calc(100% + 20px)); }
}
@media (max-width: 380px) { .ico { width: 34px; height: 34px; } .buy { padding: 0 11px; } #ca { display: none !important; } }
@media (min-width: 2000px) { :root { --bar-h: 76px; } .pin__card { min-width: 190px; padding: 12px 18px; } .pin__name { font-size: 24px; } .pin__theme { font-size: 15px; } .pin__holder { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* fixes after the first shots: an empty CA chip stays hidden, the subtitle gets a backing over the busy city,
   the headline fits a phone, stat numbers never wrap */
.ca[hidden] { display: none; }
.intro__sub { display: inline-block; padding: 12px 20px; border-radius: 16px; background: rgba(13,6,20,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(237,230,214,.12); text-shadow: none; }
.stat .v { white-space: nowrap; }
@media (max-width: 720px) {
  .intro__title { font-size: 10.6vw; }
  .intro__title .ln { display: block; }
  .intro__sub { font-size: 14.5px; padding: 10px 14px; }
  .stat .v { font-size: 21px; }
}

/* scroll-driven: rows and coins in a sheet rise into place as the sheet scrolls (CSS view timelines) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sheet__body .rows > li, .sheet__body .coin, .sheet__body .barline, .sheet__body .feed > li {
      animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% entry 70%;
    }
  }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* pressed and unavailable states */
.pill:active, .btn:active, .dock__b:active, .buy:active, .ico:active, .pin:active, .row:active { transform: translateY(1px) scale(.985); }
.btn:disabled, .dock__b:disabled, .pill:disabled { opacity: .5; cursor: progress; transform: none; }
