/**
 * The city portal.
 *
 * A single photographic screen: Amsterdam in the round, the centre's name over
 * it, and the three doors as a quiet invitation along the hem. Dark, gold, and
 * unhurried — a house introducing itself, not a dashboard.
 */

.ecza-city {
  position: relative;
  overflow: hidden;
  color: var(--cream-50);
  min-height: 0;
}

body.is-cinematic {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0b1620;
}
body.is-cinematic main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.is-cinematic .ecza-city {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}
body.is-cinematic .ecza-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  padding: .35rem 0 .7rem;
}
body.is-cinematic .ecza-footer__legal a { color: rgba(253, 252, 250, .55); }
body.is-cinematic .ecza-footer__legal a:hover { color: var(--champagne-light); }

/* ------------------------------------------------------------------- stage */

.ecza-city__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #0b1620;
}

.ecza-city__photo {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  object-position: center 46%;
  display: block;
  transform: scale(1.04);
  filter: saturate(1.18) contrast(1.08) brightness(1.04);
}

@media (prefers-reduced-motion: no-preference) {
  .ecza-city__photo {
    animation: ecza-city-drift 28s ease-in-out infinite alternate;
  }
}

@keyframes ecza-city-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.4%, -1%, 0); }
}

.ecza-city__vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 22, 32, .42) 0%, rgba(11, 22, 32, .08) 32%, rgba(11, 22, 32, .10) 62%, rgba(11, 22, 32, .72) 100%),
    linear-gradient(90deg, rgba(11, 22, 32, .22) 0%, transparent 42%, transparent 58%, rgba(11, 22, 32, .18) 100%);
}

.ecza-city__grain {
  position: absolute;
  inset: 0;
  opacity: .025;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ecza-city__credit {
  position: absolute;
  left: max(1.15rem, env(safe-area-inset-left));
  bottom: .55rem;
  z-index: 3;
  margin: 0;
  font-size: .58rem;
  letter-spacing: .04em;
  color: rgba(253, 252, 250, .42);
}
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--champagne-light), transparent);
  opacity: .55;
}

/* ------------------------------------------------------------------- chrome */

.ecza-city__lang {
  position: absolute;
  top: max(.9rem, env(safe-area-inset-top));
  left: max(1.25rem, env(safe-area-inset-left));
  z-index: 4;
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
}
.ecza-city__lang .ecza-lang__current { color: var(--cream-50); }
.ecza-city__lang .ecza-lang__link { color: rgba(253, 252, 250, .55); }
.ecza-city__lang .ecza-lang__link::before { color: rgba(253, 252, 250, .28); }
.ecza-city__lang .ecza-lang__link:hover { color: var(--champagne-light); }

.ecza-city__menu-toggle { display: none; }

/* ------------------------------------------------------------------- frame */

.ecza-city__frame {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  width: min(100% - 3rem, var(--shell));
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: 4.25rem 0 1.25rem;
}

.ecza-city__identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  justify-self: center;
}

.ecza-city__mark {
  display: block;
  width: 46px;
  height: auto;
  flex: none;
  filter: brightness(1.08);
}

.ecza-city__lockup {
  display: grid;
  gap: 5px;
  text-align: left;
}

.ecza-city__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(.82rem, .4rem + 1vw, 1.05rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.ecza-city__lockup small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--champagne-light);
}

/* ---------------------------------------------------------------- welcome */

.ecza-city__welcome {
  text-align: center;
  max-width: 22em;
  margin-inline: auto;
  align-self: center;
}

.ecza-city__eyebrow {
  margin: 0 0 1.1rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--champagne-light);
}

.ecza-city__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.4rem, 1.2rem + 5vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.ecza-city__title-write {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}

.ecza-city__glyph {
  display: inline-block;
}

.ecza-city__gap {
  display: inline-block;
  width: .28em;
}

.ecza-city__title::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin: .9rem auto 0;
  background: var(--champagne-light);
  opacity: .55;
}

.ecza-city__subtitle {
  margin: 1.15rem 0 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(.98rem, .85rem + .4vw, 1.2rem);
  line-height: 1.4;
  color: rgba(253, 252, 250, .78);
}

/* ------------------------------------------------------------------- doors */

.ecza-city__sheet { display: contents; }
.ecza-city__sheet-label { display: none; }

.ecza-city__doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  border-top: 1px solid rgba(201, 185, 154, .28);
}

.ecza-city-door {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.15rem 1.1rem 0;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.ecza-city-door + .ecza-city-door {
  border-left: 1px solid rgba(201, 185, 154, .22);
}

.ecza-city-door__number {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .28em;
  color: var(--champagne-light);
  font-variant-numeric: tabular-nums;
}

.ecza-city-door__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, .9rem + .4vw, 1.3rem);
  letter-spacing: -.015em;
  line-height: 1.2;
}

.ecza-city-door__body {
  font-size: .78rem;
  line-height: 1.45;
  color: rgba(253, 252, 250, .58);
  max-width: 28ch;
}

a.ecza-city-door:hover .ecza-city-door__title,
a.ecza-city-door:focus-visible .ecza-city-door__title {
  color: var(--champagne-light);
}

@media (prefers-reduced-motion: no-preference) {
  .ecza-city__identity,
  .ecza-city__eyebrow,
  .ecza-city-door {
    animation: ecza-city-in .9s cubic-bezier(.22, .7, .3, 1) backwards;
  }
  .ecza-city__identity { animation-delay: .12s; }
  .ecza-city__eyebrow  { animation-delay: .28s; }
  .ecza-city-door      { animation-delay: calc(.48s + var(--door-index, 0) * .1s); }

  .ecza-city__glyph {
    animation: ecza-city-write .62s cubic-bezier(.22, .7, .3, 1) both;
    animation-delay: calc(.52s + var(--i, 0) * .055s);
  }

  .ecza-city__title::after {
    animation: ecza-city-rule .9s cubic-bezier(.22, .7, .3, 1) both;
    animation-delay: calc(.7s + var(--glyphs, 20) * .055s);
  }

  .ecza-city__subtitle {
    animation: ecza-city-in .9s cubic-bezier(.22, .7, .3, 1) both;
    animation-delay: calc(.85s + var(--glyphs, 20) * .055s);
  }
}

@keyframes ecza-city-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ecza-city-write {
  from {
    opacity: 0;
    transform: translate(.12em, .16em);
    clip-path: inset(0 100% 0 -8%);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 -8% 0 -8%);
  }
}

@keyframes ecza-city-rule {
  from { width: 0; opacity: 0; }
  to   { width: min(7.5rem, 38%); opacity: .55; }
}

/* ----------------------------------------------------------------- small */

@media (max-width: 900px) {
  .ecza-city__frame {
    padding: 4.5rem 0 1rem;
    grid-template-rows: auto 1fr;
  }
  .ecza-city__identity {
    flex-direction: column;
    gap: .55rem;
    text-align: center;
  }
  .ecza-city__lockup { text-align: center; }
  .ecza-city__name {
    white-space: normal;
    text-wrap: balance;
    max-width: 16em;
  }
  .ecza-city__title { font-size: clamp(2.1rem, 9vw, 3.1rem); }

  .ecza-city__menu-toggle {
    display: grid;
    place-items: center;
    position: absolute;
    top: max(.45rem, env(safe-area-inset-top));
    right: max(.55rem, env(safe-area-inset-right));
    z-index: 5;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cream-50);
    cursor: pointer;
  }

  .ecza-city__menu-toggle__bars,
  .ecza-city__menu-toggle__bars::before,
  .ecza-city__menu-toggle__bars::after {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    transition: transform .45s cubic-bezier(.22, .7, .3, 1);
  }
  .ecza-city__menu-toggle__bars { position: relative; }
  .ecza-city__menu-toggle__bars::before,
  .ecza-city__menu-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .ecza-city__menu-toggle__bars::before { top: -6px; }
  .ecza-city__menu-toggle__bars::after { top: 6px; }

  .ecza-city.is-menu-open .ecza-city__menu-toggle__bars { background: transparent; }
  .ecza-city.is-menu-open .ecza-city__menu-toggle__bars::before {
    top: 0;
    transform: rotate(45deg);
  }
  .ecza-city.is-menu-open .ecza-city__menu-toggle__bars::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .ecza-city__sheet {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 4;
    padding: 5.5rem clamp(1.5rem, 6vw, 2.5rem) 2.5rem;
    background: #0b1620;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition:
      opacity .5s cubic-bezier(.22, .7, .3, 1),
      transform .5s cubic-bezier(.22, .7, .3, 1),
      visibility .5s;
  }
  .ecza-city.is-menu-open .ecza-city__sheet {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .ecza-city__sheet-label {
    display: block;
    margin: 0 0 1.75rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--champagne-light);
  }

  .ecza-city__doors {
    display: flex;
    flex-direction: column;
    border-top: 0;
  }
  .ecza-city-door {
    padding: 1.25rem 0 1.35rem;
  }
  .ecza-city-door + .ecza-city-door {
    border-left: 0;
    border-top: 1px solid rgba(201, 185, 154, .22);
  }
  .ecza-city-door__title {
    font-size: clamp(1.85rem, 7vw, 2.35rem);
    font-weight: 300;
  }
  .ecza-city .ecza-city-door { animation: none; }
  .ecza-city.is-menu-open .ecza-city-door {
    animation: ecza-city-in .7s cubic-bezier(.22, .7, .3, 1) backwards;
    animation-delay: calc(.12s + var(--door-index, 0) * .09s);
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .ecza-city__sheet { transition: none; transform: none; }
  .ecza-city.is-menu-open .ecza-city-door { animation: none; }
}
