:root {
    --ip-ocean: #0F3D4C;
    --ip-ocean-deep: #0A2A35;
    --ip-terracotta: #C4532F;
    --ip-terracotta-ink: #A8432A;
    --ip-red: #A3261A;
    --ip-sun: #F2B33D;
    --ip-seaglass: #7FB7B2;
    --ip-sand: #F5EEE3;
    --ip-ink: #1D2A33;
    --ip-muted: #5B6770;
    --ip-line: #E4DCCD;
    --lh-header-h: 84px;
    --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
    color: var(--ip-ink);
    background: var(--ip-sand);
}

/* ---------- header ---------- */
.lh-header {
    height: var(--lh-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid var(--ip-line);
}
.lh-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.lh-brand-text { display: flex; flex-direction: column; }
.lh-brand-name { font-family: "Fraunces", Georgia, serif; font-size: 22px; font-weight: 700; color: var(--ip-ocean); line-height: 1.1; }
.lh-brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ip-terracotta-ink); font-weight: 700; }
.lh-powered { font-size: 13px; color: var(--ip-muted); text-decoration: none; }
/* Language menu: our own list (a native <select> opens as the system menu, over the browser bar on a Mac) */
.lh-lang { position: relative; z-index: 30; margin-left: auto; margin-right: 16px; }
.lh-lang-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--ip-line);
    background: #fff; color: var(--ip-ocean);
    font: 500 14px/1.2 "DM Sans", sans-serif; cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.lh-lang-btn:hover, .lh-lang-btn[aria-expanded="true"] { border-color: var(--ip-ocean); box-shadow: 0 2px 10px rgba(15, 61, 76, .08); }
.lh-lang-btn:focus-visible { outline: 2px solid var(--ip-terracotta); outline-offset: 2px; }
.lh-lang-globe { width: 16px; height: 16px; color: var(--ip-terracotta-ink); flex: none; }
.lh-lang-code { display: none; }
.lh-lang-chevron { width: 10px; height: 6px; flex: none; transition: transform .2s var(--ease-out); }
.lh-lang-btn[aria-expanded="true"] .lh-lang-chevron { transform: rotate(180deg); }
.lh-lang-list {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 184px; margin: 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid var(--ip-line); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 61, 76, .16);
    animation: lh-lang-in .16s var(--ease-out);
}
.lh-lang-list[hidden] { display: none; }
.lh-lang-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 12px; border-radius: 9px; cursor: pointer;
    font-size: 14px; color: var(--ip-ink);
}
.lh-lang-list li:hover, .lh-lang-list li:focus { background: var(--ip-sand); outline: none; }
.lh-lang-list li[aria-selected="true"] { color: var(--ip-ocean); font-weight: 700; }
.lh-lang-check { width: 14px; height: 14px; flex: none; color: var(--ip-terracotta); visibility: hidden; }
.lh-lang-list li[aria-selected="true"] .lh-lang-check { visibility: visible; }
@keyframes lh-lang-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lh-powered:hover { color: var(--ip-ocean); text-decoration: underline; }

.ip-stamp { flex: none; animation: ip-stamp-in .7s var(--ease-out) both; }
.ip-stamp-ring { transform-box: view-box; transform-origin: 100px 100px; transition: transform 1.2s var(--ease-out); }
.lh-brand:hover .ip-stamp-ring, .lh-brand:focus-visible .ip-stamp-ring { transform: rotate(-40deg); }

@keyframes ip-stamp-in {
    0% { opacity: 0; transform: scale(1.5) rotate(-18deg); }
    60% { opacity: 1; transform: scale(.94) rotate(-6deg); }
    100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}

/* ---------- layout ---------- */
.lh-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr);
    height: calc(100vh - var(--lh-header-h));
}

/* ---------- globe ---------- */
.lh-globe-wrap {
    position: relative;
    background: radial-gradient(circle at 50% 45%, #175062 0%, var(--ip-ocean) 45%, var(--ip-ocean-deep) 100%);
    overflow: hidden;
}
.lh-globe { width: 100%; height: 100%; opacity: 0; transform: scale(.92); transition: opacity .9s var(--ease-out), transform 1.2s var(--ease-out); }
.lh-globe.is-ready { opacity: 1; transform: scale(1); }
.lh-globe-hint {
    position: absolute; left: 20px; top: 16px; margin: 0;
    font-size: 12px; color: #cfe0e3; pointer-events: none;
}

.lh-pin {
    position: relative;
    display: block; width: 30px; height: 30px; padding: 0;
    border: 0; background: none; cursor: pointer; pointer-events: auto;
    font: 700 11px "DM Sans", sans-serif;
}
.lh-pin-inner {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    animation: lh-pin-drop .6s cubic-bezier(.3, 1.5, .5, 1) both;
    animation-delay: calc(500ms + var(--i, 0) * 90ms);
}
.lh-pin-dot {
    position: relative;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--ip-terracotta); border: 2px solid var(--ip-sand);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    color: var(--ip-terracotta);
    transition: background .2s, transform .2s;
}
.lh-pin:hover .lh-pin-dot { transform: scale(1.25); }
.lh-pin-label {
    position: absolute; left: 50%; bottom: calc(100% - 4px);
    transform: translateX(-50%);
    padding: 3px 9px; border-radius: 10px;
    background: rgba(245, 238, 227, .95); color: var(--ip-ink); white-space: nowrap;
    visibility: hidden; opacity: 0; transition: opacity .2s;
}
.lh-pin:hover .lh-pin-label, .lh-pin:focus-visible .lh-pin-label,
.lh-pin.is-active .lh-pin-label, .lh-pin.show-label .lh-pin-label { visibility: inherit; opacity: 1; }
.lh-pin:hover, .lh-pin.is-active { z-index: 2; }
.lh-pin.is-dim { opacity: .3; }
.lh-pin.is-active .lh-pin-dot { background: var(--ip-sun); color: var(--ip-sun); }
.lh-pin.show-label .lh-pin-dot::after, .lh-pin.is-active .lh-pin-dot::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid currentColor; animation: lh-pulse 1.8s ease-out infinite;
}

@keyframes lh-pin-drop {
    0% { opacity: 0; transform: translateY(-28px) scale(.6); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lh-pulse {
    0% { opacity: .9; transform: scale(1); }
    100% { opacity: 0; transform: scale(2.4); }
}

/* ---------- panel ---------- */
.lh-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--ip-line); }
.lh-panel-head { padding: 26px 28px 12px; }
.lh-panel h1 { font-family: "Fraunces", Georgia, serif; font-size: 30px; line-height: 1.15; margin: 0 0 6px; color: var(--ip-ocean); }
.lh-lead { margin: 0 0 16px; color: var(--ip-muted); font-size: 15px; }

.lh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lh-chip {
    min-height: 38px; padding: 6px 15px; border-radius: 999px;
    border: 1px solid var(--ip-line); background: #fff; color: var(--ip-ink);
    font: 700 13px "DM Sans", sans-serif; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.lh-chip:hover { border-color: var(--ip-ocean); }
.lh-chip:active { transform: scale(.96); }
.lh-chip[aria-pressed="true"] { background: var(--ip-ocean); border-color: var(--ip-ocean); color: var(--ip-sand); }
.lh-chip-count { margin-left: 6px; font-weight: 400; opacity: .75; }
.lh-chip:focus-visible, .lh-cta:focus-visible, .lh-points a:focus-visible, .lh-pin:focus-visible, .lh-brand:focus-visible, .lh-powered:focus-visible {
    outline: 3px solid var(--ip-sun); outline-offset: 2px; border-radius: 8px;
}

.lh-status { margin: 0; padding: 4px 28px 10px; font-size: 13px; color: var(--ip-muted); }

.lh-list { list-style: none; margin: 0; padding: 0 28px 28px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }

/* ---------- cards ---------- */
.lh-card {
    display: flex; gap: 18px; padding: 16px;
    background: #fff; border: 1px solid var(--ip-line); border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 61, 76, .04);
    transition: border-color .2s, box-shadow .25s, translate .25s var(--ease-out);
    animation: lh-rise .55s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 60ms);
}
.lh-card:hover { translate: 0 -2px; box-shadow: 0 10px 24px rgba(15, 61, 76, .10); }
.lh-card.is-active { border-color: var(--ip-terracotta); box-shadow: 0 0 0 3px rgba(196, 83, 47, .15), 0 10px 24px rgba(15, 61, 76, .10); }
.lh-card:focus { outline: none; }

@keyframes lh-rise {
    0% { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}

.lh-photo-wrap { width: 104px; height: 104px; flex: none; border-radius: 14px; overflow: hidden; background: #e9e1d3; }
.lh-photo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
.lh-card:hover .lh-photo { transform: scale(1.08); }

.lh-body { min-width: 0; }
.lh-name { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 19px; color: var(--ip-ocean); }
.lh-role { margin: 2px 0 0; font-size: 13px; color: var(--ip-terracotta-ink); font-weight: 700; }
.lh-where { margin: 2px 0 6px; font-size: 13px; color: var(--ip-muted); }
.lh-intro { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.lh-points { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lh-points a {
    display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px;
    background: #EEF5F4; color: var(--ip-ocean); font-size: 12px; font-weight: 500; text-decoration: none;
    transition: background .2s;
}
.lh-points a:hover { background: #DCEBE9; }
.lh-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ip-terracotta-ink); text-decoration: none; }
.lh-cta-arrow { transition: transform .2s var(--ease-out); }
.lh-cta:hover .lh-cta-arrow { transform: translateX(4px); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
    :root { --lh-header-h: 72px; }
    .lh-header { padding: 0 16px; }
    .ip-stamp { width: 58px; height: 58px; }
    .lh-brand-name { font-size: 18px; }
    .lh-powered { display: none; }
    .lh-lang { margin-right: 0; }
    .lh-main { grid-template-columns: 1fr; grid-template-rows: 44vh auto; height: auto; }
    .lh-panel { border-left: 0; }
    .lh-panel-head { padding: 20px 16px 12px; }
    .lh-status { padding: 4px 16px 10px; }
    .lh-list { overflow: visible; padding: 0 16px 24px; }
    .lh-photo-wrap { width: 76px; height: 76px; }
}
@media (max-width: 480px) {
    .lh-brand-sub { display: none; } /* "Esperti locali · esperienze autentiche" does not fit next to the logo */
    .lh-lang-btn { padding: 8px 12px; gap: 6px; }
    .lh-lang-name { display: none; }
    .lh-lang-code { display: inline; font-weight: 700; letter-spacing: .04em; }
}

@media (prefers-reduced-motion: reduce) {
    .ip-stamp, .lh-pin-inner, .lh-card, .lh-pin-dot::after, .lh-lang-list { animation: none !important; }
    .lh-globe, .lh-card, .lh-photo, .ip-stamp-ring, .lh-cta-arrow { transition: none !important; }
    .lh-globe { opacity: 1; transform: none; }
    .lh-card:hover { translate: none; }
    .lh-card:hover .lh-photo { transform: none; }
    .ip-stamp { transform: rotate(-8deg); }
}

/* Instagram icon next to a hero's name */
.lh-social {
    display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 8px; vertical-align: 3px;
    border-radius: 50%; color: #fff;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    transition: transform .2s;
}
.lh-social:hover { transform: scale(1.1); }
