/* Preview-only visual direction for Immigrati Imprenditori.
   This file exists only on preview/home-light-v1 and does not affect main/production. */

:root {
  --preview-green: #17463c;
  --preview-green-deep: #10372f;
  --preview-green-soft: #e8f0ed;
  --preview-ink: #17221f;
  --preview-muted: #66716d;
  --preview-warm: #f7f5ef;
  --preview-line: #dfe4e1;
  --preview-hero-photo: url("https://images.pexels.com/photos/3866318/pexels-photo-3866318.jpeg?auto=compress&cs=tinysrgb&w=1800");
  --preview-editorial-1: url("https://images.pexels.com/photos/3862089/pexels-photo-3862089.jpeg?auto=compress&cs=tinysrgb&w=1000");
  --preview-editorial-2: url("https://images.pexels.com/photos/34707245/pexels-photo-34707245.jpeg?auto=compress&cs=tinysrgb&w=1000");
  --preview-editorial-3: url("https://images.pexels.com/photos/34164498/pexels-photo-34164498.jpeg?auto=compress&cs=tinysrgb&w=1000");
  --preview-voice-1: url("https://images.pexels.com/photos/6457577/pexels-photo-6457577.jpeg?auto=compress&cs=tinysrgb&w=900");
  --preview-voice-2: url("https://images.pexels.com/photos/3865843/pexels-photo-3865843.jpeg?auto=compress&cs=tinysrgb&w=900");
  --preview-voice-3: url("https://images.pexels.com/photos/7693688/pexels-photo-7693688.jpeg?auto=compress&cs=tinysrgb&w=900");
  --preview-voice-4: url("https://images.pexels.com/photos/36729741/pexels-photo-36729741.jpeg?auto=compress&cs=tinysrgb&w=900");
}

body {
  background: #fff;
  color: var(--preview-ink);
}

/* Header: light, quiet and institutional. The current logo remains provisional. */
.institutional-bar {
  background: #f5f7f5;
  color: #596660;
  border-bottom: 1px solid var(--preview-line);
}
.institutional-bar a,
.institutional-bar a:hover { color: #41504a; }
.primary-header { border-bottom-color: var(--preview-line); }
.primary-nav a:hover { color: var(--preview-green); }
.header-support {
  background: var(--preview-green);
  color: #fff;
  border-radius: 0;
}
.header-support:hover { background: var(--preview-green-deep); }

/* HERO V2 — photo-led, asymmetric, large editorial type. */
.home-hero,
.home-hero.has-cover,
.home-hero:not(.has-cover) {
  position: relative;
  min-height: min(760px, 78vh);
  color: var(--preview-ink);
  background-color: #eef1ec;
  background-image: var(--preview-hero-photo) !important;
  background-position: 64% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 1px solid var(--preview-line);
  isolation: isolate;
  animation: previewHeroDrift 18s ease-in-out infinite alternate;
}
.home-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 46%;
  width: 1px;
  background: rgba(23,70,60,.24);
  pointer-events: none;
}
.home-hero-overlay {
  z-index: 0;
  background:
    linear-gradient(90deg,
      rgba(251,251,247,.99) 0%,
      rgba(251,251,247,.99) 31%,
      rgba(251,251,247,.94) 42%,
      rgba(251,251,247,.58) 51%,
      rgba(251,251,247,.08) 68%,
      rgba(251,251,247,0) 100%);
}
.home-hero-inner {
  min-height: min(760px, 78vh);
  grid-template-columns: minmax(0,1.18fr) minmax(260px,.62fr);
  align-items: end;
  gap: 68px;
  padding-block: 64px 58px;
}
.home-hero-copy {
  max-width: 810px;
  align-self: center;
  padding: 30px 36px 34px 0;
}
.hero-kicker,
.eyebrow,
.eyebrow-gold { color: var(--preview-green); }
.hero-kicker {
  margin-bottom: 18px;
  letter-spacing: .24em;
  font-size: 10px;
}
.home-hero h1 {
  max-width: 800px;
  margin-top: 0;
  color: var(--preview-ink);
  font-size: clamp(58px,6.6vw,104px);
  line-height: .91;
  letter-spacing: -.055em;
  font-weight: 500;
}
.home-hero h1 br { display: none; }
.home-hero h1 span {
  display: block;
  margin-top: .09em;
  color: var(--preview-green);
}
.hero-intro {
  max-width: 610px;
  margin-top: 28px;
  color: #394640;
  font-size: 17px;
  line-height: 1.66;
}
.hero-actions { margin-top: 32px; gap: 14px; }
.button-gold {
  background: var(--preview-green);
  color: #fff;
}
.button-gold:hover { background: var(--preview-green-deep); }
.button-ghost {
  border-color: #81958d;
  color: var(--preview-green-deep);
  background: rgba(255,255,255,.88);
}
.button-ghost:hover {
  background: #fff;
  color: var(--preview-green-deep);
  border-color: var(--preview-green);
}
.hero-feature {
  position: relative;
  z-index: 3;
  align-self: end;
  margin: 0 0 4px;
  padding: 28px 30px 30px;
  border: 0;
  border-top: 4px solid var(--preview-green);
  background: rgba(255,255,255,.96);
  color: var(--preview-ink);
  box-shadow: 0 24px 70px rgba(21,42,34,.14);
  backdrop-filter: blur(7px);
}
.hero-feature::before {
  content: "IN EVIDENZA";
  display: block;
  margin-bottom: 13px;
  color: #78877f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}
.hero-feature h2 {
  margin-top: 8px;
  font-size: clamp(25px,2.25vw,34px);
  line-height: 1.04;
}
.hero-feature p:not(.eyebrow) { color: #58645f; }
.hero-feature a { color: var(--preview-green); }

@keyframes previewHeroDrift {
  from { background-position: 62% 50%; }
  to { background-position: 67% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero { animation: none; }
}

/* Editorial content: real covers win; Pexels only fills empty visual slots. */
.home-featured {
  padding-top: 48px;
  border-bottom-color: var(--preview-line);
}
.section-heading-line::after,
.featured-grid,
.editorial-card { border-color: var(--preview-line); }
.section-heading-line a,
.editorial-card-meta a,
.card-link { color: var(--preview-green); }
.editorial-card { overflow: hidden; }
.editorial-card-media {
  background: #eef1ee;
  background-size: cover;
  background-position: center;
  transition: transform .55s ease;
}
.editorial-card:hover .editorial-card-media { transform: scale(1.025); }
.featured-grid .editorial-card:nth-child(1) .editorial-card-media:not(.has-image) { background-image: var(--preview-editorial-1); }
.featured-grid .editorial-card:nth-child(2) .editorial-card-media:not(.has-image) { background-image: var(--preview-editorial-2); background-position: center 38%; }
.featured-grid .editorial-card:nth-child(3) .editorial-card-media:not(.has-image) { background-image: var(--preview-editorial-3); background-position: center 48%; }
.featured-grid .editorial-card .editorial-card-media:not(.has-image)::after { content: ""; }
.editorial-card-event { background: #f6f4ed; }
.event-date-block {
  color: var(--preview-green-deep);
  border-color: #d8d8cd;
}

/* Data: no large dark band. Numbers become a light research strip. */
.metrics-section {
  background: #f3f6f4;
  color: var(--preview-ink);
  border-top: 1px solid var(--preview-line);
  border-bottom: 1px solid var(--preview-line);
}
.metrics-intro { border-right-color: #d6dfdb; }
.metrics-intro .eyebrow { color: var(--preview-green); }
.metrics-intro p:not(.eyebrow) { color: var(--preview-muted); }
.button-outline-light {
  border-color: var(--preview-green);
  color: var(--preview-green-deep);
  background: transparent;
}
.button-outline-light:hover {
  background: var(--preview-green);
  color: #fff;
}
.metric-card { border-right-color: #d6dfdb; }
.metric-card p { color: #56635e; }
.metric-card strong { color: var(--preview-ink); }
.metric-unit { color: var(--preview-green); }
.metric-source { color: #77847f; }
.metrics-empty { color: #68756f; }

/* Data + people: the story mosaic becomes visibly photographic even before owned media arrives. */
.chart-line { stroke: var(--preview-green); }
.chart-dot { fill: var(--preview-green); }
.home-chart-head a { color: var(--preview-green); }
.voices-panel {
  background: #f5f2e9;
  color: var(--preview-ink);
  border-left: 1px solid #e2ded2;
}
.voices-copy p:not(.eyebrow) { color: #5d6863; }
.voices-copy a { color: var(--preview-green); }
.voices-placeholder { color: #68756f; }
.voice-tile {
  background: #dfe8e4;
  background-size: cover;
  background-position: center;
  color: #fff;
  transition: transform .45s ease, filter .45s ease;
}
.voice-tile:hover { transform: scale(1.018); filter: saturate(1.04); }
.voices-grid .voice-tile:not(.has-image):nth-child(1) { background-image: var(--preview-voice-1); }
.voices-grid .voice-tile:not(.has-image):nth-child(2) { background-image: var(--preview-voice-2); }
.voices-grid .voice-tile:not(.has-image):nth-child(3) { background-image: var(--preview-voice-3); }
.voices-grid .voice-tile:not(.has-image):nth-child(4) { background-image: var(--preview-voice-4); }
.voice-tile::before {
  background: linear-gradient(180deg,rgba(8,31,26,0) 42%,rgba(8,31,26,.82) 100%);
}

/* Contribution: a calm closing invitation before the footer. */
.contribute-section {
  background: #fff;
  border-top: 1px solid var(--preview-line);
}
.contribute-grid {
  display: grid;
  grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: 76px;
  padding-block: 58px 64px;
}
.contribute-grid h2 {
  margin: 10px 0 0;
  max-width: 560px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px,3.1vw,46px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.02em;
}
.contribute-grid > div:last-child > p {
  margin: 3px 0 0;
  max-width: 610px;
  color: var(--preview-muted);
  font-size: 15px;
  line-height: 1.7;
}
.contribute-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}
.contribute-primary {
  background: var(--preview-green);
  color: #fff;
}
.contribute-primary:hover { background: var(--preview-green-deep); }
.contribute-method-link {
  color: var(--preview-green-deep);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

/* Footer: the deliberate dark exception requested for the visual identity. */
.site-footer {
  background: var(--preview-green-deep);
  color: #e5eee9;
}
.footer-grid h2 { color: #fff; }
.footer-grid a { color: #d6e4de; }
.footer-grid a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-brand p { color: #c5d7cf; }
.footer-small,
.footer-bottom { color: #a9c1b7 !important; }
.footer-bottom { border-top-color: rgba(255,255,255,.16); }

:focus-visible { outline-color: var(--preview-green); }

@media (max-width: 1050px) {
  .home-hero,
  .home-hero.has-cover,
  .home-hero:not(.has-cover) {
    min-height: 650px;
    background-position: 65% center;
  }
  .home-hero-inner { min-height: 650px; gap: 38px; }
  .home-hero h1 { font-size: clamp(54px,7vw,82px); }
  .metric-card:nth-child(n+3) { border-top-color: #d6dfdb; }
}

@media (max-width: 820px) {
  .home-hero,
  .home-hero.has-cover,
  .home-hero:not(.has-cover) {
    min-height: auto;
    background-position: 61% center;
  }
  .home-hero::after { display: none; }
  .home-hero-overlay {
    background: linear-gradient(180deg,rgba(251,251,247,.92) 0%,rgba(251,251,247,.93) 57%,rgba(251,251,247,.72) 100%);
  }
  .home-hero-inner {
    min-height: 650px;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 26px;
  }
  .home-hero-copy { padding: 24px 0 0; }
  .home-hero h1 { max-width: 650px; }
  .hero-feature { max-width: 620px; }
  .metrics-intro { border-bottom-color: #d6dfdb; }
  .contribute-grid { gap: 34px; grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .institutional-bar { background: #f7f8f7; }
  .home-hero,
  .home-hero.has-cover,
  .home-hero:not(.has-cover) { background-position: 58% center; }
  .home-hero h1 { font-size: clamp(46px,14vw,64px); }
  .home-hero-inner { min-height: 610px; padding-block: 34px 42px; }
  .hero-intro { font-size: 15px; }
  .hero-feature { padding: 22px; }
  .metrics-section { background: #f4f6f4; }
  .metric-card { border-color: #d6dfdb; }
  .voices-panel { border-left: 0; border-top: 1px solid #e2ded2; }
  .contribute-grid { padding-block: 44px 50px; }
}
