:root{
  --bg: #ffffff;
  --card: #ffffff;
  --text: #111111;
  --muted: #666666;
  --brand-green: #009246;
  --brand-white: #f5f5f2;
  --brand-red: #ce2b37;
  --accent: #000000;
  --border: rgba(0,0,0,.08);
  --shadow: 0 8px 24px rgba(0,0,0,.06);
  --radius: 14px;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: #111;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus-visible{
  left: 12px;
  top: 12px;
  z-index: 1000;
}

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px 34px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap > main{ flex: 1; }

/* Header */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.brand .brand-title{
  margin:0;
  font-size: 20px;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

.brand-lockup{
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  padding: 0.16em 0.34em 0.2em;
  line-height: 1;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: none;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(0,146,70,.95) 0 33.33%,
    rgba(245,245,242,.96) 33.33% 66.66%,
    rgba(206,43,55,.95) 66.66% 100%
  );
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.brand-im{
  color: #111111;
  text-shadow: none;
  font-weight: inherit;
}

.brand-per{
  color: #111111;
  text-shadow: none;
  font-weight: inherit;
}

.brand-fetto{
  color: #111111;
  text-shadow: none;
  font-weight: inherit;
}

.brand p{
  margin:0;
  color: var(--muted);
  font-size: 14px;
}

nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.breadcrumb{
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.breadcrumb a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover{
  border-color: currentColor;
}

.breadcrumb [aria-current="page"]{
  color: var(--text);
  font-weight: 600;
}

/* Nav pills */
.navlink{
  display:inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  color: #111;
  text-decoration: none;
  background: transparent;
  font-size: 15px;
  transition: opacity .15s ease, background .15s ease;
}

.navlink:hover{
  opacity: .65;
}

.navlink:focus-visible,
.landing-nav a:focus-visible,
.breadcrumb a:focus-visible,
.card:focus-visible{
  outline: 3px solid #111;
  outline-offset: 3px;
  border-radius: 999px;
}

.card:focus-visible{
  border-radius: var(--radius);
}

.breadcrumb a:focus-visible{
  border-radius: 6px;
}

.navlink.active,
.navlink[aria-current="page"]{
  background: #111;
  color: #fff;
  border-color: #111;
  opacity: 1;
}

.navlink[aria-disabled="true"]{
  opacity: .5;
  pointer-events: none;
}

/* Hero */
.hero{
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero h1,
.hero h2{
  margin:0 0 8px;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero p{
  margin:0;
  color: var(--muted);
  max-width: 70ch;
}

.content{
  margin-top: 18px;
}

.content h2,
.content h3{
  margin: 0 0 8px;
}

.content p,
.content ul{
  margin: 0 0 20px;
}

.content ul{
  padding-left: 20px;
}

/* Ingredients flow diagram */
.ingredients-flow{
  margin-top: 8px;
}

.ingredients-diagram{
  width: min(100%, 470px);
  margin: 0 auto;
}

.ingredients-diagram-image{
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* Pastas page compact layout: prioritize first-screen visibility. */
body.pastas-page .wrap{
  padding-top: 16px;
  padding-bottom: 20px;
}

body.pastas-page header{
  margin-bottom: 6px;
}

body.pastas-page .breadcrumb{
  margin-top: 4px;
}

body.pastas-page .hero{
  margin-top: 6px;
  padding: 12px 16px;
}

body.pastas-page .hero h1{
  font-size: 24px;
  margin-bottom: 6px;
}

body.pastas-page .ingredients-flow{
  margin-top: 6px;
}

body.pastas-page .ingredients-diagram{
  width: min(100%, 470px);
}

body.pastas-page .grid{
  gap: 10px;
  margin-top: 10px;
}

body.pastas-page .card{
  padding: 16px;
}

body.pastas-page footer{
  margin-top: 10px;
}

/* Cards grid */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.card{
  grid-column: span 6;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.card:active{
  transform: translateY(0);
}

.card h3{
  margin:0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.muted{
  margin:0;
  color: var(--muted);
}

/* Card meta pills */
.meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}

.pill{
  font-size: 12px;
  color: #444;
  background: transparent;
  border: 1px solid rgba(0,0,0,.15);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Footer */
footer{
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

/* Landing page */
body.landing{
  background: #ffffff;
  color: #111;
}

.landing-wrap{
  min-height: 100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap: 28px;
  padding: 24px;
}

.landing .hero{
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.landing .cta{
  margin-top: 4px;
}

.brand-name{
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: 0.18em;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
}

body.landing .brand-name{
  position: relative;
  display: inline-block;
  padding: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 1;
  letter-spacing: 0.04em;
  font-weight: 700;
  isolation: isolate;
  opacity: 0;
  transform: translateY(10px);
  animation: landing-logo-in 400ms ease-out forwards;
}

@keyframes landing-logo-in{
  from{
    opacity: 0;
    transform: translateY(10px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce){
  body.landing .brand-name{
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.tagline{
  font-size: 18px;
  font-style: italic;
  color: #555;
  max-width: 520px;
  margin: 0;
}

.landing-nav{
  display:flex;
  flex-direction:column;
  gap: 18px;
  margin-top: 6px;
}

.landing-nav a{
  font-size: 28px;
  text-decoration:none;
  color: #111;
  transition: opacity .2s ease, border-color .2s ease;
  border-bottom: 1.5px solid rgba(0,0,0,.2);
  padding-bottom: 2px;
}

.landing-nav a:hover{
  opacity: .6;
  border-color: rgba(0,0,0,.5);
}

.landing-nav a[aria-disabled="true"]{
  opacity: .5;
  pointer-events:none;
}

.pager{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top: 22px;
  flex-wrap:wrap;
}

.pager-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  color: #111;
  text-decoration: none;
  background: transparent;
  font-size: 14px;
  transition: opacity .15s ease, background .15s ease;
}

.pager-link:hover{
  opacity: .65;
}

.pager-link:focus-visible{
  outline: 3px solid #111;
  outline-offset: 3px;
}

.landing footer{
  justify-content:center;
  text-align:center;
  padding: 0 24px 24px;
}

/* Responsive */
@media (max-width: 1024px){
  .wrap{ max-width: 900px; }
  .hero h1, .hero h2{ font-size: 32px; }
  .card{ grid-column: span 6; }
}

@media (max-width: 768px){
  header{ align-items:flex-start; }
  nav{ gap:8px; }
  .navlink{ padding: 8px 14px; font-size: 14px; }
  .hero{ padding: 18px 18px; }
  .hero h1, .hero h2{ font-size: 30px; }
  .ingredients-diagram{
    border-radius: 20px;
  }
}

@media (max-width: 720px){
  .card{ grid-column: span 12; }
  .hero h1, .hero h2{ font-size: 30px; }
}

@media print{
  *{
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body{
    font-size: 12pt;
    line-height: 1.4;
  }

  .wrap{
    max-width: none;
    padding: 0;
  }

  header nav,
  .landing-nav{
    display: none !important;
  }

  .breadcrumb{
    margin: 0 0 8pt;
  }

  .card{
    grid-column: span 12;
    border: 1px solid #000;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  footer{
    margin-top: 12pt;
    font-size: 10pt;
  }
}
