/* ============================================================
   TENNESSEE BREW WORKS — global.css
   Design tokens, reset, base, utilities.
   Token names follow Colony doc 06 §5 so component CSS ports
   into the WP theme unchanged.
   ============================================================ */

/* ---- Fonts (self-hosted, captured from live site) ---- */
@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/bebas-neue.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/brandon-grotesque-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/brandon-grotesque-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/brandon-grotesque-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/brandon-grotesque-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/brandon-grotesque-bold-italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Baskerville URW';
  src: url('../fonts/baskerville-urw.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PT Sans';
  src: url('../fonts/pt-sans-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  /* surfaces — cream "poster paper" theme with ink bands */
  --bg: #F5F0E6;
  --bg-elevated: #FBF8F1;
  --bg-surface: #EDE6D6;
  --bg-surface-hover: #E6DDC9;
  --bg-ink: #141414;
  --bg-ink-elevated: #1D1D1C;
  --bg-ink-surface: #262624;

  /* borders */
  --border-subtle: rgba(20, 20, 20, 0.12);
  --border-medium: rgba(20, 20, 20, 0.25);
  --border-strong: rgba(20, 20, 20, 0.55);
  --border-on-ink: rgba(245, 240, 230, 0.18);

  /* text */
  --text-primary: #141414;
  --text-secondary: #4E4A40;
  --text-muted: #8A8478;
  --text-on-ink: #F5F0E6;
  --text-on-ink-secondary: rgba(245, 240, 230, 0.66);

  /* brand */
  --accent: #E64500;
  --accent-dark: #C13A00;
  --accent-soft: rgba(230, 69, 0, 0.08);
  --cream: #F5F0E6;
  --gold: #E8C87E;

  /* buttons */
  --btn-bg: #141414;
  --btn-text: #F5F0E6;
  --btn-hover-bg: #E64500;

  /* shadows */
  --shadow-sm: 0 2px 10px rgba(20, 15, 5, 0.10);
  --shadow-md: 0 10px 34px rgba(20, 15, 5, 0.16);
  --shadow-lg: 0 28px 80px rgba(20, 15, 5, 0.28);

  /* selection */
  --selection-bg: #E64500;
  --selection-text: #F5F0E6;

  /* type */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-label: 'Brandon Grotesque', 'Trebuchet MS', sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif: 'Baskerville URW', Baskerville, Georgia, serif;

  /* rhythm */
  --section-pad: clamp(80px, 10vw, 140px);
  --container: 1400px;
  --gutter: clamp(20px, 4vw, 48px);

  color-scheme: light;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg);
  overflow-x: clip;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--selection-bg); color: var(--selection-text); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

/* Lenis (required companion rules) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---- Utilities ---- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* poster label — Brandon uppercase with rule dashes */
.t-label {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}
.t-label::before { content: ''; width: 34px; height: 2px; background: currentColor; }
.t-label--center::after { content: ''; width: 34px; height: 2px; background: currentColor; }
.t-label--plain::before, .t-label--plain::after { display: none; }

/* display headline stack */
.t-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* No lonely last words (1.2.1). Headings share their words evenly across their
   lines ("PLAY THE / BREW ROOM", never "PLAY THE BREW / ROOM"); running text
   avoids ending a paragraph on a single word. A browser that does not know the
   property simply wraps as it always did. */
h1, h2, h3, h4, .t-display { text-wrap: balance; }
p, li, dd, blockquote, figcaption { text-wrap: pretty; }
/* Short names that are not headings break evenly too (1.2.8): names on cards and
   list rows, and short centred lines. Left-aligned facts (addresses, hours) keep
   "pretty" from the paragraph rule above: it is the one that avoids a single
   word on the last line ("Nashville International" / "Airport"). */
.location-picker__option-name, .location-picker__option-desc,
.residencies__what, .ontap__name, .ontap__venue-note, .menu-viewer__item-name { text-wrap: balance; }
/* A word that must not split, e.g. at its hyphen. An inline block rather than
   white-space:nowrap: browsers even out the lines correctly around a block, and a
   word wider than the whole line can still break inside it as a last resort. */
.nw { display: inline-block; }

/* poster double-rule (like the wordmark's lines) */
.t-rule {
  border: none;
  border-top: 3px solid var(--text-primary);
  border-bottom: 1px solid var(--text-primary);
  height: 7px;
  background: transparent;
}
.t-rule--on-ink { border-color: var(--border-on-ink); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 34px 15px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 2px solid var(--btn-bg);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-bg); transform: translateY(-2px); }

.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--text-primary); border-color: var(--text-primary); color: var(--cream); }

.btn--ghost-ink { background: transparent; color: var(--text-on-ink); border-color: var(--border-on-ink); }
.btn--ghost-ink:hover { background: var(--cream); border-color: var(--cream); color: var(--bg-ink); }

.btn--dark { background: var(--bg-ink); border-color: var(--bg-ink); color: var(--cream); }
.btn--dark:hover { background: var(--accent); border-color: var(--accent); color: var(--cream); }

/* arrow link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap 0.25s ease;
}
.link-arrow::after { content: '→'; font-family: var(--font-body); }
.link-arrow:hover { gap: 16px; }
/* back to a list, like a breadcrumb (1.2.10): the arrow leads, pointing back */
.link-arrow--back::after { content: none; }
.link-arrow--back::before { content: '←'; font-family: var(--font-body); }

/* status chip (venue cards, beer cards) */
.chip {
  display: inline-block;
  padding: 6px 12px 4px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  line-height: 1;
}
.chip--solid { background: var(--accent); border-color: var(--accent); color: var(--cream); }

/* focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline-offset: -2px;
}
section:focus-visible { outline: none; }

/* skip link */
.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--bg-ink);
  color: var(--cream);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* generic section spacing */
.section { padding-block: var(--section-pad); position: relative; }
.section--ink { background: var(--bg-ink); color: var(--text-on-ink); }

/* paper grain (very subtle) */
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Order-To-Go: hide state + "not available here" toast ---- */
[data-order-to-go][hidden] { display: none; }
.tnbw-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 18px);
  z-index: 200;
  max-width: min(92vw, 460px);
  background: var(--bg-ink);
  color: var(--cream);
  border: 2px solid var(--bg-ink);
  box-shadow: 6px 6px 0 var(--accent);
  padding: 16px 22px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.015em;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.tnbw-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

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