/* Castelluccio — editoriale fioritura */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Palette: papavero (default) */
  --bg: #f5f1e8;
  --bg-2: #ebe4d3;
  --ink: #1a1714;
  --ink-soft: #4a433c;
  --ink-mute: #8a8074;
  --line: #1a1714;
  --accent: #c8321e;        /* papavero */
  --accent-2: #3a4a9e;      /* fiordaliso */
  --accent-3: #b86a9c;      /* lenticchia */
  --accent-4: #d4a02a;      /* genziana/senape */
  --accent-5: #2d5a3d;      /* verde prato */

  --serif: 'Playfair Display', 'Times New Roman', serif;
  --sans: 'Inter', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-palette="fiordaliso"] {
  --bg: #eef0f7;
  --bg-2: #dfe3ef;
  --accent: #3a4a9e;
  --accent-2: #c8321e;
  --accent-3: #b86a9c;
}
[data-palette="lenticchia"] {
  --bg: #f3ebf0;
  --bg-2: #e6d4e0;
  --accent: #b86a9c;
  --accent-2: #c8321e;
  --accent-3: #3a4a9e;
}
[data-palette="neutro"] {
  --bg: #efece3;
  --bg-2: #e0dbcd;
  --accent: #2a2520;
  --accent-2: #6b5a3e;
  --accent-3: #8a7a5a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 40px; }
.rule { border: none; border-top: 1px solid var(--ink); opacity: 0.5; }
.rule-thick { border: none; border-top: 2px solid var(--ink); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.display {
  font-family: var(--serif);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.display-italic {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.serif { font-family: var(--serif); }
.italic { font-style: italic; }
.mono { font-family: var(--mono); }
.drop::first-letter {
  font-family: var(--serif);
  font-weight: 900;
  float: left;
  font-size: 5.6em;
  line-height: 0.82;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: pretty;
}
.body-long p {
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 1.1em;
  color: var(--ink);
  text-wrap: pretty;
}
.body-long p + p { text-indent: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.topbar-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 32px;
}
.brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 10px;
}
.brand { white-space: nowrap; }
.brand .num { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-mute); letter-spacing: 0.1em; white-space: nowrap; }

.nav { display: flex; gap: 28px; }
.nav a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
  padding: 6px 0; border-bottom: 1px solid transparent;
  cursor: pointer; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.lang-toggle {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  display: flex; gap: 2px; border: 1px solid var(--ink); border-radius: 2px;
  overflow: hidden;
}
.lang-toggle button {
  background: transparent; border: none; cursor: pointer;
  padding: 5px 10px; font: inherit; color: var(--ink);
}
.lang-toggle button.on { background: var(--ink); color: var(--bg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  padding: 48px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
}
.hero-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-end;
  min-height: 78vh;
}
.hero-grid > :first-child {
  flex: 1 1 60%;
  min-width: 0;
  max-width: 100%;
}
.hero-grid > :last-child {
  flex: 0 0 360px;
  max-width: 360px;
  width: 360px;
}
@media (max-width: 900px) {
  .hero-grid > :first-child,
  .hero-grid > :last-child {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.035em;
}
.hero h1 em {
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  display: block;
}
.hero-meta {
  display: block !important;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--ink-soft);
  width: 100%;
}
.hero-meta > div {
  display: block !important;
  border-top: 1px solid var(--ink);
  padding-top: 8px !important;
  margin-bottom: 14px;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
}
.hero-meta > div > span {
  display: block !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  color: var(--ink-mute);
  margin-bottom: 4px;
  white-space: normal !important;
  word-break: normal !important;
}
.hero-meta > div > strong {
  display: block !important;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* "Photo" placeholder field — stylized campo di fiori */
.campo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--ink);
  overflow: hidden;
  background: var(--bg-2);
}
.campo-sky {
  position: absolute; inset: 0 0 50% 0;
  background: linear-gradient(180deg, #e6d7b8 0%, #d9c9a0 50%, #c8b47e 100%);
}
.campo-field {
  position: absolute; inset: 50% 0 0 0;
  background:
    repeating-linear-gradient(85deg, transparent 0 14px, rgba(26,23,20,.06) 14px 15px),
    linear-gradient(180deg, var(--accent) 0%, var(--accent-3) 60%, var(--accent-4) 100%);
}
.campo-horizon {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--ink); opacity: .4;
}
/* poppies scatter */
.campo-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 1.5px var(--bg);
}
.campo-dot.b { background: var(--accent-2); }
.campo-dot.c { background: var(--accent-4); }
.campo-dot.d { background: var(--accent-3); }
.campo-label {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--bg);
  background: rgba(26,23,20,.75); padding: 4px 8px;
}

/* ---------- Section ---------- */
.section { padding: 96px 0; border-bottom: 1px solid var(--ink); }
.section-head {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 40px;
  align-items: baseline;
  margin-bottom: 56px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
}
.section-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 64px;
  color: var(--accent);
  line-height: 1;
}
.section-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- Columns / multicol article ---------- */
.article-cols {
  column-count: 2; column-gap: 48px;
  font-size: 16px; line-height: 1.65;
}
.article-cols p { margin-bottom: 1em; break-inside: avoid; text-wrap: pretty; }
@media (max-width: 900px) { .article-cols { column-count: 1; } }

.pull {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.25;
  color: var(--accent);
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 24px 0;
  margin: 32px 0;
  text-wrap: balance;
}

/* ---------- Datasheet ---------- */
.datasheet {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.datasheet .cell {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 22px 20px;
  min-height: 140px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg);
}
.datasheet .cell .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-mute);
}
.datasheet .cell .v {
  font-family: var(--serif); font-weight: 900; font-size: 36px; line-height: 1;
  letter-spacing: -0.02em;
}
.datasheet .cell .u { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
.datasheet .cell.accent { background: var(--accent); color: var(--bg); }
.datasheet .cell.accent .k, .datasheet .cell.accent .u { color: var(--bg); opacity: 0.85; }
@media (max-width: 900px) { .datasheet { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--bg); background: var(--ink);
  padding: 14px 22px; border: 1px solid var(--ink); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  padding: 6px 10px; border: 1px solid var(--ink); border-radius: 999px;
  text-transform: uppercase; color: var(--ink);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--bg);
  padding: 80px 0 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 48px; }
.footer h3 { font-family: var(--serif); font-weight: 900; font-size: 48px; line-height: 0.95; letter-spacing: -0.02em; max-width: 460px; }
.footer h3 em { color: var(--accent); font-style: italic; font-weight: 400; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 8px; font-size: 14px; color: #cfc6b4; }
.footer ul a:hover { color: var(--bg); }
.footer-base { display: flex; justify-content: space-between; align-items: flex-start; border-top: 1px solid #3a342c; padding-top: 20px; font-family: var(--mono); font-size: 11px; color: #8a8074; letter-spacing: 0.08em; gap: 24px; flex-wrap: wrap; }
.footer-base-left a { color: #cfc6b4; text-decoration: none; }
.footer-base-left a:hover { color: var(--bg); }
.footer-base-left { flex: 1; min-width: 280px; }

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  background: var(--bg); border: 1px solid var(--ink);
  padding: 16px; width: 280px;
  font-family: var(--mono); font-size: 11px;
  display: none;
  box-shadow: 6px 6px 0 var(--ink);
}
.tweaks.open { display: block; }
.tweaks h5 { font-family: var(--serif); font-style: italic; font-size: 18px; font-weight: 400; margin-bottom: 12px; }
.tweaks .row { margin-bottom: 14px; }
.tweaks .row > label { display: block; color: var(--ink-mute); margin-bottom: 6px; letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }
.swatches { display: flex; gap: 6px; }
.swatch { flex: 1; height: 36px; border: 1px solid var(--ink); cursor: pointer; position: relative; }
.swatch.on::after { content: ''; position: absolute; inset: 3px; border: 2px solid var(--bg); }

/* ---------- Misc ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-2 > * { min-width: 0; }
.grid-3 > *, .grid-4 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1100px) {
  .map-wrap + div, .grid-2[style*="1.4fr"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4, .hero-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .wrap { padding: 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Flower-palette tiles ---------- */
.fiore {
  border: 1px solid var(--ink);
  padding: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.fiore-chip {
  height: 220px;
  position: relative;
  overflow: hidden;
}
.fiore-chip::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.25), transparent 40%),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(26,23,20,.06) 8px 9px);
}
.fiore-body { padding: 18px 18px 22px; display: grid; gap: 10px; }
.fiore-name { font-family: var(--serif); font-weight: 900; font-size: 28px; line-height: 1; letter-spacing: -0.01em; }
.fiore-lat { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 14px; }
.fiore-when { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.fiore-hex { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--ink-mute); border-top: 1px solid var(--ink); padding-top: 10px; margin-top: 4px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 0; }
.t-row {
  display: grid; grid-template-columns: 140px 1fr; gap: 40px;
  padding: 32px 0; border-bottom: 1px solid var(--ink);
}
.t-row:first-child { border-top: 1px solid var(--ink); }
.t-date {
  font-family: var(--serif); font-weight: 900; font-size: 44px; line-height: 1;
  letter-spacing: -0.02em; color: var(--accent);
}
.t-date span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-mute); font-weight: 400; margin-top: 8px; text-transform: uppercase; }
.t-body h4 { font-family: var(--serif); font-weight: 900; font-size: 24px; margin-bottom: 8px; letter-spacing: -0.01em; }
.t-body p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Calendar ---------- */
.cal {
  border: 1px solid var(--ink);
}
.cal-head {
  display: grid; grid-template-columns: 100px repeat(11, 1fr);
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cal-head > div { padding: 10px 6px; border-right: 1px solid var(--ink); color: var(--ink-mute); text-align: center; }
.cal-head > div:last-child { border-right: none; }
.cal-row {
  display: grid; grid-template-columns: 100px repeat(11, 1fr);
  border-bottom: 1px solid var(--ink);
  min-height: 46px;
}
.cal-row:last-child { border-bottom: none; }
.cal-label {
  padding: 12px 10px; border-right: 1px solid var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  display: flex; align-items: center;
}
.cal-cell { border-right: 1px solid var(--ink); position: relative; cursor: pointer; transition: background .2s; }
.cal-cell:last-child { border-right: none; }
.cal-cell:hover { background: var(--bg-2); }
.cal-cell.lv1 { background: color-mix(in oklab, var(--accent) 15%, transparent); }
.cal-cell.lv2 { background: color-mix(in oklab, var(--accent) 35%, transparent); }
.cal-cell.lv3 { background: color-mix(in oklab, var(--accent) 60%, transparent); }
.cal-cell.lv4 { background: var(--accent); }
.cal-cell.peak::after {
  content: '★'; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--bg); font-size: 14px;
}

/* ---------- Map ---------- */
.map-wrap {
  position: relative; aspect-ratio: 4/3;
  border: 1px solid var(--ink); background: var(--bg-2);
  overflow: hidden;
  min-width: 0;
  contain: layout paint;
}
.map-pins {
  position: absolute; inset: 0;
  pointer-events: none; /* solo i singoli pin sono cliccabili */
}
.map-pins .map-pin { pointer-events: auto; }
.map-svg { width: 100%; height: 100%; display: block; }
.map-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  cursor: pointer; transition: transform .2s;
  z-index: 2;
}
.map-pin:hover, .map-pin.active { transform: translate(-50%, -50%) scale(1.5); z-index: 3; }
.map-pin .pop {
  position: absolute; left: 18px; top: -8px; white-space: nowrap;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  padding: 4px 8px; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.map-pin.active .pop, .map-pin:hover .pop { opacity: 1; }

/* Ticker */
.ticker {
  background: var(--ink); color: var(--bg);
  overflow: hidden; white-space: nowrap;
  padding: 10px 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ticker-track { display: inline-block; animation: tick 40s linear infinite; }
.ticker-track span { padding: 0 24px; }
.ticker-track span.dot { color: var(--accent); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Scrollbar subtle */
::selection { background: var(--accent); color: var(--bg); }

/* ---------- WordPress integration additions ---------- */

/* Page switching (SPA-like) */
.cas-page { display: none; }
.cas-page.active { display: block; animation: casFade .25s ease; }
@keyframes casFade { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* Language-based display */
[data-lang-it], [data-lang-en] { display: none; }
html[lang="it"] [data-lang-it],
html[lang="it"] [data-lang-it].block,
html[lang="en"] [data-lang-en],
html[lang="en"] [data-lang-en].block { display: initial; }

/* Zone list button */
.zone-btn {
	border: none; background: transparent; color: var(--ink);
	text-align: left; padding: 10px 12px; width: 100%;
	font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
	cursor: pointer; border-bottom: 1px solid var(--ink);
	transition: background .15s, color .15s;
}
.zone-btn:hover { background: var(--bg-2); }
.zone-btn.active { background: var(--ink); color: var(--bg); }
.zone-btn .arr { display: inline-block; width: 22px; color: var(--accent); }
.zone-btn.active .arr { color: var(--bg); }

/* Zone panel swap */
.zone-panel { display: none; }
.zone-panel.active { display: block; }

/* Reset WP body styling that might interfere */
.cas-root { color: var(--ink); }
.cas-root a { text-decoration: none; color: inherit; }
.cas-root button { font-family: inherit; }

/* Hide default WP admin bar spacing conflicts */
body.admin-bar .topbar { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .topbar { top: 46px; }
}

/* ---------- Profilo Monti Sibillini (banda decorativa) ---------- */
.profilo-monti {
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
  padding: 32px 0 20px;
}
.profilo-monti-inner { max-width: 1400px !important; }
.profilo-monti-svg-wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.profilo-monti-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
}
.profilo-monti-img {
  display: none; /* hidden by default, shown only after load */
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  z-index: 2;
}
.profilo-monti-img.loaded {
  display: block;
}
.profilo-monti-coord {
  margin-top: 14px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 700px) {
  .profilo-monti { padding: 20px 0 14px; }
  .profilo-monti-coord { font-size: 9px; letter-spacing: 0.1em; }
  .profilo-monti-svg { max-height: 120px; }
}

/* ---------- Draft disclaimer (sezione Pratico) ---------- */
.cas-disclaimer {
  border: 2px dashed var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, var(--bg));
  padding: 22px 26px;
  margin-bottom: 36px;
  position: relative;
}
.cas-disclaimer-tag {
  display: inline-block;
  background: var(--accent); color: var(--bg);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  padding: 4px 10px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.cas-disclaimer p {
  font-family: var(--sans);
  font-size: 14px; line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.cas-disclaimer p strong { color: var(--accent); font-weight: 600; }

/* ---------- Footer social (colonna Seguici) ---------- */
.footer-social-col { min-width: 0; }
.footer-social {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.footer-social a {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid #3a342c;
  border-radius: 50%;
  color: #cfc6b4;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  text-decoration: none;
}
.footer-social a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.footer-social-handle {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8a8074;
}
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr !important; }
  .footer h3 { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ---------- Highlight rosso "3 nuclei" sugli abitanti ---------- */
.hero-meta div strong .meta-update {
  display: inline-block;
  color: var(--accent);
  font-weight: 500;
  margin-left: 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .hero-meta div strong .meta-update {
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }
}

/* ---------- Hero: riallineamento titolone (alzato + allineato alla colonna destra) ---------- */
.hero-grid { align-items: flex-start !important; }
.hero-grid > :first-child { padding-top: 20px; }
.hero h1 { margin-top: 0; }

/* ---------- MOBILE: hamburger menu ---------- */
.hamburger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--ink);
  background: var(--bg);
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s, opacity .3s, top .3s;
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }
.hamburger.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 39;
  overflow-y: auto;
  padding: 32px 24px 40px;
  border-top: 1px solid var(--ink);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding: 18px 0;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}
.mobile-menu a.active { color: var(--accent); }
.mobile-menu .mobile-extras {
  margin-top: 32px; display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap;
}
body.admin-bar .mobile-menu { top: 96px; }

@media (max-width: 900px) {
  /* Topbar semplificata */
  .topbar-row { gap: 12px; height: 56px; }
  .brand { font-size: 18px; }
  .brand .num { display: none; }

  /* Nascondi nav desktop + tweaks chip */
  .nav { display: none; }
  .tweaks-toggle { display: none; }

  /* Mostra hamburger */
  .hamburger { display: block; }

  /* Lang toggle resta visibile ma compatto */
  .lang-toggle { font-size: 10px; }
  .lang-toggle button { padding: 6px 8px; }

  body.admin-bar .topbar { top: 46px; }

  /* Hero mobile */
  .hero { padding: 24px 0 40px; min-height: auto !important; }
  .hero-grid { min-height: auto !important; gap: 32px; }
  .hero-grid > :first-child,
  .hero-grid > :last-child {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .hero h1 { font-size: clamp(56px, 14vw, 96px) !important; }

  /* Section padding ridotto */
  .section { padding: 60px 0 !important; }
  .section-num { font-size: 80px !important; }
  .section-title { font-size: clamp(36px, 7vw, 56px) !important; }

  /* Wrap padding */
  .wrap { padding: 0 20px !important; }

  /* Footer: impila su mobile */
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .footer-grid > :first-child { grid-column: auto !important; }
  .footer h3 { font-size: 36px !important; }

  /* Datasheet: 2 colonne invece di 4 */
  .datasheet { grid-template-columns: 1fr 1fr !important; }

  /* Trails/weekend mobile: stack */
  .section [style*="grid-template-columns:60px 2fr"],
  .section [style*="grid-template-columns:200px 1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* Mappa + pannello zone: impila */
  .section [style*="grid-template-columns:1.4fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .map-wrap { aspect-ratio: 16/10 !important; }

  /* Timeline: compatta */
  .t-row { grid-template-columns: 80px 1fr !important; gap: 12px !important; }
  .t-date { font-size: 10px !important; }

  /* Profilo monti: più compatto */
  .profilo-monti { padding: 16px 0 10px; }
  .profilo-monti-svg { max-height: 100px; }
}

@media (max-width: 500px) {
  .hero h1 { font-size: clamp(48px, 13vw, 80px) !important; }
  .section-title { font-size: clamp(28px, 8vw, 44px) !important; }
  .datasheet { grid-template-columns: 1fr !important; }
  .footer-social { flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════════════════════
   BOTTOM BAR UNIFICATA v1.3 + NEWSLETTER MAILCHIMP
   Ecosistema rifugi · 2026-04-23
   ══════════════════════════════════════════════════════════════ */

/* Newsletter section — prima del footer */
.ra-newsletter-section {
  background: #1C1815;
  color: #F4EFE6;
  padding: 3rem 1.5rem;
  border-top: 1px solid rgba(244,239,230,.1);
}
.ra-newsletter-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 840px) {
  .ra-newsletter-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}
.ra-newsletter-kicker {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #D4B97A;
  display: block;
  margin-bottom: 0.5rem;
}
.ra-newsletter-title {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 2vw + 0.8rem, 2.2rem);
  font-weight: 400;
  color: #F4EFE6;
  margin: 0 0 0.7rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.ra-newsletter-lede {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: #E0D7C4;
  margin: 0;
  max-width: 40ch;
  line-height: 1.5;
}
.ra-newsletter-label { display: none; }
.ra-newsletter-form { position: relative; }
.ra-newsletter-row {
  display: flex;
  margin-bottom: 0.7rem;
  border: 1px solid rgba(244, 239, 230, 0.3);
  transition: border-color 300ms ease;
}
.ra-newsletter-row:focus-within { border-color: #D4B97A; }
.ra-newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: #F4EFE6;
  font-family: inherit;
  font-size: 1rem;
  min-width: 0;
}
.ra-newsletter-input:focus { outline: none; }
.ra-newsletter-input::placeholder { color: rgba(244, 239, 230, 0.4); }
.ra-newsletter-btn {
  padding: 0.75rem 1.5rem;
  background: #D4B97A;
  color: #1C1815;
  border: none;
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 300ms ease;
}
.ra-newsletter-btn:hover { background: #F4EFE6; }
.ra-newsletter-privacy {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(244, 239, 230, 0.55);
  margin: 0;
  line-height: 1.6;
}

/* ═════════════ BOTTOM BAR v1.4 · sticky nero + tricolore ═════════════ */
/* Sticky footer: body flex column */
html, body { height: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.ra-bottombar { flex-shrink: 0; }

/* Nota: il footer editoriale esistente (.footer) rimane, la bottom bar
   v1.4 vive accanto come secondo footer più piccolo con tricolore sopra. */

.ra-bottombar {
  position: relative;
  background: #0E0B08;
  color: #F4EFE6;
  padding: 1.6rem 1.5rem 1.4rem;
  font-family: 'IBM Plex Mono', 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
  z-index: 10;
}
.ra-bottombar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right,
    #008C45 0%,      #008C45 33.333%,
    #F4F5F0 33.333%, #F4F5F0 66.666%,
    #CD212A 66.666%, #CD212A 100%);
  opacity: 0.9;
}
.ra-bottombar__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  color: #E0D7C4;
}
.ra-bottombar a { color: #E0D7C4; text-decoration: none; }
.ra-bottombar a:hover { color: #F4EFE6; }

/* Blocco 1 · Autore */
.ra-bottombar .ra-author {
  display: inline-flex; align-items: center; gap: 0.65rem;
  flex-wrap: wrap; justify-self: start;
}
.ra-bottombar .ra-author__label {
  font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.25em; color: #E0D7C4; opacity: 0.55;
}
.ra-bottombar .ra-author__name {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 0.9rem;
  color: #D4B97A !important;
  padding: 0 0.75rem;
  border-left: 1px solid rgba(244, 239, 230, 0.2);
  border-right: 1px solid rgba(244, 239, 230, 0.2);
  transition: color 250ms ease;
}
.ra-bottombar .ra-author__name:hover { color: #F4F5F0 !important; }
.ra-bottombar .ra-author__links {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.ra-bottombar .ra-author__links a,
.ra-bottombar .ra-author__cookie a {
  color: #F4EFE6; opacity: 0.7;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  transition: color 250ms ease, opacity 250ms ease, transform 250ms ease;
}
.ra-bottombar .ra-author__links a:hover,
.ra-bottombar .ra-author__cookie a:hover {
  color: #CD212A; opacity: 1; transform: translateY(-2px);
}
.ra-bottombar .ra-author__cookie {
  padding-left: 0.5rem;
  border-left: 1px solid rgba(244, 239, 230, 0.18);
  display: inline-flex; align-items: center;
}
.ra-bottombar .ra-author__cookie a:hover {
  transform: translateY(-2px) rotate(-8deg); color: #D4B97A;
}

/* Blocco 2 · Claim */
.ra-bottombar .ra-claim {
  display: inline-flex; align-items: center; gap: 0.65rem;
  justify-self: center;
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem; font-style: italic;
}
.ra-bottombar .ra-claim__name {
  color: #D4B97A !important; transition: color 250ms ease;
}
.ra-bottombar .ra-claim__name:hover { color: #F4F5F0 !important; }
.ra-bottombar .ra-claim__years {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-style: normal; font-size: 0.72rem; letter-spacing: 0.1em;
  color: #E0D7C4; opacity: 0.7;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(244, 239, 230, 0.18);
}
.ra-bottombar .ra-heart {
  color: #CD212A;
  animation: ra-heartbeat 2s ease-in-out infinite;
  display: inline-block; font-style: normal;
}
@keyframes ra-heartbeat {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.2); }
}

/* Blocco 3 · Sviluppo */
.ra-bottombar .ra-dev {
  display: inline-flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; justify-self: end;
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}
.ra-bottombar .ra-dev__label {
  font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.25em; color: #E0D7C4; opacity: 0.55;
}
.ra-bottombar .ra-dev__name {
  color: #E0D7C4 !important; transition: color 250ms ease;
}
.ra-bottombar .ra-dev__name:hover { color: #D4B97A !important; }
.ra-bottombar .ra-dev__vat {
  color: #E0D7C4; opacity: 0.55;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(244, 239, 230, 0.18);
}

@media (max-width: 900px) {
  .ra-bottombar { padding: 1.4rem 1rem 1.2rem; }
  .ra-bottombar__inner {
    grid-template-columns: 1fr;
    justify-items: center; text-align: center; gap: 1.1rem;
  }
  .ra-bottombar .ra-author,
  .ra-bottombar .ra-claim,
  .ra-bottombar .ra-dev { justify-self: center; }
}
@media (max-width: 480px) {
  .ra-bottombar { padding: 1.2rem 0.75rem; }
  .ra-bottombar .ra-author { gap: 0.45rem; }
  .ra-bottombar .ra-author__name { padding: 0 0.5rem; font-size: 0.82rem; }
  .ra-bottombar .ra-author__links { gap: 0.3rem; }
  .ra-bottombar .ra-author__links a,
  .ra-bottombar .ra-author__cookie a { width: 24px; height: 24px; }
  .ra-bottombar .ra-claim { font-size: 0.82rem; }
  .ra-bottombar .ra-dev { font-size: 0.68rem; }
}

/* Styling template page-cookie.php */
.ra-cookie-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.ra-cookie-page h1 {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 4vw + 0.5rem, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 1.5rem;
}
.ra-cookie-page h1 em { color: #B8472E; }
.ra-cookie-page h2 {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}
.ra-cookie-page h3 {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  margin: 1.5rem 0 0.75rem;
  color: #4A4239;
}
.ra-cookie-page p {
  margin: 0 0 1rem;
  color: #4A4239;
  line-height: 1.7;
  max-width: 68ch;
}
.ra-cookie-page ul { margin: 0 0 1rem; padding-left: 1.5rem; color: #4A4239; }
.ra-cookie-page ul li { margin-bottom: 0.5rem; }
.ra-cookie-page a { color: #2A3830; text-decoration: underline; text-underline-offset: 3px; }
.ra-cookie-page a:hover { color: #B8472E; }
.ra-cookie-page .kicker {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #B8472E;
  display: inline-block;
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.ra-cookie-page .kicker::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1rem; height: 1px; background: #B8472E; transform: translateY(-50%);
}
.ra-cookie-page .legal-meta {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8A8074;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 3px double #1C1815;
}
.ra-cookie-page .info-box {
  background: #EBE4D6;
  border: 1px solid #E0D7C4;
  border-left: 3px solid #B8472E;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #4A4239;
}
.ra-cookie-page .info-box strong { color: #1C1815; }
.ra-cookie-page table.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.85rem;
  background: #EBE4D6;
}
.ra-cookie-page table.cookie-table th,
.ra-cookie-page table.cookie-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #E0D7C4;
  vertical-align: top;
}
.ra-cookie-page table.cookie-table th {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8A8074;
  background: #E0D7C4;
}
.ra-cookie-page table.cookie-table td code {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #B8472E;
}


/* v1.5 · tazzina caffè */
.ra-bottombar .ra-author__coffee {
  padding-left: 0.5rem;
  margin-left: 0.1rem;
  border-left: 1px solid rgba(244, 239, 230, 0.18);
  display: inline-flex;
  align-items: center;
}
.ra-bottombar .ra-author__coffee a {
  color: #F4EFE6;
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  transition: color 250ms ease, opacity 250ms ease, transform 350ms ease;
}
.ra-bottombar .ra-author__coffee a:hover {
  color: #D4B97A;
  opacity: 1;
  transform: translateY(-2px) rotate(8deg);
}
@media (max-width: 480px) {
  .ra-bottombar .ra-author__coffee a { width: 24px; height: 24px; }
}
