/* TierraBite — Southwestern street food. Built to the TierraBite Brand Identity System v1.0. */
:root {
  --charcoal: #12100f;
  --chili: #ef4829;
  --sunset: #fc791d;
  --tortilla: #f5e7cb;
  --sand: #c6a77d;
  --smoked: #493128;
  --bg: var(--charcoal);
  --ink: var(--tortilla);
  --muted: #b9a88c;
  --line: rgba(245, 231, 203, 0.14);
  --display: "Anton", Impact, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mark: "Permanent Marker", "Marker Felt", cursive;
  --tm-ink: #ef4829;
  --tm-bg: rgba(239, 72, 41, 0.07);
}
body { background: var(--charcoal); color: var(--tortilla); font-family: var(--sans); }
::selection { background: var(--chili); color: var(--tortilla); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; }
.cond { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.btn { --b-bg: var(--chili); --b-fg: var(--tortilla); border-radius: 6px; font-family: var(--cond); font-weight: 700; font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase; height: 54px; padding: 0 26px; }
.btn-cream { --b-bg: var(--tortilla); --b-fg: var(--charcoal); }
.btn-line { --b-bg: transparent; --b-fg: var(--tortilla); border: 2px solid var(--tortilla); }
.btn-line:hover { background: rgba(245, 231, 203, 0.1); }
.btn-dark { --b-bg: var(--charcoal); --b-fg: var(--tortilla); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 16px; }
.wordmark { font-family: var(--mark); font-weight: 400; line-height: 1; letter-spacing: 0.01em; text-transform: none; }

/* Grain: a stamp-like texture over dark surfaces */
.grain { position: relative; isolation: isolate; }
.grain::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.grain > * { position: relative; z-index: 1; }
.grain > .tm-tag { position: absolute; z-index: 50; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding-top: env(safe-area-inset-top); transition: background 0.4s, box-shadow 0.4s; }
.nav.scrolled { background: rgba(18, 16, 15, 0.94); box-shadow: 0 2px 0 var(--chili); }
.nav .container { height: 74px; display: flex; align-items: center; gap: 28px; }
.nav .wordmark { font-size: 30px; color: var(--tortilla); }
.nav .wordmark small { display: block; font-family: var(--cond); font-size: 11px; letter-spacing: 0.32em; color: var(--sand); margin-top: 2px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-family: var(--cond); font-weight: 700; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 3px; background: var(--chili); transition: right 0.35s var(--ease); }
.nav-links a:hover::after { right: 0; }
.tray { position: relative; display: inline-flex; align-items: center; gap: 8px; font-family: var(--cond); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 0.06em; }
.tray .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--sunset); color: var(--charcoal); display: grid; place-items: center; font-size: 13px; }
.tray .count.bump { animation: bump 0.5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5) rotate(-8deg); } }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 40px; align-items: center; padding-bottom: clamp(120px, 14vw, 200px); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sand); }
.kicker i { color: var(--chili); }
.hero h1 { font-size: clamp(64px, 8.2vw, 150px); margin: 18px 0 0; color: var(--tortilla); }
.brush { display: block; width: min(420px, 70%); height: 26px; margin: 10px 0 22px; color: var(--chili); }
.hero .lead { color: var(--tortilla); opacity: 0.85; font-size: 19px; max-width: 34ch; }
.hero .actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 560px; justify-self: center; width: 100%; }
.sun { position: absolute; left: 4%; right: 4%; top: 8%; aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0; background: repeating-linear-gradient(180deg, var(--sunset) 0 60%, transparent 60% 64%, var(--sunset) 64% 74%, transparent 74% 78%, var(--sunset) 78% 86%, transparent 86% 90%, var(--sunset) 90% 100%); }
.plate { position: absolute; left: 14%; right: 14%; top: 22%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 8px solid var(--tortilla); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); }
.plate img { width: 100%; height: 100%; object-fit: cover; }
.stamp { position: absolute; right: 0; top: 2%; width: 138px; height: 138px; color: var(--tortilla); transform: rotate(-12deg); }
.stamp > svg { width: 100%; height: 100%; animation: spin 26s linear infinite; }
.stamp .ico { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: var(--chili); }
@keyframes spin { to { transform: rotate(360deg); } }
.desert { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(110px, 14vw, 210px); color: var(--smoked); z-index: 2; }

/* ---------- Ticker ---------- */
.ticker { background: var(--chili); color: var(--tortilla); padding: 16px 0; transform: rotate(-1.2deg); margin: -10px -20px 0; position: relative; z-index: 3; }
.ticker .marquee { -webkit-mask-image: none; mask-image: none; }
.ticker .marquee-track { gap: 34px; }
.ticker span { font-family: var(--display); font-size: clamp(26px, 3vw, 40px); text-transform: uppercase; white-space: nowrap; display: inline-flex; align-items: center; gap: 34px; }
.ticker span .ico { font-size: 0.7em; color: var(--charcoal); }

/* ---------- Sections ---------- */
section.block { padding: clamp(80px, 10vw, 140px) 0; }
.cream { background: var(--tortilla); color: var(--charcoal); }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.head h2 { font-size: clamp(48px, 7vw, 108px); }
.head p { max-width: 38ch; font-size: 17px; opacity: 0.8; }
.cream .kicker { color: var(--smoked); }

/* Menu */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.tabs button { height: 46px; padding: 0 20px; border-radius: 6px; border: 2px solid var(--charcoal); font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--charcoal); transition: background 0.2s, color 0.2s; }
.tabs button[aria-pressed="true"] { background: var(--charcoal); color: var(--tortilla); }
.menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dish { display: flex; flex-direction: column; background: #fff8ea; border: 2px solid var(--charcoal); border-radius: 10px; overflow: hidden; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.dish:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--charcoal); }
.dish.hide { display: none; }
.dish .media { aspect-ratio: 4 / 3; border-bottom: 2px solid var(--charcoal); background: var(--smoked); }
.dish:hover .media img { transform: scale(1.05); }
.dish .flag { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--sunset); color: var(--charcoal); font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; transform: rotate(-3deg); }
.dish .body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dish h3 { font-family: var(--cond); font-weight: 800; font-size: 28px; letter-spacing: 0.02em; line-height: 1; }
.dish p { font-size: 15px; color: #5a4a40; line-height: 1.45; }
.heat { display: flex; gap: 3px; font-size: 15px; color: rgba(73, 49, 40, 0.25); }
.heat .on { color: var(--chili); }
.dish .row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }
.dish .price { font-family: var(--display); font-size: 32px; }
.add { height: 42px; padding: 0 16px; border-radius: 6px; background: var(--chili); color: var(--tortilla); font-family: var(--cond); font-weight: 700; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s; }
.add:hover { background: #d63d20; }
.add.done { background: var(--charcoal); }

/* Find the truck */
.truck-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.truck-grid h2 { font-size: clamp(48px, 6.4vw, 96px); margin-top: 16px; }
.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 16px; border-radius: 6px; background: var(--smoked); font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; }
.status i { width: 10px; height: 10px; border-radius: 50%; background: #5bd35b; box-shadow: 0 0 0 0 rgba(91, 211, 91, 0.6); animation: ping 2s infinite; }
.status.closed i { background: var(--sand); animation: none; }
.where { margin-top: 18px; font-size: 18px; opacity: 0.85; max-width: 34ch; }
.schedule { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--line); }
.schedule li { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 18px 6px; border-bottom: 2px solid var(--line); transition: background 0.3s; }
.schedule .day { font-family: var(--display); font-size: 26px; text-transform: uppercase; }
.schedule .spot { font-family: var(--cond); font-weight: 600; font-size: 20px; letter-spacing: 0.03em; }
.schedule .hrs { font-family: var(--cond); font-weight: 600; font-size: 18px; color: var(--sand); }
.schedule li.today { background: var(--chili); border-color: var(--chili); padding-left: 14px; padding-right: 14px; }
.schedule li.today .hrs { color: var(--tortilla); }
.schedule li.off { opacity: 0.45; }

/* Story */
.story { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; }
.story .media { min-height: 420px; }
.story .copy { padding: clamp(40px, 7vw, 100px); display: flex; flex-direction: column; justify-content: center; background: var(--smoked); }
.story h2 { font-size: clamp(46px, 5.6vw, 88px); }
.story p { margin-top: 20px; font-size: 18px; opacity: 0.85; max-width: 40ch; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 2px dashed var(--sand); border-radius: 6px; font-family: var(--cond); font-weight: 700; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tortilla); }
.badge .ico { color: var(--sunset); }

/* Catering */
.catering { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.catering h2 { font-size: clamp(48px, 6.4vw, 96px); margin-top: 16px; }
.catering .points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.catering .points li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.catering .points .ico { color: var(--chili); font-size: 18px; margin-top: 3px; }
.book { background: #fff8ea; border: 2px solid var(--charcoal); border-radius: 10px; padding: clamp(22px, 3vw, 34px); box-shadow: 8px 8px 0 var(--charcoal); }
.book h3 { font-size: 40px; margin-bottom: 18px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-block; padding: 9px 14px; border: 2px solid var(--charcoal); border-radius: 6px; font-family: var(--cond); font-weight: 700; font-size: 17px; letter-spacing: 0.05em; text-transform: uppercase; }
.pick input:checked + span { background: var(--chili); border-color: var(--chili); color: var(--tortilla); }
.pick input:focus-visible + span { outline: 3px solid var(--sunset); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields .full { grid-column: 1 / -1; }
.fields label { display: grid; gap: 6px; font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--smoked); }
.fields input, .fields select { height: 50px; padding: 0 14px; border-radius: 6px; border: 2px solid var(--charcoal); background: #fff; color: var(--charcoal); font: 500 16px var(--sans); letter-spacing: 0; text-transform: none; }
.fields input:focus, .fields select:focus { outline: none; border-color: var(--chili); box-shadow: 0 0 0 3px rgba(239, 72, 41, 0.25); }
.book .btn { width: 100%; margin-top: 18px; }
.booked { text-align: center; padding: 20px 0; }
.booked .ico { width: 80px; height: 80px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--chili); color: var(--tortilla); font-size: 32px; }
.booked h3 { font-size: 44px; }
.booked p { margin-top: 8px; color: #5a4a40; }

/* Sauce & merch */
.merch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.item { border: 2px solid var(--line); border-radius: 10px; padding: 30px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.3s, transform 0.4s var(--ease); }
.item:hover { border-color: var(--chili); transform: translateY(-4px); }
.seal { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; font-size: 42px; margin-bottom: 14px; border: 3px dashed currentColor; }
.item h3 { font-family: var(--cond); font-weight: 800; font-size: 30px; letter-spacing: 0.02em; }
.item p { opacity: 0.8; }
.item .price { font-family: var(--display); font-size: 30px; margin-top: auto; padding-top: 10px; color: var(--sunset); }

/* Footer */
.chili-strip { height: 46px; background: var(--chili); display: flex; align-items: center; overflow: hidden; gap: 28px; padding: 0 14px; color: var(--charcoal); font-size: 22px; white-space: nowrap; }
.foot { padding: 64px 0 calc(90px + var(--safe-b)); }
.foot-top { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; }
.foot .wordmark { font-size: clamp(44px, 10vw, 150px); color: var(--tortilla); }
.foot .tag { font-family: var(--display); font-size: clamp(22px, 2.4vw, 34px); text-transform: uppercase; color: var(--sand); }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; padding-top: 30px; border-top: 2px solid var(--line); }
.foot h4 { font-family: var(--cond); font-weight: 700; font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand); margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--tortilla); display: grid; place-items: center; font-size: 18px; transition: background 0.2s, color 0.2s; }
.socials a:hover { background: var(--chili); border-color: var(--chili); }
.foot .credits { margin-top: 40px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot .credits a { text-decoration-color: rgba(245, 231, 203, 0.3); }

/* Toast */
.toast { position: fixed; left: 50%; top: 88px; z-index: 200; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 8px; background: var(--tortilla); color: var(--charcoal); font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; box-shadow: 5px 5px 0 var(--chili); transform: translate(-50%, -20px); opacity: 0; transition: all 0.4s var(--ease); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ico { color: var(--chili); }

/* Dark-page toggle */
.tm-toggle { background: rgba(245, 231, 203, 0.95) !important; }

/* Let grid columns shrink below their content */
.hero-grid > *, .truck-grid > *, .story > *, .catering > * { min-width: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .tray { margin-left: auto; }
  .hero-grid, .truck-grid, .story, .catering { grid-template-columns: 1fr; }
  .hero-art { max-width: 440px; }
  .menu { grid-template-columns: repeat(2, 1fr); }
  .merch { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .nav .wordmark { font-size: 24px; }
  .nav .btn { display: none; }
  .hero h1 { font-size: clamp(56px, 17vw, 76px); }
  .hero .actions .btn { flex: 1; padding: 0 16px; }
  .stamp { width: 100px; height: 100px; }
  .menu { grid-template-columns: 1fr; }
  .schedule li { grid-template-columns: 70px 1fr; }
  .schedule .hrs { grid-column: 2; }
  .schedule .day { font-size: 22px; }
  .fields { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr; }
}
@media (min-width: 1680px) {
  .hero h1 { font-size: clamp(64px, 8vw, 180px); }
  .dish h3 { font-size: 32px; } .dish p { font-size: 16px; }
}
