/* ==========================================================================
   El Jimador Mexican Bar & Grill — style.css
   ========================================================================== */

:root {
  --cream: #FFF5CD;
  --red: #C52012;
  --red-dark: #A81A0F;
  --olive: #526B13;
  --gray-green: #59615A;
  --ink: #2B2F2C;
  --ink-soft: #4F5651;
  --white: #FFFFFF;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --radius: 14px;
  --shadow-soft: 0 6px 20px rgba(43, 47, 44, 0.08);
  --shadow-lift: 0 14px 34px rgba(43, 47, 44, 0.16);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 96px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img, video, svg { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
address { font-style: normal; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.15; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section { padding-block: clamp(4rem, 9vw, 7rem); }

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* ---------- Focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 4px;
}
.utility-bar :focus-visible,
.site-footer :focus-visible,
.favorites :focus-visible {
  outline-color: var(--cream);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--olive);
  color: var(--cream);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--olive);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-title {
  color: var(--red);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
}
.section-title--light { color: var(--cream); }

.divider {
  display: block;
  width: 56px;
  height: 3px;
  margin: 1.25rem 0 1.5rem;
  background: var(--olive);
  border-radius: 2px;
}
.divider--center { margin-inline: auto; }
.divider--olive { background: var(--olive); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn--primary {
  background: var(--red);
  color: var(--cream);
}
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn--cream {
  background: var(--cream);
  color: var(--red);
}
.btn--cream:hover { background: var(--white); transform: translateY(-2px); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 4px 24px rgba(43, 47, 44, 0.12); }

.utility-bar {
  background: var(--gray-green);
  color: var(--cream);
  font-size: 0.875rem;
}
.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 40px;
  padding-block: 0.4rem;
}
.utility-bar__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
}
.utility-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}
.utility-bar__item .icon { color: var(--cream); opacity: 0.9; }
a.utility-bar__item:hover { text-decoration: underline; text-underline-offset: 3px; }

.social { display: flex; align-items: center; gap: 0.5rem; }
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--cream);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.social__link:hover { background: var(--cream); color: var(--gray-green); }
.social__link .icon { width: 1.05rem; height: 1.05rem; }

.main-header {
  background: var(--cream);
  border-bottom: 1px solid rgba(82, 107, 19, 0.15);
}
.main-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: var(--header-h);
  transition: min-height 0.3s var(--ease);
}
.site-header.is-scrolled .main-header__inner { min-height: 72px; }

.logo img {
  height: 68px;
  width: auto;
  transition: height 0.3s var(--ease);
}
.site-header.is-scrolled .logo img { height: 52px; }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--olive);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-link:hover { color: var(--olive); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--olive); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 8px;
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: min(88vh, 860px);
  min-height: 460px;
  overflow: hidden;
  background: var(--gray-green);
}
.hero__video,
.hero__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__fallback[hidden] { display: none; }

.hero__content {
  position: absolute;
  left: clamp(1.25rem, 6vw, 5rem);
  bottom: clamp(1.5rem, 7vh, 4.5rem);
  max-width: 420px;
  padding: 1.35rem 1.6rem 1.5rem;
  background: rgba(255, 245, 205, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius);
  border-left: 4px solid var(--olive);
  box-shadow: var(--shadow-soft);
}
.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  color: var(--red);
}

.fade-up-load {
  animation: fadeUp 0.9s var(--ease) 0.25s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   WELCOME
   ========================================================================== */
.welcome { background: var(--cream); }
.welcome__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
}
.welcome__media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.welcome__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.welcome__copy {
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* ==========================================================================
   FAMILY FAVORITES
   ========================================================================== */
.favorites {
  position: relative;
  background: var(--red);
  color: var(--cream);
  overflow: hidden;
}
/* Optional texture layer: drop your image at assets/favorites-texture.png */
.favorites__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/favorites-texture.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--favorites-texture-opacity, 0.18);
  pointer-events: none;
}
.favorites__bg.has-parallax { background-attachment: fixed; }
.favorites > .container { position: relative; z-index: 1; }
.favorites__header { text-align: center; margin-bottom: 3rem; }
.favorites__subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  color: rgba(255, 245, 205, 0.9);
}
.favorites__line {
  display: block;
  width: clamp(36px, 8vw, 80px);
  height: 2px;
  background: var(--olive);
  border-radius: 2px;
}

/* Slider */
.slider {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}
.slider__viewport { overflow: hidden; padding-block: 0.75rem; }
.slider__track {
  display: flex;
  --gap: 1.5rem;
  --per-view: 4;
  gap: var(--gap);
  transition: transform 0.55s var(--ease);
  will-change: transform;
}
.slider__track.is-dragging { transition: none; }
.slide {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
}

.dish-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.dish-card:hover,
.dish-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}
.dish-card__media { display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.dish-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.dish-card:hover .dish-card__media img,
.dish-card:focus-visible .dish-card__media img { transform: scale(1.04); }
.dish-card__name {
  display: block;
  padding: 1rem 1.15rem 1.15rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  border-top: 3px solid var(--olive);
}

.slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--red);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.slider__arrow:hover { background: var(--white); transform: scale(1.05); }
.slider__arrow .icon { width: 1.25rem; height: 1.25rem; }

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
}
.slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 245, 205, 0.45);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.slider__dot:hover { background: rgba(255, 245, 205, 0.8); }
.slider__dot.is-active { background: var(--cream); transform: scale(1.25); }

.favorites__cta { text-align: center; margin-top: 3rem; }

/* ==========================================================================
   DRINKS
   ========================================================================== */
.drinks__banner {
  width: 100%;
  height: clamp(320px, 56vw, 620px);
  background-image: url("assets/drinks-banner.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.drinks__banner.has-parallax { background-attachment: fixed; }

.drinks__band { position: relative; background: var(--olive); color: var(--white); overflow: hidden; }
/* Optional texture layer: drop your image at assets/drinks-texture.png */
.drinks__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/drinks-texture.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--drinks-texture-opacity, 0.18);
  pointer-events: none;
}
.drinks__bg.has-parallax { background-attachment: fixed; }
.drinks__band > .container { position: relative; z-index: 1; }
.drinks__band .section-title { color: var(--cream); }
.drinks__band .divider { background: var(--cream); }
.drinks__band :focus-visible { outline-color: var(--cream); }
.drinks__content {
  max-width: 680px;
  text-align: center;
}
.drinks__copy {
  margin: 1rem 0 2rem;
  color: var(--white);
  font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER / VISIT US
   ========================================================================== */
.site-footer {
  background: var(--gray-green);
  color: var(--cream);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.footer__logo { height: 80px; width: auto; margin-bottom: 1.5rem; }
.footer__title {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--cream);
}
.footer__address p {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
}
.footer__address .icon { color: var(--cream); opacity: 0.85; margin-top: 0.25em; }
.footer__address a { text-decoration: none; }
.footer__address a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__info .btn { margin-top: 1rem; }
.social--footer { margin-top: 1.75rem; gap: 0.75rem; }
.social--footer .social__link {
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(255, 245, 205, 0.5);
}
.social--footer .social__link .icon { width: 1.2rem; height: 1.2rem; }

.footer__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 3px solid rgba(255, 245, 205, 0.15);
}
.footer__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.footer__bottom {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-block: 1.75rem;
  border-top: 1px solid rgba(255, 245, 205, 0.2);
  text-align: center;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  margin-bottom: 1.25rem;
}
.footer__nav a {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--olive); }
.footer__copyright,
.footer__credit {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: rgba(255, 245, 205, 0.85);
}
.footer__credit a { color: var(--cream); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.footer__credit a:hover { text-decoration-color: var(--olive); }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.modal[hidden] { display: flex; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 47, 44, 0.55);
}
.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 880px);
  max-height: calc(100vh - 2.5rem);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s var(--ease);
}
.modal.is-open .modal__dialog { transform: translateY(0) scale(1); }
.modal__media { min-height: 280px; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__body {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  overflow-y: auto;
}
.modal__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--red);
  padding-right: 2rem;
}
.modal__desc { margin: 0; color: var(--ink-soft); }
.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--red);
  box-shadow: var(--shadow-soft);
  transition: background-color 0.25s var(--ease);
}
.modal__close:hover { background: var(--white); }
.modal__close .icon { width: 1.2rem; height: 1.2rem; }

body.modal-open { overflow: hidden; }

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .slider__track { --per-view: 2; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__map iframe { min-height: 320px; }
}

@media (max-width: 860px) {
  :root { --header-h: 80px; }
  .logo img { height: 56px; }
  .site-header.is-scrolled .logo img { height: 46px; }
  .site-header.is-scrolled .main-header__inner { min-height: 64px; }

  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid rgba(82, 107, 19, 0.15);
    box-shadow: 0 12px 30px rgba(43, 47, 44, 0.12);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.35s var(--ease), visibility 0.35s;
  }
  .primary-nav.is-open { max-height: 320px; visibility: visible; }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }
  .primary-nav__list li { border-top: 1px solid rgba(82, 107, 19, 0.12); }
  .nav-link {
    display: block;
    padding: 0.95rem 1.5rem;
    font-size: 1.05rem;
  }
  .nav-link::after { display: none; }
  .nav-link.is-active { box-shadow: inset 4px 0 0 var(--olive); }

  .welcome__grid { grid-template-columns: 1fr; }
  .welcome__media img { aspect-ratio: 4 / 3; }

  .modal__dialog { grid-template-columns: 1fr; max-height: calc(100vh - 2rem); overflow-y: auto; }
  .modal__media { min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .utility-bar__inner { flex-direction: column; align-items: flex-start; gap: 0.35rem; padding-block: 0.55rem; }
  .utility-bar__contact { gap: 0.25rem 1.25rem; }
  .social { align-self: flex-start; }

  .hero { height: 72vh; min-height: 420px; }
  .hero__content { left: 1rem; right: 1rem; bottom: 1.25rem; max-width: none; padding: 1.1rem 1.25rem 1.25rem; }

  .slider { grid-template-columns: 1fr; }
  .slider__track { --per-view: 1; }
  .slider__arrow {
    position: absolute;
    top: 42%;
    z-index: 2;
    width: 40px;
    height: 40px;
  }
  .slider__arrow--prev { left: -0.25rem; }
  .slider__arrow--next { right: -0.25rem; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .fade-up-load { animation: none; }
  .drinks__banner.has-parallax,
  .favorites__bg.has-parallax,
  .drinks__bg.has-parallax { background-attachment: scroll; }
  .dish-card:hover, .dish-card:focus-visible { transform: none; }
  .dish-card:hover .dish-card__media img { transform: none; }
}
