:root {
  color-scheme: light;
  --paper: #fffaf7;
  --white: #ffffff;
  --ink: #2c1a0e;
  --brown: #3b2418;
  --yellow: #ffc433;
  --lime: #8bd72d;
  --orange: #d9824f;
  --green: #25d366;
  --muted: #6e5b50;
  --line: rgba(44, 26, 14, 0.14);
  --shadow: 0 24px 70px rgba(44, 26, 14, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 250, 247, 0.94), rgba(255, 250, 247, 0.98)),
    url("./cacio-e-pera-social-pattern-orange.png") center top / 520px auto repeat;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 247, 0.94);
  backdrop-filter: blur(14px);
}

.header-row,
.page-shell,
.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.header-row {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 54px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--white) url("./logo-cacio-e-pera-ufficiale.png") center / contain no-repeat;
  box-shadow: 0 8px 22px rgba(44, 26, 14, 0.2);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1.15rem;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-cta,
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.header-cta,
.button-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.25);
}

.button-secondary {
  border-color: var(--ink);
  background: var(--white);
  color: var(--ink);
}

.header-cta:hover,
.button:hover {
  transform: translateY(-2px);
}

.primary-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  width: min(86vw, 380px);
  padding: 98px 24px 32px;
  margin: 0;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  background: var(--ink);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.primary-nav[data-open="true"] {
  transform: translateX(0);
}

.primary-nav a {
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--white);
  font-size: 1.06rem;
  font-weight: 760;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--yellow);
  color: var(--ink);
}

.menu-toggle {
  position: relative;
  z-index: 90;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  flex: 0 0 auto;
  place-content: center;
  gap: 5px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  background: rgba(20, 10, 5, 0.54);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.menu-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
}

.page-shell {
  padding-block: 48px 80px;
}

.hero {
  display: grid;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px;
  background: var(--brown);
  box-shadow: var(--shadow);
  color: var(--white);
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.hero-copy {
  display: flex;
  padding: clamp(34px, 6vw, 74px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 13ch;
  margin-bottom: 20px;
  font-size: clamp(2.65rem, 7vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 4vw, 3.15rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 9px;
  font-size: 1.16rem;
  line-height: 1.25;
}

.lead {
  max-width: 62ch;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero .button-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  background: transparent;
  color: var(--white);
}

.hero-art {
  --hero-image: none;
  min-height: 420px;
  background-color: var(--brown);
  background-image:
    linear-gradient(90deg, var(--brown) 0%, rgba(59, 36, 24, 0.15) 22%, rgba(59, 36, 24, 0) 45%),
    var(--hero-image);
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: cover, cover;
}

.hero-products {
  --hero-image: url("./pagina-prodotti.jpeg");
  background-position: center, center 58%;
}

.hero-events {
  --hero-image: url("./pagina-eventi-cheese-corner.jpeg");
  background-position: center, 50% 52%;
}

.hero-about {
  --hero-image: url("./pagina-chi-siamo.jpeg");
  background-position: center, 50% 50%;
}

.hero-press {
  --hero-image: url("./pagina-dicono-di-noi.jpeg");
  background-color: #ff3038;
  background-position: center, center;
  background-size: cover, contain;
}

.hero-location {
  --hero-image: url("./pagina-dove-siamo.jpeg");
  background-position: center, 50% 50%;
}

.hero-contact {
  --hero-image: url("./pagina-contatti.jpeg");
  background-position: center, 50% 48%;
}

.section {
  padding-top: clamp(64px, 8vw, 104px);
}

.section-heading {
  max-width: 700px;
  margin-bottom: 30px;
}

.section-heading p,
.card p,
.info-panel p,
.quote-card p {
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.info-panel,
.quote-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(44, 26, 14, 0.07);
}

.card-number {
  display: grid;
  width: max-content;
  min-width: 38px;
  height: 38px;
  padding-inline: 9px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 950;
}

.feature-list,
.plain-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list li {
  position: relative;
  padding: 18px 18px 18px 48px;
  border-radius: 18px;
  background: rgba(139, 215, 45, 0.14);
  font-weight: 760;
}

.feature-list li::before {
  position: absolute;
  top: 18px;
  left: 18px;
  color: #5aa20b;
  content: "✓";
  font-weight: 950;
}

.split {
  display: grid;
  align-items: start;
  gap: 22px;
  grid-template-columns: 1fr 1fr;
}

.plain-list {
  display: grid;
  gap: 12px;
}

.plain-list li {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.plain-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-link {
  display: block;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  font-weight: 850;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.cta-band {
  display: grid;
  margin-top: clamp(64px, 8vw, 104px);
  padding: clamp(30px, 6vw, 58px);
  align-items: center;
  gap: 22px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--yellow), #ffe18a);
  grid-template-columns: 1fr auto;
}

.cta-band h2 {
  margin-bottom: 10px;
}

.cta-band p {
  max-width: 60ch;
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  display: grid;
  padding-block: 38px;
  align-items: end;
  gap: 28px;
  grid-template-columns: 1fr auto;
}

.footer-inner p {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.footer-links a {
  color: var(--white);
  font-weight: 760;
}

.whatsapp-float {
  position: fixed;
  right: max(18px, calc((100vw - 1120px) / 2 + 18px));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.whatsapp-float img {
  width: 37px;
  height: 37px;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
summary:focus-visible {
  outline: 4px solid var(--lime);
  outline-offset: 4px;
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 380px;
    order: -1;
    background-image:
      linear-gradient(0deg, var(--brown) 0%, rgba(59, 36, 24, 0) 34%),
      var(--hero-image);
  }

  .card-grid,
  .card-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .header-row,
  .page-shell,
  .footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .header-row {
    min-height: 70px;
    gap: 9px;
  }

  .brand-mark {
    width: 46px;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .brand-copy small {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    margin-left: auto;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .page-shell {
    padding-top: 24px;
  }

  .hero {
    min-height: 0;
    border-radius: 24px;
  }

  .hero-copy {
    padding: 30px 24px 34px;
  }

  .hero-art {
    min-height: 310px;
  }

  h1 {
    font-size: clamp(2.5rem, 15vw, 4.35rem);
  }

  .card-grid,
  .card-grid.two,
  .card-grid.three,
  .feature-list,
  .split {
    grid-template-columns: 1fr;
  }

  .card,
  .info-panel,
  .quote-card {
    padding: 22px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .header-cta,
  .button,
  .whatsapp-float,
  .menu-toggle span,
  .primary-nav,
  .menu-backdrop {
    transition: none;
  }
}
