Repository navigation
Expand file tree
/
Copy pathhero.css
More file actions
277 lines (263 loc) · 11.2 KB
/
Copy pathhero.css
File metadata and controls
277 lines (263 loc) · 11.2 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
/* ---------- standalone countdown ----------
It sits above the title card on the page's own dark ground, deliberately
off the castle photograph, and is sized to be the first thing you read. */
.cd-standalone{
width:calc(100% - 28px); max-width:1280px;
margin:clamp(12px,2vw,20px) auto clamp(12px,2vw,18px);
border-radius:22px;
background:linear-gradient(180deg,#141822,#0E121A);
border:1px solid rgba(255,255,255,.14);
box-shadow:0 18px 44px rgba(0,0,0,.45);
padding:clamp(10px,1.8vw,18px) clamp(10px,2vw,22px);
}
.cd-standalone .cd-wrap{
width:100% !important; max-width:none !important; margin:0 !important;
}
.cd-standalone .cdh{ background:none !important; border:0 !important;
box-shadow:none !important; padding:0 !important; }
/* Bigger. The digit tiles were capped at 30px; these run to 58px. */
.cd-standalone .cdh-v{ gap:4px !important; }
.cd-standalone .cdh-v b{
min-width:clamp(38px,7.4vw,74px) !important;
padding:clamp(12px,2.2vw,22px) 6px !important;
font-size:clamp(30px,6.2vw,58px) !important;
border-radius:5px !important;
}
.cd-standalone .cdh-eyebrow{
font-size:clamp(9px,1.1vw,12px) !important;
letter-spacing:.26em !important;
margin-bottom:clamp(10px,1.6vw,16px) !important;
}
.cd-standalone .cdh-k{
font-size:clamp(8.5px,.95vw,10.5px) !important;
margin-top:clamp(9px,1.3vw,13px) !important;
color:#96A1B8 !important;
}
.cd-standalone .cdh-foot{ margin-top:clamp(10px,1.6vw,16px) !important; }
.cd-standalone .cdh-foot span{ font-size:clamp(9px,1.05vw,11.5px) !important; }
@media (max-width:760px){
.cd-standalone{ width:calc(100% - 16px); border-radius:18px; }
.cd-standalone .cdh-v b{ min-width:clamp(34px,9vw,52px) !important; }
}
/* Title-card hero (.tcard — namespaced: index.html already
defines a .hero rule that would centre this text) + five-park index — the top of the page.
Options 1 and 3 from designs/intro-options.html, merged: the hero names the
trip, the park index is its bottom edge and doubles as the navigation the
page otherwise has none of.
CONTRAST, measured rather than guessed. Against the actual pixels of
mk-bg.jpg behind each text band, taking the brightest 1% as the worst case
and #FFFBF2 as the ink:
scrim eyebrow title dates countdown bar
0.36 3.3:1 2.9:1 2.6:1 2.4:1 <- the unreadable version
0.50 4.9:1 4.4:1 3.9:1 3.7:1
0.64 7.6:1 7.0:1 6.3:1 6.1:1 <- shipped
Re-measured after the countdown moved out of the card and the copy rose in
the frame: eyebrow 5.2:1, title 7.2:1, dates 5.7:1.
The copy block sits between 16% and 65% of the hero's height, so the ramp
below holds .64–.66 across exactly that range and only lightens above it,
where the castle is and no text goes. Every text colour here is opaque; no
translucent white on a photograph. */
.tcard{
position:relative;
margin:0 auto;
width:calc(100% - 28px);
max-width:1280px;
border-radius:24px;
overflow:hidden;
isolation:isolate;
background:#080B0F;
}
.tc-bg{
position:absolute; inset:0; width:100%; height:100%;
object-fit:cover; object-position:50% 34%;
z-index:0;
}
/* Two stacked scrims: an overall knock-down so nothing blows out, then a
bottom-weighted ramp that carries the type. */
.tc-scrim{
position:absolute; inset:0; z-index:1; pointer-events:none;
background:
linear-gradient(180deg,
rgba(6,9,13,.32) 0%,
rgba(6,9,13,.52) 8%,
rgba(6,9,13,.65) 13%,
rgba(6,9,13,.66) 30%,
rgba(6,9,13,.66) 60%,
rgba(6,9,13,.74) 74%,
rgba(6,9,13,.90) 100%);
}
.tc-in{
position:relative; z-index:2;
/* The countdown sits above the card and the park index below it, so the
headline now has the whole frame. */
padding:clamp(54px,9vw,110px) clamp(20px,4vw,52px) clamp(48px,8vw,96px);
}
.tc-eyebrow{
margin:0 0 14px;
font:800 clamp(9px,1.5vw,11px)/1.5 'JetBrains Mono', ui-monospace, monospace;
letter-spacing:.32em; text-transform:uppercase;
color:#8FE3AE; /* opaque, not white-at-82% */
text-shadow:0 1px 10px rgba(0,0,0,.85);
}
.tc-title{
margin:0;
font:900 clamp(38px,8.6vw,84px)/.95 'Playfair Display', Georgia, serif;
letter-spacing:-.02em;
color:#FFFBF2;
text-wrap:balance;
text-shadow:0 2px 4px rgba(0,0,0,.72), 0 10px 38px rgba(0,0,0,.6);
}
.tc-rule{
display:block; width:clamp(48px,7vw,74px); height:3px; border-radius:2px;
background:#39B36A; margin:clamp(16px,2.4vw,24px) 0 0;
box-shadow:0 1px 8px rgba(0,0,0,.6);
}
.tc-dates{
margin:clamp(14px,2vw,20px) 0 0;
font:600 clamp(13px,1.9vw,17px)/1.55 ui-sans-serif,-apple-system,"Segoe UI",system-ui,sans-serif;
color:#EDE7DA; /* opaque */
text-shadow:0 1px 3px rgba(0,0,0,.8), 0 4px 18px rgba(0,0,0,.6);
max-width:34ch;
}
/* ---------- Fireworks Finale: song launcher + language chips (option A) ----------
Paused, the card looks as it always did; playing, the photo drops to night
and song-fx.js draws fireworks on .tc-fx. --lvl is the song's loudness, 0-1. */
.tc-bg{ transition:filter 1.6s ease; }
.tcard.tc-night .tc-bg{ filter:brightness(.36) saturate(1.35) contrast(1.1); }
.tc-fx{ position:absolute; inset:0; width:100%; height:100%; z-index:3; pointer-events:none; }
.tc-in.tc-swap{ animation:tc-swap .45s ease; }
@keyframes tc-swap{ from{ filter:blur(10px); opacity:0; } to{ filter:none; opacity:1; } }
.tc-song{
position:absolute; right:26px; bottom:30px; z-index:5;
display:flex; align-items:center; gap:14px; padding:10px 24px 10px 10px;
border-radius:999px; cursor:pointer; color:#FFFBF2; text-align:left;
background:rgba(8,10,16,.62); border:1px solid rgba(255,210,122,.55);
-webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
box-shadow:0 18px 40px rgba(0,0,0,.5);
}
.tc-orb{
position:relative; flex:none; width:56px; height:56px; border-radius:50%;
display:grid; place-items:center; font-size:17px; color:#2a1600;
background:radial-gradient(circle at 40% 35%,#FFF4D2,#FFC24D 55%,#E07A1F);
box-shadow:0 0 calc(18px + var(--lvl,0) * 50px) rgba(255,190,80,.85);
}
.tc-orb::after{
content:''; position:absolute; inset:-7px; border-radius:50%;
border:2px solid rgba(255,210,122,.75); animation:tc-ring 1.8s ease-out infinite;
}
.tc-song[aria-pressed="true"] .tc-orb::after{ animation:none; opacity:0; }
@keyframes tc-ring{ from{ transform:scale(.85); opacity:1; } to{ transform:scale(1.5); opacity:0; } }
.tc-song-txt b{ display:block; font:800 17px/1.2 ui-sans-serif,-apple-system,"Segoe UI",system-ui,sans-serif; }
.tc-song-txt small{ font:600 11.5px/1 ui-sans-serif,-apple-system,"Segoe UI",system-ui,sans-serif; color:#FFD27A; }
/* i18n.js's switch, restyled as three firework shells (overrides trip-tools.css). */
.tcard .lang-sw{
top:22px; right:22px; gap:10px; overflow:visible; border:0; border-radius:0;
background:none; -webkit-backdrop-filter:none; backdrop-filter:none;
}
.tcard .lang-sw button{
--c:#FFD27A; width:78px; min-height:0; padding:10px 0; border-radius:18px;
display:grid; justify-items:center; gap:4px; color:#fff; letter-spacing:0;
background:rgba(8,10,16,.55); border:1px solid rgba(255,255,255,.22);
-webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
transition:transform .25s, box-shadow .25s, border-color .25s;
}
.tcard .lang-sw button::before{
content:''; width:9px; height:9px; border-radius:50%; margin-bottom:2px;
background:var(--c); box-shadow:0 0 12px var(--c); opacity:.35;
}
.tcard .lang-sw button span{ font:800 15px/1 ui-sans-serif,-apple-system,"Segoe UI",system-ui,sans-serif; letter-spacing:.08em; }
.tcard .lang-sw button small{ font:600 10px/1 ui-sans-serif,-apple-system,"Segoe UI",system-ui,sans-serif; opacity:.75; }
.tcard .lang-sw button[aria-pressed="true"]{
background:rgba(8,10,16,.55); color:#fff; border-color:var(--c);
box-shadow:0 0 0 1px var(--c), 0 0 30px -4px var(--c); transform:translateY(-2px);
}
.tcard .lang-sw button[aria-pressed="true"]::before{ opacity:1; }
.tcard .lang-sw [data-lang="es"]{ --c:#FF7AC0; }
.tcard .lang-sw [data-lang="fr"]{ --c:#7FD8FF; }
/* ---------- five-park index: its own section under the card ---------- */
.parks{
display:block;
width:calc(100% - 28px); max-width:1280px;
margin:clamp(12px,2vw,18px) auto;
border-radius:22px;
background:linear-gradient(180deg,#141822,#0E121A);
border:1px solid rgba(255,255,255,.14);
box-shadow:0 18px 44px rgba(0,0,0,.45);
padding:clamp(13px,2vw,20px) clamp(12px,2vw,20px) clamp(14px,2.2vw,20px);
}
.parks-hd{
display:flex; flex-wrap:wrap; gap:6px 14px; align-items:baseline;
padding:0 4px clamp(11px,1.6vw,15px);
}
.parks-hd b{
font:800 10px/1 'JetBrains Mono', ui-monospace, monospace;
letter-spacing:.26em; text-transform:uppercase; color:#8FE3AE;
}
.parks-hd span{
font:600 11px/1 'JetBrains Mono', ui-monospace, monospace;
letter-spacing:.1em; color:#96A1B8;
}
.pk-row{
display:grid; grid-template-columns:repeat(5,1fr); gap:clamp(7px,1.3vw,12px);
}
.pk-card{
position:relative; display:block; border-radius:14px; overflow:hidden;
aspect-ratio:4/5; text-decoration:none;
border:1px solid rgba(255,255,255,.18);
background:#0d1219;
transition:transform .22s ease, border-color .22s ease;
}
.pk-card:hover, .pk-card:focus-visible{
transform:translateY(-3px); border-color:#39B36A; outline:none;
}
.pk-card img{
position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
}
/* Same contrast rule as the hero: these captions sit on photos too. */
.pk-card::after{
content:''; position:absolute; inset:0;
background:linear-gradient(180deg,
rgba(4,7,10,.20) 0%, rgba(4,7,10,.52) 46%, rgba(4,7,10,.92) 100%);
}
.pk-txt{ position:absolute; left:0; right:0; bottom:0; z-index:2; padding:10px 9px; }
.pk-day, .pk-name, .pk-meta{ display:block; }
.pk-day{
font:800 8.5px/1.2 'JetBrains Mono', ui-monospace, monospace;
letter-spacing:.2em; color:#8FE3AE;
}
.pk-name{
margin:6px 0 0; color:#FFFBF2;
font:800 clamp(10.5px,1.55vw,14px)/1.2 ui-sans-serif,-apple-system,"Segoe UI",system-ui,sans-serif;
text-shadow:0 1px 3px rgba(0,0,0,.8);
}
.pk-meta{
margin:5px 0 0; color:#CFC8BA;
font:600 8.5px/1.3 'JetBrains Mono', ui-monospace, monospace;
}
@media (max-width:760px){
.tcard{ width:calc(100% - 16px); border-radius:18px; }
.parks{ width:calc(100% - 16px); border-radius:18px; }
.tc-in{ padding-top:clamp(96px,26vw,110px); } /* clears the language chips */
.tc-dates br{ display:none; }
.tc-in{ padding-bottom:22px; }
.tcard .lang-sw{ top:14px; left:14px; right:14px; justify-content:center; }
.tc-song{ position:relative; right:auto; bottom:auto; width:calc(100% - 32px); margin:0 16px 18px; }
/* Five tiles do not fit a phone; swipe them instead of shrinking to stamps. */
.pk-row{
display:flex; overflow-x:auto; scroll-snap-type:x mandatory;
padding-bottom:8px; scrollbar-width:none;
}
.pk-row::-webkit-scrollbar{ display:none; }
.pk-card{ flex:0 0 40vw; max-width:170px; scroll-snap-align:start; }
}
@media (prefers-reduced-motion: reduce){
.pk-card{ transition:none; }
.tc-bg, .tcard .lang-sw button{ transition:none; }
.tc-orb::after, .tc-in.tc-swap{ animation:none; }
}
@media print{
.tc-bg, .tc-scrim, .tc-fx, .tc-song, .tcard .lang-sw{ display:none; }
.tcard{ border:1px solid #999; }
.tc-title, .tc-dates{ color:#000; text-shadow:none; }
.tc-eyebrow, .parks-hd b{ color:#333; }
}