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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
/* =============================================================================

   TRANS-TEMPORAL EXPRESS β€” CSS Reference Stylesheet

   

   This is a REFERENCE stylesheet showing the developer how to implement

   the visual design system. It covers:

   - Design tokens / CSS variables

   - Cockpit frame layout

   - Era sign styling

   - Animation keyframes for all sequences

   - State-driven transitions

   - Overlay compositing

   

   The developer should integrate these patterns into the existing

   cockpit.css, adapting to the current DOM structure.

   ============================================================================= */

/* ─── DESIGN TOKENS ─── */
:root {
  /* Colors */
  --tte-brass: #C4943D;
  --tte-amber: #D4A843;
  --tte-burgundy: #6B2D3E;
  --tte-copper: #B87333;
  --tte-cyan: #8ED8D1;
  --tte-cream: #F5E6C8;
  --tte-dark: #1A0F08;
  --tte-darker: #0A0605;
  --tte-mahogany: #2A1810;
  
  /* Glows */
  --tte-glow-amber: rgba(212, 168, 67, 0.4);
  --tte-glow-cyan: rgba(142, 216, 209, 0.4);
  --tte-glow-brass: 0 0 20px rgba(196, 148, 61, 0.3);
  
  /* Typography */
  --tte-font-heading: 'Playfair Display', Georgia, serif;
  --tte-font-body: 'Outfit', system-ui, sans-serif;
  --tte-font-mono: 'JetBrains Mono', monospace;
  
  /* Timing */
  --tte-fast: 0.3s ease;
  --tte-medium: 0.8s ease;
  --tte-slow: 2s ease-in-out;
  --tte-travel-progress: 0;
}


/* ─── COCKPIT LAYOUT ─── */

/* The main cockpit container fills the viewport */
.tte-cockpit {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--tte-darker);
}

/* Viewport β€” the windshield area where world/travel content displays */
.tte-viewport {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}

.tte-viewport-content {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--tte-slow);
}

/* Cockpit frame overlay β€” positioned OVER the viewport */
/* This is the window arch, dashboard, and cab interior border */
.tte-cockpit-frame {
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none; /* Click-through so viewport is interactive */
  /* 

   * OPTION A: Use the generated cockpit_frame.png

   * background: url('/file=static/img/cockpit/cockpit_frame.png') center/cover no-repeat;

   *

   * OPTION B (RECOMMENDED): Build with CSS for flexibility

   */
}

/* CSS-built cockpit frame (recommended approach) */
.tte-cockpit-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Create the window arch shape with gradients */
  background:
    /* Top arch shadow */
    radial-gradient(ellipse 120% 30% at 50% 0%, var(--tte-mahogany) 0%, transparent 70%),
    /* Left panel */
    linear-gradient(90deg, var(--tte-mahogany) 0%, transparent 12%),
    /* Right panel */
    linear-gradient(270deg, var(--tte-mahogany) 0%, transparent 12%),
    /* Bottom dashboard */
    linear-gradient(0deg, var(--tte-dark) 0%, var(--tte-mahogany) 15%, transparent 35%);
  z-index: 100;
  pointer-events: none;
}

/* Brass trim on the window arch */
.tte-cockpit-frame::after {
  content: '';
  position: absolute;
  inset: 5% 8%;
  border: 3px solid var(--tte-brass);
  border-radius: 50% 50% 5% 5% / 30% 30% 5% 5%;
  box-shadow: 
    inset 0 0 30px rgba(196, 148, 61, 0.15),
    0 0 15px rgba(196, 148, 61, 0.1);
  z-index: 101;
  pointer-events: none;
}


/* ─── CHRONO-THROTTLE ─── */

.tte-throttle {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: 120px;
  height: 200px;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tte-throttle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--tte-glow-amber));
}

/* Throttle states */
.tte-throttle[data-direction="future"] {
  transform: translateX(-50%) rotate(-25deg);
}

.tte-throttle[data-direction="neutral"] {
  transform: translateX(-50%) rotate(0deg);
}

.tte-throttle[data-direction="past"] {
  transform: translateX(-50%) rotate(25deg);
}

/* Sparks on throttle activation */
.tte-throttle.active::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: url('/file=static/img/overlays/spark_particles.png') center/contain no-repeat;
  mix-blend-mode: screen;
  animation: tte-spark-burst 0.8s ease-out forwards;
  pointer-events: none;
}


/* ─── COMM SCREEN ─── */

.tte-comm-screen {
  position: absolute;
  bottom: 8%;
  right: 10%;
  width: 140px;
  height: 100px;
  z-index: 120;
}

.tte-comm-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Pulse when character is speaking */
.tte-comm-screen.speaking {
  animation: tte-comm-pulse 0.5s ease-in-out infinite alternate;
}


/* ─── GAUGE CLUSTER ─── */

.tte-gauges {
  position: absolute;
  bottom: 8%;
  left: 10%;
  width: 180px;
  height: 80px;
  z-index: 120;
}

/* Haywire during travel */
.tte-state-traveling .tte-gauges {
  animation: tte-gauge-shake 0.15s ease-in-out infinite;
}


/* ─── YEAR COUNTER ─── */

.tte-year-counter {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 130;
  font-family: var(--tte-font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--tte-cream);
  text-shadow: 0 0 20px var(--tte-glow-amber);
  letter-spacing: 6px;
  text-align: center;
}

.tte-year-counter .tte-year-label {
  font-size: 0.7rem;
  font-family: var(--tte-font-body);
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--tte-brass);
  margin-bottom: 4px;
}


/* ─── ERA STATION SIGNS ─── */
/* These are dynamically created HTML elements, NOT images */

.tte-era-sign {
  position: absolute;
  top: 35%;
  z-index: 60;
  padding: 10px 28px;
  background: linear-gradient(135deg, #1a2a1a 0%, #0d1f0d 100%);
  border: 2px solid var(--tte-brass);
  border-radius: 3px;
  font-family: var(--tte-font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--tte-cream);
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
  box-shadow: var(--tte-glow-brass), inset 0 0 15px rgba(0,0,0,0.5);
  text-shadow: 0 0 8px rgba(196, 148, 61, 0.5);
  pointer-events: none;
  /* Initial position off-screen */
  transform: translateX(120vw);
}

/* Alternate sign position (some signs higher, some lower for depth) */
.tte-era-sign:nth-child(even) {
  top: 55%;
  font-size: 0.9rem;
  opacity: 0.7;
  filter: blur(1px);
}

/* Brass post under the sign */
.tte-era-sign::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 50%;
  width: 4px;
  height: 40px;
  background: linear-gradient(to bottom, var(--tte-brass), var(--tte-copper));
  transform: translateX(-50%);
}

/* Flying animation β€” FUTURE direction (signs move right-to-left) */
@keyframes tte-sign-fly-future {
  from { transform: translateX(120vw) scale(0.8); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  to   { transform: translateX(-120vw) scale(1.2); opacity: 0; }
}

/* Flying animation β€” PAST direction (signs move left-to-right) */
@keyframes tte-sign-fly-past {
  from { transform: translateX(-120vw) scale(0.8); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  to   { transform: translateX(120vw) scale(1.2); opacity: 0; }
}

.tte-era-sign.future {
  animation: tte-sign-fly-future var(--sign-speed, 1.5s) linear forwards;
}

.tte-era-sign.past {
  animation: tte-sign-fly-past var(--sign-speed, 1.5s) linear forwards;
}

/* Current era sign (idle state β€” stationary, near tracks) */
.tte-current-era-sign {
  position: absolute;
  bottom: 38%;
  right: 15%;
  z-index: 30;
  padding: 8px 20px;
  background: linear-gradient(135deg, #1a2a1a 0%, #0d1f0d 100%);
  border: 2px solid var(--tte-brass);
  border-radius: 3px;
  font-family: var(--tte-font-heading);
  font-size: 0.9rem;
  color: var(--tte-cream);
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: var(--tte-glow-brass);
  opacity: 0.8;
}


/* ─── OVERLAYS ─── */

.tte-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity var(--tte-slow);
}

/* Speed lines β€” during travel */
.tte-speed-lines {
  z-index: 50;
  background: url('/file=static/img/overlays/speed_lines.png') center/cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  animation: none;
}

.tte-state-traveling .tte-speed-lines {
  opacity: 0.7;
  animation: tte-speed-rotate 30s linear infinite;
}

/* Energy lines β€” during intro materialization */
.tte-energy-lines {
  z-index: 80;
  background: url('/file=static/img/overlays/energy_lines.png') center/cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(0.5);
}

.tte-energy-lines.active {
  opacity: 1;
  animation: tte-shockwave 1.5s ease-out forwards;
}

/* Steam cloud β€” during landing reveal */
.tte-steam-cloud {
  z-index: 90;
  background: url('/file=static/img/overlays/steam_cloud.png') center/cover no-repeat;
  opacity: 0;
}

.tte-steam-cloud.active {
  opacity: 1;
  animation: tte-steam-drift 4s ease-in-out;
}

/* Film grain overlay (pure CSS, no image needed) */
.tte-film-grain {
  z-index: 200;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
}

/* Vignette overlay (pure CSS) */
.tte-vignette {
  z-index: 150;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(10, 6, 5, 0.6) 100%);
}


/* ─── ANIMATION KEYFRAMES ─── */

/* Screen shake β€” used during braking and impacts */
@keyframes tte-screen-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-4px, 3px); }
  20% { transform: translate(4px, -2px); }
  30% { transform: translate(-3px, 4px); }
  40% { transform: translate(3px, -4px); }
  50% { transform: translate(-2px, 2px); }
  60% { transform: translate(4px, -1px); }
  70% { transform: translate(-4px, 3px); }
  80% { transform: translate(2px, -3px); }
  90% { transform: translate(-1px, 2px); }
}

/* Violent shake β€” for braking sequence */
@keyframes tte-violent-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-8px, 5px) rotate(-0.5deg); }
  20% { transform: translate(7px, -6px) rotate(0.5deg); }
  30% { transform: translate(-6px, 8px) rotate(-0.3deg); }
  40% { transform: translate(8px, -4px) rotate(0.4deg); }
  50% { transform: translate(-5px, 6px) rotate(-0.4deg); }
  60% { transform: translate(6px, -8px) rotate(0.3deg); }
  70% { transform: translate(-7px, 4px) rotate(-0.5deg); }
  80% { transform: translate(4px, -5px) rotate(0.2deg); }
  90% { transform: translate(-3px, 3px) rotate(-0.1deg); }
}

/* Speed lines rotation */
@keyframes tte-speed-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Shockwave β€” energy lines expanding */
@keyframes tte-shockwave {
  0% { transform: scale(0.3); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Comm screen pulse */
@keyframes tte-comm-pulse {
  from { filter: brightness(1) drop-shadow(0 0 5px var(--tte-glow-cyan)); }
  to { filter: brightness(1.3) drop-shadow(0 0 15px var(--tte-glow-cyan)); }
}

/* Spark burst from throttle */
@keyframes tte-spark-burst {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* Gauge shake during travel */
@keyframes tte-gauge-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Steam drift */
@keyframes tte-steam-drift {
  0% { opacity: 0; transform: translateY(5%); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(-3%); }
  100% { opacity: 0; transform: translateY(-5%); }
}

/* Idle viewport parallax drift */
@keyframes tte-idle-drift {
  0% { transform: scale(1.05) translate(0, 0); }
  33% { transform: scale(1.05) translate(-1%, 0.5%); }
  66% { transform: scale(1.05) translate(0.5%, -0.5%); }
  100% { transform: scale(1.05) translate(0, 0); }
}

/* Travel zoom β€” future (pushing forward) */
@keyframes tte-travel-zoom-future {
  from { transform: scale(1.0); }
  to { transform: scale(1.25); }
}

/* Travel zoom β€” past (pulling backward) */
@keyframes tte-travel-zoom-past {
  from { transform: scale(1.25); }
  to { transform: scale(1.0); }
}

/* Character breathing β€” subtle life */
@keyframes tte-character-breathe {
  0%, 100% { transform: scale(1.0); }
  50% { transform: scale(1.008); }
}

/* Gentle golden particle float */
@keyframes tte-particle-float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-100px) translateX(30px); opacity: 0; }
}

/* Intro ticket float */
@keyframes tte-ticket-float {
  0% { transform: scale(0.8) rotate(-5deg); opacity: 0; }
  30% { transform: scale(1) rotate(0deg); opacity: 1; }
  70% { transform: scale(1) rotate(2deg) translateY(0); }
  100% { transform: scale(0.7) rotate(0deg) translateY(200px); opacity: 0; }
}

/* Launch button pulse (dormant state) */
@keyframes tte-launch-pulse {
  0%, 100% { 
    box-shadow: 0 0 10px var(--tte-glow-amber), inset 0 0 10px rgba(212, 168, 67, 0.1);
  }
  50% { 
    box-shadow: 0 0 25px var(--tte-glow-amber), inset 0 0 20px rgba(212, 168, 67, 0.2);
  }
}


/* ─── STATE-DRIVEN TRANSITIONS ─── */

/* Dormant β€” cockpit idle, waiting for launch */
.tte-state-dormant .tte-idle-viewport {
  opacity: 1;
  animation: tte-idle-drift 20s ease-in-out infinite;
}

.tte-state-dormant .tte-launch-btn {
  animation: tte-launch-pulse 2s ease-in-out infinite;
}

/* Traveling β€” high-speed time travel */
.tte-state-traveling {
  animation: tte-screen-shake 0.3s ease-in-out infinite;
}

.tte-state-traveling .tte-idle-viewport {
  opacity: 0;
}

.tte-state-traveling .tte-travel-bg {
  opacity: 1;
}

/* Braking β€” violent stop */
.tte-state-braking {
  animation: tte-violent-shake 0.15s ease-in-out infinite;
}

/* Conversation β€” calm, world visible */
.tte-state-conversation .tte-cockpit-frame {
  filter: brightness(0.8); /* Dim frame to emphasize viewport */
}

.tte-state-conversation .tte-character {
  animation: tte-character-breathe 4s ease-in-out infinite;
}


/* ─── RESPONSIVE ─── */

@media (max-width: 860px) {
  .tte-year-counter {
    font-size: 1.8rem;
  }
  
  .tte-throttle {
    width: 80px;
    height: 140px;
  }
  
  .tte-era-sign {
    font-size: 0.9rem;
    padding: 8px 20px;
  }
}

@media (max-width: 520px) {
  .tte-year-counter {
    font-size: 1.4rem;
  }
  
  .tte-gauges,
  .tte-comm-screen {
    display: none; /* Hide on very small screens */
  }
}


/* ─── ACCESSIBILITY ─── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}