@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: #070c18;
  font-synthesis: none;
  --silver: #dfe8fb;
  --gold: #f7d79a;
  --cool: #82bbff;
  --warm: #ffba88;
  --ease: cubic-bezier(.2,.72,.13,1);
  --duration: 930ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; }
body { overflow: hidden; }
a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

.portal {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 540px;
  overflow: hidden;
  background: #070c18;
}

.realm {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: clip-path;
  transition: clip-path var(--duration) var(--ease);
}
.realm--venezia {
  z-index: 1;
  clip-path: polygon(0 0, 56% 0, 44% 100%, 0 100%);
}
.realm--sicilia {
  z-index: 2;
  clip-path: polygon(56% 0, 100% 0, 100% 100%, 44% 100%);
}

.realm__art {
  position: absolute;
  inset: -2%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transform: scale(1.025);
  transition: transform 1450ms var(--ease), filter 900ms ease;
  pointer-events: none;
}
.realm--venezia .realm__art { background-image: url('assets/venezia.webp'); }
.realm--sicilia .realm__art { background-image: url('assets/sicilia.webp'); }
.realm__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,3,12,.22), transparent 26%, transparent 67%, rgba(2,5,17,.62) 100%);
}
.realm--venezia .realm__shade {
  background-image: linear-gradient(90deg,rgba(3,11,28,.18),transparent 58%), linear-gradient(180deg,rgba(1,8,23,.30),transparent 35%,transparent 62%,rgba(1,7,21,.8));
}
.realm--sicilia .realm__shade {
  background-image: linear-gradient(270deg,rgba(27,5,9,.13),transparent 58%), linear-gradient(180deg,rgba(19,4,7,.24),transparent 35%,transparent 62%,rgba(13,5,6,.79));
}

/* Exactly complementary diagonal masks, so no part of either picture gets spliced. */
.portal[data-active="venezia"] .realm--venezia { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.portal[data-active="venezia"] .realm--sicilia { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
.portal[data-active="sicilia"] .realm--venezia { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
.portal[data-active="sicilia"] .realm--sicilia { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.portal[data-active="venezia"] .realm--venezia .realm__art,
.portal[data-active="sicilia"] .realm--sicilia .realm__art { transform: scale(1); }

.portal__seam {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  clip-path: polygon(55.83% 0, 56.17% 0, 44.17% 100%, 43.83% 100%);
  background: linear-gradient(180deg, rgba(248,249,255,.78), #f0f4ff 35%, rgba(215,229,255,.84) 65%,rgba(253,238,198,.78));
  filter: drop-shadow(0 0 10px rgba(200,219,255,.84));
  opacity: 1;
  transition: opacity 420ms ease;
}
.portal[data-active] .portal__seam { opacity: 0; }

.portal__ambient {
  z-index: 4;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 47%, rgba(0,0,8,.38));
}

.portal__top {
  position: absolute;
  z-index: 10;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: clamp(23px,3.6vw,53px) clamp(22px,4vw,68px);
  pointer-events: none;
  text-shadow: 0 2px 15px rgba(0,0,0,.7);
}
.brand { display: flex; align-items: center; gap: 13px; color: #edf4ff; }
.brand__mark { width: 36px; height: 36px; color: var(--gold); filter: drop-shadow(0 0 9px rgba(252,213,133,.35)); }
.brand__wordmark { display: flex; flex-direction: column; gap: 1px; font-family: Cinzel, Georgia, serif; font-size: 13px; letter-spacing: .25em; line-height: 1.04; }
.brand__wordmark strong { letter-spacing: .33em; font-size: 15px; font-weight: 700; }
.brand__gold { color: var(--gold); }
.portal__topnote { margin-top: 13px; font-size: 10px; letter-spacing: .23em; font-weight: 700; color: rgba(251,245,233,.78); }
.portal__topnote > span { color: var(--gold); margin-left: 12px; }

.realm__label {
  position: absolute;
  z-index: 3;
  top: auto;
  bottom: clamp(74px,14vh,157px);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  color: #fff;
  text-shadow: 0 3px 18px rgba(0,0,0,.85);
  transform: translateY(0);
  transition: opacity 400ms ease, transform 450ms ease;
  pointer-events: none;
}
.realm--venezia .realm__label { left: 9.5%; }
.realm--sicilia .realm__label { right: 9.5%; align-items: flex-end; text-align: right; }
.realm__eyebrow { color: rgba(244,240,236,.85); font-size: 10px; font-weight: 700; letter-spacing: .31em; white-space: nowrap; }
.realm__line { display: inline-block; width: 22px; height: 1px; margin-right: 8px; background: currentColor; vertical-align: middle; opacity: .8; }
.realm--venezia .realm__line { background: var(--cool); }
.realm--sicilia .realm__line { background: var(--warm); }
.realm__name { font-family: Cinzel, Georgia, serif; font-size: clamp(34px,4.1vw,68px); line-height: 1.07; letter-spacing: .025em; font-weight: 600; }
.realm--venezia .realm__name { color: #eef5ff; }
.realm--sicilia .realm__name { color: #fff1e6; }
.realm__hint { color: rgba(239,241,250,.72); font-size: 10px; font-weight: 600; letter-spacing: .19em; }
.realm__hint span { font-size: 13px; margin-left: 6px; }
.portal[data-active] .realm__label { opacity: 0; transform: translateY(18px); }

.realm__entry {
  position: absolute;
  z-index: 9;
  bottom: clamp(85px,13.5vh,145px);
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  gap: 17px;
  padding: 0 21px 0 19px;
  border: 1px solid rgba(255,255,255,.53);
  border-radius: 2px;
  color: white;
  background: rgba(6,13,29,.52);
  box-shadow: 0 18px 45px rgba(0,0,0,.36),inset 0 1px rgba(255,255,255,.12);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .20em;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateY(22px);
  transition: opacity 350ms ease, transform 600ms var(--ease), background 220ms ease, border-color 220ms ease, box-shadow 220ms ease, visibility 0s linear 600ms;
}
.realm--venezia .realm__entry { left: 10%; }
.realm--sicilia .realm__entry { right: 10%; background: rgba(31,12,12,.54); }
.realm__entry-icon { font-size: 26px; line-height: 1; font-weight: 400; color: var(--cool); }
.realm--sicilia .realm__entry-icon { color: var(--warm); }
.realm__entry-arrow { margin-left: 19px; font-size: 19px; font-weight: 400; transition: transform .25s ease; }
.realm__entry:hover { background: rgba(20,37,63,.86); border-color: rgba(222,236,255,.9); box-shadow: 0 20px 50px rgba(0,0,0,.48),0 0 27px rgba(93,154,255,.24); }
.realm--sicilia .realm__entry:hover { background: rgba(73,28,23,.85); box-shadow: 0 20px 50px rgba(0,0,0,.48),0 0 27px rgba(255,142,92,.22); }
.realm__entry:hover .realm__entry-arrow { transform: translate(3px,-3px); }
.portal[data-active="venezia"] .realm--venezia .realm__entry,
.portal[data-active="sicilia"] .realm--sicilia .realm__entry {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 180ms, 180ms, 0s, 0s, 0s, 0s;
}

.portal__instruction {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 12.2%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 17px;
  color: rgba(246,243,234,.83);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .28em;
  white-space: nowrap;
  text-shadow: 0 2px 10px #050812;
  pointer-events: none;
  transition: opacity 250ms ease;
}
.portal__dash { width: 25px; height: 1px; background: rgba(241,228,199,.7); }
.portal[data-active] .portal__instruction { opacity: 0; }
.portal__bottom {
  position: absolute;
  z-index: 10;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(22px,4vw,68px);
  color: rgba(233,235,242,.57);
  font-size: 9px;
  letter-spacing: .24em;
  font-weight: 700;
  pointer-events: none;
  text-shadow: 0 2px 10px #030912;
}
.footer__dot { color: var(--gold); margin: 0 7px; }

@media (max-width: 900px), (hover: none) {
  body { overflow: auto; }
  .portal { min-height: 650px; display: flex; flex-direction: column; }
  .realm { position: relative; inset: auto; width: 100%; flex: 1 1 50%; min-height: 300px; clip-path: none !important; transition: none; }
  .realm--venezia { order: 1; }
  .realm--sicilia { order: 2; border-top: 1px solid rgba(255,255,255,.68); }
  .realm__art { inset: 0; transform: none !important; }
  .realm--venezia .realm__art { background-position: 33% center; }
  .realm--sicilia .realm__art { background-position: 68% center; }
  .realm__shade { background: linear-gradient(90deg,rgba(0,5,19,.6),transparent 100%),linear-gradient(180deg,rgba(1,5,17,.18),rgba(1,5,17,.67)) !important; }
  .realm__label { top: auto; left: 24px !important; bottom: 100px; right: auto !important; text-align: left !important; align-items: flex-start !important; gap: 6px; opacity: 1 !important; transform: none !important; }
  .realm__name { font-size: clamp(33px,8vw,58px); }
  .realm__eyebrow { font-size: 9px; }
  .realm__hint { display: none; }
  .realm__entry { left: 24px !important; right: auto !important; bottom: 31px; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; transform: none !important; min-height: 46px; padding: 0 14px; gap: 10px; font-size: 10px; background: rgba(5,9,21,.75); }
  .realm__entry-icon { font-size: 19px; }
  .realm__entry-arrow { margin-left: 11px; font-size: 16px; }
  .portal__seam,.portal__instruction,.portal__ambient,.portal__bottom,.portal__topnote { display: none; }
  .portal__top { top: 0; padding: 18px 22px; }
  .brand__mark { width: 27px; height: 27px; }
  .brand__wordmark { font-size: 10px; }
  .brand__wordmark strong { font-size: 12px; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .portal { min-height: 500px; height: auto; }
  .realm { min-height: 270px; }
}
@media (max-height: 620px) and (min-width: 901px) {
  .realm__label { bottom: 78px; }
  .realm__entry { bottom: 78px; }
  .portal__instruction { bottom: 9%; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 550px) {
  /* Portrait phones: keep the character, hide the cut-off lettering
     that's already painted into the wide source artwork. */
  .realm--venezia .realm__art { background-size: auto 128%; background-position: left center; }
  .realm--sicilia .realm__art { background-size: auto 128%; background-position: right center; }
}
