/* El Compa David — site styles.
   Palette and lettering come from the truck itself: the red-to-orange wrap, black panels
   with yellow lettering, and the white truck body. Display type is Barlow Condensed
   (SIL OFL, see fonts/BARLOW-OFL-LICENSE.txt), a face drawn from California signage. */

@font-face {
  font-family: "Barlow Condensed";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/barlow-condensed-latin-800-italic.woff2) format("woff2");
}

:root {
  --chile: #a61b29;        /* wrap red */
  --chile-deep: #7a1220;
  --ember: #f0681e;        /* wrap orange */
  --maiz: #ffc43d;         /* lettering yellow */
  --comal: #1c1513;        /* black panels */
  --truck: #fbfaf7;        /* truck body white */
  --steel: #dfe2e4;
  --steel-ink: #585f64;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --focus: var(--comal);
  --pad: clamp(3.5rem, 8vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--truck); color: var(--comal); font: 1.0625rem/1.55 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
p { margin: 0 0 1rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
section[id] { scroll-margin-top: 1rem; }

h1, h2, h3, .wordmark, .button, .footer-thanks, .quickbar a, .contact-action strong {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
}
h1, h2, h3 { margin: 0; line-height: .95; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -10rem; z-index: 20; padding: .8rem 1rem; background: #fff; color: var(--comal); font-weight: 700; }
.skip:focus { top: 1rem; }

/* Header */
.draft { margin: 0; padding: .35rem 1rem; text-align: center; background: var(--steel); font-size: .8rem; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 4.25rem; }
.wordmark { display: inline-block; padding: .5rem 0; color: var(--chile); font-size: 1.75rem; line-height: 1; text-decoration: none; }
.wordmark small { display: block; margin-top: .2rem; color: var(--steel-ink); font: 500 .75rem/1.2 var(--body); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 .8rem; font-size: .95rem; font-weight: 600; text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav .nav-contact { padding: 0 1.1rem; border-radius: 4px; background: var(--comal); color: #fff; }
.nav .nav-contact:hover { background: #000; text-decoration: none; }
.nav .nav-wide { display: none; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .65rem 1.4rem; border: 2px solid transparent; border-radius: 4px;
  font-size: 1.4rem; line-height: 1; text-align: center; text-decoration: none; cursor: pointer;
}
.button:active { transform: translateY(1px); }
.button-board { background: var(--comal); color: var(--maiz); }
.button-board:hover { background: #000; }
.button-ghost { border-color: currentColor; background: transparent; color: #fff; }
.button-ghost:hover { background: rgb(255 255 255 / .14); }
.button-outline { border-color: var(--comal); background: transparent; color: var(--comal); }
.button-outline:hover { background: var(--comal); color: #fff; }

/* Hero: the wrap */
.hero {
  --focus: #fff;
  overflow: hidden;
  background: var(--chile) radial-gradient(70% 90% at 100% 100%, rgb(240 104 30 / .5), transparent 70%);
  color: #fff;
}
.hero-grid { display: grid; gap: 2.5rem; padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.75rem, 7vw, 5.5rem); }
.hero-copy { min-width: 0; }
.hero-label {
  width: fit-content; max-width: 100%;
  margin: .25rem 0 1.75rem -.35rem; padding: .7rem 1.4rem .85rem;
  background: var(--maiz); color: var(--chile-deep);
  transform: rotate(-2deg); transform-origin: left center;
  /* Ragged ends, like the painted labels on the truck. */
  clip-path: polygon(1.5% 0, 98.5% 0, 99.4% 6%, 98.2% 14%, 100% 23%, 97.9% 31%, 99.6% 40%, 98.4% 49%, 100% 58%, 97.8% 66%, 99.5% 75%, 98% 84%, 100% 92%, 98.6% 100%, 1.4% 100%, .5% 90%, 2% 81%, 0 72%, 1.6% 64%, .6% 55%, 2.2% 47%, 0 38%, 1.8% 30%, .4% 21%, 2% 13%, 0 7%);
}
.hero h1 { font-size: clamp(2.75rem, 12.5vw, 6rem); line-height: .9; text-wrap: balance; }
.hero-lede { max-width: 34rem; margin-bottom: 1.6rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-call { margin: 1.25rem 0 0; }
.hero-call a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.hero-photo { max-width: 30rem; margin: 0; min-width: 0; }
.hero-photo img { width: 100%; border: 6px solid #fff; border-radius: 6px; background: var(--chile-deep); box-shadow: 0 1.5rem 2.5rem -1.25rem rgb(0 0 0 / .65); }

/* Menu: the board */
.menu { --focus: var(--maiz); padding-block: var(--pad); background: var(--comal); color: #fff; }
.menu-head { display: grid; gap: .75rem; margin-bottom: 2.25rem; }
.menu h2 { color: var(--maiz); font-size: clamp(2.75rem, 10vw, 5rem); }
.menu-note { max-width: 27rem; margin: 0; color: #eae3dc; font-size: 1rem; }
.menu-board { display: grid; gap: 2.5rem; }
.menu-group { min-width: 0; }
.menu-group h3 { margin-bottom: .6rem; color: var(--maiz); font-size: 1.7rem; }
.menu-group ul { margin: 0; padding: 0; list-style: none; }
.menu-group li {
  break-inside: avoid; overflow-wrap: break-word;
  font: italic 800 1.3rem/1.1 var(--display);
}
.menu-food ul { columns: 2; column-gap: 1.5rem; }
.menu-food li { padding: .68rem 0; border-bottom: 1px solid rgb(255 255 255 / .2); }
.menu-also { margin: 1.25rem 0 0; color: #eae3dc; font-size: .95rem; }
.menu-also span { color: #fff; font-weight: 700; white-space: nowrap; }
.menu-meats .menu-group { padding: 1.25rem 1.4rem 1.1rem; border: 2px solid var(--maiz); border-radius: 6px; }
.menu-meats li { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .45rem 0 .45rem 1.15rem; }
.menu-meats .gloss { color: #eae3dc; font: 400 .95rem/1.2 var(--body); text-align: right; }
.menu-meats li::before { content: ""; position: absolute; left: 0; top: .78em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ember); }

/* The truck: real photos */
.truck { padding-block: var(--pad); }
.truck-head { margin-bottom: 1.75rem; }
.truck-head h2 { margin-bottom: .75rem; color: var(--chile); font-size: clamp(2.5rem, 9vw, 4.5rem); }
.truck-head p { max-width: 32rem; margin: 0; }
.photo-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 21rem); gap: 1rem;
  margin-right: -1.25rem; padding: 0 1.25rem .75rem 0;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.photo-strip figure { margin: 0; min-width: 0; scroll-snap-align: start; }
.photo-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; background: var(--steel); }
.photo-strip .photo-wide img { aspect-ratio: 7 / 6; object-fit: contain; }
.photo-strip figcaption { margin-top: .6rem; color: var(--steel-ink); font-size: .95rem; }

/* Contact: the counter */
.contact { padding-block: var(--pad); background: var(--maiz); }
.contact-grid { display: grid; gap: 2.5rem; }
.contact-grid > * { min-width: 0; }
.contact h2 { margin-bottom: 1rem; font-size: clamp(2.75rem, 10vw, 5rem); }
.contact-intro > p { max-width: 30rem; }
.contact-actions { display: grid; gap: .75rem; margin: 1.5rem 0 1rem; }
.contact-action {
  display: flex; align-items: center; gap: 1rem; min-height: 64px; padding: .75rem 1.1rem;
  border-radius: 6px; background: var(--comal); color: #fff; text-decoration: none;
}
.contact-action:hover { background: #000; }
.contact-action svg { flex: none; fill: none; stroke: var(--maiz); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-action strong { display: block; color: var(--maiz); font-size: 1.5rem; line-height: 1; }
.contact-value { display: block; margin-top: .2rem; overflow-wrap: anywhere; }
.contact-copy { margin: 0; font-size: .95rem; }
.text-button { min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

.inquiry-card { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 8px; background: #fff; }
.inquiry-fallback { margin: 0; }
.inquiry-fallback a { font-weight: 700; }
.inquiry h3 { margin-bottom: .6rem; font-size: 2rem; }
.inquiry-hint { color: var(--steel-ink); font-size: .95rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.fields label { display: grid; align-content: start; gap: .35rem; min-width: 0; font-size: .95rem; font-weight: 600; }
.fields .field-wide { grid-column: 1 / -1; }
.fields input, .fields textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: .6rem .75rem;
  border: 1.5px solid #7d8388; border-radius: 4px; background: #fff; color: inherit;
  font: inherit; font-weight: 400;
}
.fields textarea { resize: vertical; }
.fields small { color: var(--steel-ink); font-size: .85rem; font-weight: 400; }
.inquiry-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.inquiry-status { min-height: 1.5rem; margin: .9rem 0 0; font-size: .95rem; font-weight: 600; }
.inquiry-preview { margin-top: .5rem; }
.inquiry-preview summary { width: fit-content; padding-block: .65rem; font-size: .95rem; font-weight: 600; cursor: pointer; }
.inquiry-preview pre { margin: .25rem 0 0; padding: 1rem; overflow-x: auto; border-radius: 4px; background: var(--truck); border: 1px solid var(--steel); font: .9rem/1.5 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Videos stay out of the way until the first clip exists. */
section.videos:has(.video-grid:empty) { display: none; }
body:has(section.videos .video-grid:empty) .nav-videos { display: none; }
.videos { padding-block: var(--pad); }
.videos h2 { margin-bottom: 1.25rem; color: var(--chile); font-size: clamp(2.5rem, 9vw, 4.5rem); }

/* Footer */
.footer { --focus: var(--maiz); padding-block: 2.5rem; background: var(--comal); color: #fff; }
.footer-grid { display: grid; gap: 1.25rem; }
.footer p { margin-block: 0; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.footer-name { font-size: 1.1rem; }
.footer-thanks { color: var(--maiz); font-size: 1.6rem; line-height: 1.1; }
.footer .owner-link { margin-top: 1.5rem; color: #cfc8c2; font-size: .85rem; }

/* Quick contact bar: phones only, hidden once the contact section is on screen. */
.quickbar { display: none; }
@media (max-width: 47.99rem) {
  .footer { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
  .quickbar {
    position: fixed; inset: auto 0 0; z-index: 10;
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom, 0px));
    background: var(--comal); border-top: 1px solid rgb(255 255 255 / .18);
    transition: transform .2s ease, visibility .2s;
  }
  .quickbar[data-hidden] { transform: translateY(110%); visibility: hidden; }
  .quickbar a { --focus: #fff; display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 4px; background: var(--maiz); color: var(--comal); font-size: 1.35rem; line-height: 1; text-decoration: none; }
  .quickbar a + a { background: #fff; }
}

@media (max-width: 21.5rem) {
  .menu-food ul { columns: 1; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .wordmark { font-size: 1.5rem; }
}

@media (min-width: 40rem) {
  .nav .nav-wide { display: inline-flex; }
  .menu-group li { font-size: 1.6rem; }
  .menu-food li { padding: .8rem 0; }
  .footer-grid { grid-template-columns: repeat(3, auto); justify-content: space-between; align-items: start; }
}

@media (min-width: 44rem) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(1.75rem, 5vw, 4.5rem); }
  .hero h1 { font-size: clamp(3.25rem, 7.4vw, 6rem); }
  .hero-photo { max-width: none; }
}

@media (min-width: 56rem) {
  .wordmark { font-size: 2rem; }
  .menu-head { grid-template-columns: auto minmax(0, 27rem); justify-content: space-between; align-items: end; }
  .menu-board { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
  .photo-strip { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-right: 0; padding: 0; overflow: visible; }
  .photo-strip .photo-wide { grid-column: 1 / -1; width: min(100%, 38rem); justify-self: center; }
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; align-items: start; }
}

/* One load moment: the label is painted on, then the rest settles. */
@media (prefers-reduced-motion: no-preference) {
  .hero-label { animation: paint .55s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-lede, .actions, .hero-call { animation: settle .45s ease-out .3s both; }
  .hero-photo { animation: settle .55s ease-out .15s both; }
  .button { transition: background-color .12s ease, color .12s ease, transform .08s ease; }
  @keyframes paint { from { clip-path: polygon(1.5% 0, 1.5% 0, 1.5% 6%, 1.5% 14%, 1.5% 23%, 1.5% 31%, 1.5% 40%, 1.5% 49%, 1.5% 58%, 1.5% 66%, 1.5% 75%, 1.5% 84%, 1.5% 92%, 1.5% 100%, 1.4% 100%, .5% 90%, 2% 81%, 0 72%, 1.6% 64%, .6% 55%, 2.2% 47%, 0 38%, 1.8% 30%, .4% 21%, 2% 13%, 0 7%); } }
  @keyframes settle { from { opacity: 0; transform: translateY(.6rem); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Owner upload page */
.admin-main { padding-block: 2rem 4rem; }
.admin-wrap > :not(.video-grid) { max-width: 40rem; }
.admin-main h1 { margin-bottom: 1rem; color: var(--chile); font-size: clamp(2.5rem, 9vw, 4rem); }
.admin-main h2 { margin: 2.5rem 0 1rem; font-size: 2rem; }

.date-warning { color: #9b211a; font-weight: 600; margin: .4rem 0 0; }
.inquiry input[aria-invalid="true"] { border: 2px solid #9b211a; }
.inquiry a[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
