/* Max Farms Butcher — brand stylesheet.
   Dark chalkboard butcher-shop theme: charcoal/black backgrounds,
   cream text, butcher-red accents, dotted-border details —
   matching the shop's own woodcut badge logo and flyers. */

:root {
  --bg: #161311;
  --bg-alt: #1c1815;
  --panel: #241f1a;
  --cream: #f3ead3;
  --cream-dim: #e9dcbe;
  --tan: #ab9679;
  --red: #c0392b;
  --red-dark: #8f2a1f;
  --red-bright: #d9503f;
  --border: rgba(233, 220, 190, 0.16);
  --font-display: 'Rye', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--cream-dim);
  background: var(--bg);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* ---------- Focus ---------- */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Promo ribbon (4th of July special) ----------
   REMOVABLE BLOCK: delete the <div class="promo-ribbon">…</div> in each
   HTML file and the single ".promo-ribbon" rule below to retire the promo. */
.promo-ribbon {
  background: var(--red);
  color: var(--cream);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.8rem, 3vw, 1.1rem);
  letter-spacing: 0.02em;
  padding: 0.85rem 1rem;
  border-top: 2px dotted var(--cream);
  border-bottom: 2px dotted var(--cream);
}
/* ---------- end promo ribbon ---------- */

/* ---------- Header / nav ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  padding: 0.85rem 5vw;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--red);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header nav a {
  display: inline-block;
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.75rem 0.15rem 0.6rem;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover { color: var(--cream); }

.site-header nav a.active {
  color: var(--red-bright);
  border-bottom-color: var(--red);
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 4rem 5vw 4.5rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%, rgba(192, 57, 43, 0.22), rgba(192, 57, 43, 0.09) 40%, rgba(192, 57, 43, 0.02) 65%, transparent 80%),
    var(--bg);
}

.hero--small {
  padding: 3rem 5vw;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 4px dotted var(--red);
  padding: 6px;
  background: var(--bg-alt);
  box-shadow: 0 0 0 1px var(--border), 0 12px 30px rgba(0, 0, 0, 0.45);
}

.hero h1 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(1.9rem, 6vw + 0.5rem, 2.75rem);
  letter-spacing: 0.02em;
}

.hero--small h1 { font-size: clamp(1.7rem, 5vw + 0.5rem, 2.25rem); }

.tagline {
  font-size: 1.15rem;
  margin-top: 0.75rem;
  color: var(--tan);
  font-style: italic;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 26rem) {
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas .cta { text-align: center; }
}

.cta {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
  letter-spacing: 0.02em;
  border: 2px solid var(--red);
  transition: background 0.15s ease, color 0.15s ease;
}

.cta--primary {
  background: var(--red);
  color: var(--cream);
}

.cta--primary:hover { background: var(--red-bright); }

.cta--outline {
  background: transparent;
  color: var(--cream);
}

.cta--outline:hover { background: rgba(192, 57, 43, 0.15); }

/* ---------- Layout helpers ---------- */

main > section { padding: 3.5rem 5vw; max-width: 64rem; margin: 0 auto; }
main > .hero, main > .hero--small { max-width: none; }

h2 {
  font-family: var(--font-display);
  color: var(--cream);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  font-size: 1.85rem;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--tan);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* ---------- About section ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.about-copy p { margin-bottom: 1rem; }
.about-copy p:last-child { margin-bottom: 0; }

.about-photo img {
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.about-photo figcaption {
  margin-top: 0.6rem;
  text-align: center;
  color: var(--tan);
  font-size: 0.85rem;
  font-style: italic;
}

@media (min-width: 48rem) {
  .about-grid { grid-template-columns: 3fr 2fr; }
}

/* ---------- Photo roll (signature horizontal gallery) ----------
   Disciplined contained carousel: uniform 4/3 frames sitting inside the
   same 64rem/5vw-padded column as every other section. Editorial header
   row carries the heading + prev/next controls; no edge-fade overlays —
   the frames themselves (with spaceBetween gutters) are the affordance. */

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gallery-head h2 { margin-bottom: 0; }

.gallery-nav {
  display: none;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Swiper container. Swiper's own stylesheet (loaded after this file)
   sets .swiper { overflow: hidden }, .swiper-wrapper { display: flex },
   which is exactly what we want once Swiper initializes. */
.photo-roll {
  position: relative;
}

/* No-JS / Swiper-load-failure fallback: if Swiper never adds
   `.swiper-initialized`, fall back to plain CSS horizontal scrolling
   (with a *visible* scrollbar this time — see the bug this replaces). */
.photo-roll:not(.swiper-initialized) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.photo-roll:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  gap: 0.75rem;
  scroll-snap-type: x mandatory;
}

.photo-roll:not(.swiper-initialized) .swiper-slide {
  scroll-snap-align: center;
}

/* Uniform 4:3 frames. Swiper's numeric slidesPerView (via the JS
   `breakpoints` config) sets width on each slide directly once
   initialized; this CSS width only governs the no-JS fallback. The
   aspect-ratio applies either way, so every photo reads as a deliberate
   frame instead of a random crop. */
.photo-roll .swiper-slide {
  flex-shrink: 0;
  width: min(84vw, 22rem);
  aspect-ratio: 4 / 3;
  height: auto;
}

.photo-roll figure {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 6px; /* match .info-card / .review-card, now that the
                          strip lives inside the same card-based column */
}

.photo-roll img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-roll figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  height: 40%;
  padding: 0 1rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78) 65%);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  text-align: left;
}

/* ---------- Photo roll progress track ----------
   Thin red-on-dark progressbar under the strip, replacing dot pagination. */
.photo-roll-progress.swiper-pagination-progressbar {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: 3px;
  margin-top: 1.25rem;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

/* Extra qualifier (.gallery ...) bumps specificity above Swiper's own
   `.swiper-pagination-progressbar .swiper-pagination-progressbar-fill`
   rule, which has equal specificity to a plain descendant selector here
   and loads after this stylesheet, so it would otherwise win the tie. */
.gallery .photo-roll-progress .swiper-pagination-progressbar-fill {
  background: var(--red-bright);
}

/* ---------- Photo roll navigation arrows ----------
   Custom nav elements (not Swiper's default .swiper-button-next/prev)
   so nothing pulls in Swiper's stock blue theme. Live in the section
   header row, not over the photos. Desktop only — mobile keeps pure
   swipe, arrows would just crowd the screen. */

@media (min-width: 48rem) {
  /* Only show arrows once Swiper is actually driving the strip — in the
     no-JS fallback they'd be inert buttons with nothing to control. */
  .gallery:has(.photo-roll.swiper-initialized) .gallery-nav {
    display: flex;
  }
}

.photo-roll-prev,
.photo-roll-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--cream);
  font: inherit;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.photo-roll-prev:hover,
.photo-roll-next:hover {
  border-color: var(--red);
  color: var(--red-bright);
}

.photo-roll-prev.swiper-button-disabled,
.photo-roll-next.swiper-button-disabled {
  opacity: 0.35;
  cursor: auto;
  pointer-events: none;
}

.photo-roll-prev.swiper-button-lock,
.photo-roll-next.swiper-button-lock {
  display: none;
}

/* Override Swiper's default blue theme wherever its own components
   (e.g. a11y live region) reference it. */
.photo-roll {
  --swiper-theme-color: var(--red-bright);
}

/* ---------- Info cards ---------- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.info-card:hover {
  border-color: var(--tan);
  transform: translateY(-3px);
}

.info-card a { text-decoration: underline; text-decoration-color: var(--red); }
.info-card a:hover { color: var(--red-bright); }

.social-links a {
  color: var(--tan);
  text-decoration: none;
}

.social-links a:hover { color: var(--red-bright); }

/* ---------- Menu ---------- */

.menu-note {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 5vw 0;
  color: var(--tan);
  font-style: italic;
  text-align: center;
}

.menu-note a { color: var(--red-bright); text-decoration: underline; }

.menu-photo {
  max-width: 64rem;
  margin: 2rem auto 0;
  padding: 0 5vw;
}

.menu-photo img {
  width: 100%;
  max-height: 20rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.menu-section h2 {
  border-bottom: 1px dotted var(--red);
  padding-bottom: 0.5rem;
}

.menu-list { list-style: none; }

.menu-list li {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.45rem 0;
}

.menu-list .item {
  color: var(--cream-dim);
}

.menu-list .dots {
  flex: 1;
  height: 0;
  margin-bottom: 0.4em;
  border-bottom: 2px dotted var(--tan);
  opacity: 0.55;
}

.menu-list .price {
  color: var(--red-bright);
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

.menu-section--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 5vw;
}

.menu-section--split .menu-section { padding: 0; }

@media (min-width: 48rem) {
  .menu-section--split { grid-template-columns: 1fr 1fr; }
}

.custom-cuts {
  background: var(--panel);
  border: 1px dashed var(--red);
  border-radius: 6px;
  padding: 1.5rem;
}

.price-note {
  color: var(--tan);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  padding-top: 0;
}

/* ---------- Reviews ---------- */

.reviews h2 { margin-bottom: 0.5rem; }

.rating-badge {
  color: var(--red-bright);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.rating-badge span {
  color: var(--tan);
  font-size: 1rem;
  margin-left: 0.5rem;
  font-family: var(--font-body);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.review-card:hover {
  border-color: var(--tan);
  transform: translateY(-3px);
}

.review-card .quote { margin: 0.5rem 0 1rem; }

.review-card footer {
  color: var(--tan);
  font-size: 0.9rem;
}

.stars { color: var(--red-bright); letter-spacing: 0.05em; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-location .location-map {
  display: block;
  width: 100%;
  height: 17rem;
  margin-top: 1rem;
  border: 0;
  border-radius: 6px;
}

.contact-photo img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.contact-photo figcaption {
  margin-top: 0.6rem;
  text-align: center;
  color: var(--tan);
  font-size: 0.85rem;
  font-style: italic;
}

.hours-table {
  border-collapse: collapse;
  width: 100%;
}

.hours-table th,
.hours-table td {
  text-align: left;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--border);
  font-weight: normal;
}

.hours-table th { color: var(--cream-dim); font-family: var(--font-body); }
.hours-table td { color: var(--tan); text-align: right; white-space: nowrap; }
.hours-table tr:last-child th,
.hours-table tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 2rem 5vw;
  background: var(--bg-alt);
  color: var(--tan);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.site-footer p { margin-bottom: 0.5rem; }
.site-footer p:last-child { margin-bottom: 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .info-card:hover,
  .review-card:hover {
    transform: none;
  }
}
