hex/site/src/styles.css

1078 lines
21 KiB
CSS

@font-face {
font-family: "Inter Variable";
font-style: normal;
font-display: swap;
font-weight: 100 900;
src: url("@fontsource-variable/inter/files/inter-latin-wght-normal.woff2") format("woff2-variations");
}
:root {
color: #f2f2ef;
background: #070707;
font-family: "Inter Variable", Inter, ui-sans-serif, system-ui, sans-serif;
font-synthesis: none;
font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
text-rendering: optimizeLegibility;
color-scheme: only dark;
}
* {
box-sizing: border-box;
}
html {
min-height: 100%;
background: #070707;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
min-height: 100vh;
min-height: 100dvh;
margin: 0;
}
a {
font: inherit;
color: inherit;
text-decoration: none;
}
.page {
isolation: isolate;
position: relative;
display: grid;
min-height: 100vh;
min-height: 100dvh;
grid-template-rows: auto minmax(17rem, 1fr) auto;
grid-template-columns: minmax(0, 1fr);
overflow-x: clip;
background: #070707;
}
/* The show: messages, words and the head are drawn on one canvas behind the page. */
.stage {
position: absolute;
z-index: 0;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.screen-glass {
position: fixed;
z-index: 25;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.page[data-screen-shattered] .header,
.page[data-screen-shattered] .topbar,
.page[data-screen-shattered] .hero__copy,
.page[data-screen-shattered] .foot,
.page[data-screen-shattered] .hero__action {
opacity: 0;
transition: opacity 40ms linear;
}
.show {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
container-type: size;
pointer-events: none;
}
.show > * {
/* Head box: 3.2 head radii (head, hair and halo); the canvas reads it to place the head. */
--box: clamp(9.5rem, min(32vw, 32vh, 62cqh), 20rem);
}
.show__head {
width: var(--box);
height: var(--box);
flex: none;
}
.show__head img {
display: block;
width: 100%;
height: 100%;
transition: opacity 240ms ease-out;
}
.page[data-live] .show__head img {
opacity: 0;
}
.keycap {
position: relative;
width: 7.75rem;
height: 6.375rem;
flex: none;
margin-top: calc(var(--box) * -0.11);
padding: 0;
border: 0;
border-radius: 1.25rem;
background: none;
color: rgba(246, 247, 250, 0.92);
font: inherit;
cursor: pointer;
pointer-events: auto;
user-select: none;
-webkit-tap-highlight-color: transparent;
transition:
opacity 320ms ease,
transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1),
visibility 0s linear 0s;
}
.keycap:focus-visible {
outline: 2px solid #a9b9ff;
outline-offset: 6px;
}
.keycap__glow {
position: absolute;
inset: 0.625rem 0.75rem -0.25rem;
border-radius: 1.125rem;
background: radial-gradient(ellipse at 50% 85%, rgba(255, 164, 56, 0.52), rgba(255, 110, 32, 0.16) 58%, transparent 78%);
filter: blur(8px);
/* The pulse: --glow-pulse (0 dim, 1 bright) is set at 30 fps by OptionKey. */
opacity: calc(0.62 + 0.34 * var(--glow-pulse, 0));
transform: scale(calc(0.98 + 0.06 * var(--glow-pulse, 0)));
}
.keycap__well {
position: absolute;
inset: 0.25rem 0.25rem 0;
border-radius: 1.125rem;
background: #040406;
box-shadow:
0 22px 48px rgba(0, 0, 0, 0.82),
0 6px 16px rgba(0, 0, 0, 0.75),
inset 0 2px 5px rgba(0, 0, 0, 0.95),
0 0 0 1px rgba(255, 255, 255, 0.07);
}
.keycap__cap {
position: absolute;
inset: 0 0.375rem 0.375rem;
border-radius: 1rem;
background: linear-gradient(180deg, #2a2d35 0%, #17191f 38%, #0e1014 82%, #08090c 100%);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.28),
inset 1px 0 0 rgba(255, 255, 255, 0.1),
inset -1px 0 0 rgba(255, 255, 255, 0.08),
inset 0 -3px 6px rgba(0, 0, 0, 0.88),
0 8px 18px rgba(0, 0, 0, 0.65);
transform: translateY(var(--key-y, 0px));
transition:
transform 110ms cubic-bezier(0.22, 1.35, 0.36, 1),
box-shadow 120ms ease;
}
.keycap__dish {
position: absolute;
inset: 0.25rem 0.4375rem 0.75rem;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
padding: 0.625rem 0.75rem 0.5625rem;
border-radius: 0.75rem;
background:
radial-gradient(120% 95% at 28% 18%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.03) 42%, rgba(0, 0, 0, 0.28) 100%),
linear-gradient(165deg, #1b1d24 0%, #121419 52%, #181a21 100%);
box-shadow:
inset 0 1.5px 1px rgba(255, 255, 255, 0.26),
inset 0 -1.5px 2px rgba(0, 0, 0, 0.65),
inset 2px 0 3px rgba(0, 0, 0, 0.35),
inset -2px 0 3px rgba(0, 0, 0, 0.35),
0 1px 0 rgba(255, 255, 255, 0.06);
text-shadow: 0 0 10px rgba(255, 210, 145, 0.28);
}
.keycap__glyph {
width: 1.375rem;
height: 1.125rem;
fill: none;
stroke: currentColor;
stroke-width: 2.1;
stroke-linecap: round;
stroke-linejoin: round;
filter: drop-shadow(0 0 6px rgba(255, 200, 120, 0.25));
}
.keycap__label {
align-self: flex-start;
/* The dish is a column with space-between: without the Mac's glyph above
it, the label is the only child and would sit at the top. The auto margin
keeps it on the bottom row, where the canvas shatter draws the legend. */
margin-top: auto;
font-size: 0.9rem;
font-weight: 540;
line-height: 1;
letter-spacing: -0.01em;
}
/* Linux's chord reads as a second, smaller legend beside the key's own. */
.keycap__chord {
margin-left: 0.22rem;
font-size: 0.72rem;
font-weight: 500;
color: rgba(246, 247, 250, 0.66);
}
.keycap__hint {
position: absolute;
bottom: -1.5rem;
left: 50%;
color: rgba(244, 244, 246, 0.48);
font-size: 0.72rem;
font-weight: 500;
line-height: 1;
white-space: nowrap;
transform: translateX(-50%);
transition: color 200ms ease;
}
.keycap__hint-touch {
display: none;
}
@media (pointer: coarse) {
.keycap__hint-fine {
display: none;
}
.keycap__hint-touch {
display: inline;
}
}
@media (hover: hover) {
.keycap:hover {
--key-y: 1.5px;
}
.keycap:hover .keycap__hint {
color: rgba(244, 244, 246, 0.82);
}
}
.keycap:active,
.keycap[data-pressed] {
--key-y: 7px;
}
.keycap:active .keycap__glow,
.keycap[data-pressed] .keycap__glow {
opacity: 1;
filter: blur(11px);
transform: scale(1.22);
transition: opacity 220ms ease;
}
.keycap:active .keycap__cap,
.keycap[data-pressed] .keycap__cap {
transform: translateY(var(--key-y, 0px)) scaleX(1.035) scaleY(0.935);
transition:
transform 45ms cubic-bezier(0.12, 0.9, 0.25, 1),
box-shadow 55ms ease;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.22),
inset 0 -1px 3px rgba(0, 0, 0, 0.95),
0 2px 5px rgba(0, 0, 0, 0.82),
0 0 18px rgba(255, 152, 44, 0.35);
}
.keycap:active .keycap__dish,
.keycap[data-pressed] .keycap__dish {
box-shadow:
inset 0 1.5px 1px rgba(255, 255, 255, 0.24),
inset 0 -1.5px 3px rgba(255, 148, 42, 0.28),
inset 2px 0 3px rgba(0, 0, 0, 0.4),
inset -2px 0 3px rgba(0, 0, 0, 0.4),
0 1px 0 rgba(255, 255, 255, 0.08);
text-shadow: 0 0 14px rgba(255, 200, 110, 0.58);
}
.keycap[data-gone] {
--key-y: 6px;
visibility: hidden;
opacity: 0;
transform: translateY(4px) scale(0.95);
pointer-events: none;
transition:
opacity 320ms ease,
transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1),
visibility 0s linear 420ms;
}
.page[data-key-exploded] .keycap {
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: none;
}
.header__tools {
display: flex;
align-items: center;
gap: 1rem;
}
.sound {
display: grid;
width: 2rem;
height: 2rem;
margin: -0.5rem 0;
place-items: center;
padding: 0;
border: 0;
border-radius: 999px;
color: #9b9da3;
background: none;
cursor: pointer;
transition: color 160ms ease;
}
.sound:hover {
color: #f3f3f0;
}
.sound:focus-visible {
outline: 2px solid #a9b9ff;
outline-offset: 2px;
}
.sound svg {
width: 1.1rem;
height: 1.1rem;
fill: currentColor;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
}
.header {
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
max-width: 88rem;
margin: 0 auto;
padding-top: clamp(1.5rem, 4vh, 2.75rem);
padding-right: clamp(1.25rem, 4vw, 4rem);
padding-left: clamp(1.25rem, 4vw, 4rem);
}
.wordmark {
display: inline-flex;
align-items: center;
gap: 0.7rem;
border-radius: 0.35rem;
font-size: 0.8rem;
font-weight: 620;
letter-spacing: 0.15em;
}
.wordmark:focus-visible,
.header__github:focus-visible,
.download:focus-visible,
.command__copy:focus-visible,
.install button:focus-visible,
.install a:focus-visible {
outline: 2px solid #a9b9ff;
outline-offset: 4px;
}
.wordmark__icon {
width: 1.35rem;
height: 1.35rem;
fill: none;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 4.5;
}
.wordmark__core {
fill: currentColor;
stroke: none;
}
.header__github {
display: inline-flex;
align-items: center;
gap: 0.5rem;
border-radius: 0.35rem;
color: #9b9da3;
font-size: 0.8rem;
transition: color 160ms ease;
}
.header__github:hover {
color: #f3f3f0;
}
.header__github-icon {
width: 1rem;
height: 1rem;
fill: currentColor;
}
.hero {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: clamp(1.4rem, 3vh, 2.2rem);
width: 100%;
padding: 1.5rem 1.25rem clamp(2rem, 7vh, 4.5rem);
text-align: center;
pointer-events: none;
}
.hero > * {
pointer-events: auto;
}
.hero__copy {
display: flex;
width: fit-content;
max-width: 100%;
flex-direction: column;
align-items: center;
gap: 1rem;
pointer-events: none;
}
.hero__word {
display: inline-block;
pointer-events: none;
will-change: transform;
transform-origin: 50% 58%;
}
h1,
p {
margin: 0;
}
h1 {
max-width: 16ch;
color: #f3f3f0;
font-size: clamp(2.65rem, 6.5vw, 5.5rem);
font-weight: 540;
letter-spacing: -0.055em;
text-wrap: balance;
}
.hero__copy p {
max-width: 47ch;
color: #9b9da3;
font-size: clamp(1rem, 1.45vw, 1.12rem);
line-height: 1.65;
text-wrap: pretty;
}
/* The detected OS is the page's first guess with scripts. index.html's
<noscript> stylesheet shows this line in its place when they are off. */
.hero__any {
display: none;
}
.hero__action {
display: flex;
width: min(100%, 41rem);
flex-direction: column;
align-items: center;
gap: 0.8rem;
}
.download {
display: grid;
min-width: 13.8rem;
min-height: 3.25rem;
grid-template-columns: 1.15rem 1fr 1.15rem;
align-items: center;
gap: 0.7rem;
padding: 0.75rem 1rem;
border: 1px solid #f2f2ef;
border-radius: 0.8rem;
color: #0c0d0f;
background: #f2f2ef;
font-size: 0.92rem;
font-weight: 590;
transition: background-color 160ms ease, border-color 160ms ease;
}
button.download {
font-family: inherit;
cursor: pointer;
}
a.download:hover,
button.download:hover {
border-color: #fff;
background: #fff;
}
.download--disabled {
border-color: rgba(242, 242, 239, 0.14);
color: #777b82;
background: transparent;
cursor: not-allowed;
}
.command {
display: flex;
align-items: center;
width: min(100%, 41rem);
min-width: 0;
border: 1px solid rgba(242, 242, 239, 0.14);
border-radius: 0.8rem;
background: rgba(242, 242, 239, 0.04);
}
.command code {
flex: 1;
min-width: 0;
overflow-x: auto;
padding: 0.85rem 0 0.85rem 1rem;
color: #f2f2ef;
font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
font-size: 0.8rem;
white-space: pre;
scrollbar-width: none;
}
.command__copy {
flex: none;
min-width: 4.75rem;
margin: 0.35rem;
padding: 0.5rem 0.8rem;
border: 0;
border-radius: 0.5rem;
color: #0c0d0f;
background: #f2f2ef;
font: inherit;
font-size: 0.8rem;
font-weight: 590;
cursor: pointer;
transition: background-color 160ms ease;
}
.command__copy:hover {
background: #fff;
}
.install__os {
position: relative;
/* Equal-width tabs, so the pill keeps one size as it slides. */
display: inline-grid;
max-width: 100%;
grid-auto-columns: 1fr;
grid-auto-flow: column;
gap: 0.25rem;
padding: 0.25rem;
border: 1px solid rgba(242, 242, 239, 0.1);
border-radius: 0.8rem;
}
.install__os button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.5rem 0.95rem;
border: 0;
border-radius: 0.55rem;
color: #9b9da3;
background: transparent;
font: inherit;
font-size: 0.85rem;
font-weight: 540;
cursor: pointer;
transition: color 160ms ease, background-color 160ms ease;
}
.install__os .mark {
width: 0.95rem;
height: 0.95rem;
}
.install__os button:hover,
.install__os button[aria-selected="true"] {
color: #f2f2ef;
}
.install__os:not([data-measured]) button[aria-selected="true"] {
background: rgba(242, 242, 239, 0.1);
}
/* The selected-tab pill, placed by useTabIndicator. */
.install__os[data-measured]::before {
position: absolute;
top: 0.25rem;
bottom: 0.25rem;
left: 0;
width: var(--tab-width);
border-radius: 0.55rem;
background: rgba(242, 242, 239, 0.1);
content: "";
transform: translateX(var(--tab-x));
}
.install__os[data-animate]::before {
transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1), width 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.install__methods {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 0.4rem 1.1rem;
min-height: 1.75rem;
}
.install__methods [role="tablist"] {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.25rem 1.1rem;
}
.install__arch {
padding-left: 1.1rem;
border-left: 1px solid rgba(242, 242, 239, 0.14);
}
.install__methods button {
padding: 0.2rem 0 0.3rem;
border: 0;
border-bottom: 1px solid transparent;
color: #777b82;
background: transparent;
font: inherit;
font-size: 0.8rem;
cursor: pointer;
transition: color 160ms ease, border-color 160ms ease;
}
.install__methods button:hover {
color: #c9cace;
}
.install__methods button[aria-selected="true"] {
border-bottom-color: #f2f2ef;
color: #f2f2ef;
}
.install {
gap: 1rem;
}
.install__methods {
margin-top: 0.15rem;
}
.install .command {
width: min(100%, 36rem);
min-height: 3.25rem;
text-align: left;
}
.mark {
width: 1.05rem;
height: 1.05rem;
flex: none;
fill: currentColor;
}
.mark--stroke {
fill: none;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.7;
}
.download__arrow {
color: #686a6e;
font-size: 1rem;
}
/* The Anomaly copyright, as on opentunnel.xyz and the OpenCode console: the signature sits faintly behind the line. */
.site-footer {
display: flex;
justify-content: center;
padding: 2.5rem 1.25rem 4rem;
background: #070707;
}
.copyright {
position: relative;
color: #909090;
font-size: 0.8125rem;
line-height: 1.5rem;
}
.copyright img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
}
.copyright p {
position: relative;
margin: 0;
}
.copyright a {
color: inherit;
text-decoration: underline rgba(255, 255, 255, 0.2);
text-underline-offset: 2px;
}
.copyright a:hover {
color: #f2f2ef;
}
@media (max-width: 39rem) {
.hero {
gap: 1.4rem;
padding-top: 1rem;
padding-bottom: 2rem;
}
.hero__copy p {
max-width: 32ch;
font-size: 1rem;
line-height: 1.55;
}
.download {
min-height: 3.5rem;
}
.install .command {
min-height: 3.5rem;
}
.install__arch {
flex-basis: 100%;
padding-left: 0;
border-left: 0;
}
}
@media (max-height: 46rem) and (min-width: 40rem) {
.hero {
gap: 1.2rem;
padding-top: 0.5rem;
padding-bottom: 1.5rem;
}
h1 {
font-size: 3.4rem;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
}
.keycap__glow {
opacity: 0.78;
transform: none;
}
.install__os[data-animate]::before {
transition: none;
}
.keycap,
.keycap[data-gone] {
transform: none;
}
}
/* Install: OS tabs over one aligned stack of install methods. */
.install {
/* As wide as the headline at its largest size. */
width: min(100%, 42.5rem);
gap: 1rem;
}
.install__os {
align-self: center;
}
.install__panels {
display: grid;
width: 100%;
}
.install__panels > .stack {
grid-area: 1 / 1;
align-self: start;
}
.install__panels > .stack:not([data-active]) {
visibility: hidden;
}
.stack {
display: flex;
width: 100%;
flex-direction: column;
overflow: hidden;
border: 1px solid rgba(242, 242, 239, 0.1);
border-radius: 0.8rem;
background: rgba(242, 242, 239, 0.025);
}
.stack__row {
display: grid;
grid-template-columns: 7rem minmax(0, 1fr) 2.25rem;
align-items: center;
gap: 1rem;
min-height: 3.25rem;
padding: 0.4rem 0.5rem 0.4rem 1.1rem;
text-align: left;
}
.stack__row + .stack__row {
border-top: 1px solid rgba(242, 242, 239, 0.07);
}
.stack__label {
color: #f2f2ef;
font-size: 0.85rem;
font-weight: 560;
}
.stack__value {
display: flex;
min-width: 0;
flex-wrap: wrap;
align-items: center;
gap: 0.4rem 0.75rem;
color: #777b82;
font-size: 0.8rem;
}
.stack__choices {
display: inline-flex;
flex: none;
gap: 0.15rem;
padding: 0.15rem;
border: 1px solid rgba(242, 242, 239, 0.1);
border-radius: 0.5rem;
}
.stack__choices button {
padding: 0.2rem 0.5rem;
border: 0;
border-radius: 0.35rem;
color: #777b82;
background: transparent;
font: inherit;
font-size: 0.75rem;
font-weight: 540;
cursor: pointer;
transition: color 160ms ease, background-color 160ms ease;
}
.stack__choices button:hover,
.stack__choices button[aria-pressed="true"] {
color: #f2f2ef;
}
.stack__choices button[aria-pressed="true"] {
background: rgba(242, 242, 239, 0.1);
}
/* Beside a row's switch the command wraps to its own line when it would be
too short to read (phones). */
.stack__value code {
flex: 1 1 9rem;
min-width: min(9rem, 100%);
display: block;
overflow: hidden;
color: #b9bbc0;
font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
font-size: 0.78rem;
white-space: nowrap;
text-overflow: ellipsis;
}
.stack__action {
display: inline-flex;
width: 2.25rem;
height: 2.25rem;
align-items: center;
justify-content: center;
border: 1px solid rgba(242, 242, 239, 0.14);
border-radius: 0.55rem;
color: #f2f2ef;
background: transparent;
font: inherit;
font-size: 0.8rem;
font-weight: 560;
cursor: pointer;
transition: background-color 160ms ease, border-color 160ms ease;
}
.stack__action:hover {
border-color: rgba(242, 242, 239, 0.3);
background: rgba(242, 242, 239, 0.06);
}
.stack__action--primary {
border-color: #f2f2ef;
color: #0c0d0f;
background: #f2f2ef;
}
.stack__action--primary:hover {
border-color: #fff;
background: #fff;
}
@media (max-width: 30rem) {
.install__os {
width: 100%;
}
.install__os button {
gap: 0.35rem;
padding: 0.5rem 0.5rem;
font-size: 0.8rem;
}
.install__os .mark {
width: 0.85rem;
height: 0.85rem;
}
}
@media (max-width: 24rem) {
.install__os button {
flex-direction: column;
gap: 0.25rem;
padding: 0.45rem 0.25rem;
font-size: 0.75rem;
}
}
@media (max-width: 34rem) {
.stack__row {
grid-template-columns: 5rem minmax(0, 1fr) 2.25rem;
gap: 0.75rem;
padding-left: 0.9rem;
}
}
/* Too narrow for a switch beside the label: it moves under the label. */
@media (max-width: 22.5rem) {
.stack__row:has(.stack__choices) {
grid-template-columns: minmax(0, 1fr) 2.25rem;
row-gap: 0.4rem;
padding-block: 0.6rem;
}
.stack__row:has(.stack__choices) .stack__value {
grid-row: 2;
grid-column: 1 / -1;
}
}
/* Every OS, architecture, and package, for the no-script fallback. It stays
hidden while scripts run, so the switcher above looks exactly as it did;
index.html's <noscript> stylesheet swaps the two. */
.install__plain {
display: none;
width: 100%;
flex-direction: column;
gap: 0.75rem;
text-align: left;
}
.install__plain-note {
color: #777b82;
font-size: 0.8rem;
text-align: center;
}
.install__plain .stack__row {
grid-template-columns: 7rem minmax(0, 1fr);
padding-right: 1.1rem;
}
/* The list has no copy button, so its commands wrap and stay selectable
instead of truncating. */
.install__plain code {
flex-basis: 100%;
overflow: visible;
white-space: pre-wrap;
overflow-wrap: anywhere;
text-overflow: clip;
}
.stack__title {
margin: 0;
padding: 0.8rem 1.1rem 0.65rem;
color: #f2f2ef;
font-size: 0.85rem;
font-weight: 600;
}
.stack__title + .stack__row {
border-top: 1px solid rgba(242, 242, 239, 0.07);
}
/* A download in the no-script list names itself; the switcher's icon button
carries the name in its aria-label. */
.stack__link {
color: #f2f2ef;
text-decoration: underline rgba(255, 255, 255, 0.28);
text-underline-offset: 2px;
transition: color 160ms ease;
}
.stack__link:hover {
color: #fff;
}
@media (max-width: 34rem) {
.install__plain .stack__row {
grid-template-columns: 5rem minmax(0, 1fr);
}
}
.stack__icon {
width: 1rem;
height: 1rem;
}