@font-face { font-family: "TPF Label"; font-style: normal; font-weight: 200 900; font-display: swap; size-adjust: 72%; src: url(./fonts/tpf-unbounded.woff2) format("woff2"); }
@font-face { font-family: "TPF Text"; font-style: normal; font-weight: 400 900; font-display: swap; size-adjust: 86%; src: url(./fonts/tpf-bodoni-moda.woff2) format("woff2"); }
@font-face { font-family: "TPF Text"; font-style: italic; font-weight: 400 900; font-display: swap; size-adjust: 86%; src: url(./fonts/tpf-bodoni-moda-italic.woff2) format("woff2"); }
:root { --bg: #5c171a; --ground: linear-gradient(180deg, #501215 0%, #501215 36%, #6a1b1e 62%, #832b2d 100%); --mark: #6b2226; --nav: 236, 228, 210; --ui: 236, 228, 210; --face: 26, 23, 20; --rim: 236, 228, 210; --tick: 236, 228, 210; --foot: max(34px, calc(env(safe-area-inset-bottom) + 14px)); --gutter: clamp(16px, 4vw, 44px);
--plate: "TPF Label", "Arial Narrow", "Helvetica Neue", Arial, sans-serif; --cut: "TPF Text", "Bodoni 72", Didot, Georgia, serif; }
body.light { --ui: 15, 31, 58; --face: 236, 228, 210; --rim: 15, 31, 58; --tick: 15, 31, 58; }
html, body { margin: 0; height: 100%; overflow: hidden; }
html { background: var(--bg); }
body { background: var(--ground); }
#mark { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55; background: var(--mark); clip-path: inset(0 0 16.6% 0);
-webkit-mask: url(./src/tpf-quill.webp) no-repeat 50% 48% / auto 74vh; mask: url(./src/tpf-quill.webp) no-repeat 50% 48% / auto 74vh; }
body.failed #mark { display: none; }
#stage { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; opacity: 0; transition: opacity 0.9s ease; }
#stage:active { cursor: grabbing; }
body.ready #stage { opacity: 1; }
.frame { position: fixed; inset: 9px; z-index: 3; pointer-events: none; border: 1px solid rgb(var(--tick)); color: rgb(var(--tick)); opacity: 0.9; transition: border-color 0.5s, color 0.5s; }
.frame::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgb(var(--tick)); opacity: 0.7; transition: border-color 0.5s;
background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 60px) left top/100% 9px no-repeat, repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 60px) left bottom/100% 9px no-repeat,
repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 60px) left top/9px 100% no-repeat, repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 60px) right top/9px 100% no-repeat,
repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 12px) left top/100% 4px no-repeat, repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 12px) left bottom/100% 4px no-repeat,
repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 12px) left top/4px 100% no-repeat, repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 12px) right top/4px 100% no-repeat; }
.nav { position: fixed; z-index: 4; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top, 0px) + 30px) var(--gutter) 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
gap: clamp(24px, 6vw, 68px); color: rgb(var(--nav)); pointer-events: none; opacity: 0; transition: color 0.5s, opacity 0.8s ease; }
body.ready .nav { opacity: 1; transition-delay: 0s, 1.2s; }
.nav a { pointer-events: auto; color: inherit; font: 500 clamp(14px, 1.5vw, 19px)/1 var(--plate); letter-spacing: 0.108em; text-transform: uppercase; text-decoration: none; padding: 6px 0; position: relative; }
.nav a:first-child { justify-self: end; }
.nav a:last-child { justify-self: start; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.2s steps(5); }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.nav a:focus-visible { outline: 1px dashed currentColor; outline-offset: 4px; }
.nav .mark { width: 46px; height: 46px; border-radius: 50%; background: currentColor; padding: 0; transition: transform 0.2s steps(5); }
.nav .mark:hover { transform: rotate(-8deg); }
.nav .mark::after { display: none; }
.nav .mark i { display: block; width: 46px; height: 46px; background: var(--bg); -webkit-mask: url(./fonts/tpf-roundel.webp) center/contain no-repeat; mask: url(./fonts/tpf-roundel.webp) center/contain no-repeat; }
@media (max-width: 760px) { .nav { gap: 16px; } .nav a { letter-spacing: 0.081em; } }
.foot { position: fixed; z-index: 4; right: calc(env(safe-area-inset-right, 0px) + 36px); bottom: 34px; display: flex; gap: 8px 34px; font: 500 12px/1 var(--plate); letter-spacing: 0.099em; text-transform: uppercase; color: rgb(var(--nav)); opacity: 0; transition: color 0.5s, opacity 0.8s ease; }
body.ready .foot { opacity: 0.86; transition-delay: 0s, 1.2s; }
body.failed .foot { display: none; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: #e4c47a; }
@media (max-width: 1080px) { .foot { display: none; } }
:root { --corner: clamp(64px, 48px + 1.6vw, 82px); --corner-x: 32px; --corner-y: 30px; }
@media (max-width: 760px) { :root { --corner: 60px; --corner-x: 22px; --corner-y: 22px; } .frame { inset: 6px; } .frame::after { inset: 3px; } }
.snd { position: fixed; z-index: 4; left: calc(env(safe-area-inset-left, 0px) + var(--corner-x) + var(--corner) * 0.075); bottom: calc(var(--corner-y) + var(--corner) * 0.015); width: calc(var(--corner) * 0.734); height: calc(var(--corner) * 0.771);
padding: 0; display: grid; place-items: end center; color: rgb(var(--nav)); background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; opacity: 0; transition: color 0.5s, opacity 0.3s; }
body.ready .snd { opacity: 1; }
body.ready .snd:hover, body.ready .snd[aria-pressed="true"] { opacity: 1; }
body.failed .snd { display: none; }
.snd:focus-visible { outline: 1px dashed currentColor; outline-offset: 4px; }
.snd svg { display: block; width: 100%; height: auto; fill: currentColor; overflow: visible; }
.snd .ln { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.snd .gap { fill: none; stroke: var(--bg); stroke-linecap: round; }
.snd .disc { transform-box: fill-box; transform-origin: 50% 50%; animation: spin 1.6s linear infinite; animation-play-state: paused; }
.snd .platter { transform-box: fill-box; transform-origin: 50% 50%; animation: flutter 0.9s ease-in-out infinite alternate; animation-play-state: paused; }
.snd .crank { transform-box: fill-box; transform-origin: 50% 50%; animation: spin 2.4s linear infinite; animation-play-state: paused; }
.snd .air { opacity: 0; transition: opacity 0.4s; }
.snd[aria-pressed="true"] .disc, .snd[aria-pressed="true"] .platter, .snd[aria-pressed="true"] .crank { animation-play-state: running; }
.snd[aria-pressed="true"] .air { animation: air 2.4s ease-in-out infinite; }
.snd[aria-pressed="true"] .air + .air { animation-delay: 0.3s; }
.snd[aria-pressed="true"] .air + .air + .air { animation-delay: 0.6s; }
.snd.busy svg { animation: busy 1s ease-in-out infinite alternate; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flutter { from { transform: rotate(-1.4deg) translateY(-0.15px); } to { transform: rotate(1.4deg) translateY(0.15px); } }
@keyframes air { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }
@keyframes busy { to { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .snd .disc, .snd .platter, .snd .crank, .snd .air { animation: none !important; } .snd[aria-pressed="true"] .air { opacity: 1; } }
@media (max-width: 760px) { .pill { padding: 12px 11px; } }
#photo { position: fixed; z-index: 2; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; display: none; opacity: 0; }
#bar { position: fixed; z-index: 5; left: 0; right: 0; bottom: var(--foot); display: flex; flex-direction: column; align-items: center; gap: 12px;
font: 500 12px/1 var(--plate); letter-spacing: 0.1em; text-transform: uppercase; color: rgb(var(--ui)); pointer-events: none; opacity: 0; transition: opacity 0.8s ease; }
body.ready #bar { opacity: 1; transition-delay: 1.2s; }
body.failed #bar { display: none; }
#hint { margin: 0; font: 400 17px/1.4 var(--cut); letter-spacing: 0; text-transform: none; color: rgba(var(--ui), 0.55); transition: opacity 0.6s ease, color 0.3s ease; }
#hint.gone { display: none; }
#buttons { display: flex; gap: 0; pointer-events: auto; background: rgba(var(--face), 0.72); border: 1px solid rgba(var(--rim), 0.8); outline: 1px solid rgba(var(--rim), 0.3); outline-offset: -4px; }
.pill, .reset { font: inherit; letter-spacing: inherit; text-transform: inherit; color: rgb(var(--ui)); background: rgba(var(--face), 0.72); border: 1px solid rgba(var(--rim), 0.8);
border-radius: 0; outline: 1px solid rgba(var(--rim), 0.3); outline-offset: -4px; cursor: pointer; -webkit-tap-highlight-color: transparent;
transition: background 0.2s ease, color 0.2s ease; }
.pill { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; outline: 0; background: none; position: relative; }
.pill + .pill::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: rgba(var(--rim), 0.4); }
.pill[aria-expanded="true"]::before, .pill[aria-pressed="true"]::before, .pill[aria-expanded="true"] + .pill::before, .pill[aria-pressed="true"] + .pill::before { display: none; }
.reset { font-size: 9.5px; font-weight: 500; letter-spacing: 0.08em; padding: 7px 10px; outline-offset: -3px; }
.pill:hover, .reset:hover { background: rgba(var(--rim), 0.16); }
.pill[aria-expanded="true"], .pill[aria-pressed="true"] { background: rgb(var(--ui)); color: rgb(var(--face)); }
.pill:focus-visible, .panel button:focus-visible { outline: 2px solid rgb(var(--ui)); outline-offset: 2px; }
.dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid currentColor; flex: none; }
#mix { display: flex; align-items: center; gap: 12px; pointer-events: auto; font-weight: 500; font-size: 10.5px; letter-spacing: 0.09em; color: rgba(var(--ui), 0.8); }
#mix[hidden] { display: none; }
#mix input { width: min(46vw, 220px); }
body.nophoto #mix::after { content: "The photograph did not load"; text-transform: none; letter-spacing: 0; font: 400 16px var(--cut); }
body.nophoto #mix > * { display: none; }
.panel { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 88px); right: calc(env(safe-area-inset-right, 0px) + 28px); box-sizing: border-box; width: 112px; display: flex; flex-direction: column; align-items: center;
gap: 11px; pointer-events: auto; font-weight: 500; font-size: 9.5px; letter-spacing: 0.08em; color: rgba(var(--ui), 0.9); }
.panel[hidden] { display: none; }
@media (min-width: 760px) { .panel { top: calc(env(safe-area-inset-top, 0px) + 104px); right: calc(env(safe-area-inset-right, 0px) + 44px); width: 132px; } }
#bar input[type=range] { -webkit-appearance: none; appearance: none; margin: 0; height: 22px; background: none; cursor: pointer; }
#bar input[type=range]::-webkit-slider-runnable-track { height: 1px; background: rgba(var(--rim), 0.95); }
#bar input[type=range]::-moz-range-track { height: 1px; background: rgba(var(--rim), 0.95); }
#bar input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -5px; background: rgb(var(--ui)); border: 1px solid rgb(var(--rim)); transform: rotate(45deg); }
#bar input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 0; background: rgb(var(--ui)); border: 1px solid rgb(var(--rim)); transform: rotate(45deg); }
#bar input[type=range]:focus-visible { outline: 1px solid rgb(var(--ui)); outline-offset: 2px; }
#lights { display: flex; flex-direction: column; gap: 5px; width: 100%; }
#lights label { display: flex; flex-direction: column; gap: 0; white-space: nowrap; }
#lights input { width: 100%; }
#pick { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
#tones { display: contents; }
#swatches { display: flex; justify-content: space-between; width: 100%; }
#swatches button { width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 1px solid rgba(var(--rim), 0.9); cursor: pointer; -webkit-tap-highlight-color: transparent; }
#swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgb(var(--ui)); }
#wheel { flex: none; width: 100%; height: auto; aspect-ratio: 1; touch-action: none; cursor: crosshair; border-radius: 50%; box-shadow: 0 0 0 1px rgba(var(--rim), 0.9); }
#shade { width: 100%; }
@media (max-width: 480px) { #bar { font-size: clamp(8.5px, 2.67vw, 10px); letter-spacing: 0.07em; } .pill { padding: 11px clamp(5px, 1.9vw, 7px); gap: 6px; } }
@media (max-width: 340px) { .pill { padding: 11px 4px; gap: 4px; } }
#fail { display: none; position: fixed; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 24px;
font: 400 19px/1.5 var(--cut); color: rgba(var(--ui), 0.75); }
body.failed #fail { display: flex; }
