mirror of
https://github.com/bitbaum/s-ink.git
synced 2026-12-04 04:27:42 +01:00
Conversion: - Primary BOOK NOW on the first screen and a sticky bar on phones, where the Book section is otherwise eight screens of scrolling away. - Payment listed as cash and Bitcoin. Quality pass — each a real defect, all invisible to typecheck/lint/build: - The hero drift-in keyframe still ended at the OLD opacity (0.38). With fill `both` the last keyframe wins over the rule above it, so raising the image opacity did nothing and read like a CSS ordering bug. - Lightbox leaked focus: aria-modal does nothing for the Tab key, so a keyboard user tabbed out of the viewer into a page they could not see. - lib/works.ts kept its own copy of the artist and studio name; reads SITE now. - Dropped an unused design token; documented the one non-token colour. - Locale negotiation extracted from middleware so it is testable as a pure fn. Added 69 tests (from zero), sitemap + robots for all seven locales, .nvmrc. verify now runs tests, so CI and a local run check the same things. Co-authored-by: Mao Nakamoto <georgy.butaev@revamp-it.ch>
279 lines
6.3 KiB
CSS
279 lines
6.3 KiB
CSS
.hero {
|
|
position: relative;
|
|
min-height: 100svh;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
padding-block: 8rem 5rem;
|
|
overflow: hidden;
|
|
isolation: isolate;
|
|
}
|
|
|
|
/* Sami at the machine. Unlike the tattoo close-ups this is meant to be READ, not
|
|
used as texture — so it sits at near-full strength and the scrim below does
|
|
the work of keeping the wordmark legible instead of dimming the whole frame. */
|
|
.backdrop {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: -2;
|
|
}
|
|
|
|
.backdrop img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
/* Bias right: his face and the ring light live in the right two-thirds, and
|
|
the wordmark sits bottom-left. */
|
|
object-position: 64% 32%;
|
|
/* Full strength and lifted: the source frame is a dark studio at night, so
|
|
anything less than this and his face disappears into the scrim below. */
|
|
opacity: 1;
|
|
filter: contrast(1.03) brightness(1.5);
|
|
}
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.backdrop img {
|
|
animation: drift-in 2.4s var(--ease-out) both;
|
|
}
|
|
}
|
|
|
|
/* Ends at opacity 1, matching .backdrop img. The animation runs with fill
|
|
`both`, so whatever the last keyframe says WINS over the rule above it —
|
|
leaving a stale value here silently dims the hero and looks like a CSS
|
|
ordering bug rather than an animation one. */
|
|
@keyframes drift-in {
|
|
from {
|
|
transform: scale(1.09);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Hairline measuring grid. Fades out toward the bottom so it never competes
|
|
with the name sitting on top of it. */
|
|
.grid {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: -1;
|
|
background-image:
|
|
repeating-linear-gradient(
|
|
to right,
|
|
color-mix(in srgb, var(--color-border-strong) 55%, transparent) 0 1px,
|
|
transparent 1px 9vw
|
|
),
|
|
repeating-linear-gradient(
|
|
to bottom,
|
|
color-mix(in srgb, var(--color-border-strong) 40%, transparent) 0 1px,
|
|
transparent 1px 9vw
|
|
);
|
|
/* Not a design token: a mask stop is an alpha value, and swapping in a
|
|
themed colour here would change nothing but the reader's expectations. */
|
|
mask-image: linear-gradient(to bottom, rgb(0 0 0) 0%, transparent 78%);
|
|
}
|
|
|
|
/* The scrim. Now that the portrait runs at near-full strength this is the only
|
|
thing keeping the wordmark readable, so it is heavier on the left (where the
|
|
type sits) and barely touches the right (where his face and the light are). */
|
|
.vignette {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: -1;
|
|
background:
|
|
linear-gradient(to right, rgb(5 5 7 / 0.94) 0%, rgb(5 5 7 / 0.34) 30%, transparent 56%),
|
|
linear-gradient(to top, var(--color-bg) 1%, rgb(5 5 7 / 0.4) 16%, transparent 48%),
|
|
radial-gradient(95% 70% at 8% 96%, rgb(5 5 7 / 0.9) 8%, transparent 62%);
|
|
}
|
|
|
|
.inner {
|
|
width: 100%;
|
|
}
|
|
|
|
.eyebrow {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.9rem;
|
|
margin: 0 0 clamp(0.75rem, 2vw, 1.5rem);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.rule {
|
|
display: block;
|
|
width: clamp(2rem, 8vw, 7rem);
|
|
height: 1px;
|
|
background: var(--color-accent);
|
|
transform-origin: left;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.rule {
|
|
animation: extend 1.2s var(--ease-out) 0.5s both;
|
|
}
|
|
}
|
|
|
|
@keyframes extend {
|
|
from {
|
|
transform: scaleX(0);
|
|
}
|
|
to {
|
|
transform: scaleX(1);
|
|
}
|
|
}
|
|
|
|
.name {
|
|
/* line-height below 1 lets the caps overshoot their box; the padding keeps
|
|
the top line clear of the eyebrow above it. */
|
|
margin: 0;
|
|
padding-top: 0.06em;
|
|
font-size: var(--text-hero);
|
|
font-weight: 700;
|
|
line-height: 0.82;
|
|
letter-spacing: var(--tracking-hero);
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.line {
|
|
display: block;
|
|
}
|
|
|
|
/* Second line in outline only. The solid/hollow pair is what makes the name
|
|
read as a mark rather than as a heading. */
|
|
.outline {
|
|
color: transparent;
|
|
-webkit-text-stroke: 1.5px var(--color-text);
|
|
/* Safari/WebKit lose the glyph entirely at some sizes without this pairing. */
|
|
paint-order: stroke fill;
|
|
}
|
|
|
|
@supports not (-webkit-text-stroke: 1px black) {
|
|
.outline {
|
|
color: var(--color-text-muted);
|
|
}
|
|
}
|
|
|
|
.corners {
|
|
position: absolute;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.corners span {
|
|
position: absolute;
|
|
}
|
|
|
|
.tl {
|
|
top: 5.5rem;
|
|
left: var(--gutter);
|
|
}
|
|
|
|
.tr {
|
|
top: 5.5rem;
|
|
right: var(--gutter);
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
.bl {
|
|
bottom: 2rem;
|
|
left: var(--gutter);
|
|
}
|
|
|
|
.scroll {
|
|
position: absolute;
|
|
right: var(--gutter);
|
|
bottom: 2rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
min-height: 44px;
|
|
color: var(--color-text-muted);
|
|
transition: color var(--dur-fast) var(--ease-out);
|
|
}
|
|
|
|
.scroll:hover {
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.scrollLine {
|
|
display: block;
|
|
width: 3.5rem;
|
|
height: 1px;
|
|
background: currentColor;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.scrollLine {
|
|
animation: sweep 2.2s var(--ease-out) infinite;
|
|
}
|
|
}
|
|
|
|
/* Reads as a needle travelling — a small nod to the machine. */
|
|
@keyframes sweep {
|
|
0% {
|
|
transform: scaleX(0.15);
|
|
transform-origin: left;
|
|
}
|
|
50% {
|
|
transform: scaleX(1);
|
|
transform-origin: left;
|
|
}
|
|
51% {
|
|
transform: scaleX(1);
|
|
transform-origin: right;
|
|
}
|
|
100% {
|
|
transform: scaleX(0.15);
|
|
transform-origin: right;
|
|
}
|
|
}
|
|
|
|
/* On short/narrow screens the corner readouts collide with the name. The name
|
|
is the priority; the instrument panel is decoration. */
|
|
@media (max-width: 48rem), (max-height: 40rem) {
|
|
.bl,
|
|
.tl {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* Primary action on the first screen. Filled, so it reads as the one thing to
|
|
do against a page made entirely of hairlines. */
|
|
.cta {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-top: clamp(1.5rem, 4vw, 2.5rem);
|
|
padding: clamp(0.9rem, 2vw, 1.15rem) clamp(1.4rem, 3vw, 2rem);
|
|
min-height: 52px;
|
|
background: var(--color-accent);
|
|
color: var(--color-on-accent);
|
|
font-weight: 700;
|
|
font-size: clamp(0.95rem, 1.8vw, 1.15rem);
|
|
letter-spacing: -0.02em;
|
|
text-transform: uppercase;
|
|
transition: filter var(--dur-fast) var(--ease-out);
|
|
}
|
|
|
|
.cta:hover,
|
|
.cta:focus-visible {
|
|
filter: brightness(1.12);
|
|
}
|
|
|
|
.ctaArrow {
|
|
font-size: 1.2em;
|
|
transition: transform var(--dur-mid) var(--ease-out);
|
|
}
|
|
|
|
.cta:hover .ctaArrow,
|
|
.cta:focus-visible .ctaArrow {
|
|
transform: translateX(0.35rem);
|
|
}
|
|
|
|
/* The sticky bar takes over on phones, so the hero button would be a duplicate
|
|
sitting a thumb's width away from it. */
|
|
@media (max-width: 60rem) {
|
|
.cta {
|
|
margin-top: clamp(1.25rem, 3vw, 2rem);
|
|
}
|
|
}
|