:root {
  --bg: #F6F1EB;
  --bg-warm: #EDE6DC;
  --ink: #1A1A18;
  --ink-soft: #5C5A54;
  --green: #2D4A3E;
  --green-light: #3D6B5A;
  --terracotta: #C4654A;
  --terracotta-light: #E8845F;
  --cream: #FFFCF7;
  --border: rgba(26,26,24,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(246,241,235,0.85);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}

.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--green);
}

.logo span { color: var(--terracotta); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  font-size: 1.2rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.lang-toggle:hover {
  background: rgba(45,74,62,0.06);
  transform: translateY(-1px);
}

.nav-cta {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.5rem;
  background: var(--green);
  color: var(--cream);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--green-light);
  transform: translateY(-1px);
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 3rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 900px;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--green);
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 520px;
  margin-top: 2rem;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-problems {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.7s forwards;
}

.hero-problem-item {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(45,74,62,0.04);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.hero-problem-item:hover {
  background: rgba(45,74,62,0.07);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.hero-problem-item .problem-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.hero-problem-item h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.hero-problem-item p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 300;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.9s forwards;
}

.btn-primary {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--terracotta-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196,101,74,0.3);
}

.btn-secondary {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.macro-card {
  background: var(--cream);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 40px rgba(0,0,0,0.06), 0 30px 80px rgba(0,0,0,0.04);
  border: 1px solid rgba(255,255,255,0.8);
}

.macro-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.macro-card-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  color: var(--green);
}

.macro-card-cal {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: rgba(196,101,74,0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
}

.macro-value {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.macro-slider-row {
  display: flex;
  align-items: center;
  padding: 0.6rem 0;
  gap: 0.75rem;
}

.macro-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 10px;
  background: var(--bg);
  outline: none;
  cursor: pointer;
}

.macro-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: transform 0.15s ease;
}

.macro-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.macro-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.slider-protein::-webkit-slider-thumb { background: var(--green); }
.slider-carbs::-webkit-slider-thumb { background: var(--terracotta); }
.slider-fat::-webkit-slider-thumb { background: var(--ink-soft); }
.slider-protein::-moz-range-thumb { background: var(--green); }
.slider-carbs::-moz-range-thumb { background: var(--terracotta); }
.slider-fat::-moz-range-thumb { background: var(--ink-soft); }

@keyframes nudgeSlider {
  0% { transform: translateX(0); }
  12% { transform: translateX(14px); }
  28% { transform: translateX(-10px); }
  44% { transform: translateX(7px); }
  62% { transform: translateX(-4px); }
  78% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.macro-card.nudge .slider-protein::-webkit-slider-thumb {
  animation: nudgeSlider 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s 1;
}
.macro-card.nudge .slider-carbs::-webkit-slider-thumb {
  animation: nudgeSlider 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.5s 1;
}
.macro-card.nudge .slider-fat::-webkit-slider-thumb {
  animation: nudgeSlider 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.7s 1;
}
.macro-card.nudge .slider-protein::-moz-range-thumb {
  animation: nudgeSlider 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s 1;
}
.macro-card.nudge .slider-carbs::-moz-range-thumb {
  animation: nudgeSlider 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.5s 1;
}
.macro-card.nudge .slider-fat::-moz-range-thumb {
  animation: nudgeSlider 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.7s 1;
}

.macro-card-dish {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  transition: all 0.3s ease;
}

.dish-emoji {
  font-size: 2rem;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border-radius: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dish-info h4 { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.15rem; transition: all 0.3s ease; }
.dish-info p { font-size: 0.7rem; color: var(--ink-soft); font-weight: 300; transition: all 0.3s ease; }
.dish-funny .dish-emoji { background: rgba(196,101,74,0.08); }

section { padding: 6rem 3rem; position: relative; }

.container { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }

.wave-divider { position: relative; width: 100%; overflow: hidden; line-height: 0; margin: 0; padding: 0; font-size: 0; }
.wave-divider svg { display: block; width: 100%; height: auto; margin-bottom: -1px; }

.deco-blob { position: absolute; pointer-events: none; z-index: 0; }
.deco-blob svg { width: 100%; height: 100%; }

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(10px, -15px) rotate(3deg); }
  66% { transform: translate(-8px, 10px) rotate(-2deg); }
}

@keyframes morphBlob {
  0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  25% { border-radius: 50% 50% 35% 65% / 60% 40% 60% 40%; }
  50% { border-radius: 35% 65% 50% 50% / 40% 55% 45% 60%; }
  75% { border-radius: 60% 40% 45% 55% / 50% 60% 40% 50%; }
}

.deco-morph {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  animation: morphBlob 18s ease-in-out infinite, floatSlow 14s ease-in-out infinite;
}

.hero .deco-morph-1 { width: 450px; height: 450px; background: radial-gradient(ellipse at 30% 40%, rgba(196,101,74,0.07) 0%, rgba(196,101,74,0.02) 50%, transparent 70%); top: -120px; left: -180px; }
.hero .deco-morph-2 { width: 350px; height: 350px; background: radial-gradient(ellipse at 60% 50%, rgba(45,74,62,0.06) 0%, rgba(45,74,62,0.015) 50%, transparent 70%); bottom: -80px; right: 25%; animation-delay: -5s; animation-direction: reverse; }
.hero .deco-blob-1 { width: 200px; height: 200px; top: 12%; right: 40%; opacity: 0.5; animation: floatSlow 16s ease-in-out infinite; }

.problem { background: var(--green); color: var(--cream); overflow: hidden; padding-top: 0; padding-bottom: 0; }
.problem-inner { padding: 6rem 0; position: relative; }
.problem .deco-morph-1 { width: 400px; height: 400px; background: radial-gradient(ellipse at 50% 50%, rgba(232,132,95,0.08) 0%, transparent 65%); top: -120px; right: -100px; animation-delay: -3s; }
.problem .deco-morph-2 { width: 300px; height: 300px; background: radial-gradient(ellipse at 40% 60%, rgba(255,252,247,0.04) 0%, transparent 60%); bottom: -80px; left: -80px; animation-delay: -8s; animation-direction: reverse; }

#come-funziona { overflow: hidden; }
#come-funziona .deco-morph-1 { width: 320px; height: 320px; background: radial-gradient(ellipse at 50% 40%, rgba(45,74,62,0.05) 0%, transparent 65%); top: -60px; right: -40px; animation-delay: -4s; }
#come-funziona .deco-blob-1 { width: 160px; height: 160px; bottom: 8%; left: 5%; opacity: 0.4; animation: floatSlow 18s ease-in-out infinite reverse; }

.plates { overflow: hidden; padding-top: 0; padding-bottom: 0; background: var(--bg-warm); }
.plates-inner { padding: 6rem 0; position: relative; }
.plates .deco-morph-1 { width: 350px; height: 350px; background: radial-gradient(ellipse at 40% 50%, rgba(45,74,62,0.04) 0%, transparent 65%); top: -100px; left: -100px; animation-delay: -6s; }

.cta-section { overflow: hidden; }
.cta-section .deco-morph-1 { width: 550px; height: 550px; background: radial-gradient(ellipse at 60% 40%, rgba(196,101,74,0.05) 0%, transparent 60%); top: -220px; right: -180px; animation-delay: -2s; }
.cta-section .deco-morph-2 { width: 400px; height: 400px; background: radial-gradient(ellipse at 40% 60%, rgba(45,74,62,0.04) 0%, transparent 60%); bottom: -180px; left: -120px; animation-delay: -9s; animation-direction: reverse; }

.cta-glow { position: absolute; width: 600px; height: 300px; left: 50%; top: 55%; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(196,101,74,0.08) 0%, rgba(45,74,62,0.04) 40%, transparent 70%); pointer-events: none; z-index: 0; filter: blur(40px); }

.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-tag { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 1rem; position: relative; z-index: 1; }
.section-title { font-family: 'Instrument Serif', serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; max-width: 600px; margin-bottom: 1rem; position: relative; z-index: 1; }
.section-header .section-title { margin-left: auto; margin-right: auto; }
.section-desc { font-size: 1.05rem; line-height: 1.7; color: var(--ink-soft); max-width: 500px; font-weight: 300; position: relative; z-index: 1; }
.section-header .section-desc { margin-left: auto; margin-right: auto; }

.problem .section-tag { color: var(--terracotta-light); }
.problem .section-desc { color: rgba(255,252,247,0.65); }

.solution-visual { display: flex; justify-content: center; position: relative; z-index: 1; }
.solution-visual .macro-card { width: 100%; max-width: 400px; color: var(--ink); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 4.2rem;
  left: calc(16.66% + 1rem);
  right: calc(16.66% + 1rem);
  height: 2px;
  background: linear-gradient(90deg, var(--terracotta) 0%, var(--green) 100%);
  opacity: 0.15;
  z-index: 1;
}

.step {
  position: relative;
  padding: 2.5rem 2rem;
  background: var(--cream);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  z-index: 2;
}

.step:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,0,0,0.06); border-color: rgba(45,74,62,0.15); }

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: 'Instrument Serif', serif;
  font-size: 3rem;
  color: var(--bg-warm);
  line-height: 1;
  display: block;
  margin-bottom: 1.5rem;
}

.step h3 { font-family: 'Instrument Serif', serif; font-size: 1.3rem; margin-bottom: 0.6rem; color: var(--green); }
.step p { font-size: 0.88rem; line-height: 1.65; color: var(--ink-soft); font-weight: 300; }

.plates-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.plates-scroll::-webkit-scrollbar { display: none; }

.plate-card {
  min-width: 280px;
  background: var(--cream);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.plate-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.06); }

.plate-visual { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 4rem; background: linear-gradient(135deg, var(--bg) 0%, var(--bg-warm) 100%); }

.plate-info { padding: 1.5rem; }
.plate-info h4 { font-family: 'Instrument Serif', serif; font-size: 1.1rem; margin-bottom: 0.3rem; }
.plate-info .plate-desc { font-size: 0.78rem; color: var(--ink-soft); font-weight: 300; margin-bottom: 1rem; }

.plate-macros { display: flex; gap: 0.75rem; }
.plate-macro { font-size: 0.7rem; padding: 0.3rem 0.6rem; border-radius: 100px; font-weight: 500; font-variant-numeric: tabular-nums; }
.plate-macro.p { background: rgba(45,74,62,0.08); color: var(--green); }
.plate-macro.c { background: rgba(196,101,74,0.08); color: var(--terracotta); }
.plate-macro.f { background: rgba(92,90,84,0.08); color: var(--ink-soft); }

.cta-section { text-align: center; padding: 8rem 3rem; position: relative; }
.cta-section .section-title { margin: 0 auto 1rem; max-width: 650px; }
.cta-section .section-desc { margin: 0 auto 2.5rem; max-width: 450px; }

.signup-form { display: flex; gap: 0.75rem; max-width: 480px; margin: 0 auto; position: relative; z-index: 2; }
.signup-form input { flex: 1; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; padding: 1rem 1.5rem; border: 1px solid var(--border); border-radius: 100px; background: var(--cream); color: var(--ink); outline: none; transition: all 0.3s ease; }
.signup-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,74,62,0.08); }
.signup-form input::placeholder { color: rgba(92,90,84,0.5); }
.signup-form button { font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 1rem 2rem; background: var(--terracotta); color: white; border: none; border-radius: 100px; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; }
.signup-form button:hover { background: var(--terracotta-light); transform: translateY(-1px); }
.signup-note { font-size: 0.72rem; color: var(--ink-soft); margin-top: 1rem; font-weight: 300; position: relative; z-index: 2; }

footer { padding: 2.5rem 3rem; border-top: 1px solid var(--border); }
.footer-left { font-family: 'Instrument Serif', serif; font-size: 1.1rem; color: var(--green); }
.footer-right { font-size: 0.75rem; color: var(--ink-soft); font-weight: 300; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  section { padding: 4rem 1.5rem; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .hero-problems, .steps-grid { grid-template-columns: 1fr; gap: 1rem; }
  .problem-inner, .plates-inner { padding: 4rem 0; }
  .deco-morph, .deco-blob { display: none; }
  .steps-grid::before { display: none; }
  .signup-form { flex-direction: column; }
  footer .container { flex-direction: column; gap: 0.5rem; text-align: center; }
}
