/* Palette e font di ownitaly.com */
:root {
  --navy: #212942;
  --navy-deep: #171d30;
  --gold: #e8cca7;
  --gold-dim: rgba(232, 204, 167, 0.35);
  --gold-line: rgba(232, 204, 167, 0.22);
  --ivory: #f6f1e8;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background: var(--navy);
}

body {
  background: var(--navy);
  color: var(--gold);
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kicker {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}

h1,
h2,
.brand-word,
.place-name,
.manifesto-text {
  font-family: "Cardo", Georgia, serif;
  font-weight: 400;
}

em {
  font-style: italic;
}

/* 1 · Apertura */
.opening {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  text-align: center;
  padding: 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.brand-mark {
  width: clamp(84px, 11vw, 132px);
  height: auto;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.brand-word {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-word span {
  display: block;
}

.opening-tag {
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.65;
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  opacity: 0.6;
}

.scroll-cue span {
  width: 1px;
  height: 48px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.4s var(--ease) infinite;
  transform-origin: top;
}

@keyframes cue {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* 2 · La porta */
.portal {
  position: relative;
  height: 320svh;
}

.portal-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.portal-arch {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(34vw, 420px);
  height: min(64svh, 600px);
  transform: translate(-50%, -50%);
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  will-change: width, height, border-radius;
}

.portal-arch::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold-dim);
  border-radius: inherit;
  pointer-events: none;
}

.portal-arch img {
  transform: scale(1.35);
  will-change: transform;
}

.portal-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 29, 48, 0.15) 0%, rgba(23, 29, 48, 0.75) 100%);
  opacity: 0;
}

.portal-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  color: var(--ivory);
}

.portal-copy .kicker {
  color: var(--gold);
  margin-bottom: 1.75rem;
  opacity: 0;
}

.portal-copy h1 {
  font-size: clamp(2.4rem, 7vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: 0.02em;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.line > span {
  display: inline-block;
  transform: translateY(110%);
}

/* 3 · Manifesto */
.manifesto {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  width: min(1080px, 100% - 48px);
  margin: 0 auto;
  padding: 18svh 0;
}

.manifesto-text {
  font-size: clamp(1.8rem, 4.2vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: 0.005em;
  color: var(--gold);
}

.manifesto-text .word {
  opacity: 0.14;
}

/* 4 · Destinazioni */
.places {
  position: relative;
  width: min(1180px, 100% - 48px);
  margin: 0 auto;
  padding: 10svh 0 18svh;
}

.places-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.5rem;
}

.places-note {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.45;
}

.places-list {
  list-style: none;
  border-top: 1px solid var(--gold-line);
}

.place {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  border-bottom: 1px solid var(--gold-line);
  cursor: default;
}

.place-num {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0.5;
}

.place-name {
  font-size: clamp(2rem, 5.5vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.7s var(--ease), color 0.5s ease;
}

.place-type {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
  text-align: right;
}

.places-list:hover .place-name {
  color: rgba(232, 204, 167, 0.3);
}

.places-list .place:hover .place-name {
  color: var(--gold);
  transform: translateX(1.25rem);
}

.place-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 300px;
  pointer-events: none;
  z-index: 20;
}

.place-preview-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  transform: scale(0);
  outline: 1px solid var(--gold-dim);
  outline-offset: 6px;
}

/* 5 · Chiusura */
.closing {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  text-align: center;
  padding: 6rem 1.5rem;
  background: var(--navy-deep);
}

.closing-mark {
  width: 64px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.closing h2 {
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.closing-btn {
  position: relative;
  padding: 1.1rem 2.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.6s var(--ease);
}

.closing-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
  z-index: -1;
}

.closing-btn:hover,
.closing-btn:focus-visible {
  color: var(--navy);
}

.closing-btn:hover::before,
.closing-btn:focus-visible::before {
  transform: scaleY(1);
}

/* Su touch: niente anteprima che segue il cursore, foto ad arco nella riga */
@media (hover: none), (max-width: 768px) {
  .place-preview {
    display: none;
  }

  .place {
    grid-template-columns: 1fr 72px;
    grid-template-areas:
      "num thumb"
      "name thumb"
      "type thumb";
    row-gap: 0.4rem;
  }

  .place-num { grid-area: num; }
  .place-name { grid-area: name; }
  .place-type { grid-area: type; text-align: left; }

  .place::after {
    content: "";
    grid-area: thumb;
    width: 72px;
    height: 96px;
    border-radius: 999px 999px 0 0;
    background: var(--thumb) center / cover no-repeat;
    align-self: center;
  }

  .places-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span {
    animation: none;
  }
}

@media (max-width: 768px) {
  .portal-arch {
    width: 74vw;
    height: 60svh;
  }

  .brand-word {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }
}
