/* New Jazz City, held in a 1996 clamshell: matte charcoal plastic, a pull-up antenna, red LED readouts, grey rubber keys.
   The site itself runs untouched inside the screen (/home). */
@font-face{font-family:VT323;src:url(/phone/vt323.woff2) format('woff2');font-display:swap}
:root{--led:#ff3b22;--led-glow:rgba(255,59,34,.55);--led-off:rgba(255,59,34,.09);--plastic:#2b2c2f;--plastic-dk:#18191b;--print:#c9ccd1;--key:#b8bdc4;--key-dk:#8d939b;--key-ink:#16181b}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none}
body{height:100svh;overflow:hidden;display:grid;place-items:center;background:#0c0d0f;
  background-image:radial-gradient(80% 60% at 50% 30%,#22262e 0%,#0c0d0f 70%);
  font-family:VT323,ui-monospace,Menlo,Consolas,monospace;color:var(--print);-webkit-tap-highlight-color:transparent}
.glow{display:none}
.grain,.upper,.lower,.lid{--noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E")}

.phone{position:relative;width:min(400px,92vw);height:calc(100svh - 56px);max-height:960px;margin-top:30px;display:flex;flex-direction:column;filter:drop-shadow(0 30px 40px rgba(0,0,0,.7))}
/* the pull-up antenna, top right */
.phone:before{content:"";position:absolute;right:34px;top:-30px;width:9px;height:40px;border-radius:5px 5px 2px 2px;background:linear-gradient(90deg,#0d0e10,#3a3c41 45%,#0d0e10);z-index:-1}
.phone:after{content:"";position:absolute;right:31px;top:-38px;width:15px;height:15px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#55585e,#141517 70%);z-index:-1}

.upper{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;padding:30px 16px 10px;border-radius:26px 26px 10px 10px;
  border:1px solid #3f4146;background:var(--noise),linear-gradient(170deg,#36383c 0%,var(--plastic) 40%,var(--plastic-dk) 100%);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.07),inset 0 -3px 6px rgba(0,0,0,.6)}
/* earpiece: punched holes */
.ear{position:absolute;top:10px;left:50%;width:84px;height:12px;margin-left:-42px;background:radial-gradient(circle,#050506 1.6px,transparent 2px) 0 0/8px 6px}
.cam{position:absolute;top:12px;right:22px;width:7px;height:7px;border-radius:50%;background:#1aff6a;box-shadow:0 0 6px #1aff6a;animation:led 2.4s steps(1) infinite}
@keyframes led{0%,88%{opacity:.15}90%,100%{opacity:1}}
.printed{display:flex;justify-content:space-between;margin:0 2px 6px;font-size:13px;letter-spacing:.18em;color:#8e9298}

.screen{position:relative;flex:1;min-height:0;border-radius:4px;overflow:hidden;background:#000;
  box-shadow:0 0 0 3px #0a0b0c,0 0 0 5px #45484e,0 0 0 9px #1c1d20,inset 0 0 22px rgba(0,0,0,.9)}
/* status line: a red LED dot-matrix readout */
.lcd{height:24px;display:flex;align-items:center;gap:9px;padding:0 8px;background:#0b0303;color:var(--led);
  font-size:19px;line-height:1;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;text-shadow:0 0 6px var(--led-glow);border-bottom:1px solid #2a0907}
.lcd .bars{display:inline-flex;align-items:flex-end;gap:1px;height:12px}
.lcd .bars i{width:3px;background:var(--led);box-shadow:0 0 4px var(--led-glow);opacity:.12}
.lcd .bars i.on{opacity:1}
.lcd .bars i:nth-child(1){height:3px}.lcd .bars i:nth-child(2){height:5px}.lcd .bars i:nth-child(3){height:7px}.lcd .bars i:nth-child(4){height:9px}.lcd .bars i:nth-child(5){height:12px}
.lcd .carrier{flex:1;overflow:hidden;text-overflow:ellipsis}
.lcd .env{background:none;border:0;padding:0 2px;color:var(--led);font:inherit;letter-spacing:.04em;text-shadow:inherit;cursor:pointer;animation:blink 1s steps(1) infinite}
@keyframes blink{50%{opacity:.2}}
.lcd .env[hidden]{display:none}
.lcd .batt{display:inline-block;width:20px;height:9px;border:1px solid var(--led);position:relative;box-shadow:0 0 4px var(--led-glow)}
.lcd .batt:after{content:"";position:absolute;inset:1px 4px 1px 1px;background:var(--led)}

/* the mint strip: LED count over the minted bar, and two rubber keys */
.mintbar{position:relative;height:32px;display:flex;align-items:center;gap:7px;padding:0 6px 0 8px;background:#120404;border-bottom:1px solid #2a0907;overflow:hidden}
.mintbar .fill{position:absolute;left:0;bottom:0;height:3px;width:0;background:var(--led);box-shadow:0 0 6px var(--led-glow);transition:width 1s steps(12)}
.mintbar .count{flex:1;color:var(--led);font-size:19px;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 0 6px var(--led-glow)}
.mintbar .count b{font-weight:400}
.mintbar a,.mintbar button{flex:none;text-decoration:none;font-size:16px;letter-spacing:.12em;padding:2px 10px 1px;border-radius:9px;white-space:nowrap;text-transform:uppercase;
  border:1px solid #6d7279;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 2px 0 #0a0b0c}
.mintbar .mn{cursor:pointer;font-family:inherit;background:linear-gradient(#ffd27a,#e0a12a);color:#2a1700;border-color:#a3741b}
.mintbar .mn:hover{background:linear-gradient(#ffe2a3,#efb444)}
.mintbar .os{background:linear-gradient(var(--key),var(--key-dk));color:var(--key-ink)}

#scr{display:block;width:100%;height:calc(100% - 24px - 32px);border:0;background:#07070a}
/* the glass: a faint dot-matrix grid and a curve of light over the page */
.screen:after{content:"";position:absolute;inset:56px 0 0;pointer-events:none;
  background:linear-gradient(160deg,rgba(255,255,255,.06),transparent 28%),repeating-linear-gradient(0deg,rgba(0,0,0,.18) 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,rgba(0,0,0,.12) 0 1px,transparent 1px 3px)}
.brand{margin-top:8px;text-align:center;font-size:17px;letter-spacing:.38em;color:var(--print)}
.brand b{font-weight:400;color:#e6e8eb}
.brand small{display:block;font-size:12px;letter-spacing:.3em;color:#80858c}

/* pop-ups: the phone's own LED menus */
.pop{position:absolute;left:10px;right:10px;top:64px;z-index:5;background:#0b0303;color:var(--led);border:1px solid #5a160f;box-shadow:0 10px 30px rgba(0,0,0,.7);
  font-size:18px;letter-spacing:.06em;padding:10px 12px;text-shadow:0 0 6px var(--led-glow);text-transform:uppercase}
.pop[hidden]{display:none}
.pop h3{margin:0 0 6px;font-size:16px;letter-spacing:.16em;font-weight:400}
.pop p{margin:0 0 10px;line-height:1.15}
.pop .row{display:flex;justify-content:space-between;gap:8px}
.pop button{background:none;border:1px solid #5a160f;color:var(--led);font:inherit;letter-spacing:.12em;padding:2px 10px;cursor:pointer;text-shadow:inherit}
.pop ol{list-style:none;margin:0;padding:0;columns:2;column-gap:10px}
.pop ol li{break-inside:avoid}
.pop ol button{display:block;width:100%;text-align:left;border:0;padding:3px 2px;letter-spacing:.08em}
.pop ol button:focus-visible,.pop ol button:hover{background:#2a0907}

.hinge{height:18px;margin:0 9%;flex:none;border-radius:9px;background:linear-gradient(#0b0c0d,#34363b 40%,#202226 60%,#0b0c0d)}

.lower{height:var(--lower,250px);flex:none;padding:12px 20px 18px;border-radius:10px 10px 34px 34px;border:1px solid #3f4146;
  background:var(--noise),linear-gradient(190deg,#323438,var(--plastic-dk) 70%);box-shadow:inset 0 2px 0 rgba(255,255,255,.06)}
.soft{display:grid;grid-template-columns:1fr 62px 1fr;align-items:center;gap:10px;margin-bottom:10px}
.soft .side{display:flex;flex-direction:column;gap:7px}
.sk,.call,.end,.key{border:1px solid #6d7279;background:linear-gradient(var(--key),var(--key-dk));color:var(--key-ink);font-family:inherit;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 3px 0 #0a0b0c,0 4px 6px rgba(0,0,0,.4)}
.sk,.call,.end{height:25px;border-radius:13px;font-size:17px;letter-spacing:.16em;line-height:1}
.call{color:#0d6b2a}.end{color:#a3160c}
.dpad{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,#4a4d53,#1d1e21 70%);box-shadow:inset 0 2px 0 rgba(255,255,255,.1),0 2px 5px rgba(0,0,0,.6)}
.ok{width:38px;height:38px;border-radius:50%;border:1px solid #a3741b;background:linear-gradient(#ffd27a,#e0a12a);color:#2a1700;font-family:inherit;font-size:15px;letter-spacing:.06em;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 3px 0 #0a0b0c}
.keys{display:grid;grid-template-columns:repeat(3,1fr);gap:7px 12px}
.key{height:31px;border-radius:15px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:22px;line-height:1}
.key small{font-size:12px;letter-spacing:.1em;color:#3b3f45}
.key:active,.key.on,.sk:active,.ok:active,.call:active,.end:active{transform:translateY(2px);box-shadow:inset 0 1px 2px rgba(0,0,0,.4),0 1px 0 #0a0b0c}
button:focus-visible,a:focus-visible{outline:2px solid var(--led);outline-offset:2px}

/* the lid: closed on arrival, an outer LED with the time */
.lid{position:absolute;inset:-1px;z-index:20;border-radius:26px 26px 10px 10px;border:1px solid #3f4146;cursor:pointer;
  background:var(--noise),linear-gradient(190deg,#393b40,var(--plastic) 45%,var(--plastic-dk));display:grid;place-items:center;transform-origin:50% 100%;
  transition:transform .7s cubic-bezier(.3,.7,.2,1),opacity .7s;backface-visibility:hidden}
.lid .outer{min-width:170px;padding:10px 14px;border-radius:3px;background:#0b0303;color:var(--led);text-align:center;font-size:17px;letter-spacing:.14em;text-shadow:0 0 6px var(--led-glow);
  box-shadow:0 0 0 3px #0a0b0c,0 0 0 5px #45484e}
.lid .outer .t{font-size:42px;letter-spacing:.06em;margin:2px 0}
.lid .hint{position:absolute;bottom:22px;left:0;right:0;text-align:center;font-size:15px;letter-spacing:.3em;color:#8e9298}
.lid.open{transform:perspective(1100px) rotateX(-176deg);opacity:0;pointer-events:none}

/* on a phone, the device is the phone: full bleed, soft keys at the thumb, keypad on demand */
@media (max-width:560px),(max-height:640px){
  body{place-items:stretch}
  .phone{width:100vw;height:100svh;max-height:none;margin:0;filter:none}
  .phone:before,.phone:after,.ear,.cam,.printed,.brand,.hinge{display:none}
  .upper{border-radius:0;padding:0;border:0}
  .screen{border-radius:0;box-shadow:none}
  .lower{height:auto;border-radius:0;border:0;border-top:1px solid #3f4146;padding:7px 10px calc(7px + env(safe-area-inset-bottom))}
  .soft{grid-template-columns:1fr 50px 1fr;margin:0}
  .soft .side{flex-direction:row}
  .soft .side>*{flex:1}
  .dpad{width:50px;height:50px}.ok{width:34px;height:34px}
  .keys{display:none;margin-top:8px}
  .phone.t9 .keys{display:grid}
  .lid{border-radius:0}
}
@media (prefers-reduced-motion:reduce){.lid{transition:none}.cam,.lcd .env{animation:none}}

.lid[hidden]{display:none}

/* boarding opens over the page inside the screen */
#quest{position:absolute;left:0;right:0;bottom:0;top:56px;width:100%;height:calc(100% - 56px);border:0;background:#0b0a09;z-index:4}
#quest[hidden]{display:none}
.mintbar .wl{background:linear-gradient(#ff6a4f,#d2321c);color:#1a0602;border-color:#8c1f10;cursor:pointer;font-family:inherit}
