aboutsummaryrefslogtreecommitdiff
path: root/public/app.css
blob: 44b7c7f7c7057a570a3a8af11eba53ec4d21340e (plain)
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
:root {
  --bg: #0e0f13;
  --tile: #1b1d24;
  --ring: #7dd3fc;
  --ink: #e6e8ee;
  --muted: #8b90a0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
}

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

#world {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(0, 0);
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.tile {
  position: absolute;
  border-radius: 6px;
  background: var(--tile);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
  cursor: pointer;
  transition: box-shadow .2s;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; }
.tile.lock { animation: lock .5s cubic-bezier(.22, 1, .36, 1); }

@keyframes lock {
  0%   { transform: scale(.2); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.tile.current {
  box-shadow: 0 0 0 2px var(--ring), 0 0 26px 2px rgba(125, 211, 252, .4);
}

.nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.tile.current:hover .nav { opacity: 1; }

.nav-btn {
  position: absolute;
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .95);
  color: #17181d;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .5);
  transition: transform .12s, background .12s, box-shadow .12s;
}
.nav-btn svg { width: 22px; height: 22px; display: block; }
.nav-btn:hover { transform: scale(1.15); background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .55); }
.nav-btn[data-dir="N"] { top: 0; left: 50%; translate: -50% -50%; }
.nav-btn[data-dir="E"] { top: 50%; right: 0; translate: 50% -50%; }
.nav-btn[data-dir="S"] { bottom: 0; left: 50%; translate: -50% 50%; }
.nav-btn[data-dir="W"] { top: 50%; left: 0; translate: -50% -50%; }

.nav-label {
  position: absolute;
  left: 50%;
  translate: -50%;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
  background: rgba(18, 19, 24, .92);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 3px 10px;
  opacity: 0;
  transition: opacity .12s;
  pointer-events: none;
}
.nav-btn[data-dir="N"] .nav-label { bottom: calc(100% + 8px); }
.nav-btn[data-dir="S"] .nav-label { top: calc(100% + 8px); }
.nav-btn[data-dir="E"] .nav-label { top: 50%; left: calc(100% + 10px); translate: 0 -50%; }
.nav-btn[data-dir="W"] .nav-label { top: 50%; right: calc(100% + 10px); translate: 0 -50%; }
.nav-btn:hover .nav-label { opacity: 1; }

#flash {
  position: fixed;
  top: 18px;
  left: 50%;
  translate: -50%;
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--ink);
  background: rgba(14, 15, 19, .88);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  padding: 6px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
#flash.show { opacity: 1; }

#splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  background: var(--bg);
  z-index: 10;
  transition: opacity .4s, visibility .4s;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#splash h1 { margin: 0; font-size: 44px; font-weight: 300; letter-spacing: .18em; }
#splash h1 .dot { color: var(--ring); }
#splash p { max-width: 34ch; color: var(--muted); margin: 0; font-size: 15px; line-height: 1.6; }
#start {
  margin-top: 10px;
  padding: 10px 34px;
  font-size: 15px;
  letter-spacing: .12em;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
#start:hover { border-color: var(--ring); background: rgba(125, 211, 252, .08); }

@media (prefers-reduced-motion: reduce) {
  #world { transition: none; }
  .tile.lock { animation: none; }
  #flash { transition: none; }
}