/* The Thomas Egerton — main stylesheet.
   Readable source. The minified twin is generated by build_theme.py; never hand-edit it.
   Palette and type tokens live in theme.json — reference presets here, don't restate hex. */

/* TRAP: WordPress does not set box-sizing globally. Without it, any padded element
   inside a grid or flex track overflows by exactly its horizontal padding —
   typically 11px on a phone, which produces a horizontal scrollbar and nothing else. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* TRAP (12 Aug 2026): WordPress silently declined to emit
   --wp--preset--font-family--body, so theme.json's own `body{font-family:var(...)}`
   resolved to nothing and the whole site fell back to Times New Roman. The preset is
   now called --serif, and this rule carries a literal fallback so a missing token can
   never again degrade the body face without anyone noticing. */
body {
  font-family: var(--wp--preset--font-family--serif, 'Libre Baskerville', Georgia, 'Times New Roman', serif);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- buttons */

.teg-btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--wp--preset--font-family--condensed);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.875rem;
  padding: 13px 24px;
  border-radius: 3px;
  line-height: 1.2;
}

.teg-btn--gold {
  background: var(--wp--preset--color--gold);
  color: var(--wp--preset--color--charcoal);
}

.teg-btn--gold:hover {
  background: var(--wp--preset--color--gold-bright);
  color: var(--wp--preset--color--charcoal);
}

.teg-btn--ghost {
  border: 2px solid var(--wp--preset--color--white);
  color: var(--wp--preset--color--white);
}

.teg-btn--ghost:hover {
  border-color: var(--wp--preset--color--gold);
  color: var(--wp--preset--color--gold);
}

/* An unset menu is visibly unset. A button that silently goes nowhere is worse.
   Inherit the colour rather than fixing it: these chips sit on paper on the Menus
   page and on plum on the front page, and a fixed body colour was invisible on
   the second one. */
.teg-btn--unset {
  background: transparent;
  border: 1px dashed currentColor;
  color: inherit;
  cursor: not-allowed;
  opacity: 0.65;
}

.teg-btn--unset em {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.8;
}

/* ---------------------------------------------------------------- header */

.teg-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--wp--preset--color--plum);
  color: var(--wp--preset--color--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.teg-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.teg-header a {
  color: #e9dfe6;
  text-decoration: none;
}

.teg-header a:hover {
  color: var(--wp--preset--color--gold);
}

.teg-header .wp-block-site-title a {
  color: var(--wp--preset--color--white);
}

.teg-header .teg-btn--gold,
.teg-header .teg-btn--gold:hover {
  color: var(--wp--preset--color--charcoal);
}

.teg-brand {
  display: inline-block;
  text-decoration: none;
}

.teg-brand--logo img {
  display: block;
  height: 58px;
  width: auto;
}

/* The wordmark is the one place the display serif appears at brand scale. */
.teg-brand-name {
  display: block;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--wp--preset--color--white);
}

.teg-strapline {
  font-family: var(--wp--preset--font-family--condensed);
  font-size: 0.5625rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gold);
  margin-top: 4px;
}

/* TRAP: two CTAs plus a burger will not fit beside a brand mark at 390px — they
   wrap one per line and the header becomes three rows deep. Do NOT fix this by
   hiding the CTA: a booking button is the last thing that should disappear on a
   phone. Give the row its own line and split the width. */
@media (max-width: 560px) {
  .teg-brand--logo img {
    height: 42px;
  }

  .teg-header .teg-header-actions {
    width: 100%;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .teg-header .wp-block-navigation {
    flex: 0 0 auto;
  }

  .teg-header .teg-btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 0.75rem;
    padding: 12px 8px;
  }
}

/* ------------------------------------------------------------ info strip */

.teg-info-strip {
  background: var(--wp--preset--color--charcoal);
  color: #e6e0d6;
  font-family: var(--wp--preset--font-family--condensed);
  letter-spacing: 0.04em;
  font-size: 0.875rem;
}

.teg-info-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
}

.teg-info-strip b {
  color: var(--wp--preset--color--gold);
}

.teg-info-strip a {
  color: var(--wp--preset--color--white);
}

/* ------------------------------------------------------------------ hero */

/* TRAP (12 Aug 2026): this used the `background` SHORTHAND, which resets
   background-image to none. The hero photo is painted by an inline rule from
   functions.php, and this stylesheet loads after it — so the shorthand silently
   wiped the image while the <style> tag sat in the head looking perfectly correct.
   Longhand only on any element something else might paint. */
.teg-hero {
  position: relative;
  background-color: var(--wp--preset--color--charcoal);
  color: var(--wp--preset--color--white);
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 20px;
  background-size: cover;
  background-position: center;
}

.teg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(30, 20, 28, 0.3), rgba(30, 20, 28, 0.6));
}

.teg-hero > * {
  position: relative;
}

.teg-hero h1,
.teg-hero h2 {
  color: var(--wp--preset--color--white);
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.teg-eyebrow {
  font-family: var(--wp--preset--font-family--condensed);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gold);
}

.teg-hero p {
  font-style: italic;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  color: #efe8ec;
}

/* --------------------------------------------------------------- sections */

.teg-section {
  padding: 4rem 20px;
}

.teg-section--plum {
  background: var(--wp--preset--color--plum);
  color: var(--wp--preset--color--white);
}

.teg-section--plum h2,
.teg-section--charcoal h2 {
  color: var(--wp--preset--color--white);
}

.teg-section--charcoal {
  background: var(--wp--preset--color--charcoal);
  color: #e6e0d6;
}

.teg-menu-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 1.5rem;
}

.teg-allergen {
  font-size: 0.8125rem;
  font-style: italic;
  margin-top: 1.25rem;
  opacity: 0.85;
}

/* ------------------------------------------------------------------ cards */

.teg-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--rule);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 30, 30, 0.06);
}

.teg-card .wp-block-image {
  margin: 0;
}

.teg-card .wp-block-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.teg-card .teg-card-body {
  padding: 20px 22px 24px;
}

/* --------------------------------------------------------------- archives */

/* TRAP: WordPress renders the Post Template block as a <ul>, so a wrapping group
   has exactly ONE child — that list. Putting the grid on the wrapper gives the
   <ul> a single column and every card stacks inside it. Invisible until the
   archive has real posts in it. */
.teg-post-grid {
  display: block;
}

.teg-post-grid .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.teg-post-grid .wp-block-post-template > li {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.teg-post-grid .wp-block-post-featured-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Responsive overrides must target the SAME selector, or mobile silently keeps
   the desktop column count. */
@media (max-width: 900px) {
  .teg-post-grid .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .teg-post-grid .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

/* TRAP: featured-image blocks render NOTHING when there is no image, so a
   two-column card collapses to text in one column and empty space in the other.
   Most venue archives have images on well under half their posts. */
.teg-lead-card:not(:has(img)) {
  grid-template-columns: 1fr;
}

/* ------------------------------------------------------------ post content */

.teg-post-content > p:first-of-type {
  font-size: 1.125rem;
  line-height: 1.6;
}

.teg-post-meta {
  font-family: var(--wp--preset--font-family--condensed);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--wp--preset--color--plum);
}

/* ----------------------------------------------------------------- footer */

.teg-footer {
  background: var(--wp--preset--color--plum-deep);
  color: #d9cdd5;
  font-size: 0.875rem;
  padding: 3rem 20px 1.75rem;
}

.teg-footer h2,
.teg-footer h3 {
  color: var(--wp--preset--color--white);
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
}

.teg-footer a {
  color: var(--wp--preset--color--gold);
}

/* The footer link colour is gold, which repainted a gold button's own label
   gold-on-gold and made it read as an empty box. Buttons opt out. */
.teg-footer .teg-btn--gold,
.teg-footer .teg-btn--gold:hover {
  color: var(--wp--preset--color--charcoal);
}

.teg-footer .teg-credit {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.125rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: #b3a3ae;
}

/* -------------------------------------------------------------------- 404 */

/* Someone hitting a 404 is lost and still interested — this is not filler. */
.teg-404 {
  text-align: center;
  padding: 5rem 20px;
}

.teg-404 .teg-btn {
  margin: 0 6px 10px;
}
