/* Access Sicily home page: the logo, the flight from Europe down to Sicily, and the plain map of towns
   it lands on. Styled after The Sicily Project: black, white and neutral greys, Helvetica Neue,
   fine lines and plenty of space. */
:root {
  --ink: #000000; --grey: #797979; --line: #D9D9D9; --soft: #F5F5F5; --bg: #FFFFFF;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif; --caps: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1); --gut: clamp(18px, 2.8vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--ink); color: #fff; padding: 10px 14px; text-decoration: none; }
.skip-link:focus { top: 12px; }
.k, .town-meta, .card-txt small, .bar-note, .bar-btn, .skip-flight, .whole { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- stage ---------- */
.stage { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: var(--soft); isolation: isolate; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wash { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .9s var(--ease);
  background: linear-gradient(96deg, var(--soft) 0, var(--soft) 26%, rgba(245, 245, 245, .5) 40%, rgba(245, 245, 245, 0) 52%); }
.stage.open .wash { opacity: 1; }

.bar { position: absolute; z-index: 5; left: var(--gut); right: var(--gut); top: 0; height: 66px; display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); }
.bar-note { color: var(--grey); }
.bar-btn { opacity: 0; pointer-events: none; padding: 6px 0; border-bottom: 1px solid var(--ink); transition: opacity .5s, color .2s, border-color .2s; }
.stage.open .bar-btn { opacity: 1; pointer-events: auto; }
.bar-btn:hover { color: var(--grey); border-color: var(--grey); }

/* ---------- logo: the island in one fine grey line and wide light capitals,
   after The Sicily Project's line-drawn house ---------- */
.logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo .mark { display: block; width: 58px; height: auto; overflow: visible; }
.logo-name, .logo-by { font-family: var(--caps); font-weight: 300; text-transform: uppercase; white-space: nowrap; line-height: 1; }
.logo-name { font-size: 15px; letter-spacing: .3em; }
.logo-by { font-size: 10.5px; letter-spacing: .3em; color: var(--grey); }
.logo-full { flex-direction: column; align-items: flex-start; gap: 0; margin: 0; }
.logo-full .mark { width: 172px; margin-left: -4px; }
.logo-full .logo-name { font-size: 21px; margin-top: 16px; }
.logo-full .logo-by { margin-top: 12px; }
.mark-isle { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .logo.wait .mark-isle { stroke-dashoffset: 1; }
  .logo.wait .logo-name, .logo.wait .logo-by { opacity: 0; }
  .logo.draw .mark-isle { animation: logo-line 2.2s cubic-bezier(.5, 0, .2, 1) both; }
  .logo.draw .logo-name { animation: logo-word 1.5s var(--ease) .9s both; }
  .logo.draw .logo-by { animation: logo-fade 1.1s var(--ease) 1.7s both; }
}
@keyframes logo-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes logo-word { from { opacity: 0; letter-spacing: .52em; } to { opacity: 1; letter-spacing: .3em; } }
@keyframes logo-fade { from { opacity: 0; } to { opacity: 1; } }

/* the opening: the logo alone, drawing itself, before the map */
.splash-screen { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: var(--soft); opacity: 0; pointer-events: none; transition: opacity 1s var(--ease); }
.stage.splash .splash-screen { opacity: 1; transition-duration: .01s; }
.logo-splash { align-items: center; text-align: center; }
.logo-splash .mark { width: min(62vw, 440px); margin: 0; }
.logo-splash .logo-name { font-size: clamp(20px, 3.4vw, 34px); margin-top: clamp(22px, 4vh, 40px); padding-left: .3em; }
.logo-splash .logo-by { font-size: clamp(10px, 1.2vw, 12.5px); margin-top: 18px; padding-left: .3em; }
.logo-bar { transition: opacity .9s var(--ease) .3s; }
.stage.splash .logo-bar { opacity: 0; transition: none; }

.hud { position: absolute; z-index: 4; left: var(--gut); bottom: 34px; font-weight: 300; font-size: clamp(1.7rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -.02em; transition: opacity .6s, transform .9s var(--ease); }
.hud b { font-weight: 700; }
.stage.open .hud { opacity: 0; transform: translateY(14px); }
.skip-flight { position: absolute; z-index: 8; right: var(--gut); bottom: 34px; height: 44px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 20px 0; background: transparent; transition: opacity .4s, background .2s, color .2s; }
.skip-flight:hover { background: var(--ink); color: #fff; }
.stage.open .skip-flight { opacity: 0; pointer-events: none; }

/* ---------- the left column ---------- */
.side { position: absolute; z-index: 3; left: var(--gut); top: 66px; bottom: 0; width: min(38vw, 540px); display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 4.4vh, 48px); padding: 26px 0 40px; pointer-events: none; }
.side > * { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.stage.open .side > * { opacity: 1; transform: none; pointer-events: auto; }
.stage.open .side > nav { transition-delay: .14s; }
.k { color: var(--grey); }
.intro h1 { font-weight: 300; font-size: clamp(2.8rem, 5.4vw, 5.2rem); line-height: 1; letter-spacing: -.035em; }
.intro h1 b { display: block; font-weight: 700; }
.intro h1 .k { display: block; font-weight: 400; line-height: 1.6; margin-bottom: 16px; }
.lead { color: var(--grey); max-width: 31em; margin-top: 22px; }

.towns { border-top: 1px solid var(--ink); max-height: 46vh; overflow-y: auto; scrollbar-width: thin; }
.town { position: relative; display: grid; grid-template-columns: 38px 1fr auto 22px; column-gap: 12px; align-items: baseline; padding: 16px 4px 15px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.town::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease); }
.town:hover::after, .town:focus-visible::after, .town.on::after { transform: scaleX(1); }
.town-n { font-size: 11px; letter-spacing: .1em; color: var(--grey); font-variant-numeric: tabular-nums; }
.town-name { font-size: clamp(1.2rem, 1.8vw, 1.6rem); font-weight: 400; line-height: 1.1; letter-spacing: -.015em; transition: transform .5s var(--ease); }
.town:hover .town-name, .town.on .town-name { transform: translateX(6px); }
.town-meta { color: var(--grey); white-space: nowrap; }
.town-go { align-self: center; width: 18px; height: 18px; transition: transform .5s var(--ease); }
.town:hover .town-go, .town.on .town-go { transform: translateX(4px); }
.town-pic, .town-line { display: none; }

/* ---------- pins: plain dots, with a soft halo on the one in hand ---------- */
.pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .7s; }
.stage.open .pins { opacity: 1; }
.pin { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; display: grid; place-items: center; pointer-events: auto; text-decoration: none; will-change: transform; }
.pin.off { visibility: hidden; }
.pin::before { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(0, 0, 0, .1); scale: 0; transition: scale .45s var(--ease); }
.pin:hover::before, .pin.on::before { scale: 1; }
.pin-dot { position: relative; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); border: 2.5px solid #fff; transition: scale .4s var(--ease); }
@media (prefers-reduced-motion: no-preference) {
  .stage.open .pin-dot { animation: pin-in .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 250ms); }
}
@keyframes pin-in { from { scale: 0; } }
.pin:hover, .pin.on { z-index: 3; }
.pin:hover .pin-dot, .pin.on .pin-dot { scale: 1.2; }
.pin-tag { position: absolute; padding: 0 5px; font-size: 13.5px; line-height: 22px; white-space: nowrap; color: var(--ink); pointer-events: none; }
.pin[data-side="r"] .pin-tag { left: calc(50% + 10px); top: 50%; translate: 0 -50%; }
.pin[data-side="l"] .pin-tag { right: calc(50% + 10px); top: 50%; translate: 0 -50%; }
.pin[data-side="t"] .pin-tag { left: 50%; bottom: calc(50% + 10px); translate: -50% 0; }
.pin[data-side="b"] .pin-tag { left: 50%; top: calc(50% + 10px); translate: -50% 0; }
.pin[data-side="tr"] .pin-tag { left: calc(50% + 6px); bottom: calc(50% + 4px); }
.pin[data-side="br"] .pin-tag { left: calc(50% + 6px); top: calc(50% + 4px); }
.pin[data-side="tl"] .pin-tag { right: calc(50% + 6px); bottom: calc(50% + 4px); }
.pin[data-side="bl"] .pin-tag { right: calc(50% + 6px); top: calc(50% + 4px); }
.pin-tag { transition: opacity .25s; }
.pin.mute .pin-tag { opacity: 0; }
.pin.mute:hover .pin-tag, .pin.mute.on .pin-tag, .pin.on .pin-tag { opacity: 1; background: rgba(255, 255, 255, .92); border-radius: 3px; }
.pin.on .pin-tag { font-weight: 700; }
/* attractions: an open diamond, so they read apart from the towns' solid dots. Their names wait until one is in hand. */
.pin-sight .pin-dot { width: 11px; height: 11px; border-radius: 2px; rotate: 45deg; background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 0 0 1.5px #fff; }
.pin-sight .pin-tag { opacity: 0; background: #fff; border-radius: 3px; transition: opacity .25s; }
.pin-sight:hover .pin-tag, .pin-sight.on .pin-tag { opacity: 1; }
.legend { display: flex; gap: 18px; align-items: center; margin-top: 16px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.legend i.lg-sight { width: 8px; height: 8px; border-radius: 1.5px; rotate: 45deg; background: #fff; border: 2px solid var(--ink); }
.towns .group { padding: 14px 0 6px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); border-bottom: 1px solid var(--line); }

/* ---------- preview card, beside the pin ---------- */
.card { position: absolute; z-index: 4; left: 0; top: 0; width: 300px; background: #fff; border-radius: 0 20px; overflow: hidden; pointer-events: none; opacity: 0; scale: .96; transform-origin: 50% 100%; box-shadow: 0 18px 50px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .06); transition: opacity .25s, scale .45s var(--ease); }
.card.show { opacity: 1; scale: 1; }
.card.below { transform-origin: 50% 0; }
.card-pic { height: 164px; background: var(--soft); overflow: hidden; }
.card-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-txt { padding: 16px 20px 18px; }
.card-txt small { color: var(--grey); }
.card-txt b { display: block; font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; margin-top: 6px; }
.card-txt p { font-size: 14.5px; line-height: 1.45; color: var(--grey); margin-top: 6px; }
.card-txt p em { font-style: normal; }
.card-txt span { display: inline-block; margin-top: 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }

.whole { display: none; }

.readout { position: absolute; z-index: 3; right: var(--gut); bottom: 18px; display: flex; align-items: center; gap: 18px; font-size: 11px; letter-spacing: .06em; color: var(--grey); font-variant-numeric: tabular-nums; white-space: pre; transition: opacity .5s; }
.scale { display: inline-flex; align-items: center; gap: 8px; }
.scale i { display: block; height: 5px; border: 1px solid var(--grey); border-top: 0; }
.scale b { font-weight: 400; }
html.flying .readout { opacity: 0; }

/* ---------- contact notice ---------- */
.bar-link { color: var(--ink); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.bar-link:hover { color: var(--grey); border-color: var(--grey); }
.notice { padding: 64px var(--gut) 68px; border-top: 1px solid var(--line); background: var(--soft); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); column-gap: 20px; row-gap: 10px; scroll-margin-top: 0; }
.notice .k { grid-column: 1 / -1; }
.notice h2 { margin: 0; font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.02em; }
.notice h2 b { display: block; font-weight: 700; }
.notice-txt { max-width: 38em; font-size: 17px; line-height: 1.6; }
.notice-txt p { margin: 0 0 14px; }
.notice-txt a { font-weight: 700; text-underline-offset: 3px; }

/* ---------- footer ---------- */
.foot { padding: 44px var(--gut) 56px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 20px; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; font-size: 13px; line-height: 1.6; color: var(--grey); }
.foot a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot a:hover { text-decoration-color: var(--ink); }

/* ---------- small screens: the list becomes a row of cards under the map ---------- */
@media (max-width: 859px) {
  .stage { min-height: 600px; }
  .wash { background: linear-gradient(180deg, var(--soft) 0, rgba(245, 245, 245, .94) 170px, rgba(245, 245, 245, 0) 260px); }
  .bar { height: 56px; gap: 14px; }
  .logo-bar { gap: 10px; }
  .logo-bar .mark { width: 44px; }
  .logo-bar .logo-name { font-size: 12px; letter-spacing: .26em; }
  .bar-note { display: none; }
  .bar-btn { font-size: 10px; letter-spacing: .14em; }
  .hud { bottom: 28px; }
  .skip-flight { bottom: 24px; }
  .side { left: 0; right: 0; top: 56px; width: auto; justify-content: space-between; padding: 16px 0 16px; gap: 0; }
  .intro { padding: 0 var(--gut); }
  .intro h1 { font-size: clamp(2rem, 9.4vw, 2.8rem); }
  .intro h1 .k { margin-bottom: 8px; }
  .intro h1 b { display: inline; }
  .lead { display: none; }
  .towns { display: flex; gap: 10px; max-height: none; border: 0; overflow-x: auto; overflow-y: hidden; padding: 6px var(--gut) 4px; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut); scrollbar-width: none; }
  .towns::-webkit-scrollbar { display: none; }
  .towns li { flex: none; scroll-snap-align: start; }
  .town { display: block; width: 236px; padding: 0; border: 0; border-radius: 0 20px; overflow: hidden; background: #fff; box-shadow: 0 8px 26px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .06); }
  .town.on { box-shadow: 0 8px 26px rgba(0, 0, 0, .1), 0 0 0 1px var(--ink); }
  .town::after { display: none; }
  .town-pic { display: block; height: 104px; background: var(--soft); }
  .town-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .town-n { display: none; }
  .town-name { display: block; font-size: 19px; font-weight: 700; padding: 12px 14px 0; }
  .town:hover .town-name, .town.on .town-name { transform: none; }
  .town-meta { display: block; padding: 5px 14px 0; font-size: 10px; }
  .town-line { display: block; padding: 10px 14px 14px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
  .town-go { display: none; }
  .towns .group { display: none; }
  .legend { margin-top: 10px; }
  .pin-dot { width: 13px; height: 13px; border-width: 2px; }
  .pin-tag { font-size: 12.5px; line-height: 17px; padding: 0 3px; }
  .card { display: none; }
  .whole { display: block; position: absolute; z-index: 4; right: var(--gut); top: 150px; height: 34px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 20px 0; background: var(--soft); font-size: 10px; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .whole.show { opacity: 1; pointer-events: auto; }
  .readout { display: none; }
  .foot, .foot-cols { grid-template-columns: 1fr; }
  .bar-link { display: none; }
  .notice { grid-template-columns: 1fr; padding: 44px var(--gut) 48px; }
  .notice-txt { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
