/* =====================================================================
   Journey — Home page (stile travel/editoriale)
   Namespaced ".journey-home" + prefisso "jh-" per non entrare in
   conflitto con Bootstrap 5 e con site.css.
   ===================================================================== */
.journey-home {
  --paper:    #F5F2EA;
  --surface:  #FFFFFF;
  --ink:      #16302B;
  --ink-soft: #4C5B54;
  --line:     #E6DFCF;
  --line-soft:#F0EADD;
  --amber:    #C0761B;
  --amber-ink:#95590F;
  --clay:     #B4472E;
  --sea:      #2C6E6A;
  --sky-top:  #2A5450;
  --sky-mid:  #C97E3A;
  --sky-low:  #E9A860;

  --serif: "Hoefler Text","Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --sans:  system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:  ui-monospace,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;

  --shadow-s: 0 1px 2px rgba(22,48,43,.06), 0 2px 8px rgba(22,48,43,.05);
  --shadow-m: 0 6px 22px rgba(22,48,43,.10), 0 2px 6px rgba(22,48,43,.06);
  --shadow-l: 0 18px 48px rgba(22,48,43,.16);
  --r: 14px;

  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
.journey-home *,
.journey-home *::before,
.journey-home *::after { box-sizing: border-box; }
.journey-home img { max-width: 100%; display: block; }
.journey-home a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.journey-home .jh-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .9rem/1 var(--sans); cursor: pointer;
  padding: 10px 16px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.journey-home .jh-btn:hover { transform: translateY(-1px); }
.journey-home .jh-btn-primary { background: var(--amber); color: #1c1103; box-shadow: var(--shadow-s); }
.journey-home .jh-btn-primary:hover { box-shadow: var(--shadow-m); color: #1c1103; }
.journey-home .jh-btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.journey-home .jh-btn-ghost:hover { border-color: var(--ink-soft); }

/* ---------- Hero ---------- */
.journey-home .jh-hero {
  position: relative; overflow: hidden; border-radius: 18px;
  box-shadow: var(--shadow-m); margin-bottom: clamp(18px, 3vw, 28px);
}
.journey-home .jh-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-top) 32%, var(--sky-mid) 74%, var(--sky-low) 100%);
}
.journey-home .jh-sun {
  position: absolute; left: 68%; top: 42%; width: 200px; height: 200px; transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #FBE0A8 0%, #F4B65C 42%, rgba(244,182,92,0) 70%); opacity: .9;
}
.journey-home .jh-ridges { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; display: block; }
.journey-home .jh-hero-in { position: relative; z-index: 2; padding: clamp(44px, 9vw, 96px) clamp(24px, 5vw, 60px) clamp(96px, 15vw, 150px); }
.journey-home .jh-eyebrow {
  font: 600 .72rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.82); display: inline-flex; align-items: center; gap: 9px;
}
.journey-home .jh-eyebrow::before { content: ""; width: 26px; height: 1px; background: rgba(255,255,255,.6); }
.journey-home .jh-hero h1 {
  font-family: var(--serif); font-weight: 600; color: #FFF9EE; margin: 18px 0 0;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.03; letter-spacing: -.015em; text-wrap: balance;
}
.journey-home .jh-hero .jh-lead {
  color: rgba(255,248,236,.92); max-width: 44ch; font-size: clamp(1rem, 1.6vw, 1.18rem); margin: 16px 0 28px;
}
.journey-home .jh-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.journey-home .jh-hero .jh-btn-ghost { border-color: rgba(255,255,255,.5); color: #FFF9EE; }
.journey-home .jh-hero .jh-btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* barra statistiche sotto l'hero — sempre leggibile su carta */
.journey-home .jh-statbar { display: flex; flex-wrap: wrap; gap: clamp(22px, 6vw, 56px); align-items: flex-end; padding: 2px 6px clamp(20px, 4vw, 28px); margin-bottom: clamp(26px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.journey-home .jh-statbar .jh-stat { display: flex; flex-direction: column; gap: 3px; }
.journey-home .jh-statbar .jh-n { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1; color: var(--amber-ink); font-variant-numeric: tabular-nums; }
.journey-home .jh-statbar .jh-l { font: 600 .72rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Grid ---------- */
.journey-home .jh-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: clamp(26px, 4vw, 48px); align-items: start; }
.journey-home .jh-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.journey-home .jh-section-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 3vw, 1.95rem); margin: 0; letter-spacing: -.01em; }
.journey-home .jh-section-head .jh-count { font: 600 .74rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }

/* ---------- Trip cards ---------- */
.journey-home .jh-trips { display: flex; flex-direction: column; gap: 24px; }
.journey-home .jh-trip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  display: grid; grid-template-columns: 260px 1fr; box-shadow: var(--shadow-s);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.journey-home .jh-trip:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
.journey-home .jh-cover { position: relative; min-height: 200px; overflow: hidden; background-size: cover; background-position: center; }
.journey-home .jh-cover .jh-topo { position: absolute; inset: 0; opacity: .45; mix-blend-mode: soft-light; }
.journey-home .jh-cover .jh-place {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  font: 600 .74rem/1 var(--sans); color: #fff; background: rgba(16,28,25,.42); backdrop-filter: blur(3px);
  padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22);
}
.journey-home .jh-cover .jh-pub {
  position: absolute; right: 12px; top: 12px; z-index: 2; font: 600 .66rem/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; color: #eafffb; background: rgba(21,72,66,.55);
  border: 1px solid rgba(255,255,255,.28); padding: 5px 9px; border-radius: 999px;
}
.journey-home .jh-cv1 { background: linear-gradient(150deg,#3E7C74,#264C48 60%,#7BB0A6); }
.journey-home .jh-cv2 { background: linear-gradient(150deg,#C98A3C,#8E4B2A 65%,#E7B45E); }
.journey-home .jh-cv3 { background: linear-gradient(150deg,#B5573A,#6E2E33 60%,#D98C4B); }
.journey-home .jh-cv4 { background: linear-gradient(150deg,#2F6E86,#1F3D52 60%,#69A6B7); }
.journey-home .jh-cv5 { background: linear-gradient(150deg,#6C7F3E,#3B4A24 60%,#A9B96A); }

.journey-home .jh-trip-body { padding: 20px 22px 18px; display: flex; flex-direction: column; }
.journey-home .jh-trip-meta { display: flex; align-items: center; gap: 12px; font: 600 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 9px; }
.journey-home .jh-trip-meta .jh-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.journey-home .jh-trip-meta .jh-date { font-family: var(--mono); letter-spacing: .02em; text-transform: none; font-size: .8rem; }
.journey-home .jh-trip h3 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.01em; text-wrap: balance; }
.journey-home .jh-trip h3 a:hover { color: var(--amber-ink); }
.journey-home .jh-trip .jh-excerpt { margin: 0 0 16px; color: var(--ink-soft); font-size: .97rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.journey-home .jh-trip-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.journey-home .jh-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.journey-home .jh-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 .82rem/1 var(--sans); color: #fff; flex: none; object-fit: cover; background: var(--sea); }
.journey-home .jh-author .jh-who { font-size: .82rem; min-width: 0; }
.journey-home .jh-author .jh-who b { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey-home .jh-author .jh-who span { color: var(--ink-soft); font-size: .74rem; }
.journey-home .jh-legs { display: flex; align-items: center; gap: 14px; color: var(--sea); font: 600 .8rem/1 var(--sans); flex: none; }
.journey-home .jh-legs .jh-li { display: inline-flex; align-items: center; gap: 5px; }
.journey-home .jh-legs .jh-li .jh-mono { font-family: var(--mono); font-size: .82rem; }

/* ---------- Sidebar ---------- */
.journey-home .jh-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 82px; }
.journey-home .jh-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-s); }
.journey-home .jh-card-pad { padding: 20px; }
.journey-home .jh-card h4 { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; }
.journey-home .jh-card h4 svg { color: var(--amber); flex: none; }

.journey-home .jh-welcome { background: linear-gradient(155deg, color-mix(in srgb, var(--sea) 12%, var(--surface)), var(--surface)); }
.journey-home .jh-welcome p { color: var(--ink-soft); font-size: .92rem; margin: 6px 0 16px; }
.journey-home .jh-welcome .jh-btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.journey-home .jh-welcome .jh-btn:last-child { margin-bottom: 0; }
.journey-home .jh-me { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.journey-home .jh-me .jh-avatar { width: 46px; height: 46px; font-size: 1rem; }
.journey-home .jh-me b { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.journey-home .jh-me span { display: block; color: var(--ink-soft); font-size: .8rem; }

.journey-home .jh-mini { display: flex; flex-direction: column; }
.journey-home .jh-mini a.jh-row { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-top: 1px solid var(--line-soft); transition: padding .15s, color .15s; }
.journey-home .jh-mini a.jh-row:first-of-type { border-top: 0; }
.journey-home .jh-mini a.jh-row:hover { color: var(--amber-ink); padding-left: 9px; }
.journey-home .jh-mini .jh-pin { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #fff; }
.journey-home .jh-mini .jh-rt-wrap { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.journey-home .jh-mini .jh-rt { font-size: .92rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey-home .jh-mini .jh-rs { font-family: var(--mono); font-size: .72rem; color: var(--ink-soft); }

.journey-home .jh-photo-set { border-top: 1px solid var(--line-soft); padding: 14px 0 4px; }
.journey-home .jh-photo-set:first-of-type { border-top: 0; padding-top: 2px; }
.journey-home .jh-photo-set .jh-ps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.journey-home .jh-photo-set .jh-ps-head b { font-size: .92rem; font-weight: 600; }
.journey-home .jh-photo-set .jh-ps-head time { font-family: var(--mono); font-size: .68rem; color: var(--ink-soft); white-space: nowrap; }
.journey-home .jh-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.journey-home .jh-thumb { aspect-ratio: 1; border-radius: 9px; overflow: hidden; position: relative; box-shadow: var(--shadow-s); background: var(--line); background-size: cover; background-position: center; }
.journey-home .jh-thumb::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); border-radius: 9px; }

/* ---------- Empty state ---------- */
.journey-home .jh-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 40px 24px; text-align: center; color: var(--ink-soft); }
.journey-home .jh-empty svg { color: var(--amber); opacity: .7; margin-bottom: 10px; }

/* ---------- Motion ---------- */
.journey-home .jh-rise { opacity: 0; transform: translateY(16px); animation: jh-rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.journey-home .jh-d1{animation-delay:.05s}.journey-home .jh-d2{animation-delay:.14s}.journey-home .jh-d3{animation-delay:.23s}.journey-home .jh-d4{animation-delay:.32s}.journey-home .jh-d5{animation-delay:.41s}
@keyframes jh-rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .journey-home .jh-rise { animation: none; opacity: 1; transform: none; }
  .journey-home .jh-btn:hover, .journey-home .jh-trip:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .journey-home .jh-grid { grid-template-columns: 1fr; }
  .journey-home .jh-side { position: static; }
}
@media (max-width: 560px) {
  .journey-home .jh-trip { grid-template-columns: 1fr; }
  .journey-home .jh-cover { min-height: 168px; }
  .journey-home .jh-trip-foot { flex-direction: column; align-items: flex-start; }
}
