:root {
  --page-bg: #FAF8F3;
  --ink: #151A22;
  --navy: #12213F;

  --eco-panel: #FFEDB8;
  --eco-accent: #B85C00;
  --eco-tag-bg: #FFD25A;
  --eco-tag-fg: #1A1A1A;

  --fin-panel: #E3EAFF;
  --fin-accent: #2540C8;
  --fin-tag-bg: #2540C8;
  --fin-tag-fg: #FFFFFF;

  --trv-panel: #E4F4DD;
  --trv-accent: #2F7D32;
  --trv-tag-bg: #C2185B;
  --trv-tag-fg: #FFFFFF;

  --radius-card: 14px;
  --radius-xl: 24px;
  --shadow-soft: 0 10px 30px rgba(18, 33, 63, 0.12);
  --shadow-card: 0 6px 18px rgba(21, 26, 34, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }

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

/* ---------- Sticky top bar (collapsed masthead) ---------- */

.sticky-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  z-index: 100;
  transform: translateY(-100%);
  transition: transform 200ms ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.sticky-bar.visible { transform: translateY(0); }

.sticky-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.sticky-title {
  color: #fff;
  font-family: "Newsreader", serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.progress-line {
  position: fixed;
  top: 56px; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--eco-accent), var(--fin-accent), var(--trv-accent));
  z-index: 101;
  opacity: 0;
  transition: opacity 200ms ease;
}

.progress-line.visible { opacity: 1; }

/* ---------- Masthead ---------- */

.masthead-band {
  background: var(--navy);
  height: 150px;
  position: relative;
  display: flex;
  justify-content: center;
}

.nameplate {
  position: absolute;
  top: 100%;
  transform: translateY(-50%);
  width: 78%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: flex;
  justify-content: center;
}

.nameplate img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ---------- Feed / sections ---------- */

#feed {
  padding-top: 150px;
}

.section-panel {
  width: 100%;
  padding: 48px 20px 56px;
}

.section-header {
  position: relative;
  margin-bottom: 28px;
  padding-top: 8px;
}

.section-header .ghost-label {
  font-family: "Newsreader", serif;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(2.6rem, 14vw, 3.6rem);
  color: transparent;
  -webkit-text-stroke: 1.5px currentColor;
  opacity: 0.22;
  line-height: 1;
  position: absolute;
  top: -6px;
  left: -2px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.section-header .solid-label {
  font-family: "Newsreader", serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  position: relative;
  padding-top: 1.9rem;
  display: inline-block;
}

.section-header .accent-rule {
  display: block;
  width: 64px;
  height: 6px;
  border-radius: 3px;
  margin-top: 10px;
}

.economia-panel { background: var(--eco-panel); }
.economia-panel .ghost-label, .economia-panel .solid-label { color: var(--eco-accent); }
.economia-panel .accent-rule { background: var(--eco-accent); }

.finanza-panel { background: var(--fin-panel); }
.finanza-panel .ghost-label, .finanza-panel .solid-label { color: var(--fin-accent); }
.finanza-panel .accent-rule { background: var(--fin-accent); }

.viaggi-panel { background: var(--trv-panel); }
.viaggi-panel .ghost-label, .viaggi-panel .solid-label { color: var(--trv-accent); }
.viaggi-panel .accent-rule { background: var(--trv-accent); }

/* ---------- Fade-in on scroll ---------- */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.fade-in.shown {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ---------- Shared card image rules ---------- */

.card-img {
  width: 100%;
  object-fit: cover;
  object-position: center 40%;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0,0,0,0.12);
  opacity: 0;
  transition: opacity 400ms ease;
  background: #ddd;
}

.card-img.loaded { opacity: 1; }

.read-more {
  display: inline-block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 8px;
}

.preview-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 8px 0;
  color: var(--ink);
}

/* ---------- ECONOMIA: split cards on white ---------- */

.economia-list { display: flex; flex-direction: column; gap: 22px; }

.eco-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 14px;
  cursor: pointer;
}

.eco-card.lead .card-img {
  aspect-ratio: 16 / 9;
  height: auto;
}

.eco-card.lead h3 {
  font-family: "Newsreader", serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 12px 0 0;
  line-height: 1.25;
}

.eco-card.side {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.eco-card.side .card-img {
  width: 45%;
  flex: 0 0 45%;
  aspect-ratio: 4 / 5;
  height: 100%;
}

.eco-card.side .side-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eco-card.side.reverse { flex-direction: row-reverse; }

.eco-card.side h3 {
  font-family: "Newsreader", serif;
  font-weight: 700;
  font-size: 1.08rem;
  margin: 0;
  line-height: 1.3;
}

.eco-card .read-more { color: var(--eco-accent); }

/* ---------- FINANZA: overlay cards ---------- */

.finanza-list { display: flex; flex-direction: column; gap: 24px; }

.fin-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
}

.fin-card .overlay-wrap {
  position: relative;
}

.fin-card .card-img {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 0;
  border: none;
}

.fin-card .gradient-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0));
}

.fin-card .gradient-cap h3 {
  font-family: "Newsreader", serif;
  font-weight: 700;
  color: #fff;
  font-size: 1.12rem;
  margin: 0;
  line-height: 1.3;
}

.fin-card .number-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fin-accent);
  color: #fff;
  font-weight: 700;
  font-family: "Newsreader", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.fin-card .fin-body { padding: 14px; }

.fin-card .read-more { color: var(--fin-accent); }

/* ---------- VIAGGI E TURISMO ---------- */

.viaggi-list { display: flex; flex-direction: column; }

.trv-card { padding: 20px 0; cursor: pointer; }

.trv-card:first-child { padding-top: 0; }

.trv-card .img-wrap { position: relative; }

.trv-card .card-img {
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: var(--radius-xl);
}

.trv-card .place-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--trv-tag-bg);
  color: var(--trv-tag-fg);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.trv-card h3 {
  font-family: "Newsreader", serif;
  font-weight: 700;
  font-size: 1.18rem;
  margin: 14px 0 0;
  line-height: 1.3;
}

.trv-card .read-more {
  display: inline-block;
  background: var(--trv-accent);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 10px;
}

.trv-divider {
  border: none;
  border-top: 2px dotted rgba(47, 125, 50, 0.35);
  margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 36px 20px 44px;
  text-align: center;
}

.footer-tagline {
  font-family: "Newsreader", serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.footer-email {
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
}

/* ---------- Full-screen story overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: var(--page-bg);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.overlay.open { transform: translateY(0); }

.overlay-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.overlay-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(21, 26, 34, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 210;
  cursor: pointer;
}

.overlay-hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.overlay-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.overlay-body {
  padding: 20px 20px 60px;
  max-width: 680px;
  margin: 0 auto;
}

.overlay-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 14px;
}

.overlay-headline {
  font-family: "Newsreader", serif;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.overlay-meta {
  font-size: 0.85rem;
  opacity: 0.6;
  margin: 0 0 18px;
}

.overlay-text {
  font-size: 1.02rem;
  line-height: 1.7;
  white-space: pre-line;
}

/* ---------- Small screens (320px floor) ---------- */

@media (max-width: 360px) {
  .nameplate { width: 85%; }
  .section-panel { padding: 40px 14px 48px; }
}
