/* Header, scroll sections, glass panels, toy buttons, cards and brick-assembly reveals. */

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px var(--gutter);
  background: linear-gradient(180deg, rgba(27, 22, 48, 0.78), rgba(27, 22, 48, 0));
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 19px;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 6px 16px rgba(10, 4, 24, 0.45);
}
.footer__logo { width: 120px; height: 120px; border-radius: 22px; margin: 0 auto 10px; display: block; box-shadow: 0 16px 40px rgba(10, 4, 24, 0.5); }

/* "New scene unlocked" poster card */
.scene-card {
  position: fixed;
  left: var(--gutter);
  bottom: 172px;
  z-index: 23;
  width: min(320px, calc(100% - 2 * var(--gutter)));
  border-radius: 16px;
  overflow: hidden;
  background: rgba(27, 22, 48, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(10, 4, 24, 0.55);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-30px) rotate(-2deg);
}
.scene-card.is-showing { animation: card-in 4.2s cubic-bezier(0.2, 0.9, 0.3, 1) forwards; }
.scene-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.scene-card__text { padding: 10px 14px 12px; }
.scene-card__eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: var(--yellow); }
.scene-card__name { margin: 2px 0 0; font-family: var(--display); font-size: 18px; }
@keyframes card-in {
  0% { opacity: 0; transform: translateX(-30px) rotate(-2deg); }
  10%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateX(-16px); }
}
@media (max-width: 820px) { .scene-card { bottom: auto; top: 230px; left: 12px; width: 220px; } }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }
.topbar__actions { display: flex; gap: 8px; }

/* ---------- Buttons: tactile toy controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.btn--ghost { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.2); }

.btn--brick {
  --c: var(--pink);
  position: relative;
  margin-top: 8px;
  padding: 0 20px;
  min-height: 50px;
  background: var(--c);
  color: var(--navy);
  font-family: var(--display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.03em;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 6px 0 rgba(0, 0, 0, 0.3), 0 10px 22px rgba(0, 0, 0, 0.25);
}
/* A row of studs on top of every brick button */
.btn--brick::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: -7px;
  height: 7px;
  background: radial-gradient(circle at 11px 7px, var(--c) 6px, transparent 6.5px) 0 0 / 22px 7px repeat-x;
  filter: brightness(1.08);
}
.btn--brick:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn--brick:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 2px 0 rgba(0, 0, 0, 0.3); }
.btn--yellow { --c: var(--yellow); }
.btn--teal { --c: var(--teal); }

.btn--small {
  min-height: 38px;
  margin-top: 12px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--c, var(--pink));
  color: var(--navy);
  font-family: var(--display);
  font-size: 12px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 4px 0 rgba(0, 0, 0, 0.3);
}
.btn--small:hover { transform: translateY(-1px); }
.btn--small:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.actions--center { justify-content: center; }

/* ---------- Sections and panels ---------- */
.site, .footer { position: relative; z-index: 2; transition: opacity 0.8s ease; }

.stop {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px var(--gutter) 80px;
}
.stop--hero { align-items: flex-start; padding-top: 86px; }
.stop--contact { justify-content: center; }

.panel {
  width: min(540px, 100%);
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 24px 60px rgba(10, 4, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.panel--right { margin-left: auto; }
.panel--left { margin-right: auto; }
.panel--wide { width: min(700px, 100%); }
.panel--center { margin: 0 auto; text-align: center; }
.panel--hero { width: min(470px, 100%); }

.panel h2 { font-size: clamp(26px, 3.2vw, 40px); }
.panel > p { color: var(--muted); }

.hero__title { font-size: clamp(30px, 3.4vw, 44px); color: var(--text); }
.hero__sub {
  font-family: var(--display);
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--yellow) !important;
  letter-spacing: 0.02em;
}
.panel--hero p:not(.eyebrow):not(.hero__sub):not(.fine) { font-size: 15.5px; margin-bottom: 0.6em; }

.eyebrow {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal) !important;
}
.fine {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.grid--modes, .grid--missions, .grid--services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--process { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  --c: var(--pink);
  position: relative;
  padding: 20px 16px 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-top: 6px solid var(--c);
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.card::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: -12px;
  height: 6px;
  background: radial-gradient(circle at 9px 6px, var(--c) 5px, transparent 5.5px) 0 0 / 18px 6px repeat-x;
}
.card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.11); }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--c);
}
.card__category { font-weight: 700; color: var(--text) !important; margin-bottom: 4px !important; }

/* Mission card: square logo beside the title */
.mission-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.mission-card__head h3 { margin-bottom: 2px; }
.mission-card__logo {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--c), 0 8px 18px rgba(10, 4, 24, 0.4);
  background: var(--plum);
}
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.mode .btn { margin-top: 14px; }
.step { padding-top: 18px; }

/* ---------- District list ---------- */
.districts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.district {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.district strong { font-family: var(--display); font-weight: 400; font-size: 14px; }
.district__label { color: var(--muted); font-size: 14px; }
.district__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--c);
  transition: background 0.3s ease;
}
.is-visited .district__dot { background: var(--c); }

/* ---------- Footer ---------- */
.footer {
  padding: 34px var(--gutter) 40px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(27, 22, 48, 0), rgba(27, 22, 48, 0.92) 35%);
}
.footer p { margin: 0 0 8px; }
.footer__brand { font-family: var(--display); font-size: 26px; color: var(--text); }
.footer__nav { margin: 6px 0 12px; font-weight: 800; letter-spacing: 0.1em; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: var(--yellow); }
.footer__closing { font-family: var(--display); color: var(--yellow); }
.footer__note { font-size: 12px; opacity: 0.75; }

/* ---------- Brick-assembly reveals ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal].is-visible h1,
[data-reveal].is-visible h2 { animation: title-snap 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both 0.08s; }
[data-reveal].is-visible .card { animation: brick-drop 0.55s cubic-bezier(0.25, 1.45, 0.45, 1) both; animation-delay: calc(0.15s + var(--i, 0) * 0.08s); }
@keyframes brick-drop {
  0% { opacity: 0; transform: translateY(-40px) rotate(-4deg) scale(0.9); }
  100% { opacity: 1; transform: none; }
}
@keyframes title-snap {
  0% { opacity: 0; transform: translateY(14px) scaleY(0.6); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .grid--process { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .topbar { gap: 10px; }
  .topbar__actions { margin-left: auto; }
  .daynight__label { display: none; }
  .stop, .stop--hero { align-items: flex-end; padding-top: 120px; padding-bottom: 40px; }
  .panel, .panel--wide, .panel--hero { width: 100%; margin: 0; }
  .grid--modes, .grid--missions, .grid--services { grid-template-columns: 1fr; }
  .hero__title { font-size: 28px; }
  /* Keep the city visible on phones: only the first hero paragraph */
  .panel--hero p:not(.eyebrow):not(.hero__sub):not(.fine) ~ p:not(.fine) { display: none; }
}
