/* Shared base for the Portland bar mock-ups.
   Each site defines its own tokens on :root:
   --bg, --surface, --text, --muted, --accent, --accent-text, --line, --focus,
   --font-display, --font-body, --font-mono, --radius. */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Accessibility */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--accent-text);
  padding: .6rem 1rem; border-radius: var(--radius); text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Layout helpers */
.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.stack > * + * { margin-top: var(--stack, 1rem); }

/* Hours badge (filled in by bar.js; the static text inside is the no-JS fallback) */
.hours-badge {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .85rem; letter-spacing: .04em;
}
.hours-badge .dot {
  width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); flex: none;
}
.hours-badge[data-state="open"] .dot { background: var(--open, #3FB950); box-shadow: 0 0 0 4px color-mix(in srgb, var(--open, #3FB950) 25%, transparent); }
.hours-badge[data-state="closing-soon"] .dot { background: var(--closing, #E3B341); }
.hours-badge[data-state="closed"] .dot { background: var(--closed, #9AA0A6); }

/* Hours table */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.hours-table td { text-align: right; font-family: var(--font-mono); font-size: .92rem; }
.hours-table tr[aria-current="date"] th, .hours-table tr[aria-current="date"] td { font-weight: 700; color: var(--accent-strong, var(--text)); }

/* Menu + events + taps */
.menu-item { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding-block: .8rem; border-bottom: 1px dashed var(--line); }
.menu-item .name { font-weight: 700; }
.menu-item .price { font-family: var(--font-mono); white-space: nowrap; }
.menu-item .desc { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; }
.menu-item.is-out .name, .menu-item.is-out .price { text-decoration: line-through; text-decoration-thickness: 2px; }
.tag {
  display: inline-block; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; padding: .1rem .45rem; border: 1px solid currentColor; border-radius: 999px;
  margin-left: .4rem; vertical-align: .15em;
}
.empty-state { color: var(--muted); font-style: italic; padding-block: 1rem; }

/* Form */
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .85rem; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error, #D93025); }
.field .error { color: var(--error-text, var(--error, #D93025)); font-size: .88rem; min-height: 1.2em; }
.form-status { padding: 1rem 1.1rem; border-radius: var(--radius); border: 1.5px solid var(--line); }
.form-status[hidden] { display: none; }

/* Photo placeholder frames: where the client's own photography goes */
.photo-slot {
  position: relative; display: grid; place-items: end start; overflow: hidden;
  border-radius: var(--radius); min-height: 14rem;
  background: var(--slot-bg, var(--surface)); color: var(--slot-text, var(--muted));
}
.photo-slot figcaption {
  position: relative; z-index: 1; margin: .9rem; padding: .35rem .6rem; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--slot-label-bg, rgba(0,0,0,.55)); color: var(--slot-label-text, #fff);
}

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

/* Line balance: no lopsided breaks. Headings and short copy balance; long paragraphs avoid orphans. */
h1, h2, h3, h4, figcaption, .kicker, .eyebrow, .lede, .hero-lede, .sub, .mono, .label, .tag, .btn, li, dd, dt { text-wrap: balance; }
p { text-wrap: pretty; }
