/*
Theme Name: The Bell Inn Kersey
Theme URI: https://thebellinnkersey.com
Author: The Bell Inn
Description: Bespoke theme for The Bell Inn, a 14th-century village inn in Kersey, Suffolk. Includes ready-made Home, Menus, Gallery and Contact pages that are created automatically on activation.
Version: 1.9.2
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bellinn
*/

/* ------------------------------------------------------------------
   Palette — drawn from the inn itself:
   oak beams, limewashed plaster, and the teal & mustard dining chairs
------------------------------------------------------------------ */
:root {
  --oak: #241d16;          /* deep warm brown-black: beams, footer, text  */
  --oak-soft: #4a3f33;     /* secondary text                              */
  --plaster: #f3ede2;      /* aged plaster: alternating section bands     */
  --limewash: #fbf8f1;     /* page background                             */
  --teal: #1f6f6b;         /* Kersey teal: links, buttons                 */
  --teal-deep: #14504d;
  --ochre: #c99a2e;        /* mustard ochre: small accents, hover states  */
  --line: #d9cfbd;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, "Segoe UI", sans-serif;

  --measure: 62ch;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--limewash);
  color: var(--oak);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { max-width: 46rem; }

/* ------------------------------------------------------------------ Header */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding: 1.1rem 0 1.4rem;
}
/* Legibility scrim when the header sits over the hero photo */
.site-header:not(.site-header--solid) {
  background: linear-gradient(180deg, rgba(20,15,10,.62) 0%, rgba(20,15,10,.3) 62%, rgba(20,15,10,0) 100%);
}
.site-header--solid {
  position: static;
  background: var(--oak);
}
/* Keep clear of the WordPress admin bar for logged-in users */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.site-brand__logo {
  height: 54px;
  width: auto;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(20,15,10,.35);
  flex: none;
}
.site-brand:hover { color: #fff; }
@media (max-width: 720px) {
  .site-brand__logo { height: 58px; }
  .site-brand { font-size: 1.15rem; }
}
@media (max-width: 420px) {
  .site-brand__text { display: none; }
  .site-brand__logo { height: 66px; }
}

.site-nav ul { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
  padding-bottom: .25rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { border-bottom-color: var(--ochre); color: #fff; }

/* "Book a Table" nav button */
.site-nav .nav-book a {
  border: 1.5px solid var(--ochre);
  border-radius: 3px;
  padding: .45rem 1rem;
  color: #fff;
  transition: background .15s ease, color .15s ease;
}
.site-nav .nav-book a:hover {
  background: var(--ochre);
  color: var(--oak);
  border-bottom-color: var(--ochre);
}
@media (min-width: 721px) {
  .site-nav .nav-book { margin-left: .4rem; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 4px;
  color: #fff;
  font: inherit;
  font-size: .9rem;
  padding: .35rem .8rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--oak); padding: .75rem var(--pad) 1.25rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: .9rem; }
  .site-header--solid .site-nav { position: static; padding-inline: 0; }
}

/* ------------------------------------------------------------------ Hero */
.hero {
  position: relative;
  min-height: min(92vh, 780px);
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: 7rem var(--pad) 4rem;
  background: var(--oak);
}
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,15,10,.55) 0%, rgba(20,15,10,.25) 45%, rgba(20,15,10,.6) 100%);
}
.hero__inner { position: relative; max-width: 44rem; }
.hero__est {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ochre);
  margin-bottom: .75rem;
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.3rem); margin-bottom: 1.8rem; opacity: .95; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .98rem;
  text-decoration: none;
  padding: .8rem 1.7rem;
  border-radius: 3px;
  border: 1.5px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn--solid { background: var(--teal); color: #fff; }
.btn--solid:hover { background: var(--teal-deep); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.85); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--oak); }
.btn--oak { background: var(--oak); color: #fff; }
.btn--oak:hover { background: var(--oak-soft); color: #fff; }
.btn { margin: .35rem .3rem; }
.btn--gold { background: var(--ochre); color: #fff; }
.btn--gold:hover { background: #d9ad45; color: #111; }

/* ------------------------------------------------------------------ Sections */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section--plaster { background: var(--plaster); }
.section--oak { background: var(--oak); color: #f6f1e7; }
.section--oak h2, .section--oak h3 { color: #fff; }
.section__lede { max-width: var(--measure); }
.text-center { text-align: center; }
.text-center .section__lede { margin-inline: auto; }

/* Bell divider between sections */
.bell-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 2.2rem;
  max-width: 22rem;
}
.bell-divider::before,
.bell-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bell-divider svg { width: 18px; height: 18px; fill: var(--ochre); flex: none; }
.section--oak .bell-divider::before,
.section--oak .bell-divider::after { background: rgba(255,255,255,.25); }

/* ------------------------------------------------------------------ Home: photo strip */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 2.5rem;
}
.photo-strip figure { margin: 0; }
.photo-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}
.photo-strip figcaption {
  font-size: .9rem;
  color: var(--oak-soft);
  margin-top: .5rem;
  text-align: center;
}
@media (max-width: 720px) { .photo-strip { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Service times */
.times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2.4rem;
}
.times-card {
  background: var(--limewash);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 4px;
  padding: 1.5rem 1.4rem;
}
.times-card h4 { margin-bottom: .7rem; }
.times-card p { font-size: .95rem; margin-bottom: .55em; }
.times-card p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ House notes */
.house-notes {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-width: var(--measure);
  margin-inline: auto;
}
.house-notes li {
  padding: .9rem 0 .9rem 2rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.house-notes li:last-child { border-bottom: 0; }
.house-notes li::before {
  content: "";
  position: absolute;
  left: .3rem;
  top: 1.45rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ochre);
}

/* ------------------------------------------------------------------ Page hero (inner pages) */
.page-hero {
  position: relative;
  background: var(--oak);
  color: #fff;
  padding: 7.5rem 0 3.2rem;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: .2em; }
.page-hero p { max-width: 40rem; margin-inline: auto; opacity: .92; }
/* Optional background image (the page's Featured Image), dimmed behind
   a 75% overlay of the band colour so the text stays readable */
.page-hero__bg { position: absolute; inset: 0; overflow: hidden; }
.page-hero__bg img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
}
.page-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(36, 29, 22, .75);
}
/* With an image set, the header overlays the band, so give the band
   extra top padding to clear it */
.page-hero--image { padding: 10.5rem 0 5rem; }
.page-hero .wrap { position: relative; }

/* ------------------------------------------------------------------ Menus page */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.6rem;
}
.menu-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: var(--oak);
  transition: transform .15s ease, box-shadow .15s ease;
}
.menu-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(36,29,22,.14); color: var(--oak); }
.menu-tile__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 3px solid var(--ochre);
}
.menu-tile__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.menu-tile h3 { margin: 1rem 0 .2rem; }
.menu-tile span { display: block; font-size: .88rem; color: var(--oak-soft); padding: 0 1rem 1.2rem; }

/* ------------------------------------------------------------------ Gallery */
.gallery-masonry { columns: 3 260px; column-gap: 1.1rem; }
.gallery-masonry a {
  display: block;
  margin-bottom: 1.1rem;
  border-radius: 4px;
  overflow: hidden;
  break-inside: avoid;
}
.gallery-masonry img { width: 100%; transition: transform .25s ease; }
.gallery-masonry a:hover img { transform: scale(1.03); }

/* ------------------------------------------------------------------ Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-details h3 { margin-top: 1.6rem; }
.contact-details h3:first-child { margin-top: 0; }
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 4px;
}
.contact-form-slot { margin-top: 2rem; }

/* ------------------------------------------------------------------ Lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20,15,10,.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lb.is-open { display: flex; }
.lb img { max-width: min(92vw, 900px); max-height: 88vh; width: auto; height: auto; border-radius: 3px; }
.lb__close, .lb__prev, .lb__next {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: .5rem .9rem;
  opacity: .85;
}
.lb__close:hover, .lb__prev:hover, .lb__next:hover { opacity: 1; }
.lb__close { top: .8rem; right: 1rem; }
.lb__prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb__next { right: .5rem; top: 50%; transform: translateY(-50%); }
.lb__caption {
  position: absolute;
  bottom: 1.2rem;
  left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-size: .95rem;
  opacity: .9;
}

/* ------------------------------------------------------------------ Events */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 900px) { .events-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .events-grid { grid-template-columns: 1fr; } }
.event-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: var(--oak);
  transition: transform .15s ease, box-shadow .15s ease;
}
.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(36,29,22,.14);
  color: var(--oak);
}
.event-card__img { display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.event-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-card__date {
  display: block;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--teal);
  margin: 1rem 1rem 0;
}
.event-card h3 { margin: .25rem 1rem 1.1rem; font-size: 1.25rem; }
.events-empty {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--oak-soft);
}

/* ------------------------------------------------------------------ Footer */
.site-footer {
  background: var(--oak);
  color: #cfc4b2;
  padding: 3.2rem 0 2rem;
  font-size: .95rem;
}
.site-footer a { color: #fff; }
.site-footer .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-brand__logo {
  height: 96px;
  width: auto;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(0,0,0,.35);
}
.footer-social {
  display: flex;
  gap: .9rem;
  margin-top: 1.1rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 50%;
  transition: border-color .15s ease, background .15s ease;
}
.footer-social svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}
.footer-social a:hover {
  border-color: var(--ochre);
  background: rgba(201,154,46,.15);
}
.site-footer h4 { color: #fff; margin-bottom: .8rem; }
.site-footer p { margin-bottom: .4em; }
.footer-bottom {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.14);
  text-align: center;
  font-size: .85rem;
  grid-column: 1 / -1;
}
.footer-bottom a { color: #cfc4b2; }
.footer-bottom a:hover { color: #fff; }
.footer-credit { margin-top: .3rem; opacity: .75; }

/* ------------------------------------------------------------------ Generic page content (for extra pages / WPBakery etc.) */
.entry-content { padding: 3rem 0 4rem; }
.entry-content > * { max-width: 46rem; margin-left: auto; margin-right: auto; }
.entry-content .alignwide { max-width: 72rem; }
.entry-content .alignfull { max-width: none; }

/* ------------------------------------------------------------------ Holding page */
.holding-body { margin: 0; }
.holding {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: var(--oak);
}
.holding__bg { position: absolute; inset: 0; overflow: hidden; }
.holding__bg img { width: 100%; height: 100%; object-fit: cover; }
.holding__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,15,10,.5) 0%, rgba(20,15,10,.65) 100%);
}
.holding__card {
  position: relative;
  text-align: center;
  color: #fff;
  max-width: 34rem;
  background: rgba(24,18,12,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  padding: clamp(2rem, 5vw, 3.2rem) clamp(1.5rem, 5vw, 3rem);
}
.holding__logo {
  height: 110px;
  width: auto;
  margin-inline: auto;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(20,15,10,.4);
}
.holding__est {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ochre);
  margin: .6rem 0 .4rem;
}
.holding__card h1 { color: #fff; font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: .5em; }
.holding__message { opacity: .95; margin-bottom: 1.6rem; }
.holding__details { margin-top: 1.8rem; font-size: .95rem; opacity: .9; }
.holding__details p { margin-bottom: .35em; }
.holding__details a { color: #fff; }

/* Client-built pages (WPBakery layouts take over the page) */
.builder-content { min-height: 40vh; }
.builder-content > .wpb_row,
.builder-content .vc_row { margin-left: 0; margin-right: 0; }

/* Client-managed gallery (WordPress Gallery block on the Gallery page) */
.gallery-content { max-width: none; }
.gallery-content .wp-block-gallery { gap: 1.1rem; }
.gallery-content img { border-radius: 4px; }
.gallery-content figcaption { font-size: .88rem; color: var(--oak-soft); }

/* Focus visibility */

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ochre);
  color: var(--oak);
  padding: .6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }
