wake / style.css
kiwina's picture
Phonlet Wake lab from release v0.1.0
6c15bad verified
Raw History Blame Contribute Delete
7.27 kB
/* Phonlet Wake lab: the dark stage and orange accent of phonletai.com. */
:root {
color-scheme: dark;
--night: #0e0f0c;
--panel: #171814;
--panel-2: #1f201b;
--line: #2e2f28;
--ink: #f3efe6;
--muted: #a6a294;
--orange: #e95630;
--orange-deep: #c94322; /* white text on it passes WCAG AA */
--orange-text: #ff8a63;
--ok: #7fd1a0;
--sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
--mono: 'Geist Mono', ui-monospace, monospace;
--serif: 'Instrument Serif', Georgia, serif;
}
* {
box-sizing: border-box;
}
html {
background: var(--night);
}
body {
margin: 0;
min-height: 100vh;
color: var(--ink);
font: 16px/1.55 var(--sans);
background:
radial-gradient(60rem 30rem at 85% -10%, rgb(233 86 48 / 0.22), transparent 70%),
radial-gradient(40rem 24rem at -10% 30%, rgb(233 86 48 / 0.08), transparent 70%), var(--night);
}
a {
color: var(--orange-text);
}
a:hover {
color: var(--ink);
}
:focus-visible {
outline: 2px solid var(--orange-text);
outline-offset: 3px;
}
code {
font-family: var(--mono);
font-size: 0.9em;
color: var(--ink);
}
.top,
main,
footer {
width: min(920px, 100% - 32px);
margin-inline: auto;
}
.top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 22px 0;
}
.brand {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--ink);
font-weight: 600;
font-size: 22px;
letter-spacing: -0.04em;
text-decoration: none;
}
.brand svg {
width: 24px;
height: 24px;
fill: var(--orange);
}
.brand .dot {
color: var(--orange);
}
.top nav {
display: flex;
gap: 18px;
font-size: 14px;
}
.top nav a {
color: var(--muted);
text-decoration: none;
}
.top nav a:hover {
color: var(--ink);
}
.intro {
padding: clamp(24px, 6vw, 64px) 0 clamp(20px, 4vw, 40px);
}
.eyebrow {
margin: 0 0 14px;
color: var(--orange-text);
font: 500 12px/1 var(--mono);
letter-spacing: 0.14em;
text-transform: uppercase;
}
h1 {
margin: 0;
font-size: clamp(40px, 8vw, 76px);
font-weight: 500;
line-height: 0.98;
letter-spacing: -0.05em;
}
h1 em {
font-family: var(--serif);
font-weight: 400;
color: var(--orange-text);
letter-spacing: -0.02em;
}
.lede {
max-width: 46ch;
margin: 20px 0 0;
color: var(--muted);
font-size: 18px;
}
.lab {
position: relative;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 22px;
padding: clamp(20px, 4vw, 36px);
border: 1px solid var(--line);
border-radius: 22px;
background: linear-gradient(180deg, var(--panel), var(--night));
overflow: hidden;
}
label {
font-weight: 500;
}
.field {
display: flex;
gap: 10px;
margin-top: 8px;
}
input[type='text'] {
flex: 1;
min-width: 0;
padding: 13px 16px;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--night);
color: var(--ink);
font: inherit;
font-size: 17px;
}
input[type='text']::placeholder {
color: #6f6c62;
}
button {
padding: 12px 20px;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--panel-2);
color: var(--ink);
font: 500 15px var(--sans);
cursor: pointer;
}
button:hover:not(:disabled) {
border-color: var(--orange);
}
button:disabled {
opacity: 0.55;
cursor: progress;
}
button.primary {
border-color: var(--orange-deep);
background: var(--orange-deep);
color: #fff;
}
button.primary:hover:not(:disabled) {
background: #b33a1d;
}
button.primary.is-on {
background: transparent;
color: var(--orange-text);
}
button.ghost {
background: transparent;
}
.hint {
margin: 8px 0 0;
overflow-wrap: anywhere;
color: var(--muted);
font-size: 14px;
}
.phrases {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 0;
padding: 0;
list-style: none;
}
.phrases li {
display: inline-flex;
align-items: center;
gap: 10px;
max-width: 100%;
padding: 7px 8px 7px 14px;
border: 1px solid var(--line);
border-radius: 999px;
background: var(--panel-2);
}
.phrases li.is-new {
border-color: var(--orange);
}
.phrases .name {
font-weight: 500;
overflow-wrap: anywhere;
}
.phrases .sounds {
color: var(--muted);
font: 12px var(--mono);
}
.phrases .tag {
padding: 2px 8px;
border-radius: 999px;
background: rgb(233 86 48 / 0.14);
color: var(--orange-text);
font: 500 11px var(--mono);
letter-spacing: 0.06em;
text-transform: uppercase;
}
.phrases .tag.warn {
background: rgb(255 196 0 / 0.14);
color: #ffd166;
}
.phrases button {
width: 28px;
height: 28px;
padding: 0;
border-radius: 50%;
line-height: 1;
}
.tune label {
display: flex;
justify-content: space-between;
}
.tune output {
font-family: var(--mono);
color: var(--orange-text);
}
input[type='range'] {
width: 100%;
margin-top: 10px;
accent-color: var(--orange);
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.actions .primary {
min-width: 180px;
}
.meter {
height: 6px;
border-radius: 999px;
background: var(--panel-2);
overflow: hidden;
}
.meter span {
display: block;
height: 100%;
width: 0;
border-radius: inherit;
background: linear-gradient(90deg, var(--orange), #ffb08a);
transition: width 80ms linear;
}
.status {
min-height: 1.55em;
margin: -8px 0 0;
color: var(--muted);
}
.status.is-error {
color: #ff9b8a;
}
.heard h2 {
margin: 0 0 8px;
font: 500 12px var(--mono);
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--muted);
}
.heard h2 span {
color: var(--orange-text);
}
.heard ol {
display: grid;
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.heard li {
display: flex;
justify-content: space-between;
gap: 12px;
padding: 10px 14px;
border-radius: 12px;
background: var(--panel-2);
}
.heard li time {
color: var(--muted);
font: 13px var(--mono);
}
.heard li:first-child {
outline: 1px solid rgb(233 86 48 / 0.5);
}
.burst {
position: absolute;
inset: 0;
display: grid;
place-items: center;
pointer-events: none;
opacity: 0;
font: italic 400 clamp(40px, 9vw, 88px) / 1 var(--serif);
color: #fff;
text-align: center;
background: radial-gradient(circle at center, rgb(233 86 48 / 0.55), transparent 65%);
}
.burst.is-on {
animation: burst 1.4s ease-out;
}
@keyframes burst {
0% {
opacity: 0;
transform: scale(0.92);
}
15% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(1.04);
}
}
.facts {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px;
margin: 28px 0;
}
.facts div {
padding: 18px;
border: 1px solid var(--line);
border-radius: 16px;
}
.facts strong {
display: block;
font-size: 28px;
font-weight: 500;
letter-spacing: -0.04em;
}
.facts span {
color: var(--muted);
font-size: 14px;
}
footer {
padding: 8px 0 40px;
color: var(--muted);
font-size: 14px;
}
@media (max-width: 720px) {
.facts {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.phrases .sounds {
display: none;
}
.top nav {
gap: 12px;
}
}
@media (prefers-reduced-motion: reduce) {
.burst.is-on {
animation: burst-still 1.4s steps(1, end);
}
@keyframes burst-still {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.meter span {
transition: none;
}
}