/* ============================================================
   DI GIANCA — "L'EDITORIALE"
   Hoja de estilos compartida: index / menu / vinos
   Paleta: espresso · crema · terracotta · granate
   ============================================================ */
:root {
  --espresso: #1B120C;
  --espresso-2: #241811;
  --crema: #F0E6D2;
  --crema-suave: rgba(240, 230, 210, 0.65);
  --terracotta: #C05B33;
  --granate: #6E2B2B;
  --dorado: #B8935A;
  --linea: rgba(240, 230, 210, 0.16);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Archivo', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* Alto real de la barra superior fija (se usa para posicionar la barra de secciones) */
:root { --alto-header: 78px; --alto-subnav: 50px; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-header) + var(--alto-subnav) + 16px); }

body {
  background: var(--espresso);
  color: var(--crema);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--terracotta); color: var(--crema); }

:focus-visible { outline: 2px solid var(--dorado); outline-offset: 3px; }

/* ---------- Tipografía ---------- */
.italic { font-family: var(--serif); font-style: italic; font-weight: 400; }

.label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--terracotta);
}

/* ---------- Nav ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  background: linear-gradient(rgba(27, 18, 12, 0.92), rgba(27, 18, 12, 0));
  transition: background 0.3s;
}
header.solid { background: rgba(27, 18, 12, 0.96); border-bottom: 1px solid var(--linea); }
header.always-solid { background: rgba(27, 18, 12, 0.96); border-bottom: 1px solid var(--linea); }

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.brand em { font-style: italic; color: var(--terracotta); }

nav.links { display: flex; gap: 2rem; align-items: center; }
nav.links a {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--crema-suave);
  transition: color 0.2s;
}
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--crema); }

.btn-reserva {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--crema) !important;
  border: 1px solid var(--terracotta);
  background: var(--terracotta);
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  transition: all 0.25s;
}
.btn-reserva:hover { background: transparent; color: var(--terracotta) !important; }

.nav-toggle { display: none; background: none; border: 1px solid var(--linea); color: var(--crema); font-size: 1.2rem; padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer; }

@media (max-width: 980px) {
  :root { --alto-header: 71px; --alto-subnav: 44px; }
  header { padding: 1rem 1.2rem; }
  nav.links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 1.4rem;
    background: var(--espresso);
    padding: 2rem;
    border-bottom: 1px solid var(--linea);
    max-height: 80vh;
    overflow-y: auto;
  }
  nav.links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------- Hero portada ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  padding: 0 2rem 3.5rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('img/pasta.jpg');
  background-size: cover;
  background-position: center;
  filter: sepia(0.35) saturate(0.85) brightness(0.5) contrast(1.05);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,18,12,0.5) 0%, rgba(27,18,12,0.25) 45%, rgba(27,18,12,0.96) 100%);
}
.hero-content { position: relative; max-width: 1300px; margin: 0 auto; width: 100%; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 13vw, 12.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.hero h1 .line2 { display: block; font-style: italic; color: var(--terracotta); font-weight: 300; }
.hero-sub {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--linea);
  flex-wrap: wrap;
}
.hero-sub p { max-width: 420px; color: var(--crema-suave); }
@media (max-width: 700px) { .hero { padding: 0 1.2rem 2.5rem; } }

/* ---------- Cabecera de página interior ---------- */
.page-head {
  padding: 9rem 2rem 3.5rem;
  max-width: 1300px;
  margin: 0 auto;
  border-bottom: 1px solid var(--linea);
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-top: 0.6rem;
}
.page-head h1 em { font-style: italic; color: var(--terracotta); }
.page-head .intro { max-width: 560px; color: var(--crema-suave); margin-top: 1.6rem; }
@media (max-width: 700px) { .page-head { padding: 7rem 1.2rem 2.5rem; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
  padding: 0.9rem 0;
  white-space: nowrap;
}
.marquee-inner {
  display: inline-block;
  animation: scroll 30s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--crema-suave);
}
.marquee-inner span { margin: 0 2.2rem; }
.marquee-inner .dot { color: var(--terracotta); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Capítulos ---------- */
.chapter { max-width: 1300px; margin: 0 auto; padding: 7rem 2rem; }
.chapter-head {
  display: flex;
  align-items: baseline;
  gap: 1.6rem;
  margin-bottom: 3.5rem;
}
.chapter-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--dorado);
}
.chapter h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1;
}
@media (max-width: 700px) { .chapter { padding: 4.5rem 1.2rem; } }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; gap: 2.5rem; } }

.story-text p { margin-bottom: 1.3rem; color: var(--crema-suave); }
.story-text p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 4.2rem;
  float: left;
  line-height: 0.8;
  padding: 0.35rem 0.7rem 0 0;
  color: var(--terracotta);
}

.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.25;
  color: var(--crema);
  border-left: 2px solid var(--terracotta);
  padding-left: 1.8rem;
  margin: 2.5rem 0;
}

.foto {
  filter: sepia(0.3) saturate(0.9) contrast(1.02) brightness(0.92);
  border-radius: 2px;
}
.foto-caption {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--crema-suave);
  margin-top: 0.9rem;
}

/* ---------- Lista de platos (portada, sin precio) ---------- */
.dish-list { border-top: 1px solid var(--linea); }
.dish {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0.5rem;
  border-bottom: 1px solid var(--linea);
  transition: background 0.25s, padding 0.25s;
}
.dish:hover { background: var(--espresso-2); padding-left: 1.2rem; }
.dish h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.dish p {
  font-size: 0.85rem;
  color: var(--crema-suave);
  text-align: right;
  max-width: 380px;
}
@media (max-width: 700px) {
  .dish { flex-direction: column; gap: 0.3rem; }
  .dish p { text-align: left; }
}

/* ---------- Botones ---------- */
.cta-row { margin-top: 3rem; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.btn-line {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding: 0.9rem 2rem;
  border: 1px solid var(--crema-suave);
  border-radius: 999px;
  transition: all 0.25s;
  display: inline-block;
}
.btn-line:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-fill {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--crema);
}
.btn-fill:hover { background: transparent; }

/* ---------- Banda granate ---------- */
.wine-band { background: var(--granate); }
.wine-band .chapter { padding: 6rem 2rem; }
.wine-band .label { color: var(--dorado); }
.wine-band .btn-line:hover { border-color: var(--crema); color: var(--crema); }

/* ---------- Scuola / servicios ---------- */
.offer {
  display: grid;
  grid-template-columns: 3.5rem 1fr 2fr;
  gap: 2rem;
  padding: 2.2rem 0.5rem;
  border-bottom: 1px solid var(--linea);
  align-items: baseline;
}
.offer:first-of-type { border-top: 1px solid var(--linea); }
.offer .num { font-family: var(--serif); font-style: italic; color: var(--dorado); }
.offer h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; }
.offer p { color: var(--crema-suave); font-size: 0.95rem; }
@media (max-width: 700px) { .offer { grid-template-columns: 2.5rem 1fr; gap: 1rem; } .offer p { grid-column: 2; } }

/* ---------- En Casa ---------- */
.encasa {
  background: var(--espresso-2);
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}
.badge {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  border: 1px solid var(--terracotta);
  color: var(--terracotta);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

/* ---------- Galería ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.strip img { width: 100%; height: 340px; object-fit: cover; }
@media (max-width: 880px) { .strip { grid-template-columns: repeat(2, 1fr); } .strip img { height: 220px; } }

/* ============================================================
   MENÚ Y CARTA DE VINOS
   ============================================================ */

/* Navegación de secciones pegajosa */
.section-nav {
  position: sticky;
  top: var(--alto-header);
  z-index: 150;
  background: rgba(27, 18, 12, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav-inner {
  display: flex;
  gap: 0;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  white-space: nowrap;
}
.section-nav a {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--crema-suave);
  padding: 1.1rem 1.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.section-nav a:hover { color: var(--crema); }
.section-nav a.active { color: var(--terracotta); border-bottom-color: var(--terracotta); }

/* Etiqueta de grupo dentro de la barra (Italia / Mundo) */
.nav-grupo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--dorado);
  padding: 1.1rem 1rem 1.1rem 0;
  align-self: center;
  border-left: 1px solid var(--linea);
  padding-left: 1.2rem;
  margin-left: 0.4rem;
}
.section-nav-inner > .nav-grupo:first-child { border-left: 0; margin-left: 0; padding-left: 0; }
@media (max-width: 980px) { .section-nav-inner { padding: 0 1rem; } .section-nav a { padding: 0.9rem 0.8rem; } }

/* Bloque de sección del menú */
.menu-block { max-width: 1300px; margin: 0 auto; padding: 4.5rem 2rem 1rem; }
.menu-block h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}
.menu-block .sottotitolo {
  font-family: var(--serif);
  font-style: italic;
  color: var(--dorado);
  font-size: 1.05rem;
  margin-top: 0.4rem;
}
.menu-block > .items { margin-top: 2.5rem; border-top: 1px solid var(--linea); }
@media (max-width: 700px) { .menu-block { padding: 3rem 1.2rem 0.5rem; } }

/* Grid de dos columnas para los platos */
.items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 4rem;
}
@media (max-width: 880px) { .items { grid-template-columns: 1fr; column-gap: 0; } }

.plato {
  padding: 1.4rem 0.4rem;
  border-bottom: 1px solid var(--linea);
}
.plato-top {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}
.plato h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.32rem;
  line-height: 1.25;
}
.plato .puntos, .vino .puntos {
  flex: 1;
  border-bottom: 1px dotted rgba(240, 230, 210, 0.28);
  transform: translateY(-4px);
  min-width: 1.5rem;
}
.plato .precio, .vino .precio {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  color: var(--dorado);
  font-variant-numeric: tabular-nums;
}
.plato .desc {
  font-size: 0.88rem;
  color: var(--crema-suave);
  margin-top: 0.35rem;
  max-width: 46ch;
}
.plato .nota {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--dorado);
  margin-top: 0.25rem;
}

/* Chips (formas de pasta, tés) */
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.8rem; }
.chip {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  color: var(--crema-suave);
}

/* Nota al pie de sección */
.pie-nota {
  font-family: var(--serif);
  font-style: italic;
  color: var(--crema-suave);
  font-size: 0.95rem;
  margin-top: 1.6rem;
  padding-left: 0.4rem;
}

/* ---------- Vinos ---------- */
.vino {
  padding: 1.15rem 0.4rem;
  border-bottom: 1px solid var(--linea);
}
.vino h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.22rem;
  line-height: 1.3;
}
.vino .origen {
  font-size: 0.8rem;
  color: var(--crema-suave);
  letter-spacing: 0.02em;
  margin-top: 0.2rem;
}
.vino .pais {
  color: var(--dorado);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
}

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--linea); }
.footer-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}
.footer-main h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1;
  margin-bottom: 3rem;
}
.footer-main h2 em { font-style: italic; color: var(--terracotta); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--linea);
}
.footer-grid h4 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--dorado);
  margin-bottom: 1rem;
  font-weight: 500;
}
.footer-grid p, .footer-grid a { color: var(--crema-suave); font-size: 0.92rem; display: block; margin-bottom: 0.35rem; }
.footer-grid a:hover { color: var(--crema); }
.footer-bottom {
  text-align: center;
  padding: 1.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--crema-suave);
  border-top: 1px solid var(--linea);
}
@media (max-width: 700px) { .footer-main { padding: 3.5rem 1.2rem 2rem; } }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 300;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 22px rgba(0,0,0,0.45);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-inner { animation: none; }
}

/* ---------- Impresión (el menú en papel) ---------- */
@media print {
  header, .section-nav, .wa-float, .cta-row, footer .footer-grid { display: none !important; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .plato h3, .menu-block h2, .vino h3 { color: #111; }
  .plato .desc, .vino .origen { color: #444; }
  .plato .precio, .menu-block .sottotitolo, .plato .nota { color: #6E2B2B; }
  .menu-block { padding: 1rem 0; break-inside: avoid; }
  .items { grid-template-columns: repeat(2, 1fr); }
  .page-head { padding: 0 0 1rem; }
}
