Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
536 lines (506 loc) · 13.9 KB
/
Copy pathstyle.css
File metadata and controls
536 lines (506 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
/* Self-hosted Fraunces + Jost (latin / latin-ext only, opsz 144). Removes the
render-blocking fonts.googleapis.com round-trip that delayed #headline LCP.
Preload of fraunces-italic-latin.woff2 in index.html starts the LCP face
in parallel with this stylesheet. Noto Serif SC for zh stays on Google Fonts
and is injected from script.js only when Chinese is active. */
@font-face {
font-family: "Fraunces";
font-style: italic;
font-weight: 400 600;
font-display: swap;
src: url("fonts/fraunces-italic-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Fraunces";
font-style: italic;
font-weight: 400 600;
font-display: swap;
src: url("fonts/fraunces-italic-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Fraunces";
font-style: normal;
font-weight: 400 600;
font-display: swap;
src: url("fonts/fraunces-normal-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Fraunces";
font-style: normal;
font-weight: 400 600;
font-display: swap;
src: url("fonts/fraunces-normal-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Jost";
font-style: normal;
font-weight: 400 600;
font-display: swap;
src: url("fonts/jost-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Jost";
font-style: normal;
font-weight: 400 600;
font-display: swap;
src: url("fonts/jost-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
--pine: #0f2a1f;
--pine-light: #1d4a35;
--cream: #f6efe0;
--gold: #e9c46a;
--gold-light: #f4dc9a;
--ribbon: #a8202e;
--display: "Fraunces", Georgia, serif;
--body: "Jost", Futura, "Century Gothic", sans-serif;
}
[hidden] {
display: none !important;
}
html,
body {
margin: 0;
background: var(--pine);
}
/* Three stacked rows: the hero block is centred in the free space, the reserved
sleigh band sits underneath it, and the credit line is the last row so it is
anchored to the bottom of the viewport. --santa-band is the height the sleigh
animation needs, so the footer never overlaps it. */
main {
--santa-band: clamp(120px, 17vh, 160px);
position: relative;
/* Clip sideways for the off-screen baubles, but let the page grow and scroll on
short viewports instead of clipping the footer text. */
overflow-x: clip;
overflow-y: visible;
min-height: 100vh;
min-height: 100svh;
box-sizing: border-box;
padding: 88px 24px 0;
display: grid;
grid-template-rows: minmax(min-content, 1fr) var(--santa-band) auto;
justify-items: center;
color: var(--cream);
font-family: var(--body);
}
/* Background: bokeh lights and two out-of-focus baubles.
Clipped to the page box so the oversized glow never adds scroll height. */
.decor {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
}
/* Bokeh as radial gradients rather than filter: blur, which Safari clips to a visible rectangle */
.bokeh {
position: absolute;
border-radius: 50%;
}
.b1 { top: 4%; left: 2%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(233, 196, 106, 0.16), transparent 65%); }
.b2 { top: 12%; right: 5%; width: 220px; height: 220px; background: radial-gradient(circle, rgba(244, 220, 154, 0.22), transparent 65%); }
.b3 { bottom: 10%; left: 10%; width: 180px; height: 180px; background: radial-gradient(circle, rgba(244, 220, 154, 0.18), transparent 65%); }
.b4 { bottom: 0; right: 12%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(192, 57, 43, 0.14), transparent 65%); }
.glow { top: 46%; left: 48%; width: 900px; height: 900px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(29, 74, 53, 0.75), transparent 60%); }
/* Santa's sleigh: flies across the reserved band below the content, left to right, then waits briefly off-screen.
The band is its own grid row, so it never overlaps the hero or the closing line. */
.santa-band {
grid-row: 2;
justify-self: stretch;
align-self: end;
position: relative;
width: 100%;
min-height: var(--santa-band);
overflow: hidden;
}
.sleigh {
position: absolute;
top: 50%;
left: 0;
width: min(520px, 80vw);
color: var(--gold-light);
opacity: 0.22;
filter: blur(2px);
transform: translate(-100%, -50%);
animation: fly 20s linear infinite;
}
.sleigh svg {
display: block;
width: 100%;
height: auto;
}
@keyframes fly {
0% { transform: translate(-100%, -50%); }
46% { transform: translate(calc(50vw - 50%), -50%); }
92%, 100% { transform: translate(100vw, -50%); }
}
@media (prefers-reduced-motion: reduce) {
.sleigh {
animation: none;
left: 50%;
transform: translate(-50%, -50%);
}
}
.bauble {
position: absolute;
top: 0;
display: flex;
flex-direction: column;
align-items: center;
}
.bauble .string {
width: 2px;
background: #c9a14a;
}
.bauble .ball {
border-radius: 50%;
}
.bauble-red {
right: 7%;
filter: blur(5px);
opacity: 0.85;
}
.bauble-red .string { height: 120px; }
.bauble-red .cap {
width: 28px;
height: 18px;
border-radius: 4px 4px 2px 2px;
background: linear-gradient(90deg, #8a6a2a, var(--gold-light) 45%, #b8913e);
}
.bauble-red .ball {
width: 190px;
height: 190px;
margin-top: -4px;
background: radial-gradient(circle at 34% 30%, #ff9a8a 0%, #c0392b 22%, #8c1c2b 58%, #3a0a10 100%);
box-shadow: inset -18px -24px 40px rgba(0, 0, 0, 0.35), 0 0 60px rgba(192, 57, 43, 0.35);
}
.bauble-gold {
left: 9%;
filter: blur(11px);
opacity: 0.55;
}
.bauble-gold .string { height: 220px; }
.bauble-gold .cap {
width: 32px;
height: 20px;
border-radius: 3px;
background: #c9a14a;
}
.bauble-gold .ball {
width: 218px;
height: 218px;
margin-top: -2px;
background: radial-gradient(circle at 34% 30%, #fff1c4 0%, var(--gold) 25%, #a67c2e 65%, #3d2a0a 100%);
}
/* Language switch */
.lang-switch {
position: absolute;
top: 20px;
right: 20px;
display: flex;
gap: 4px;
padding: 4px;
border: 1px solid rgba(233, 196, 106, 0.35);
border-radius: 999px;
}
.lang-switch a {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 44px;
min-height: 36px;
box-sizing: border-box;
padding: 0 10px;
border-radius: 999px;
background: transparent;
color: var(--gold);
text-decoration: none;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.12em;
}
.lang-switch a[aria-current="true"] {
background: var(--gold);
color: var(--pine);
}
.lang-switch a:focus-visible {
outline: 2px solid var(--gold-light);
outline-offset: 2px;
}
.version-tag-button:focus-visible,
.version-tag-changelog:focus-visible {
outline: 2px solid var(--gold-light);
outline-offset: 2px;
border-radius: 3px;
}
/* Hero block: optically centred in the free space above the sleigh band */
.hero {
grid-row: 1;
position: relative;
align-self: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 40px;
width: 100%;
max-width: 1100px;
text-align: center;
}
/* Date reads as a quiet caption above the headline on every viewport: small,
muted, wide-tracked, with real breathing room so it never competes with
"Bijna Kerst". Markup order is date-then-headline, so no reorder rules. */
.title-group {
display: flex;
flex-direction: column;
align-items: center;
gap: 18px;
}
.eyebrow {
margin: 0;
font-size: 10px;
font-weight: 500;
line-height: 1.5;
letter-spacing: 0.26em;
text-transform: uppercase;
color: rgba(246, 239, 224, 0.5);
}
h1 {
margin: 0;
font-family: var(--display);
font-style: italic;
font-weight: 600;
font-variation-settings: "SOFT" 100, "WONK" 1;
font-size: clamp(48px, 8.5vw, 112px);
line-height: 1.02;
letter-spacing: -0.015em;
text-wrap: balance;
}
/* Chinese: Fraunces has no CJK glyphs, and a slanted fallback looks wrong, so use an upright serif */
:lang(zh) h1,
:lang(zh) .christmas,
:lang(zh) footer > p {
font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
font-style: normal;
letter-spacing: 0.04em;
}
:lang(zh) h1 {
font-weight: 700;
}
:lang(zh) .tile .label {
letter-spacing: 0.12em;
}
/* Chinese glyphs are already wide; keep the caption feel without the
Latin tracking, which reads as gaps between CJK characters. */
:lang(zh) .eyebrow {
letter-spacing: 0.16em;
}
.countdown {
display: flex;
flex-direction: column;
align-items: center;
gap: 24px;
width: 100%;
}
.weeks {
margin: 0;
font-size: clamp(19px, 2vw, 24px);
line-height: 1.4;
color: rgba(246, 239, 224, 0.9);
text-wrap: balance;
}
.weeks strong {
font-weight: 600;
color: var(--gold);
}
.ribbon-row {
position: relative;
width: 100%;
}
.ribbon {
position: absolute;
top: 50%;
left: 50%;
width: 100vw;
height: 22px;
transform: translate(-50%, -50%);
background: var(--ribbon);
border-top: 1px solid rgba(233, 196, 106, 0.7);
border-bottom: 1px solid rgba(233, 196, 106, 0.7);
}
.tiles {
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 16px;
width: 100%;
}
.tile {
flex: 1 1 140px;
max-width: 196px;
box-sizing: border-box;
padding: 22px 12px 20px;
border: 1px solid rgba(233, 196, 106, 0.55);
border-radius: 16px;
background: var(--pine);
box-shadow: 0 12px 28px rgba(4, 16, 10, 0.5);
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.tile .value {
font-family: var(--display);
font-weight: 500;
font-variation-settings: "SOFT" 100, "opsz" 144;
font-size: clamp(48px, 6vw, 76px);
line-height: 0.9;
font-variant-numeric: lining-nums tabular-nums;
}
.tile .label {
font-size: 12px;
font-weight: 500;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--gold);
}
.christmas {
margin: 0;
font-family: var(--display);
font-style: italic;
font-size: clamp(32px, 4.5vw, 52px);
color: var(--gold);
}
/* Closing line; reserves two lines so switching language doesn't shift the page.
Sits in the bottom band, under the sleigh's flight path. */
/* Closing line + credit; the last row of the page, anchored to the bottom edge.
Reserves two lines so switching language doesn't shift the page. */
footer {
grid-row: 3;
position: relative;
justify-self: stretch;
align-self: end;
box-sizing: border-box;
width: 100%;
max-width: 560px;
margin: 0 auto;
padding: clamp(8px, 1.6vh, 16px) 0 clamp(10px, 1.6vh, 16px);
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
gap: clamp(14px, 2.4vh, 32px);
}
footer > p {
margin: 0;
min-height: 3em;
font-family: var(--display);
font-style: italic;
font-weight: 400;
font-variation-settings: "SOFT" 100, "WONK" 1;
font-size: 18px;
line-height: 1.5;
text-align: center;
color: rgba(246, 239, 224, 0.72);
text-wrap: balance;
}
/* Short viewports (small laptops in landscape): trim the surrounding space before
the hero shrinks, so the block still reads as centred above the sleigh band. */
@media (max-height: 780px) {
main {
--santa-band: 120px;
padding: 64px 24px 10px;
}
.hero {
gap: 26px;
}
.countdown {
gap: 18px;
}
footer {
gap: 18px;
}
footer > p {
min-height: 0;
font-size: 16px;
}
}
@media (max-height: 620px) {
main {
padding: 48px 20px 0;
}
.hero {
gap: 18px;
}
.tile {
padding: 14px 10px 12px;
}
.santa-band {
min-height: 120px;
}
footer {
padding-bottom: 8px;
}
footer > p {
font-size: 15px;
}
}
/* Narrow phones: the tiles wrap to two rows, so tighten the vertical rhythm too. */
@media (max-width: 480px) {
main {
/* The date is the first element now, so it has to clear the language pill
itself rather than the headline doing it. */
padding: 86px 18px 0;
}
.hero {
gap: 28px;
}
footer {
gap: 16px;
}
/* Slightly tighter eyebrow rhythm on narrow phones; still a caption, still
clearly separated from the language pill. */
.title-group {
gap: 14px;
}
}
/* Very narrow phones: the date string is long enough to wrap at 0.26em tracking,
which costs a whole extra line. Tighten the tracking so it stays one line and
keeps reading as a wide-tracked caption. */
@media (max-width: 400px) {
.eyebrow {
letter-spacing: 0.16em;
}
}
/* Short phones (e.g. 360x640): the date now sits above the headline, so the
top padding must still clear the pill; reclaim space from the surrounding
rhythm instead — proportionally, not by shrinking any text. */
@media (max-width: 480px) and (max-height: 720px) {
main {
padding-top: 82px;
/* The sleigh renders 67px tall at these widths, so the reserved band can be
much smaller here without clipping it. */
--santa-band: 76px;
}
.hero {
gap: 18px;
}
.countdown {
gap: 12px;
}
footer {
gap: 10px;
}
}
.copyright {
font-size: 9px;
letter-spacing: 0.08em;
/* 0.55 alpha keeps ~5:1 contrast on the pine background; 0.26 was ~2.2:1 */
color: rgba(246, 239, 224, 0.55);
}