/* ============================================
   HOMEPAGE - STILE LOVABLE (classi personalizzate)
   ============================================ */

:root {
  --background: #FDF6EC;
  --foreground: #1B3A5C;
  --primary: #1B3A5C;
  --accent: #C0392B;
  --muted: #6e7776;
  --border: #e6ded0;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Karla', system-ui, sans-serif;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  margin: 0;
}

h1, h2, h3, h4, .home-title, .section-title, .diary-title {
  font-family: var(--font-serif);
}

.site-container {
  width: min(84%, 1120px);
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary);
}
.header-logo img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: contain;
}
.header-logo-text {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}
.header-logo-sub {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.header-nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
}
.header-nav a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
.header-nav a:hover {
  color: var(--accent);
}

/* Hero */
.home-hero {
  position: relative;
  height: clamp(500px, 44vw, 820px);
  overflow: hidden;
}
.home-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 50%;
}
.hero-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(253,246,236,0.56) 0%, rgba(253,246,236,0.2) 38%, transparent 62%);
}
.home-hero-copy {
  position: relative;
  padding-top: 66px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.home-title {
  font-size: 54px;
  line-height: 1;
  font-weight: 600;
  color: var(--primary);
  max-width: 650px;
  margin: 0;
}
.home-title em {
  font-weight: 500;
}
.home-lead {
  font-size: 16px;
  line-height: 1.4;
  color: var(--primary);
  max-width: 420px;
  margin-top: 16px;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 99px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: #a03023;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 99px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: rgba(27,58,92,0.05);
}
.badge-stretto {
  position: absolute;
  bottom: 56px;
  right: 8%;
  transform: rotate(-5deg);
  font-family: var(--font-serif);
  font-size: 24px;
  font-style: italic;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 20px rgba(15,30,50,0.85);
}
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
}

/* Sezioni */
.section-ricette {
  padding: 60px 0 30px;
}
.section-storie {
  padding: 30px 0 80px;
}
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
}
.section-title::after {
  content: "";
  width: 82px;
  height: 1px;
  background: rgba(192,57,43,0.5);
}
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.section-link:hover {
  text-decoration: underline;
}

/* Card */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.recipe-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 16px -6px rgba(27,58,92,0.15);
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -8px rgba(27,58,92,0.25);
}
.recipe-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.recipe-badge {
  position: absolute;
  bottom: 12px;
  left: 16px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
}
.recipe-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.recipe-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 8px 0;
}
.recipe-description {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 16px;
  min-height: 40px;
  flex: 1;
}
.recipe-meta {
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
}
.recipe-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.icona-forchetta {
  width: 14px;
  height: 14px;
}

/* Diario */
.diary-band {
  position: relative;
  padding: 40px 0;
}
.diary-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.diary-title {
  font-size: 32px;
  line-height: 1.1;
  color: var(--primary);
  margin: 12px 0;
}
.diary-title em {
  font-weight: 500;
}
.diary-text p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--primary);
  margin-bottom: 24px;
}
.diary-photo {
  aspect-ratio: 1.8;
  overflow: hidden;
  border-radius: 12px;
}
.diary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Storie */
.story-card {
  display: block;
  text-decoration: none;
}
.story-image {
  aspect-ratio: 3.6;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: transform 0.3s;
}
.story-card:hover .story-image {
  transform: scale(1.03);
}
.story-date {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.story-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 8px 0;
  max-width: 280px;
  line-height: 1.2;
}
.story-body p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 1023px) {
  .home-title { font-size: 48px; }
  .home-hero-copy { padding-top: 55px; }
}
@media (max-width: 850px) {
  .cards-grid { grid-template-columns: 1fr; }
  .diary-grid { grid-template-columns: 1fr; gap: 24px; }
  .header-nav { display: none; }
}
@media (max-width: 639px) {
  .site-container { width: calc(100% - 40px); }
  .home-hero { height: 650px; background: #d7e0da; }
  .home-hero-image { height: 400px; top: auto; object-position: 90% center; }
  .home-title { font-size: 40px; line-height: 1.03; }
  .section-title { font-size: 32px; gap: 16px; }
  .section-title::after { width: 40px; }
}
