@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('vendor/fonts/anton-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Kaushan Script';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('vendor/fonts/kaushan-script-latin.woff2') format('woff2');
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0c;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Screen 1: main ---------- */

.main-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(1px) saturate(1.15) contrast(1.05);
  transition: background-image 0.5s ease;
}

.main-grain {
  position: absolute;
  inset: 0;
  background-image: url('vendor/noise.png');
  background-size: 160px 160px;
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.main-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.6) 100%);
}

.main-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 24px) 20px calc(env(safe-area-inset-bottom, 16px) + 20px);
}

.title-wordmark {
  margin: 7vh 0 0;
  text-align: center;
}

.wordmark-image {
  max-width: min(86vw, 420px);
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
}

.wordmark-generated {
  display: block;
}

.wordmark-generated[hidden],
.wordmark-image[hidden] {
  display: none;
}

.wordmark-country {
  display: block;
  font-family: 'Anton', sans-serif;
  font-size: clamp(44px, 15vw, 84px);
  line-height: 0.85;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #0a0a0a 0%, #7a0f14 42%, #d94e1f 70%, #f4c430 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0,0,0,0.6);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.wordmark-city {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  margin-top: -0.25em;
}

.wordmark-city-badge {
  font-size: clamp(18px, 5vw, 26px);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.wordmark-city-name {
  font-family: 'Kaushan Script', cursive;
  font-size: clamp(26px, 9vw, 46px);
  color: var(--city-accent, #e2312b);
  text-shadow: 0 3px 10px rgba(0,0,0,0.55);
}

/* ---------- Gallery preview ---------- */

.gallery-wrap {
  position: fixed;
  left: 6%;
  right: 6%;
  top: 30%;
  bottom: 17%;
  border-radius: 32px;
  overflow: hidden;
  /* No background of its own — the page's blurred cover photo shows
     through underneath it. */
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 5;
}

.gallery-canvas {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
  background-size: cover;
  background-position: center;
}

.gallery-canvas canvas {
  border-radius: inherit;
}

.icon-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 20px) + 12px);
  left: 16px;
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20,20,24,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn[hidden] {
  display: none;
}

.close-btn {
  left: auto;
  right: 16px;
}

/* ---------- Dock ---------- */

.dock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.dock-circle-btn {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  padding: 18px;
  background: rgba(217, 217, 217, 0.4);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.dock-circle-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.65));
}

.city-dock {
  flex: 1 1 auto;
  min-width: 0;
  height: 72px;
  border-radius: 36px;
  padding: 0 12px;
  border: 1px solid rgba(0,0,0,0.4);
}

.dock-ticks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
}

.dock-tick {
  --tick-color: 255, 255, 255;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--tick-color), 1), rgba(var(--tick-color), 0.72));
  box-shadow: 0 3px 8px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.55), inset 0 -3px 4px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: flex-basis 0.35s cubic-bezier(.22,.9,.32,1), flex-grow 0.35s ease, background 0.3s ease;
}

/* Straubing/Munich/Günzburg color-code the dock, matching the original
   Figma dock component; a 4th+ city repeats the 3-color cycle. */
.dock-tick:nth-child(3n+1) { --tick-color: 255, 0, 0; }
.dock-tick:nth-child(3n+2) { --tick-color: 40, 108, 253; }
.dock-tick:nth-child(3n+3) { --tick-color: 255, 212, 0; }

.dock-tick.is-active {
  flex: 0 1 96px;
}

/* ---------- Screen 3: fullscreen photo ---------- */

#screen-photo {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.photo-full {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.download-btn {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 16px) + 28px);
  transform: translateX(-50%);
  z-index: 5;
  padding: 14px 28px;
  border-radius: 999px;
  background: rgba(20,20,24,0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
