:root {
  --fondo: #0b0c10;
  --vetro: rgba(255, 255, 255, 0.16);
  --vetro-alto: rgba(255, 255, 255, 0.3);
  --bordo-vetro: rgba(255, 255, 255, 0.26);
  --testo: #ffffff;
  --testo-tenue: rgba(255, 255, 255, 0.72);
  --luce: #ffe2bd;
  --ombra: rgba(8, 10, 20, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 14px;
}

.card {
  position: relative;
  width: min(420px, 100%);
  height: min(560px, calc(100vh - 28px));
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}

/* the photo: four real photos stacked, the chosen one on top */
.photo { position: absolute; inset: 0; z-index: 0; }
.photo__layer { position: absolute; inset: -4%; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 50%; }
.scene[data-scene="dolomites"] { object-position: 62% 50%; }
.scene[data-scene="lofoten"] { object-position: 28% 50%; }
.scene[data-scene="coast"] { object-position: 50% 70%; }
.photo__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 24, 0.28) 0%, rgba(10, 12, 24, 0) 30%, rgba(10, 12, 24, 0) 52%, rgba(10, 12, 24, 0.62) 100%);
  pointer-events: none;
  z-index: 900;
}
.photo__grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.07; mix-blend-mode: overlay; pointer-events: none; z-index: 901; }

.top {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 0;
  font-size: 13px; z-index: 2;
}
.top__brand { display: flex; align-items: center; gap: 7px; font-weight: 650; font-variation-settings: "wdth" 104; letter-spacing: 0.01em; }
.top__brand svg { width: 17px; height: 17px; fill: var(--testo); }
.top__meta { color: var(--testo-tenue); font-weight: 500; }

/* the glass search */
.search-wrap { position: absolute; left: 0; right: 0; top: 56px; display: flex; justify-content: center; z-index: 4; }
.search {
  position: relative;
  width: calc(100% - 48px);
  height: 50px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--vetro-alto), var(--vetro));
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px -12px var(--ombra);
  cursor: text;
}
.search__edge {
  position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang, 210deg), rgba(255, 255, 255, 0.18) 0deg, rgba(255, 242, 222, 0.95) 34deg, rgba(255, 255, 255, 0.18) 80deg, rgba(255, 255, 255, 0.14) 200deg, rgba(255, 255, 255, 0.5) 250deg, rgba(255, 255, 255, 0.18) 300deg, rgba(255, 255, 255, 0.18) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.search__shine {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden;
}
.search__shine::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 246, 232, 0.32) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(var(--sx, -140%));
}
.search__lens { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--testo); stroke-width: 1.9; stroke-linecap: round; position: relative; }
.search__input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; font-weight: 520; color: var(--testo);
  caret-color: var(--luce);
  position: relative;
}
.search__input::selection { background: rgba(255, 226, 189, 0.34); color: var(--testo); }
.search__input::placeholder { color: var(--testo-tenue); font-weight: 450; }
.search__clear {
  position: relative; width: 28px; height: 28px; flex: none;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); cursor: pointer; opacity: 0; visibility: hidden;
}
.search__clear svg { width: 14px; height: 14px; fill: none; stroke: var(--testo); stroke-width: 2; stroke-linecap: round; }

/* the suggestions: glass cards that rise and stack */
.sugg {
  position: absolute; left: 24px; right: 24px; top: 116px;
  list-style: none; z-index: 3;
}
.sugg__item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 12px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--bordo-vetro), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 28px -16px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transform-origin: 50% 0;
}
.sugg__item.is-on { background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18)); }
.sugg__thumb {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  background-size: cover; background-repeat: no-repeat; background-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.sugg__txt { display: grid; gap: 2px; min-width: 0; }
.sugg__name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg__name mark { background: none; color: var(--luce); font-weight: 720; }
.sugg__meta { font-size: 12px; color: var(--testo-tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg__go { margin-left: auto; width: 16px; height: 16px; flex: none; fill: none; stroke: var(--testo-tenue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the place, written large at the bottom */
.hero { position: absolute; left: 22px; right: 22px; bottom: 22px; z-index: 2; }
.hero__kicker { font-size: 12.5px; color: var(--testo-tenue); font-weight: 500; margin-bottom: 4px; }
.hero__title {
  font-size: clamp(30px, min(10vw, 9vh), 46px);
  line-height: 1.02;
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.015em;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.hero__title .ch { display: inline-block; white-space: pre; }
.hero__sub { margin-top: 6px; font-size: 13px; color: var(--testo-tenue); font-weight: 500; }
.hero__sub b { color: var(--testo); font-weight: 650; }

.ghost {
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  fill: #121214; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
  pointer-events: none;
  opacity: 0;
  z-index: 50;
}

@media (max-height: 480px) {
  .search-wrap { top: 46px; }
  .search { height: 44px; }
  .sugg { top: 100px; }
  .sugg__item { height: 46px; margin-bottom: 6px; }
  .sugg__thumb { width: 30px; height: 30px; }
  .hero { bottom: 16px; }
  .hero__kicker { display: none; }
}

@media (max-width: 380px) {
  .search { width: calc(100% - 32px); }
  .sugg { left: 16px; right: 16px; }
  .sugg__meta { font-size: 11px; }
  .hero { left: 18px; bottom: 16px; }
}
