/* ========================================================================
   Variables
   ======================================================================== */

:root {
  /* Color Palette - Light Bistro Theme */
  --color-background: #f5efe4; /* warm milk / light oatmeal-beige */
  --color-surface: #f9f4ea;    /* lighter surface panels */
  --color-surface-alt: #f1e7d8;
  --color-border-subtle: #dcdcdc; /* classic subtle structural borders */
  --color-border-strong: #b9b4aa;

  --color-text: #262627;       /* deep charcoal */
  --color-text-muted: #6a6762;
  --color-heading: #171717;

  --color-primary: #c88a1f;    /* toasted amber / warm mustard */
  --color-primary-soft: #f0cf8a;
  --color-primary-dark: #8b5f12;

  --color-success: #2e7d32;
  --color-warning: #f9a825;
  --color-danger: #c62828;

  /* Neutral Grays (for structural UI, not dominant background) */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-body: var(--font-sans);
  --font-heading: var(--font-serif);

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-display: 3rem; /* 48px hero / editorial */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* Spacing Scale (0–96px) */
  --space-0: 0;
  --space-1: 0.125rem; /* 2px */
  --space-2: 0.25rem;  /* 4px */
  --space-3: 0.375rem; /* 6px */
  --space-4: 0.5rem;   /* 8px */
  --space-5: 0.625rem; /* 10px */
  --space-6: 0.75rem;  /* 12px */
  --space-8: 1rem;     /* 16px */
  --space-10: 1.25rem; /* 20px */
  --space-12: 1.5rem;  /* 24px */
  --space-16: 2rem;    /* 32px */
  --space-20: 2.5rem;  /* 40px */
  --space-24: 3rem;    /* 48px */
  --space-32: 4rem;    /* 64px */
  --space-40: 5rem;    /* 80px */
  --space-48: 6rem;    /* 96px */

  /* Radius */
  --radius-none: 0;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Shadows - soft, ambient, bistro lighting */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 10, 6, 0.12);
  --shadow-lg: 0 18px 45px rgba(10, 6, 2, 0.18);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout Widths */
  --max-width-page: 1120px; /* editorial column */
  --max-width-wide: 1320px; /* hero mosaics, menu boards */

  /* Aliases used across page templates */
  --font-display: var(--font-heading);
  --color-text-soft: var(--color-text-muted);
  --page-max-width: var(--max-width-page);
  --page-wide-width: var(--max-width-wide);
  --color-bg-page: var(--color-background);
  --color-bg-soft: var(--color-surface-alt);
  --color-surface-soft: var(--color-surface);
  --color-primary-strong: var(--color-primary-dark);
  --shadow-soft: var(--shadow-sm);
  --transition-base: var(--transition-normal);
  --color-success-soft: rgba(46, 125, 50, 0.12);
}

/* ========================================================================
   Reset / Normalize
   ======================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p,
ul, ol,
figure,
blockquote,
dl, dd {
  margin: 0;
}

ul, ol {
  padding-left: 1.25rem;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

textarea {
  resize: vertical;
}

[hidden] {
  display: none !important;
}

/* ========================================================================
   Base Styles
   ======================================================================== */

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-heading);
}

h1 {
  font-size: var(--font-size-display);
  letter-spacing: 0.02em;
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-md);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-8);
  color: var(--color-text);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

small {
  font-size: var(--font-size-sm);
}

a {
  position: relative;
  color: var(--color-primary-dark);
  cursor: pointer;
}

a:hover {
  color: var(--color-primary);
}

/* Editorial-style underline reveal for body links */

a:not(.btn, .button, .nav-link)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

a:not(.btn, .button, .nav-link):hover::after {
  transform: scaleX(1);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-16) 0;
}

code, pre {
  font-family: var(--font-mono);
}

/* ========================================================================
   Accessibility & Motion
   ======================================================================== */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

:focus {
  outline: none;
}

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

/* Screen reader only */

.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;
}

/* ========================================================================
   Layout Utilities
   ======================================================================== */

/* Responsive containers for page and hero/menu layouts */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
  max-width: var(--max-width-page);
}

.container--wide {
  max-width: var(--max-width-wide);
}

.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section--bordered {
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Flex helpers for variable header & hero composition */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs {
  gap: var(--space-4);
}

.gap-sm {
  gap: var(--space-8);
}

.gap-md {
  gap: var(--space-12);
}

.gap-lg {
  gap: var(--space-16);
}

.gap-xl {
  gap: var(--space-24);
}

/* Grid helpers for hero mosaics & menu boards */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-16);
}

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-16);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Masonry-like helper using CSS columns for variable hero/photo walls */

.masonry {
  column-count: 3;
  column-gap: var(--space-16);
}

.masonry > * {
  break-inside: avoid;
  margin-bottom: var(--space-16);
}

@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .masonry {
    column-count: 1;
  }
}

/* Width helpers for asymmetric hero splits */

.w-40 {
  width: 40%;
}

.w-60 {
  width: 60%;
}

.w-50 {
  width: 50%;
}

@media (max-width: 768px) {
  .w-40,
  .w-60,
  .w-50 {
    width: 100%;
  }
}

/* Alignment and text utilities */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--color-text-muted);
}

/* Spacing utilities (margin & padding) */

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-4); }
.mt-sm { margin-top: var(--space-8); }
.mt-md { margin-top: var(--space-12); }
.mt-lg { margin-top: var(--space-16); }
.mt-xl { margin-top: var(--space-24); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-4); }
.mb-sm { margin-bottom: var(--space-8); }
.mb-md { margin-bottom: var(--space-12); }
.mb-lg { margin-bottom: var(--space-16); }
.mb-xl { margin-bottom: var(--space-24); }

.pt-0 { padding-top: 0; }
.pt-sm { padding-top: var(--space-8); }
.pt-md { padding-top: var(--space-12); }
.pt-lg { padding-top: var(--space-16); }
.pt-xl { padding-top: var(--space-24); }

.pb-0 { padding-bottom: 0; }
.pb-sm { padding-bottom: var(--space-8); }
.pb-md { padding-bottom: var(--space-12); }
.pb-lg { padding-bottom: var(--space-16); }
.pb-xl { padding-bottom: var(--space-24); }

/* Border utilities for tile grids & menu boards */

.border-tile {
  border: 1px solid var(--color-border-subtle);
}

.border-top {
  border-top: 1px solid var(--color-border-subtle);
}

.border-bottom {
  border-bottom: 1px solid var(--color-border-subtle);
}

.border-radius-sm {
  border-radius: var(--radius-sm);
}

.border-radius-md {
  border-radius: var(--radius-md);
}

/* ========================================================================
   Components - Header & Nav (variable layouts)
   ======================================================================== */

/* Generic header shell; actual layout controlled via utility classes and
   templating logic to allow randomization of brand and nav placement */

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(245, 239, 228, 0.96);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
  gap: var(--space-12);
}

.site-brand {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-brand span {
  display: inline-block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.nav-link {
  position: relative;
  padding: var(--space-4) 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background-color: var(--color-primary-dark);
  transition: width var(--transition-fast);
}

.nav-link--active::after,
.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(249, 244, 234, 0.9);
}

.nav-toggle__bar {
  width: 16px;
  height: 1px;
  background-color: var(--color-text);
  border-radius: 999px;
}

@media (max-width: 900px) {
  .site-header__inner {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding-top: var(--space-8);
  }

  .nav-list.is-open {
    display: flex;
  }
}

/* ========================================================================
   Components - Buttons
   ======================================================================== */

.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-16);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary-dark);
  color: var(--color-primary-dark);
}

.btn-outline:hover {
  background-color: var(--color-primary-soft);
}

.btn-ghost {
  background-color: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.btn[disabled],
.button[disabled],
.btn.is-disabled,
.button.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ========================================================================
   Components - Form Elements
   ======================================================================== */

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.label {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.input,
.textarea,
.select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: var(--space-8) var(--space-10);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: #fff;
  color: var(--color-text);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder,
select::placeholder,
input::placeholder {
  color: var(--gray-500);
}

.input:focus-visible,
.textarea:focus-visible,
select:focus-visible,
input:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
}

input[disabled],
select[disabled],
textarea[disabled] {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

/* ========================================================================
   Components - Card, Tiles & Panels
   ======================================================================== */

.card {
  position: relative;
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-xs);
  padding: var(--space-16);
}

.card--soft {
  background-color: rgba(249, 244, 234, 0.96);
}

.card-header {
  margin-bottom: var(--space-8);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  text-transform: none;
}

.card-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Menu tile styling - for food boards and poker schedule */

.menu-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-10) var(--space-12);
}

.menu-tile__heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  font-family: var(--font-heading);
}

.menu-tile__title {
  font-size: var(--font-size-md);
}

.menu-tile__price {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.menu-tile__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Hero media framing - for static bistro/poker imagery (no sliders) */

.hero-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-md);
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 45%);
  pointer-events: none;
}

/* ========================================================================
   Helpers - Page-specific Atmosphere (Bistro / Poker Lounge)
   ======================================================================== */

.bg-bistro {
  background: radial-gradient(circle at top left, #f9f4ea 0, #f1e7d8 45%, #e7dccb 100%);
}

.bg-lounge {
  background: radial-gradient(circle at bottom right, #2b2b2d 0, #171717 50%, #101012 100%);
  color: #f5efe4;
}

.chalk-border {
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.chalk-text {
  color: #f7f3e8;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background-color: rgba(255, 255, 255, 0.7);
}

.tag--highlight {
  border-color: var(--color-primary);
  background-color: rgba(240, 207, 138, 0.18);
  color: var(--color-primary-dark);
}

/* ========================================================================
   Global Syntax Code Injections (per specification)
   ======================================================================== */

ul {
  list-style: none !important;
}

.nav-toggle {
  flex-direction: column;
}

/* --- mobile overflow guard (auto) --- */
html {
  overflow-x: clip;
}
body {
  overflow-x: clip;
  max-width: 100%;
}
img,
video,
svg {
  max-width: 100%;
  height: auto;
}
.u-container,
.container,
[class*="container"] {
  max-width: 100%;
}
.u-grid,
[class*="grid"] {
  min-width: 0;
}
@media (max-width: 767px) {
  .header-inner,
  .header-shell,
  .site-header,
  .header-nav {
    max-width: 100%;
    min-width: 0;
  }
  .header-brand,
  .brand-lockup,
  .site-logo {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-nav-list,
  .nav-links {
    flex-wrap: wrap;
  }
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}
