/* ============================================
   Pan y Manteca — hoja de estilos
   ============================================ */

:root {
  /* Paleta */
  --crema:     #FBF7F0;
  --masa:      #F3EBDD;
  --masa-2:    #EADDC8;
  --manteca:   #E9B949;
  --dulce:     #C9772F;
  --corteza:   #8A5A34;
  --espresso:  #241A13;
  --tinta:     #5A4838;
  --tinta-2:   #8A7663;
  --linea:     #E2D5C0;

  /* Tipografía */
  --display: 'Fraunces', Georgia, serif;
  --body: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Medidas */
  --wrap: 1180px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(36, 26, 19, .06);
  --shadow-md: 0 10px 30px rgba(36, 26, 19, .10);
  --shadow-lg: 0 24px 60px rgba(36, 26, 19, .16);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: var(--body);
  background: var(--crema);
  color: var(--espresso);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ---------- Tipos ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.2rem; }
em { font-style: italic; }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dulce);
  margin-bottom: 14px;
}
.eyebrow--light { color: var(--manteca); }

.sec-head { max-width: 620px; margin-bottom: 54px; }
.sec-head__sub { color: var(--tinta); margin-top: 18px; font-size: 1.05rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1.5px solid transparent;
  border-radius: 100px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--espresso); color: var(--crema); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--dulce); box-shadow: var(--shadow-md); }

.btn--ghost { border-color: rgba(251, 247, 240, .5); color: var(--crema); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(251, 247, 240, .14); border-color: var(--crema); }

.btn--sm { padding: 10px 20px; font-size: .88rem; }
.btn--full { width: 100%; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), padding .35s var(--ease);
  padding: 18px 0;
}
.nav__inner {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.nav.is-stuck {
  background: rgba(251, 247, 240, .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--linea), var(--shadow-sm);
  padding: 10px 0;
}

.logo { display: flex; align-items: center; gap: 12px; }
/* Ojo: no usar grid/flex acá. El contenido es `P<span>y</span>M` y cada
   corrida de texto suelta se volvería un item anónimo, apilando las letras.
   Con inline-block + line-height se centra sin romper la línea. */
.logo__mark {
  display: inline-block;
  width: 42px; height: 42px;
  line-height: 42px;
  text-align: center;
  border-radius: 12px;
  background: var(--manteca);
  color: var(--espresso);
  font-family: var(--display);
  font-weight: 700; font-size: .95rem;
  letter-spacing: -.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo__mark span { color: var(--dulce); }
.logo__text {
  font-family: var(--display);
  font-weight: 600; font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--crema);
  transition: color .35s;
}
.nav.is-stuck .logo__text { color: var(--espresso); }

.nav__links { display: flex; align-items: center; gap: 8px; }
.nav__links > a:not(.btn) {
  padding: 8px 14px;
  border-radius: 100px;
  font-size: .94rem; font-weight: 500;
  color: var(--crema);
  transition: color .3s, background .3s;
}
.nav__links > a:not(.btn):hover { background: rgba(251, 247, 240, .16); }
.nav.is-stuck .nav__links > a:not(.btn) { color: var(--tinta); }
.nav.is-stuck .nav__links > a:not(.btn):hover { background: var(--masa); color: var(--espresso); }

.nav__links .btn--primary { margin-left: 8px; }
.nav:not(.is-stuck) .nav__links .btn--primary { background: var(--manteca); color: var(--espresso); }
.nav:not(.is-stuck) .nav__links .btn--primary:hover { background: var(--crema); }

.nav__toggle {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 10px; background: none; border: 0; cursor: pointer;
}
.nav__toggle span {
  width: 24px; height: 2px; border-radius: 2px;
  background: var(--crema);
  transition: transform .3s var(--ease), opacity .25s, background .35s;
}
.nav.is-stuck .nav__toggle span { background: var(--espresso); }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 140px 0 90px;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 13, 8, .72) 0%, rgba(20, 13, 8, .45) 45%, rgba(20, 13, 8, .82) 100%),
    linear-gradient(90deg, rgba(20, 13, 8, .6) 0%, transparent 65%);
}

.hero__content {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: 24px;
  color: var(--crema);
  max-width: min(var(--wrap), 100%);
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.035em;
  max-width: 14ch;
}
.hero__title em { color: var(--manteca); font-weight: 600; }

.hero__sub {
  margin-top: 24px;
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: rgba(251, 247, 240, .82);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero__facts {
  display: flex; flex-wrap: wrap; gap: 44px;
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid rgba(251, 247, 240, .22);
  max-width: 520px;
}
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts strong {
  font-family: var(--display);
  font-size: 1.9rem; font-weight: 600;
  color: var(--manteca);
  line-height: 1;
}
.hero__facts span {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(251, 247, 240, .62);
  margin-top: 8px;
}

.hero__scroll {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid rgba(251, 247, 240, .45);
  border-radius: 100px;
  display: grid; place-items: start center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 3px; height: 8px; border-radius: 2px;
  background: var(--manteca);
  animation: scroll-hint 1.8s var(--ease) infinite;
}
@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: .2; }
}

/* ============================================
   FRANJAS
   ============================================ */
.franjas { background: var(--masa); padding: 84px 0; }
.franjas__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.franja {
  background: var(--crema);
  border: 1px solid var(--linea);
  border-radius: var(--r-lg);
  padding: 34px 30px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.franja:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.franja__ico {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--masa);
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.franja h3 { font-size: 1.4rem; }
.franja__time {
  font-weight: 700; font-size: .84rem;
  letter-spacing: .1em;
  color: var(--dulce);
  margin: 6px 0 12px;
}
.franja p:last-child { color: var(--tinta); font-size: .96rem; }

/* ============================================
   CARTA
   ============================================ */
.carta { padding: 100px 0; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter {
  padding: 10px 22px;
  border: 1.5px solid var(--linea);
  border-radius: 100px;
  background: transparent;
  font-size: .92rem; font-weight: 500;
  color: var(--tinta);
  cursor: pointer;
  transition: all .25s var(--ease);
}
.filter:hover { border-color: var(--corteza); color: var(--espresso); }
.filter.is-active { background: var(--espresso); border-color: var(--espresso); color: var(--crema); }

.menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}

.dish {
  background: var(--crema);
  border: 1px solid var(--linea);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.dish:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }

.dish.is-hidden { display: none; }

.dish__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--masa-2); }
.dish__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.dish:hover .dish__img img { transform: scale(1.06); }

.dish__tag {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--manteca);
  color: var(--espresso);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.dish__body { padding: 22px 24px 26px; }
.dish__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.dish__row h3 { font-size: 1.16rem; }
.dish__price {
  font-family: var(--display);
  font-weight: 600; font-size: 1.02rem;
  color: var(--dulce);
  white-space: nowrap;
}
.dish__body p { margin-top: 8px; color: var(--tinta); font-size: .92rem; line-height: 1.6; }

.menu__empty { text-align: center; padding: 60px 0; color: var(--tinta-2); }

/* ============================================
   FRASE
   ============================================ */
.quote { background: var(--espresso); color: var(--crema); padding: 92px 0; }
.quote blockquote { max-width: 760px; margin-inline: auto; text-align: center; }
.quote p {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.quote cite {
  display: block;
  margin-top: 26px;
  font-style: normal;
  font-size: .84rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--manteca);
}

/* ============================================
   LOCAL / GALERÍA
   ============================================ */
.local { padding: 100px 0; background: var(--masa); }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  gap: 16px;
}
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--masa-2);
}
.gallery__item--big { grid-column: span 2; grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }

.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.gallery__item:hover img { transform: scale(1.07); }

.gallery__item figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 34px 20px 16px;
  background: linear-gradient(transparent, rgba(20, 13, 8, .78));
  color: var(--crema);
  font-family: var(--display);
  font-size: .98rem; font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.gallery__item:hover figcaption { opacity: 1; transform: translateY(0); }

/* ============================================
   NOSOTROS
   ============================================ */
.nosotros { padding: 110px 0; }
.nosotros__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 68px;
  align-items: center;
}

.nosotros__media { position: relative; }
.nosotros__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.nosotros__badge {
  position: absolute;
  right: -22px; bottom: -22px;
  background: var(--manteca);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.nosotros__badge strong {
  display: block;
  font-family: var(--display);
  font-size: 2.4rem; font-weight: 700;
  line-height: 1;
  color: var(--espresso);
}
.nosotros__badge span {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--corteza); font-weight: 700;
}

.nosotros__text h2 { margin-bottom: 20px; }
.nosotros__text p { color: var(--tinta); margin-bottom: 14px; }

.checks { margin-top: 28px; display: grid; gap: 12px; }
.checks li {
  position: relative;
  padding-left: 32px;
  font-size: .96rem;
  color: var(--espresso);
}
.checks li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--manteca);
}
.checks li::after {
  content: '';
  position: absolute;
  left: 6px; top: 12px;
  width: 5px; height: 9px;
  border: solid var(--espresso);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ============================================
   VISITANOS
   ============================================ */
.visitanos { padding: 100px 0; background: var(--masa); }
.visitanos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.info-block { margin-top: 30px; }
.info-block h4 {
  font-family: var(--body);
  font-size: .76rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--tinta-2);
  margin-bottom: 8px;
}
.info-block p { color: var(--espresso); }
.info-block a { border-bottom: 1px solid var(--linea); transition: border-color .25s, color .25s; }
.info-block a:hover { color: var(--dulce); border-color: var(--dulce); }

.hours { border-collapse: collapse; width: 100%; max-width: 320px; }
.hours td { padding: 7px 0; font-size: .95rem; }
.hours td:first-child { color: var(--tinta); }
.hours td:last-child { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.hours tr + tr td { border-top: 1px solid var(--linea); }

.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.socials a {
  padding: 9px 18px;
  border: 1.5px solid var(--linea);
  border-radius: 100px;
  font-size: .86rem; font-weight: 500;
  transition: all .25s var(--ease);
}
.socials a:hover { background: var(--espresso); border-color: var(--espresso); color: var(--crema); }

/* Form */
.visitanos__form {
  background: var(--crema);
  border: 1px solid var(--linea);
  border-radius: var(--r-xl);
  padding: 38px 34px;
  box-shadow: var(--shadow-md);
}
.visitanos__form h3 { font-size: 1.6rem; }
.form__hint { color: var(--tinta-2); font-size: .88rem; margin: 8px 0 26px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: .84rem; font-weight: 500; color: var(--tinta); }
.field .opt { color: var(--tinta-2); font-weight: 400; }

.field input, .field select, .field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--linea);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: .95rem;
  transition: border-color .25s, box-shadow .25s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--manteca);
  box-shadow: 0 0 0 4px rgba(233, 185, 73, .22);
}
.field input.is-error, .field select.is-error, .field textarea.is-error {
  border-color: #C0503A;
  box-shadow: 0 0 0 4px rgba(192, 80, 58, .14);
}
.field input::placeholder, .field textarea::placeholder { color: #B9A88F; }

.visitanos__form .btn { margin-top: 10px; }
.form__ok {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: rgba(233, 185, 73, .2);
  border: 1px solid var(--manteca);
  font-size: .9rem; font-weight: 500;
  text-align: center;
}

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--espresso); color: var(--crema); padding: 60px 0 44px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 34px;
  align-items: center;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand p { font-family: var(--display); font-weight: 600; line-height: 1.3; }
.footer__brand span {
  font-family: var(--body); font-weight: 400; font-size: .82rem;
  color: rgba(251, 247, 240, .55);
}

.footer__links { display: flex; gap: 22px; }
.footer__links a {
  font-size: .92rem;
  color: rgba(251, 247, 240, .7);
  transition: color .25s;
}
.footer__links a:hover { color: var(--manteca); }

.footer__legal {
  text-align: right;
  font-size: .8rem;
  color: rgba(251, 247, 240, .5);
  line-height: 1.7;
}
.footer__credit a { border-bottom: 1px solid rgba(251, 247, 240, .3); }
.footer__credit a:hover { color: var(--manteca); }

/* ============================================
   REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1000px) {
  .franjas__grid { grid-template-columns: 1fr; }
  .nosotros__grid, .visitanos__grid { grid-template-columns: 1fr; gap: 54px; }
  .nosotros__media img { aspect-ratio: 16 / 10; }
  .nosotros__badge { right: 20px; bottom: -20px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery__item--big, .gallery__item--wide { grid-column: span 2; }
  .gallery__item--big { grid-row: span 1; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer__legal { text-align: center; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }

  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 96px 24px 32px;
    background: var(--crema);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    transition: transform .45s var(--ease);
    z-index: -1;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links > a:not(.btn),
  .nav.is-stuck .nav__links > a:not(.btn) {
    color: var(--espresso);
    padding: 14px 16px;
    font-size: 1.05rem;
    border-radius: var(--r-sm);
  }
  .nav__links .btn--primary,
  .nav:not(.is-stuck) .nav__links .btn--primary {
    margin: 12px 0 0;
    background: var(--espresso);
    color: var(--crema);
  }

  .hero { padding-top: 120px; min-height: auto; }
  .hero__facts { gap: 28px; margin-top: 44px; }
  .hero__facts strong { font-size: 1.5rem; }
  .hero__scroll { display: none; }

  .franjas, .carta, .local, .nosotros, .visitanos { padding: 68px 0; }
  .quote { padding: 68px 0; }

  .menu { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery__item--big, .gallery__item--wide { grid-column: span 1; }

  .visitanos__form { padding: 28px 22px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }

  .footer__links { flex-wrap: wrap; justify-content: center; gap: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
