:root {
  --red: #e30613;
  --red-dark: #b3000b;
  --ink: #161414;
  --muted: #6f6662;
  --paper: #fffaf7;
  --soft: #f6eee9;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(30, 20, 18, 0.16);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 52px);
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
  transition: background 220ms ease, box-shadow 220ms ease, padding 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: clamp(142px, 14vw, 210px);
  height: 54px;
  object-fit: contain;
}

.brand span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -7% 0;
  z-index: -3;
  background-image: url("../img/pasta-poveri.jpg");
  background-position: center;
  background-size: cover;
  transform: translate3d(0, 0, 0) scale(1.08);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(22, 20, 20, 0.84), rgba(22, 20, 20, 0.48) 48%, rgba(22, 20, 20, 0.2)),
    linear-gradient(0deg, rgba(22, 20, 20, 0.4), rgba(22, 20, 20, 0.05));
}

.hero-content {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding-top: 92px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--red);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 6.8vw, 6.4rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(2.1rem, 4.8vw, 4.7rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
  line-height: 1.1;
}

.hero-copy {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--red);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--red-dark);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.scroll-hint {
  position: absolute;
  right: clamp(18px, 4vw, 52px);
  bottom: 34px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(82px, 11vw, 150px) 0;
}

.intro {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100% - var(--max)) / 2));
  padding-right: 0;
  padding-bottom: 0;
  background: #e2e8ed;
}

.projects {
  width: 100%;
  max-width: none;
  padding-inline: max(20px, calc((100% - var(--max)) / 2));
  color: var(--white);
  background: #2d3338;
}

.projects h2 {
  color: var(--white);
}

.projects .section-kicker,
.projects .options-intro {
  color: var(--red);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: clamp(34px, 7vw, 92px);
  align-items: center;
}

.intro .split {
  grid-template-columns: minmax(340px, 0.82fr) minmax(520px, calc(680px + max(20px, (100vw - var(--max)) / 2)));
  gap: clamp(24px, 4vw, 60px);
  align-items: end;
}

.intro .split-copy {
  padding-bottom: clamp(82px, 11vw, 150px);
}

.split-copy p {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.08rem;
}

.image-panel {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro .image-panel {
  justify-self: stretch;
  align-self: end;
  border-radius: 0;
  box-shadow: none;
}

.image-panel img {
  width: 100%;
  aspect-ratio: 0.86;
  object-fit: cover;
}

.intro .image-panel img {
  width: 100%;
  height: auto;
  max-height: clamp(560px, 68vw, 860px);
  margin-left: auto;
  object-fit: contain;
  object-position: right bottom;
}

.impact-band {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.impact-bg {
  position: absolute;
  inset: -12% 0;
  z-index: -2;
  background:
    linear-gradient(rgba(163, 0, 9, 0.78), rgba(62, 0, 4, 0.78)),
    url("../img/donazione.jpg") center / cover;
  transform: scale(1.08);
  will-change: transform;
}

.impact-content {
  width: min(var(--max), calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.metric {
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  padding: 28px;
}

.metric strong {
  display: block;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.9;
}

.metric span {
  display: block;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 44px;
}

.project-story {
  max-width: 920px;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.project-story p {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.65;
}

.project-story p:last-child {
  margin-bottom: 0;
}

.inline-logo {
  display: inline-block;
  width: 44px;
  height: 40px;
  margin: 0 4px;
  object-fit: contain;
  vertical-align: middle;
}

.company-options {
  max-width: 1040px;
  margin-top: 34px;
}

.options-intro {
  margin-bottom: 18px;
  color: var(--red);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
  font-weight: 900;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.option-card {
  min-height: 330px;
  border: 1px solid rgba(22, 20, 20, 0.08);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 40px);
  background: var(--white);
  box-shadow: 0 18px 50px rgba(30, 20, 18, 0.07);
}

.option-card-dark {
  color: var(--white);
  background: var(--ink);
}

.option-label {
  display: inline-flex;
  margin-bottom: 48px;
  color: var(--red);
  font-weight: 900;
}

.option-card h3 {
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  text-transform: lowercase;
}

.option-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.option-title img {
  width: clamp(118px, 12vw, 170px);
  height: auto;
  object-fit: contain;
}

.option-card-dark h3 {
  color: var(--white);
}

.option-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.option-card-dark p {
  color: rgba(255, 255, 255, 0.74);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 270px;
  border: 1px solid rgba(22, 20, 20, 0.08);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(30, 20, 18, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 70px rgba(30, 20, 18, 0.12);
}

.card-number {
  display: inline-flex;
  margin-bottom: 52px;
  color: var(--red);
  font-weight: 900;
}

.project-card p {
  color: var(--muted);
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  min-height: 620px;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.story-media {
  min-height: 500px;
  overflow: hidden;
  will-change: transform;
}

.story-media img {
  width: 100%;
  height: 116%;
  object-fit: cover;
}

.story-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(44px, 6vw, 86px);
}

.story-copy p:not(.section-kicker) {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.donate {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: #2d3338;
}

.donate-card {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  border-radius: 0;
  padding: clamp(34px, 6vw, 66px) max(20px, calc((100% - var(--max)) / 2));
  color: var(--white);
  background: linear-gradient(0deg, rgba(130, 26, 31, 0.72) 0%, var(--red) 78%);
}

.donate-card .section-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.donate-card p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
}

.donate-card .button-primary {
  width: fit-content;
  color: var(--red);
  background: var(--white);
}

.donate-image {
  position: relative;
  min-height: clamp(520px, 58vw, 820px);
  overflow: hidden;
  border-radius: 0;
  background: var(--white);
  box-shadow: none;
  isolation: isolate;
}

.donate-photo {
  position: absolute;
  inset: -8% 0;
  z-index: 1;
  width: 100%;
  height: 116%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

.contact {
  padding: clamp(82px, 10vw, 130px) 0;
  background: #e2e8ed;
}

.contact-inner {
  width: min(var(--max), calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  margin: 0 auto;
}

.contact-copy p:not(.section-kicker) {
  max-width: 620px;
  color: var(--muted);
}

.mail-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--red);
  font-size: 1.3rem;
  font-weight: 900;
}

.social-panel {
  display: grid;
  gap: 14px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(22, 20, 20, 0.08);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--white);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--red);
  transform: translateX(4px);
  box-shadow: 0 16px 42px rgba(30, 20, 18, 0.08);
}

.social-link svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.social-link[aria-label="Facebook"] svg,
.social-link[aria-label="YouTube"] path {
  fill: currentColor;
  stroke: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 4vw, 52px);
  color: rgba(255, 255, 255, 0.76);
  background: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) {
  transition-delay: 80ms;
}

.reveal:nth-child(3) {
  transition-delay: 150ms;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    position: relative;
    z-index: 32;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: currentColor;
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-toggle span {
    position: absolute;
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease;
  }

  .nav-toggle span:first-child {
    transform: translateY(-4px);
  }

  .nav-toggle span:last-child {
    transform: translateY(4px);
  }

  .site-header.is-open .nav-toggle span:first-child {
    transform: rotate(45deg);
  }

  .site-header.is-open .nav-toggle span:last-child {
    transform: rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: clamp(18px, 4vw, 52px);
    left: auto;
    z-index: 31;
    display: grid;
    gap: 6px;
    min-width: min(240px, calc(100vw - 36px));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(0, 0, 0, 0.9);
    color: var(--white);
    font-size: 1rem;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    padding: 10px 12px 10px 24px;
    text-align: right;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav a::after {
    display: none;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .split,
  .story,
  .donate,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .intro {
    padding-right: max(20px, calc((100% - var(--max)) / 2));
  }

  .intro .split {
    grid-template-columns: 1fr;
  }

  .intro .split-copy {
    padding-bottom: 0;
  }

  .intro .image-panel {
    justify-self: stretch;
    align-self: auto;
  }

  .intro .image-panel img {
    max-height: none;
  }

  .impact-content,
  .project-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    padding: 20px 0 20px 20px;
  }

  .donate-image {
    min-height: 680px;
  }

  .story-copy {
    padding: 40px 20px 70px;
  }
}

@media (max-width: 560px) {
  .brand span {
    display: block;
  }

  h1 {
    font-size: clamp(1.85rem, 8.2vw, 2.35rem);
    line-height: 1.08;
  }

  .section,
  .contact-inner,
  .hero-content,
  .impact-content {
    width: calc(100% - 32px);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .scroll-hint {
    display: none;
  }
}
