/* Projecte web d’Oriol Solà i Solà · © 2026 */
:root {
  --moix-purple: #bb29bb;
  --ink: #202020;
  --paper: #f7f5ef;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

.masthead {
  height: 77px;
  background: #fff;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid #e9e6e6;
  padding: 0 clamp(22px, 4vw, 64px);
}
.brand { gap: 15px; }
.brand-rule { width: 5px; height: 42px; background: var(--moix-purple); }
.brand-pin {
  width: 42px;
  height: 50px;
  flex: 0 0 42px;
  display: block;
  object-fit: contain;
}
.brand-copy { line-height: 1.03; }
.brand-copy strong {
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.045em;
  text-transform: none;
}
.brand-copy small {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}
.header-right { gap: 28px; }
.header-link { color: #242024; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.header-link:hover, .header-link:focus-visible { color: var(--moix-purple); text-decoration: underline; text-underline-offset: 4px; }
.project-label {
  color: #242024;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.demo-pill {
  border: 1px solid #e8d9e8;
  border-radius: 0;
  background: #fbf4fb;
  color: #692269;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

main { max-width: none; }
.intro {
  min-height: 276px;
  padding: 40px clamp(22px, 4vw, 64px) 0;
  gap: 0;
  align-items: stretch;
  background: var(--paper);
  border-bottom: 1px solid #eae5e3;
}
.intro-title { flex: 1; padding: 15px 30px 36px 0; }
.eyebrow, .section-kicker { color: #a51fa5; }
.eyebrow { font-size: 11px; letter-spacing: .13em; }
.eyebrow-line { background: var(--moix-purple); width: 32px; }
h1, h2, h3 { font-family: "DM Sans", Arial, sans-serif; }
h1 {
  margin-top: 25px;
  font-size: clamp(42px, 5.2vw, 77px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 800;
}
h1 em { color: var(--moix-purple); }
.intro-aside {
  width: min(32%, 370px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 0 38px 27px;
  border-left: 1px solid #d9ccd7;
}
.intro-index { color: #a123a1; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.intro p { padding: 0; color: #38333a; max-width: 340px; font-size: 16px; line-height: 1.55; }

.workspace { margin-top: 30px; gap: 22px; }
.explorer { box-shadow: none; border-color: #e5dfe5; }
.explorer-head h2 { letter-spacing: -.045em; }
.count-badge { border-radius: 0; background: #f6e1f6; color: #831b83; }
.place-list-toggle { display: none; }
.search-wrap, .filter-grid select { border-color: #ddd5dd; }
.list-head { background: #f7f5ef; }
.place-row.active { background: #fbecfb; }
.map-frame { border-color: #ddd8dd; }
.map-overlay { box-shadow: 0 4px 18px #25152526; }
.map-legend { border-radius: 0; gap: 14px; padding: 9px 12px; }
.legend-item { display: flex; align-items: center; gap: 7px; }
.legend-item > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.legend-item strong { font-size: 10px; color: #35233f; white-space: nowrap; }
.legend-item small { margin-top: 2px; font-size: 9px; font-weight: 500; color: #7d6f84; white-space: nowrap; }
.legend-dot { flex: 0 0 auto; width: 12px; height: 12px; }
.legend-dot.exact { width: 15px; height: 19px; border: 0; background: transparent url("./pin-moixiganguers-final.png?v=4") center / contain no-repeat; }
.legend-dot.approximate { background: #fff; border: 2px dashed #751575; }
@media (max-width: 700px) {
  .map-legend { align-items: flex-start; flex-direction: column; gap: 7px; }
}
.detail { background: var(--moix-purple); }
.detail:after { display: none; }
.detail-empty { padding: 44px 48px; }
.empty-symbol { display: none; }
.detail-empty:before, .detail-content:before {
  content: "MOIXIGANGUERS · ARXIU CASTELLER";
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .19em;
  color: #fff;
  opacity: .88;
  margin-bottom: 13px;
}
.detail-empty h2 { margin: 0 0 7px; font-size: 29px; letter-spacing: -.04em; }
.detail-content { padding-top: 24px; }
.detail-content:before { margin-bottom: 17px; }
.detail-kicker { letter-spacing: .1em; }
.history-toggle, .history-more { border-radius: 0; }
footer { padding-top: 10px; border-top: 1px solid #e8e2e8; }
.site-footer { align-items: flex-start; line-height: 1.55; letter-spacing: .03em; }
.site-footer p { max-width: 900px; font-size: 11px; color: #625662; }
.site-footer strong { color: #7c207c; }
.footer-status { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; white-space: nowrap; }
.footer-status small { color: #8b7f8b; font-size: 9px; font-weight: 500; letter-spacing: .01em; }

@media (min-width: 701px) {
  body { position: relative; }
  .masthead {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: transparent;
    border-bottom: 0;
  }
  .brand-pin { width: 38px; height: 46px; flex-basis: 38px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 11px; }
  .intro { min-height: 154px; padding-top: 55px; }
  .intro-title { padding: 8px 30px 18px 0; display: flex; align-items: flex-end; }
  .intro h1 { margin-top: 0; font-size: clamp(38px, 3.25vw, 52px); line-height: .92; }
  .intro-aside { width: min(28%, 340px); justify-content: flex-end; padding: 8px 0 19px 25px; }
  .intro p { font-size: 13px; line-height: 1.4; }
  .workspace {
    min-height: 460px;
    height: calc(100vh - 227px);
    margin-top: 14px;
    margin-bottom: 10px;
  }
  .explorer { min-height: 0; height: 100%; }
  .place-list { max-height: none; }
  .map-column { grid-template-rows: minmax(245px, 55%) minmax(190px, 1fr); height: 100%; gap: 10px; }
  .map-frame { height: auto; }
  .detail { min-height: 0; }
  .detail-empty { padding: 30px 38px; }
  .detail-content { padding: 18px 25px; }
  .detail-content:before { margin-bottom: 10px; }
  .detail-grid { margin-top: 12px; padding-top: 11px; }
  .history-toggle { margin-top: 11px; padding: 8px 12px; }
  .site-footer { min-height: 34px; padding-top: 5px; padding-bottom: 6px; }
  .site-footer p { max-width: none; flex: 1; font-size: 9px; line-height: 1.3; }
  .workspace.history-open {
    height: auto;
    min-height: 0;
    align-items: start;
  }
  .workspace.history-open .explorer {
    position: sticky;
    top: 10px;
    height: calc(100vh - 30px);
    min-height: 460px;
  }
  .workspace.history-open .map-column {
    height: auto;
    grid-template-rows: minmax(300px, 42vh) auto;
  }
  .workspace.history-open .detail { overflow: visible; }
}

@media (max-width: 900px) {
  .intro { min-height: 190px; }
  .intro-aside { width: 35%; }
  h1 { font-size: clamp(39px, 5vw, 60px); }
}
@media (max-width: 700px) {
  .masthead { height: 60px; padding: 0 14px; }
  .brand { gap: 10px; }
  .brand-pin { width: 34px; height: 41px; flex-basis: 34px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 10px; }
  .demo-pill { max-width: 105px; text-align: center; font-size: 8px; padding: 5px; }
  .header-right { gap: 9px; }
  .header-link { font-size: 8px; }
  .intro { display: block; min-height: 0; padding: 18px 14px 17px; }
  .intro-title { padding: 0; }
  .eyebrow { font-size: 8px; letter-spacing: .08em; }
  .eyebrow-line { width: 20px; }
  h1 { font-size: clamp(36px, 10.5vw, 48px); margin-top: 12px; line-height: .96; }
  .intro-aside { display: none; }
  .workspace { margin: 8px 8px 18px; gap: 8px; }
  .explorer-head { padding: 13px 14px 10px; }
  .explorer-head h2 { font-size: 20px; }
  .section-kicker { font-size: 9px; }
  .count-badge { width: auto; min-width: 30px; height: 30px; padding: 0 7px; }
  .controls { padding: 0 14px 10px; }
  .search-wrap { height: 42px; }
  .filter-grid { margin-top: 10px; gap: 8px; }
  .filter-grid select { height: 38px; }
  .clear-button { margin-top: 9px; }
  .list-head { padding: 10px 14px; align-items: center; }
  .desktop-list-sort { display: none; }
  .place-list-toggle { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: #861d86; padding: 2px 0; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .place-list { display: none; max-height: 180px; }
  .explorer.list-open .place-list { display: block; }
  .map-frame { height: min(58svh, 500px); min-height: 380px; }
  .map-overlay { top: 10px; right: 10px; left: auto; padding: 8px 10px; }
  .map-overlay span { display: none; }
  .map-legend { right: 10px; bottom: 18px; padding: 8px 9px; gap: 10px; flex-direction: row; align-items: center; }
  .legend-item { gap: 5px; }
  .legend-item small { display: none; }
  .legend-item strong { font-size: 9px; }
  .legend-dot { width: 10px; height: 10px; }
  .detail { min-height: 0; }
  .detail-empty { padding: 22px; }
  .detail-empty:before { margin-bottom: 8px; font-size: 8px; }
  .detail-empty h2 { font-size: 22px; }
  .detail-empty p { font-size: 13px; line-height: 1.4; }
  .site-footer { padding: 13px 10px 18px; }
  .site-footer p { font-size: 9px; line-height: 1.45; }
  .footer-status { align-items: flex-start; margin-top: 10px; white-space: normal; }
  .footer-status small { font-size: 8px; }
}

/* Navegació principal entre el mapa i les estadístiques */
.masthead .section-nav{display:flex;align-items:stretch;gap:0;border:1px solid #bb29bb;background:#fff}
.masthead .section-nav a{display:flex;align-items:center;justify-content:center;min-height:34px;padding:0 15px;color:#6f1d6f;background:#fff;font-size:10px;font-weight:800;letter-spacing:.06em;text-decoration:none;text-transform:uppercase;white-space:nowrap}
.masthead .section-nav a+a{border-left:1px solid #bb29bb}
.masthead .section-nav a:hover,.masthead .section-nav a:focus-visible{background:#faeafa;color:#681568;text-decoration:none}
.masthead .section-nav a.active{background:#bb29bb;color:#fff}
@media(max-width:700px){.masthead .section-nav a{min-height:31px;padding:0 9px;font-size:8px}.brand-copy strong{font-size:14px}.brand-copy small{font-size:9px}}

@media(max-width:700px){.masthead{padding-left:6px;padding-right:6px}.brand-lockup{gap:4px}.brand-mark{width:24px;height:32px}.masthead .section-nav a{padding-left:5px;padding-right:5px;font-size:7px;letter-spacing:.03em}}
