Spaces:
Running

hub-wrapped / src /styles.css
enzostvs's picture
enzostvs HF Staff
Add the account-age slide
0323ef5 verified
Raw History Blame Contribute Delete
19.4 kB
:root {
--sun: #ffd21e;
--ember: #ff5a36;
--ink: #1b1035;
--night: #0f0822;
--orchid: #b48cff;
--mint: #7cf2c4;
--paper: #fff6dc;
--font: 'Bricolage Grotesque', system-ui, sans-serif;
--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* { box-sizing: border-box; margin: 0; }
html, body, #root { height: 100%; }
body {
font-family: var(--font);
background: var(--night);
color: var(--paper);
-webkit-font-smoothing: antialiased;
overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
/* ---------- Themes: each slide is a colour field ---------- */
[data-theme='ink'] { --bg: var(--ink); --fg: var(--paper); --hi: var(--sun); --g1: #ff5a36; --g2: #b48cff; --g3: #ffd21e; }
[data-theme='night'] { --bg: var(--night); --fg: var(--paper); --hi: var(--mint); --g1: #7cf2c4; --g2: #6a3cff; --g3: #ff5a36; }
[data-theme='sun'] { --bg: var(--sun); --fg: var(--ink); --hi: var(--ember); }
[data-theme='ember'] { --bg: var(--ember); --fg: var(--paper); --hi: var(--sun); }
[data-theme='orchid'] { --bg: var(--orchid); --fg: var(--ink); --hi: var(--paper); }
[data-theme='mint'] { --bg: var(--mint); --fg: var(--ink); --hi: #6a3cff; }
[data-theme='paper'] { --bg: var(--paper); --fg: var(--ink); --hi: var(--ember); }
[data-theme='violet'] { --bg: #6a3cff; --fg: var(--paper); --hi: var(--sun); }
/* ---------- Shared art ---------- */
.burst polygon { fill: currentColor; }
.burst { animation: spin 60s linear infinite; }
.rings circle {
fill: none;
stroke: currentColor;
stroke-width: 2.2;
animation: pulse 3.2s ease-in-out infinite;
animation-delay: calc(var(--i) * 160ms);
}
.glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.glow i {
position: absolute;
width: 70%;
aspect-ratio: 1;
border-radius: 50%;
filter: blur(70px);
opacity: 0.55;
animation: drift 14s ease-in-out infinite alternate;
}
.glow i:nth-child(1) { background: var(--g1, var(--ember)); top: -18%; left: -22%; }
.glow i:nth-child(2) { background: var(--g2, var(--orchid)); bottom: -20%; right: -25%; animation-duration: 18s; animation-direction: alternate-reverse; }
.glow i:nth-child(3) { background: var(--g3, var(--sun)); width: 40%; top: 40%; left: 45%; opacity: 0.3; animation-duration: 11s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes drift { to { transform: translate(18%, 12%) scale(1.2); } }
/* ---------- Home: colour bands with scrolling type, one solid panel ---------- */
.home {
position: relative;
height: 100%;
overflow: hidden auto;
display: grid;
grid-template-columns: minmax(0, 1fr);
place-items: center;
padding: 24px 16px;
background: var(--ink);
}
.bands {
position: absolute;
inset: -20% -20%;
display: grid;
grid-template-rows: repeat(5, 1fr);
transform: rotate(-7deg);
pointer-events: none;
}
.band { background: var(--bg); color: var(--fg); overflow: hidden; display: flex; align-items: center; container-type: size; }
.band-track {
display: flex;
gap: 0.28em;
width: max-content;
white-space: nowrap;
font-size: 92cqh;
font-weight: 800;
font-stretch: 75%;
letter-spacing: -0.04em;
line-height: 1;
animation: marquee 70s linear infinite;
}
.band:nth-child(even) .band-track { animation-direction: reverse; animation-duration: 90s; }
.band-track .outline { color: transparent; -webkit-text-stroke: 0.025em var(--fg); }
@keyframes marquee { to { transform: translateX(-50%); } }
.panel {
position: relative;
background: var(--ink);
color: var(--paper);
border-radius: 40px;
box-shadow: 14px 14px 0 var(--night);
}
.home-inner { width: min(100%, 700px); padding: clamp(28px, 6vw, 60px); }
.home-kicker {
display: inline-block;
font-size: 1rem; font-weight: 700;
padding: 6px 14px; border-radius: 999px;
background: var(--sun); color: var(--ink);
margin-bottom: 22px;
}
.home h1 {
font-size: clamp(2.8rem, 8vw, 5.6rem);
font-weight: 800;
font-stretch: 75%;
line-height: 0.9;
letter-spacing: -0.04em;
text-wrap: balance;
}
.home-lede { margin-top: 20px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.45; max-width: 30em; opacity: 0.85; }
.home-form { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.field {
flex: 1 1 240px;
min-width: 0;
display: flex;
align-items: center;
padding: 0 22px;
height: 64px;
border-radius: 999px;
background: var(--paper);
color: var(--ink);
font-size: 1.25rem;
transition: box-shadow 0.2s;
}
.field:focus-within { box-shadow: 0 0 0 4px var(--orchid); }
.field span { opacity: 0.55; }
.field input { flex: 1; width: 100%; min-width: 0; background: none; border: 0; outline: 0; font-weight: 700; }
.field input::placeholder { color: rgb(27 16 53 / 0.4); font-weight: 400; }
.home-form button {
height: 64px;
padding: 0 32px;
border-radius: 999px;
background: var(--sun);
color: var(--ink);
font-size: 1.2rem;
font-weight: 800;
transition: transform 0.2s var(--ease), background 0.2s;
}
.home-form button:hover:not(:disabled) { transform: scale(1.05) rotate(-2deg); background: var(--mint); }
.home-form button:active:not(:disabled) { transform: scale(0.97); }
.home-form button:disabled { opacity: 0.55; cursor: default; }
.home-error { margin-top: 16px; padding: 12px 18px; border-radius: 18px; background: var(--ember); color: var(--paper); font-weight: 500; line-height: 1.4; }
.home-note { margin-top: 20px; font-size: 0.92rem; opacity: 0.65; }
.loading { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 44px 56px; }
.loading-dots { display: flex; gap: 10px; margin-bottom: 16px; }
.loading-dots i { width: 22px; height: 22px; border-radius: 50%; background: var(--sun); animation: hop 0.9s var(--ease) infinite alternate; }
.loading-dots i:nth-child(2) { background: var(--ember); animation-delay: 0.12s; }
.loading-dots i:nth-child(3) { background: var(--orchid); animation-delay: 0.24s; }
.loading-dots i:nth-child(4) { background: var(--mint); animation-delay: 0.36s; }
@keyframes hop { to { transform: translateY(-18px); } }
.loading p { font-size: 1.6rem; font-weight: 800; font-stretch: 80%; }
.loading span { opacity: 0.7; }
@media (max-width: 560px) {
.panel { border-radius: 30px; box-shadow: 8px 8px 0 var(--night); }
.bands { inset: -12% -60%; }
}
/* ---------- Stage + card ---------- */
.stage {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
background: radial-gradient(60% 60% at 50% 45%, color-mix(in srgb, var(--bg) 42%, var(--night)), var(--night) 100%);
}
.card {
position: relative;
height: min(100dvh - 32px, 860px);
aspect-ratio: 9 / 16;
max-width: 100vw;
border-radius: 28px;
overflow: hidden;
container-type: size;
box-shadow: 0 0 120px color-mix(in srgb, var(--bg) 45%, transparent), 0 30px 80px rgb(0 0 0 / 0.5);
}
.nav {
width: 48px;
height: 48px;
border-radius: 50%;
background: rgb(255 246 220 / 0.12);
color: var(--paper);
font-size: 1.8rem;
line-height: 1;
padding-bottom: 4px;
transition: background 0.2s;
}
.nav:hover:not(:disabled) { background: rgb(255 246 220 / 0.25); }
.nav:disabled { opacity: 0.25; cursor: default; }
.segs { position: absolute; z-index: 3; top: 3cqw; left: 4cqw; right: 4cqw; display: flex; gap: 1cqw; pointer-events: none; }
.segs span { flex: 1; height: 0.8cqw; min-height: 3px; border-radius: 9px; background: color-mix(in srgb, var(--fg) 28%, transparent); overflow: hidden; }
.segs i { display: block; height: 100%; width: 0; background: var(--fg); border-radius: inherit; }
.segs i.done { width: 100%; }
.segs i.run { animation: fill 7s linear forwards; }
@keyframes fill { to { width: 100%; } }
.close {
position: absolute; z-index: 3; top: 6cqw; right: 3.5cqw;
width: 9cqw; height: 9cqw; border-radius: 50%;
font-size: 6cqw; line-height: 1; color: var(--fg); opacity: 0.75;
}
.close:hover { opacity: 1; background: color-mix(in srgb, var(--fg) 14%, transparent); }
/* ---------- Slide ---------- */
.slide {
position: absolute; inset: 0;
background: var(--bg);
color: var(--fg);
display: flex;
flex-direction: column;
justify-content: center;
padding: 16cqw 8cqw 12cqw;
overflow: hidden;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
cursor: pointer;
animation: slide-in 0.45s var(--ease);
}
@keyframes slide-in { from { opacity: 0; scale: 1.04; } }
.body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4cqw; }
.body.center { align-items: center; text-align: center; }
.r { animation: rise 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 170ms + 200ms); }
@keyframes rise { from { opacity: 0; transform: translateY(6cqw); } }
.lead { font-size: 5.4cqw; font-weight: 600; line-height: 1.2; max-width: 16em; text-wrap: balance; }
.title { font-weight: 800; font-stretch: 78%; letter-spacing: -0.03em; line-height: 0.95; text-wrap: balance; }
.title.xl { font-size: 15cqw; }
.title.lg { font-size: 10.5cqw; line-height: 1; }
.title.md { font-size: 7.6cqw; line-height: 1.05; font-stretch: 85%; letter-spacing: -0.02em; }
.title.repo { font-size: 14cqw; color: var(--hi); overflow-wrap: anywhere; text-wrap: wrap; text-shadow: 0 0 12cqw rgb(255 210 30 / 0.5); }
.title.persona {
font-size: 19cqw; line-height: 0.88;
background: linear-gradient(100deg, var(--sun), var(--ember) 45%, var(--orchid) 80%);
-webkit-background-clip: text; background-clip: text; color: transparent;
filter: drop-shadow(0 0 9cqw rgb(255 90 54 / 0.55));
padding-bottom: 0.08em;
}
.note { font-size: 4.5cqw; line-height: 1.35; opacity: 0.82; max-width: 19em; }
.note.wide { font-size: 5.2cqw; opacity: 0.92; }
.hint { position: absolute; z-index: 1; bottom: 7cqw; left: 0; right: 0; text-align: center; font-size: 3.8cqw; opacity: 0.6; }
.big {
display: block;
font-weight: 800;
font-stretch: 75%;
letter-spacing: -0.045em;
line-height: 0.8;
font-size: 50cqw;
color: var(--hi);
font-variant-numeric: tabular-nums;
margin: 2cqw 0 1cqw -0.04em;
}
.big[data-len='3'] { font-size: 44cqw; }
.big[data-len='4'] { font-size: 36cqw; }
.big[data-len='5'] { font-size: 32cqw; }
.big[data-len='6'], .big[data-len='7'] { font-size: 26cqw; }
[data-theme='ink'] .big, [data-theme='night'] .big { text-shadow: 0 0 14cqw color-mix(in srgb, var(--hi) 60%, transparent); }
/* Poster-style hard shadow on the flat colour slides. */
[data-theme='sun'] .big, [data-theme='paper'] .big, [data-theme='orchid'] .big, [data-theme='violet'] .big { text-shadow: 0.045em 0.045em 0 var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 2cqw; }
.chips li {
font-size: 4.3cqw; font-weight: 500;
padding: 2.2cqw 4.2cqw; border-radius: 99cqw;
background: var(--fg); color: var(--bg);
rotate: -1.5deg;
}
.chips li:nth-child(even) { rotate: 1.5deg; background: var(--hi); color: var(--chip-ink, var(--ink)); }
[data-theme='orchid'] .chips li:nth-child(even), [data-theme='mint'] .chips li:nth-child(even) { color: var(--bg); }
[data-theme='mint'] .chips li:nth-child(even) { color: var(--paper); }
.chips b { font-weight: 800; }
/* Art placement */
.art { position: absolute; pointer-events: none; }
.intro-burst { width: 92cqw; left: 50%; top: 50%; margin: -46cqw 0 0 -46cqw; z-index: -1; color: var(--sun); filter: drop-shadow(0 0 14cqw rgb(255 210 30 / 0.65)); }
.corner-burst { width: 70cqw; right: -24cqw; top: -18cqw; color: var(--hi); }
.side-burst { width: 110cqw; right: -62cqw; bottom: -30cqw; color: var(--hi); opacity: 0.55; }
.top-rings { width: 90cqw; right: -42cqw; top: -40cqw; color: var(--hi); opacity: 0.5; }
.center-rings { width: 190cqw; left: -45cqw; top: 50%; translate: 0 -50%; color: var(--ink); opacity: 0.16; }
.persona-burst { width: 190cqw; left: -45cqw; top: 50%; translate: 0 -50%; color: var(--paper); opacity: 0.05; }
/* Ribbon: the home page's scrolling band, tilted across the foot of a slide */
.ribbon {
position: absolute; z-index: 1;
left: -20%; width: 140%; bottom: 11cqw; height: 16cqw;
background: var(--bg); color: var(--fg);
display: flex; align-items: center; overflow: hidden;
rotate: -6deg;
pointer-events: none;
animation: ribbon-in 0.8s var(--ease) 0.15s both;
}
.ribbon .band-track { font-size: 13cqw; animation-duration: 45s; }
@keyframes ribbon-in { from { transform: translateX(-105%); } }
.slide:has(.ribbon) { padding-bottom: 36cqw; }
.slide:has(.ribbon) .hint { bottom: 3.5cqw; }
/* Intro */
.intro-avatar { position: relative; margin-bottom: 26cqw; }
.avatar { display: block; border-radius: 50%; object-fit: cover; background: var(--orchid); }
.avatar.fallback { display: grid; place-items: center; color: var(--ink); font-weight: 800; }
.intro-avatar .avatar { width: 34cqw; height: 34cqw; font-size: 16cqw; border: 1.4cqw solid var(--ink); box-shadow: 0 0 0 1.2cqw var(--paper), 0 0 20cqw rgb(255 210 30 / 0.8); }
/* Months */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.6cqw; height: 46cqw; margin: 4cqw 0 1cqw; }
.bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 1.6cqw; }
.bars i {
width: 100%; height: calc(var(--h) * 100%);
border-radius: 1.6cqw;
background: color-mix(in srgb, var(--fg) 30%, transparent);
transform-origin: bottom;
animation: grow 0.9s var(--ease) both;
animation-delay: calc(var(--m) * 50ms + 600ms);
}
.bars .peak i { background: var(--hi); box-shadow: 0 0 9cqw var(--hi); }
.bars span { font-size: 3.2cqw; font-weight: 600; opacity: 0.6; }
.bars .peak span { opacity: 1; color: var(--hi); }
@keyframes grow { from { transform: scaleY(0); } }
/* Ranked lists */
.ranked { display: grid; gap: 1.5cqw; margin-top: 2cqw; counter-reset: rank; }
.ranked li {
counter-increment: rank;
display: flex; align-items: baseline; gap: 3cqw;
font-size: 5cqw; font-weight: 700;
padding: 2.6cqw 4cqw; border-radius: 4cqw;
background: var(--fg); color: var(--bg);
}
.ranked li:first-child { background: var(--hi); color: var(--ink); }
.ranked li::before { content: counter(rank); opacity: 0.5; font-variant-numeric: tabular-nums; }
.ranked span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked em { font-style: normal; font-weight: 800; }
.builders { display: grid; gap: 2.4cqw; counter-reset: rank; margin: 2cqw 0; }
.builders li { counter-increment: rank; display: grid; grid-template-columns: 8cqw 1fr; align-items: baseline; }
.builders li::before { content: counter(rank); font-size: 5cqw; font-weight: 700; opacity: 0.5; }
.builders span { font-weight: 800; font-stretch: 78%; letter-spacing: -0.03em; line-height: 1; font-size: 8cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builders li:first-child span { font-size: 13cqw; color: var(--hi); }
.builders li:nth-child(2) span { font-size: 10cqw; }
.builders em { grid-column: 2; font-style: normal; font-size: 3.8cqw; font-weight: 500; opacity: 0.7; }
/* Likes split */
.split-bar { display: flex; gap: 1cqw; height: 5cqw; }
.split-bar i { border-radius: 2cqw; min-width: 2cqw; background: var(--hi); }
.split-bar i:nth-child(2) { background: var(--ember); }
.split-bar i:nth-child(3) { background: var(--orchid); }
.split-bar i:nth-child(4) { background: var(--mint); }
.split ul { display: flex; flex-wrap: wrap; gap: 1cqw 5cqw; margin-top: 3cqw; font-size: 4.2cqw; }
.split li::before { content: ''; display: inline-block; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; margin-right: 1.6cqw; background: var(--hi); }
.split li:nth-child(2)::before { background: var(--ember); }
.split li:nth-child(3)::before { background: var(--orchid); }
.split li:nth-child(4)::before { background: var(--mint); }
/* Community */
.orgs > div { display: flex; padding-left: 3cqw; }
.orgs .avatar { width: 13cqw; height: 13cqw; margin-left: -3cqw; border: 0.8cqw solid var(--bg); border-radius: 3.4cqw; font-size: 6cqw; }
.orgs p { margin-top: 3cqw; font-size: 4.5cqw; opacity: 0.82; }
/* Summary */
.slide:has(.summary) { justify-content: flex-start; padding-top: 15cqw; cursor: default; }
.summary { gap: 3.6cqw; }
.summary header { display: flex; align-items: center; gap: 4cqw; }
.summary header .avatar { width: 14cqw; height: 14cqw; font-size: 7cqw; box-shadow: 0 0 0 0.8cqw var(--sun), 0 0 10cqw rgb(255 210 30 / 0.6); }
.summary header b { display: block; font-size: 6cqw; font-weight: 800; font-stretch: 85%; line-height: 1.1; }
.summary header span { font-size: 4cqw; opacity: 0.65; }
.title.persona-sm {
font-size: 11.5cqw;
background: linear-gradient(100deg, var(--sun), var(--ember) 55%, var(--orchid));
-webkit-background-clip: text; background-clip: text; color: transparent;
padding-bottom: 0.08em;
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqw; }
.grid div { padding: 2.6cqw 4cqw; border-radius: 5cqw; background: var(--sun); color: var(--ink); }
.grid div:nth-child(2) { background: var(--ember); color: var(--paper); }
.grid div:nth-child(3) { background: var(--orchid); }
.grid div:nth-child(4) { background: var(--mint); }
.grid dt { font-size: 3.6cqw; font-weight: 600; opacity: 0.8; }
.grid dd { margin: 0; font-size: 9.5cqw; font-weight: 800; font-stretch: 75%; letter-spacing: -0.03em; line-height: 1; }
.rows { display: grid; gap: 2cqw; }
.rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 4cqw; border-bottom: 0.3cqw solid rgb(255 246 220 / 0.16); padding-bottom: 1.8cqw; }
.rows dt { font-size: 3.8cqw; opacity: 0.7; white-space: nowrap; }
.rows dd { margin: 0; font-size: 4.6cqw; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary footer { font-size: 4cqw; font-weight: 700; opacity: 0.85; }
.actions { position: absolute; z-index: 2; left: 8cqw; right: 8cqw; bottom: 7cqw; display: flex; flex-wrap: wrap; gap: 2cqw; }
.actions button {
flex: 1 1 auto;
padding: 2.4cqw 2.4cqw; border-radius: 99cqw;
font-size: 3.4cqw; white-space: nowrap; font-weight: 700;
border: 0.4cqw solid rgb(255 246 220 / 0.4);
transition: background 0.2s, transform 0.2s var(--ease);
}
.actions .break { flex-basis: 100%; height: 0; }
.actions button:hover { background: rgb(255 246 220 / 0.12); }
.actions button.primary { flex: 1 1 50%; background: var(--sun); color: var(--ink); border-color: var(--sun); font-size: 4.4cqw; padding: 2.8cqw; box-shadow: 0 0 10cqw rgb(255 210 30 / 0.45); }
.actions button.primary:hover { transform: scale(1.02); }
.actions p { position: absolute; left: 0; right: 0; top: 100%; margin-top: 1cqw; text-align: center; font-size: 3.4cqw; opacity: 0.75; overflow-wrap: anywhere; }
/* ---------- Small screens: the card is the screen ---------- */
@media (max-width: 560px), (max-aspect-ratio: 10 / 16) {
.stage { gap: 0; }
.nav { display: none; }
.card { width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
.burst, .rings circle, .glow i, .r, .bars i, .slide, .band-track, .loading-dots i, .ribbon { animation: none; }
/* No auto-advance: the viewer moves through the story by tapping. */
.segs i.run { animation: none; width: 100%; }
}