/* ============================================================
   RUNDGANG — the room-by-room photo tours.
   Loaded on top of base.css and the house sheet (villa.css /
   residenza.css), so each tour keeps its house's typography and
   tint. Adds only three things: the compact head, the section
   index (chips on mobile, quiet sticky column on desktop) and an
   art-directed photo grid.
   ============================================================ */
:root{--nav-h:63px}

/* ---- compact head ---- */
.tour-head{padding-bottom:clamp(1rem,3vw,1.8rem)}
.tour-head h1{margin:0}
.tour-head .lede{margin:.7rem 0 0}
.tour-facts{display:flex;flex-wrap:wrap;gap:.35rem 1.5rem;list-style:none;margin:1.3rem 0 0;padding:0;
  font-size:var(--step--1);letter-spacing:.1em;text-transform:uppercase;font-weight:600;color:var(--muted)}
.tour-facts li{position:relative}
.tour-facts li + li::before{content:"·";position:absolute;left:-.9rem;color:var(--stone-300)}
.tour-back{margin:1.1rem 0 0;font-size:.95rem}
.tour-back a{color:var(--green)}

/* ---- layout ---- */
.tour-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.tour-sections{min-width:0}

/* ---- section index ---- */
.tour-index{position:sticky;top:var(--nav-h);z-index:40;margin:0 0 1.4rem;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
body.villa .tour-index{background:var(--bg-warm)}
body.residenza .tour-index{background:var(--bg-cool)}
.tour-index .tour-index-heading{display:none}
.tour-index ol{display:flex;gap:.45rem;list-style:none;margin:0;padding:.65rem 0;
  overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tour-index ol::-webkit-scrollbar{display:none}
.tour-index li{flex:0 0 auto}
.tour-index a{display:block;white-space:nowrap;text-decoration:none;background:#fff;
  font-size:.76rem;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);
  border:1px solid var(--stone-200);border-radius:var(--radius);padding:.42rem .78rem;
  transition:color .2s var(--ease),border-color .2s var(--ease)}
.tour-index a:hover{color:var(--anthracite);border-color:var(--stone-300)}
.tour-index a[aria-current="true"]{color:var(--green);border-color:var(--green)}
.tour-index a:focus-visible{outline:3px solid var(--green);outline-offset:2px}

@media (min-width:980px){
  .tour-layout{grid-template-columns:minmax(0,190px) minmax(0,1fr);
    gap:clamp(2rem,5vw,4.5rem);align-items:start}
  .tour-index{position:sticky;top:calc(var(--nav-h) + 2.2rem);margin:0;border:0;background:none}
  body.villa .tour-index,body.residenza .tour-index{background:none}
  .tour-index .tour-index-heading{display:block;margin:0 0 .7rem .9rem;
    font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;font-weight:600;color:var(--muted)}
  .tour-index ol{flex-direction:column;gap:0;padding:0;overflow:visible}
  .tour-index a{background:none;border:0;border-left:1px solid var(--stone-200);border-radius:0;
    padding:.5rem .9rem;white-space:normal;letter-spacing:.06em}
  .tour-index a[aria-current="true"]{border-left-color:var(--green)}
}

/* ---- one section per room ---- */
.tour-sec{scroll-margin-top:calc(var(--nav-h) + 4.4rem);
  padding-block:clamp(2.2rem,5vw,3.4rem);border-top:1px solid var(--line)}
.tour-sec:first-child{border-top:0;padding-top:0}
.tour-sec h2{margin:0;font-size:var(--step-2)}
.tour-sec-intro{margin:.55rem 0 0;max-width:56ch;color:var(--charcoal);line-height:1.6}
.tour-chips{display:flex;flex-wrap:wrap;gap:.4rem;list-style:none;margin:1rem 0 0;padding:0}
.tour-chips li{background:#fff;border:1px solid var(--stone-200);border-radius:var(--radius);
  padding:.24rem .6rem;font-size:.76rem;letter-spacing:.03em;color:var(--muted)}

/* ---- the photo grid: one wide tile carries two half tiles ---- */
.tour-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin-top:1.6rem}
.tour-grid .gallery-item{overflow:hidden;border-radius:var(--radius);background:var(--stone-100)}
.tour-grid .gallery-item img{display:block;width:100%;height:100%;object-fit:cover;
  aspect-ratio:var(--ar,4/3);transition:transform .6s var(--ease)}
.tour-grid .gallery-item:hover img{transform:scale(1.02)}
.tour-grid .gallery-item:focus-visible{outline:3px solid var(--green);outline-offset:2px}
.tour-grid .t-solo{grid-column:1/-1;--ar:3/2}
.tour-grid .t-wide{grid-column:1/-1;--ar:16/9}
.tour-grid .t-half{--ar:4/3}
.tour-grid .t-portrait{--ar:3/4}

@media (max-width:640px){
  .tour-grid{grid-template-columns:1fr;gap:.6rem}
  .tour-grid .t-solo,.tour-grid .t-wide{--ar:4/3}
  .tour-grid .t-portrait{--ar:3/4}
}
@media (prefers-reduced-motion:reduce){
  .tour-grid .gallery-item img{transition:none}
  .tour-grid .gallery-item:hover img{transform:none}
}
