/* SITED · base grafica WeInspire */

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --light1: #fff;
  --light2: #646464;
  --dark1: #000;
  --dark2: #111;
  --line: #333;
  --red: #EA0000;
  --yellow: #FDCE00;
  --gap: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
h1, h2, h3 { font-weight: 500; font-size: inherit; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.18;
  background: var(--dark1);
  color: var(--light1);
  padding: var(--gap);
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--light1); color: var(--dark1); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.muted { color: var(--light2); }
.right { text-align: right; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.js) .js-only { display: none !important; }
.count { font-size: .7em; vertical-align: super; line-height: 0; color: var(--light2); margin-left: 1px; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; } .col-8 { grid-column: span 8; } .col-9 { grid-column: span 9; } .col-12 { grid-column: span 12; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  margin: calc(var(--gap) * -1) calc(var(--gap) * -1) 0;
  padding: var(--gap) var(--gap) 0;
  background: var(--dark1);
}
.site-header > .grid { row-gap: 0; }
.logo {
  background: var(--red); color: var(--light1);
  margin: calc(var(--gap) * -1) 0 0 calc(var(--gap) * -1);
  padding: var(--gap); min-height: 60px;
}
.logo:hover { text-decoration: none; }
.logo strong { display: block; font-weight: 500; letter-spacing: .02em; }
.nav { display: flex; gap: 24px; align-items: flex-start; justify-content: flex-end; }
.nav-left { justify-content: flex-start; }

/* Pannelli: <details> */
.drop summary { list-style: none; cursor: pointer; user-select: none; }
.drop summary::-webkit-details-marker { display: none; }
.drop[open] summary { text-decoration: underline; }
.panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--dark1); color: var(--light2);
  padding: 20px var(--gap); border-bottom: 1px solid #222;
  max-height: calc(100vh - 80px); overflow: auto;
}
.facet-title { color: var(--light1); margin-bottom: 8px; }
.facet ul { display: flex; flex-direction: column; gap: 3px; }
.facet a { color: var(--light2); }
.facet a:hover, .facet a.on { color: var(--light1); text-decoration: none; }
.facet a.on::before { content: '● '; color: var(--red); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 22px; height: 22px; border-radius: 100px; border: 1px solid var(--line); }
.swatch.on { outline: 2px solid var(--light1); outline-offset: 2px; }
.swatch:hover { transform: scale(1.12); }
.swiss-toggle.on::before { content: '● '; color: var(--red); }
.cities { margin-top: 12px; }
.loc-search { border-bottom: 1px solid var(--line); max-width: 260px; width: 100%; margin-bottom: 12px; padding-bottom: 3px; outline: 0; }
.loc-search:focus { border-color: var(--light1); }
.countries { columns: 3; column-gap: var(--gap); }
.countries > li { break-inside: avoid; padding-bottom: 6px; }
.countries .sub { padding: 3px 0 0 14px; display: flex; flex-direction: column; gap: 2px; }

/* Ricerca */
.search { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); flex: 1; max-width: 260px; margin-right: auto; }
.search:focus-within { border-color: var(--light1); }
.search input { width: 100%; padding: 0 0 3px; outline: 0; }
.search input::placeholder, .loc-search::placeholder { color: var(--light2); }
.search kbd { font: inherit; font-size: 11px; color: var(--light2); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }

/* Filtri attivi */
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0; }
.chip { border: 1px solid var(--line); border-radius: 100px; padding: 4px 10px; display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { border-color: var(--light1); text-decoration: none; }
.chip .dot { width: 9px; height: 9px; border-radius: 100px; }
.chip.clear { color: var(--light2); border-color: transparent; }

/* Apertura */
.strap { padding: 60px 0 40px; }
.strap h1 { font-size: 7vw; line-height: .95; letter-spacing: -.02em; }
.strap-small { padding: 40px 0 30px; }
.strap-small h1 { font-size: 5vw; }
.strap .sub { margin-top: 12px; }

/* Latest */
.latest { border-top: 1px solid var(--light1); padding-top: 12px; margin-bottom: 60px; }
.latest .label { color: var(--red); }
.latest h2 { font-size: 4vw; line-height: 1; letter-spacing: -.01em; margin: 6px 0 14px; }
.latest .why { font-size: 17px; }
.latest .actions { margin-top: 24px; }
.latest img { width: 100%; }

/* Lista e card */
.list-head { border-top: 1px solid var(--light1); padding: 12px 0; }
.cards { row-gap: 48px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.thumb { position: relative; background: var(--dark2); aspect-ratio: 16 / 10; overflow: hidden; transition: opacity .5s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (hover: hover) {
  .cards:hover .thumb { opacity: .15; }
  .cards .card:hover .thumb { opacity: 1; }
  .card .tags { opacity: 0; transition: opacity .5s ease .4s; }
  .card:hover .tags { opacity: 1; }
}
.card .tags { display: flex; flex-direction: column; gap: 2px; color: var(--light2); }
.card .num { color: var(--light2); }
.card .title { font-size: 15px; }
.palette { display: flex; height: 6px; }
.palette span { height: 100%; }
.save {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 100px;
  display: grid; place-items: center; font-size: 14px;
  background: var(--dark1); opacity: 0; transition: opacity .3s;
}
.card:hover .save, .save:focus-visible, .save.on { opacity: 1; }
.save.on { background: var(--red); }
.city { background: var(--yellow); color: var(--dark1); padding: 0 3px; align-self: flex-start; }
.empty { padding: 60px 0; color: var(--light2); grid-column: 1 / -1; }

/* Bottoni */
.btn {
  height: 44px; padding: 0 22px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--light1); color: var(--dark1);
}
.btn:hover { background: var(--red); color: var(--light1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--light1); border: 1px solid var(--light1); }
.btn.ghost:hover { background: var(--light1); color: var(--dark1); }
.btn.ghost.on { background: var(--red); border-color: var(--red); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Paginazione */
.pager { border-top: 1px solid var(--light1); margin-top: 60px; padding-top: 12px; align-items: start; }
.pager-side { display: flex; flex-direction: column; gap: 4px; }
.pager-side.right { text-align: right; }
.pager-nums { display: flex; gap: 18px; font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.pager-nums a { color: var(--light2); }
.pager-nums a:hover, .pager-nums a.on { color: var(--light1); text-decoration: none; }

/* Scheda sito */
.crumbs { display: flex; justify-content: space-between; padding-top: 12px; }
.crumbs span { display: flex; gap: 12px; color: var(--light2); }
.detail-head { padding: 40px 0 20px; border-bottom: 1px solid var(--light1); align-items: end; }
.detail-head h1, .big-meta { font-size: 7vw; line-height: 1; letter-spacing: -.02em; }
.big-meta { display: flex; justify-content: space-between; }
.detail-body { padding-top: 20px; }
.sticky { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 40px; }
.sticky .actions { margin-top: -20px; }
.why { font-size: 22px; line-height: 1.15; }
.block-title { color: var(--light2); margin-bottom: 8px; }
.block-sub { margin-top: 16px; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; }
.kv dt { color: var(--light2); }
.kv-num { display: flex; flex-direction: column; gap: 4px; }
.kv-num li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.taglist { display: flex; flex-wrap: wrap; gap: 6px; }
.taglist a { border: 1px solid var(--line); border-radius: 100px; padding: 3px 9px; }
.taglist a:hover { border-color: var(--light1); text-decoration: none; }
.moods { margin-top: 8px; }
.pal { display: flex; flex-direction: column; gap: 4px; }
.pal button { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; text-align: left; }
.pal .sw { height: 28px; border: 1px solid var(--line); }
.pal button:hover .hex { text-decoration: underline; }
.img-pal { display: flex; height: 28px; border: 1px solid var(--line); }
.img-pal button { min-width: 6px; }
.viewer-tabs { display: flex; gap: 24px; margin-bottom: 12px; }
.viewer-tabs button { color: var(--light2); }
.viewer-tabs button[aria-selected='true'] { color: var(--light1); text-decoration: underline; }
.viewer { display: flex; justify-content: center; background: var(--dark2); padding: 24px; }
.viewer[hidden] { display: none; }
.viewer-tablet img { width: 52%; }
.viewer-mobile img { width: 30%; }
.similar { margin-top: 80px; }
.text { font-size: 17px; line-height: 1.4; }
.text p + p { margin-top: 1em; }

/* Footer */
.site-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: var(--gap); background: var(--dark1); align-items: center; }
.footer-button { height: 44px; border-radius: 100px; display: flex; align-items: center; justify-content: center; background: var(--light1); color: var(--dark1); }
.footer-button:hover { background: var(--red); color: var(--light1); text-decoration: none; }

.toast {
  position: fixed; left: 50%; bottom: 80px; z-index: 99; pointer-events: none;
  transform: translate(-50%, 20px); opacity: 0; transition: .3s;
  background: var(--light1); color: var(--dark1); padding: 8px 16px; border-radius: 100px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Mobile */
@media (max-width: 991px) {
  .grid > [class*='col-'] { grid-column: span 12; }
  .grid.keep > [class*='col-'] { grid-column: span 6; }
  .site-header { position: relative; }
  .logo { margin-right: calc(var(--gap) * -1); }
  .nav, .nav-left { justify-content: flex-start; flex-wrap: wrap; padding: 10px 0 4px; }
  .search { max-width: none; }
  .strap h1 { font-size: 13vw; }
  .strap-small h1 { font-size: 10vw; }
  .latest h2 { font-size: 9vw; }
  .detail-head h1, .big-meta { font-size: 12vw; }
  .sticky { position: static; }
  .countries { columns: 2; }
  .pager-nums { order: -1; font-size: 32px; }
  .pager-side.right { text-align: left; }
  .site-footer .hide-m { display: none; }
  .viewer-tablet img { width: 100%; }
  .viewer-mobile img { width: 70%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
