/* ==========================================================================
   Lombardi's Prime Meats — shared stylesheet (redesign)
   Palette: warm butcher-paper + charcoal, oxblood-red brand,
   USDA-Prime purple as the signature mark. Mobile-first.
   ========================================================================== */

@import "fonts.css";

:root {
  /* Color */
  --paper:     #F4EBDC;   /* warm steak-paper — page canvas */
  --kraft:     #EADCC6;   /* butcher-paper — section surfaces */
  --bone:      #FBF6EE;   /* lightest — elevated cards */
  --ink:       #201A15;   /* warm near-black — text */
  --ink-soft:  #574B40;   /* secondary text */
  --meat:      #8A1B1B;   /* deep oxblood — brand / buttons */
  --meat-dark: #6E1414;   /* hover */
  --stamp:     #4A2A7A;   /* USDA-Prime purple — signature */
  --line:      rgba(32, 26, 21, 0.14);
  --line-soft: rgba(32, 26, 21, 0.08);

  /* Type */
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body:    "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono:    "Spline Sans Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --container: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
  --shadow: 0 2px 8px rgba(32, 26, 21, 0.08), 0 8px 28px rgba(32, 26, 21, 0.08);
}

/* --- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--meat); text-underline-offset: 2px; }
a:hover { color: var(--meat-dark); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

p { margin: 0 0 1rem; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0; top: -3rem; z-index: 1000;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* --- Layout helpers ------------------------------------------------------- */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
}
.section { padding-block: clamp(2.75rem, 7vw, 5rem); }
.section--kraft { background: var(--kraft); }
.section--ink { background: var(--ink); color: var(--paper); }
.section__head { max-width: 46rem; margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.section--ink a { color: #E8B4B4; }

/* Eyebrow — carries the stamp-ink voice */
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--stamp);
  margin: 0 0 0.6rem;
}
.section--ink .eyebrow { color: #B79BE0; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.7rem 1.4rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--meat); color: #fff; }
.btn--primary:hover { background: var(--meat-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--on-dark { border-color: var(--paper); color: var(--paper); }
.btn--on-dark:hover { background: var(--paper); color: var(--ink); }

/* --- USDA-Prime stamp (the signature mark) -------------------------------- */
.stamp {
  --s: 104px;
  width: var(--s); height: var(--s); flex: 0 0 auto;
  display: grid; place-content: center; text-align: center;
  border: 2.5px solid var(--stamp); border-radius: 50%;
  color: var(--stamp); transform: rotate(-9deg);
  font-family: var(--display); text-transform: uppercase; line-height: 0.9;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--stamp);
}
.stamp b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.02em; }
.stamp span { display: block; font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.18em; margin-top: 2px; }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.awning {
  background: var(--meat); color: #fff;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
}
.awning .container { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; justify-content: center; align-items: center; padding-block: 0.4rem; }
.awning a { color: #fff; text-decoration: none; font-weight: 500; }
.awning a:hover { text-decoration: underline; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bone); border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.6rem; position: relative;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); flex: 0 1 auto; min-width: 0; }
.brand img { height: 46px; width: auto; }
.brand__name { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.25rem; line-height: 1.05; letter-spacing: 0.01em; min-width: 0; }
.brand__name small { display: block; font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.18em; color: var(--ink-soft); font-weight: 400; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; flex: 0 0 auto;
  background: none; border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 0.45rem 0.7rem; cursor: pointer; font-family: var(--mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink);
}
.nav-toggle__bars { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }

/* Mobile: the menu drops as a full-width panel below the header */
.primary-nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: var(--bone); border-block: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(32, 26, 21, 0.14);
  padding-inline: var(--gutter);
}
.nav-toggle[aria-expanded="true"] + .primary-nav { display: block; }
.primary-nav ul { list-style: none; margin: 0; padding: 0.25rem 0 0.5rem; }
.primary-nav li { border-top: 1px solid var(--line-soft); }
.primary-nav li:first-child { border-top: 0; }
.primary-nav a {
  display: block; padding: 0.7rem 0.2rem; text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.05rem;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--meat); }

@media (min-width: 60em) {
  .nav-toggle { display: none; }
  .primary-nav { display: block !important; position: static; background: none; border: 0; box-shadow: none; padding: 0; }
  .primary-nav ul { display: flex; gap: clamp(0.6rem, 1.4vw, 1.4rem); align-items: center; padding: 0; }
  .primary-nav li, .primary-nav li:first-child { border: 0; }
  .primary-nav a { padding: 0.4rem 0; font-size: 0.98rem; }
}

/* ==========================================================================
   Hero carousel
   ========================================================================== */
.hero { position: relative; background: var(--ink); overflow: hidden; }
.hero__track { position: relative; }
.hero__track:focus-visible { outline: 3px solid var(--stamp); outline-offset: -3px; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 700ms ease; }
.hero__slide.is-active { position: relative; opacity: 1; }
.hero__slide img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: brightness(0.74);
}
.hero__slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(20,15,12,0.55), rgba(20,15,12,0.12) 55%, transparent 80%);
}
/* Family slide: keep all four faces clear by dropping the caption to the bottom
   over a bottom-up scrim instead of covering the group with a left scrim. */
.hero__slide--family::after {
  background: linear-gradient(to top, rgba(20,15,12,0.80) 6%, rgba(20,15,12,0.28) 42%, transparent 66%);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hero__slide--family .hero__caption { justify-content: flex-end; align-items: center; text-align: center; }
.hero__slide--family .hero__cta { justify-content: center; }
.hero__caption {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; gap: 1rem;
  min-height: clamp(24rem, 62vh, 40rem); padding-block: 2.5rem; color: #fff;
}
.hero__caption .eyebrow { color: #EBD7B4; }
.hero__title { font-size: clamp(2.2rem, 6.5vw, 4.4rem); color: #fff; margin: 0 0 0.2em; text-shadow: 0 2px 18px rgba(0,0,0,0.45); }
.hero__caption p { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 32rem; margin: 0; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.hero__stamp { position: absolute; top: var(--gutter); right: var(--gutter); display: none; }
.hero__stamp .stamp { color: #fff; border-color: #fff; box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px #fff; }
@media (min-width: 48em) { .hero__stamp { display: block; } }

.hero__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(32,26,21,0.5); color: #fff; border: 1.5px solid rgba(255,255,255,0.5);
  font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-content: center;
}
.hero__btn:hover { background: var(--meat); }
.hero__btn--prev { left: 0.75rem; } .hero__btn--next { right: 0.75rem; }

.hero__dots { position: absolute; bottom: 1rem; left: 0; right: 0; z-index: 2; display: flex; gap: 0.5rem; justify-content: center; }
.hero__dots button {
  width: 11px; height: 11px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1.5px solid #fff; background: transparent;
}
.hero__dots button[aria-current="true"] { background: #fff; }

/* ==========================================================================
   Content sections
   ========================================================================== */
/* Heritage band */
.heritage .container { display: grid; gap: 1.5rem; align-items: center; text-align: center; justify-items: center; }
.heritage p { max-width: 44rem; font-size: 1.1rem; }
.heritage__photo { margin: 0; width: 100%; max-width: 24rem; }
.heritage__photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.heritage__body .stamp { margin: 0 auto 1rem; }
@media (min-width: 48em) {
  .heritage .container { grid-template-columns: minmax(0, 0.8fr) 1fr; text-align: left; justify-items: start; gap: clamp(2rem, 5vw, 3.5rem); }
  .heritage__body .stamp { margin: 0 0 1rem; }
}

/* Category card grid */
.cats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.cat {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.cat img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; transition: transform 0.4s ease; filter: brightness(0.72); }
.cat:hover img { transform: scale(1.05); }
.cat__label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem;
  color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: 0.02em;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}
.cat__label span { display: block; font-family: var(--mono); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.14em; color: #E8D9C4; }

/* Two-column feature (specials / ordering) */
.duo { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 48em) { .duo { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--bone); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow);
}
.card h3 { color: var(--meat); }
.notice {
  display: inline-block; font-family: var(--mono); font-size: 0.74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--stamp);
  border: 1.5px dashed var(--stamp); border-radius: var(--radius); padding: 0.3rem 0.7rem; margin-bottom: 0.75rem;
}

/* Contact / hours data — mono, tabular */
.data { font-family: var(--mono); font-size: 0.95rem; }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line-soft); }
.hours li:last-child { border-bottom: 0; }
.hours .day { color: var(--ink-soft); }
.contact-line { font-family: var(--mono); }
.contact-line a { text-decoration: none; }

/* Trust strip */
.trust { display: flex; flex-wrap: wrap; gap: clamp(1rem, 4vw, 2.5rem); align-items: center; justify-content: center; }
.trust img { height: 88px; width: auto; }
.trust .badge { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.payments { text-align: center; margin-top: 1.5rem; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; }

/* --- Data tables --------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.9rem; background: var(--bone); }
.data-table th, .data-table td { padding: 0.5rem 0.8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--ink); color: var(--paper); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; }
.data-table th[scope="colgroup"] { background: var(--kraft); color: var(--ink); font-weight: 700; }

/* --- Responsive video embeds -------------------------------------------- */
.embed { max-width: 640px; margin-inline: auto; }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }

/* --- Form controls ------------------------------------------------------- */
input, select, textarea { font: inherit; color: inherit; max-width: 100%; box-sizing: border-box; }
textarea { width: 100%; }
form label { font-weight: 600; }
form input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]),
form select, form textarea {
  padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bone);
}
form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(2.5rem, 6vw, 3.5rem); }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.1rem; margin: 0 0 0.75rem; color: #fff; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 2rem; padding-top: 1.25rem; font-family: var(--mono); font-size: 0.72rem; color: #C9BCAC; letter-spacing: 0.04em; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }

/* ==========================================================================
   Motion / accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .hero__slide { transition: none; }
}

/* ==========================================================================
   Order form  (order.php — order_form.html / order_thanks.html)
   ========================================================================== */
/* The form is rendered inside .card; give the fields room to breathe. */
#orderForm { max-width: 46rem; margin-inline: auto; }
#orderForm .form-req { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); margin: 0 0 1.25rem; }
#orderForm .form-req strong { color: var(--meat); }

.field { margin-bottom: 1.25rem; }
.field > label,
.field .field-legend {
  display: block; margin-bottom: 0.3rem; font-weight: 600;
}
.field .req { color: var(--meat); font-weight: 700; }
.field .opt { font-weight: 400; color: var(--ink-soft); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; }

/* Text-like controls fill the field width */
.field input.text,
.field textarea,
.field select { width: 100%; }

/* Radio group */
.radio-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.field label.inline { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; margin: 0; }
.field label.inline input { width: auto; margin: 0; }

/* City / State / Zip row */
.csz-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.csz-row .city { flex: 1 1 12rem; }
.csz-row select { flex: 0 0 auto; width: auto; }
.csz-row .zip { flex: 0 0 7rem; }

/* Items */
.items-fieldset { margin: 0 0 1.5rem; }
.items-fieldset legend {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em;
  font-weight: 800; font-size: 1.1rem; color: var(--meat); padding: 0 0.4rem;
}
.item-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: flex-end; }
.item-row__item { flex: 1 1 14rem; }
.item-row__qty { flex: 0 0 6rem; }
.item-row__item input,
.item-row__qty input { width: 100%; }
.item-add { margin-top: 0.5rem; }

/* Validation errors */
.form-error {
  display: block; margin-top: 0.3rem;
  color: var(--meat); font-family: var(--mono); font-size: 0.85rem; font-weight: 500;
}
.form-error--summary {
  max-width: 46rem; margin: 0 auto 1.25rem;
  border: 1.5px solid var(--meat); border-radius: var(--radius);
  padding: 0.75rem 1rem; background: var(--bone);
}

/* Submit / action buttons */
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Recipe figures — float on desktop, stack on small phones */
.recipe-fig { float: right; max-width: 200px; margin: 0 0 1rem 1.25rem; }
@media (max-width: 30em) {
  .recipe-fig { float: none; max-width: 100%; margin: 0 0 1rem; }
}

/* --- Page loader ("Prime Stamp") ---------------------------------------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-content: center; background: var(--paper);
  transition: opacity 0.45s ease, visibility 0.45s ease;
  animation: loader-failsafe 0s linear 2.5s forwards; /* no-JS/slow-load safety */
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__stamp {
  width: 128px; height: 128px; display: grid; place-content: center; text-align: center;
  border: 3px solid var(--stamp); border-radius: 50%; color: var(--stamp);
  font-family: var(--display); font-weight: 800; font-size: 2rem;
  text-transform: uppercase; letter-spacing: 0.04em; transform: rotate(-9deg);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--stamp);
  animation: loader-press 0.6s cubic-bezier(0.2,0.8,0.2,1) both,
             loader-breath 1.6s ease-in-out 0.6s infinite;
}
@keyframes loader-press {
  0%   { opacity: 0; transform: rotate(-26deg) scale(1.3); }
  60%  { opacity: 1; transform: rotate(-6deg) scale(0.93); }
  80%  { transform: rotate(-9deg) scale(1.03); }
  100% { transform: rotate(-9deg) scale(1); }
}
@keyframes loader-breath { 0%,100% { opacity: 1; } 50% { opacity: 0.72; } }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .loader { animation: none; }
  .loader__stamp { animation: none; }
}

.map-embed { margin-top: 1.5rem; }
.map-embed iframe { width: 100%; height: clamp(240px, 40vw, 360px); border: 0; border-radius: var(--radius); display: block; }
