/* Salt & Vines — shared base used by all four homepage versions.
   Only mechanics live here (placeholders, reveal, toast, cart rows).
   Every version sets its own look on top. */

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- Photo placeholders ----------
   <div class="ph" data-img="../img/x.jpg" data-shot="what the photo should be">
   If the file exists it fades in; if not, the art-directed placeholder stays. */
.ph {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--ph-bg, #2b1d17);
}
.ph::before { /* side light, like a window at dusk */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 28% 18%, var(--ph-light, rgba(255, 214, 170, .18)), transparent 62%);
  z-index: 0;
}
.ph::after { /* film grain */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain, .22);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}
.ph-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: var(--pos, center);
  opacity: 0;
  transition: opacity 1s ease;
}
.ph.loaded .ph-img { opacity: 1; }
.ph-note {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  font: 500 10.5px/1.45 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ph-fg, rgba(255, 240, 225, .55));
  pointer-events: none;
}
.ph.loaded .ph-note { display: none; }
.ph-note--top .ph-note { top: 96px; bottom: auto; } /* clears the fixed nav */

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv-d1 { transition-delay: .12s; }
.js .rv-d2 { transition-delay: .24s; }
.js .rv-d3 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Toast ---------- */
.snv-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  transform: translate(-50%, 140%);
  padding: 12px 20px;
  border-radius: var(--toast-radius, 999px);
  background: var(--toast-bg, #1b1410);
  color: var(--toast-fg, #f5ece0);
  font-size: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.snv-toast.show { transform: translate(-50%, 0); }
.snv-toast a { margin-left: 10px; font-weight: 600; }

/* ---------- Cart rows (structure only) ---------- */
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
}
.cl-name small { display: block; opacity: .65; font-size: .8em; margin-top: 2px; }
.cl-qty { display: inline-flex; align-items: center; gap: 4px; }
.cl-qty button, .cl-remove {
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
}
.cl-qty button:hover, .cl-remove:hover { opacity: 1; }
.cl-qty span { min-width: 2.2em; text-align: center; font-variant-numeric: tabular-nums; }
.cl-total { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
.cl-remove { border-color: transparent; font-size: 18px; }
.cart-empty { opacity: .7; padding: 14px 0; margin: 0; }
.cl-warn {
  grid-column: 1 / -1;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--warn-bg, #f8e3dc);
  color: var(--warn-fg, #8a3f2c);
  font-size: 14px;
  line-height: 1.45;
}
.cl-warn button {
  margin-left: 6px;
  padding: 5px 12px;
  border: 1px solid currentColor;
  border-radius: 99px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.cl-warn button:hover { background: var(--warn-fg, #8a3f2c); color: #fff; }
.min-msg { color: var(--warn-fg, #8a3f2c) !important; }
form.below-min [type=submit] { opacity: .55; }

.order-fallback[hidden] { display: none; }
.order-fallback textarea { width: 100%; min-height: 220px; font: 13px/1.5 ui-monospace, Menlo, monospace; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 520px) {
  .cart-line { grid-template-columns: 1fr auto; row-gap: 8px; }
  .cl-total { text-align: left; }
}