/* ==========================================================================
   King Hill Kitchen / King Hill Inn — static site styles
   Built by ONNA Web Design. Converted from WordPress (Astra + Elementor).
   All sizing in rem (1rem = 16px).
   ========================================================================== */

/* ---------- Self-hosted fonts (Lato, latin subset) ---------- */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/lato-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 700; font-display: swap; src: url("/fonts/lato-latin-700-italic.woff2") format("woff2"); }

/* ---------- Design tokens (colors carried over from the WordPress theme) ---------- */
:root {
  --black: #000;
  --charcoal: #232323;      /* tile band background + body text */
  --grey-text: #7a7a7a;     /* footer text */
  --tile-border: #54595f;
  --tile-title: #dadada;
  --tile-text: #a3a3a3;
  --red: #b32024;           /* links, accents */
  --red-dark: #7f1417;      /* link hover */
  --white: #fff;
  --font-body: "Lato", sans-serif;
  /* Optima is a system font on Mac/iOS; the WordPress site used this same stack */
  --font-head: Optima, Candara, "Segoe UI", Helvetica, Arial, sans-serif;
  --container: 78.75rem;    /* 1260px content width */
  --gutter: 1.25rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover, a:focus { color: var(--red-dark); }
/* Inline body-copy links are underlined so they don't rely on color alone (WCAG 1.4.1) */
.content p a, .content figcaption a { text-decoration: underline; text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
p { margin: 0 0 1.65rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--black);
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}
h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.2rem; line-height: 1.3; }
/* Sitewide: an h2 directly under the h1 sits closer to it */
h1 + h2 { margin-top: -0.25rem; }
/* Sitewide: buttons that follow text get consistent breathing room */
p + .btn, p + .btn-row, .btn + p { margin-top: 1.25rem; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--white); color: var(--black); padding: 0.75rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--black);
  padding: 0.875rem 1.5rem;
  border-radius: 0.1875rem;
  border: 0;
  cursor: pointer;
  transition: background-color 0.3s;
}
.btn:hover, .btn:focus { color: var(--white); background: var(--red); }

/* ---------- Header bar ---------- */
.site-header { background: var(--black); border-bottom: 1px solid #222; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1.875rem; padding-bottom: 1.875rem;
}
.site-logo { display: block; max-width: 25rem; flex: 0 1 25rem; } /* 400px (was 500px on WordPress) */
.site-logo img { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }
.header-phone {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover, .header-phone:focus { color: var(--white); text-decoration: underline; }
.menu-toggle {
  background: none; border: 0; padding: 0.5rem; margin: -0.5rem; cursor: pointer; color: var(--white);
  display: inline-flex;
}
.menu-toggle svg { width: 1.6rem; height: 1.6rem; display: block; }

/* ---------- Flyout menu ---------- */
.menu-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 900;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.flyout {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 901;
  width: min(18.75rem, 85vw);
  max-height: 100vh; max-height: 100dvh;
  overflow-y: auto;  /* tall menu scrolls inside itself (phones in landscape) */
  background: var(--black);
  padding: 3.5rem 2.75rem 2rem;
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
body.menu-open .flyout { transform: none; visibility: visible; }
body.menu-open { overflow: hidden; }
.flyout-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: 0; color: var(--white); cursor: pointer; padding: 0.5rem;
}
.flyout-close svg { width: 1.25rem; height: 1.25rem; display: block; }
.flyout ul { list-style: none; margin: 0; padding: 0; }
.flyout li a {
  display: block; padding: 0.6rem 0; color: var(--white); text-decoration: none; font-size: 1rem;
}
.flyout li a:hover, .flyout li a:focus, .flyout li a[aria-current="page"] { color: var(--red); }
.flyout-phone { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #333; }
.flyout-phone a { color: var(--white); font-family: var(--font-head); font-size: 1.25rem; text-decoration: none; }

/* ---------- Hero slideshows ----------
   The image layers are absolutely positioned behind; the band itself sets the height.
   Home hero is 900px at desktop, inner-page heroes 600px, both scale down with width. */
.hero { position: relative; overflow: hidden; background: #111; }
.hero--home { height: clamp(16.25rem, 62.5vw, 56.25rem); }
.hero--page { height: clamp(13.75rem, 41.67vw, 37.5rem); }
.hero .slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; transition: opacity 1s ease-in-out;
}
.hero .slide.is-active { opacity: 1; }
.slideshow-toggle {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.45); color: var(--white); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: opacity 0.2s;
}
.slideshow-toggle:hover, .slideshow-toggle:focus-visible { opacity: 1; }
.slideshow-toggle svg { width: 0.9rem; height: 0.9rem; }

/* ---------- Main content ---------- */
.content { padding: 4.375rem 0; }
.content--home { padding: 4.375rem 0; }
.content--home h2 { font-size: 1.5rem; text-transform: none; }
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26.75rem); /* text | 428px image */
  gap: 2rem;
  align-items: start;
}
.two-col--narrow-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 18.75rem); }
.two-col--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aside img { width: 100%; }
.aside--framed img { box-shadow: 0 0 0 3px #ccc; }
.zoom-link { display: block; cursor: zoom-in; }

/* Review articles */
.article-source { font-style: italic; font-size: 0.95rem; }
.content--article h1 { font-size: 2.2rem; }
.figure-list { display: grid; gap: 1.75rem; }
.figure-list figure { margin: 0; }
.figure-list figcaption { font-size: 0.875rem; line-height: 1.6; text-align: center; margin-top: 0.75rem; }

/* Reviews page */
.reviews-badges { text-align: center; }
.reviews-badges img { margin: 0 auto 1rem; }
.reviews-badges p { font-size: 0.95rem; }
.reviews-badges p a { color: var(--red); font-weight: 700; text-decoration: none; }
.reviews-badges p a:hover, .reviews-badges p a:focus { text-decoration: underline; }
.award-logo { display: inline-block; margin-bottom: 1.25rem; }
.award-logo img { width: 18.75rem; }

/* Contact page */
.icon-link { display: inline-block; color: var(--charcoal); margin: 0 0 1.25rem; }
.icon-link svg { width: 1.5rem; height: auto; fill: currentColor; display: block; }
.icon-link:hover, .icon-link:focus { color: var(--red); }
.map-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #e5e3df; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Gallery page */
.gallery-intro h1 { margin-bottom: 1.5rem; }
.gallery-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.gallery-card { text-align: center; }
.gallery-card h2 { margin-bottom: 0.5rem; }
.gallery-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 0.625rem; }
.gallery-card .btn { margin-top: 0.625rem; }

/* ---------- Dialogs: gallery grid + lightbox ---------- */
dialog { border: 0; padding: 0; color: inherit; }
dialog::backdrop { background: rgba(0, 0, 0, 0.85); }
.gallery-dialog {
  width: min(70rem, 94vw); max-height: 90vh; max-height: 90dvh;
  background: var(--white); overflow: hidden;
}
.gallery-dialog[open] { display: flex; flex-direction: column; }
.gallery-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-bottom: 1px solid #e5e5e5;
}
.gallery-dialog-head h2 { font-size: 1.25rem; margin: 0; }
.gallery-dialog-body { overflow-y: auto; padding: 1rem; }
.masonry { columns: 3 16rem; column-gap: 0.625rem; }
.masonry a { display: block; margin-bottom: 0.625rem; break-inside: avoid; cursor: zoom-in; }
.masonry img { width: 100%; transition: opacity 0.2s; }
.masonry a:hover img, .masonry a:focus img { opacity: 0.85; }
.dialog-close {
  background: none; border: 0; cursor: pointer; padding: 0.5rem; color: inherit; line-height: 0;
}
.dialog-close svg { width: 1.25rem; height: 1.25rem; }

.lightbox {
  background: transparent; color: var(--white);
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; max-height: 86dvh; width: auto; height: auto; object-fit: contain; }
.lightbox .dialog-close { position: absolute; top: 0.75rem; right: 0.75rem; color: var(--white); }
.lightbox .dialog-close svg { width: 1.75rem; height: 1.75rem; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4); color: var(--white); border: 0; cursor: pointer;
  width: 3rem; height: 3rem; display: inline-flex; align-items: center; justify-content: center;
}
.lb-nav svg { width: 1.5rem; height: 1.5rem; }
.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }
.lb-count { position: absolute; bottom: 0.75rem; left: 0; right: 0; text-align: center; font-size: 0.875rem; }

/* ---------- Service tiles band ---------- */
.tiles { background: var(--charcoal); padding: 4.375rem 0; }
.tiles ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem;
}
.tiles a {
  display: block; height: 100%;
  background: var(--black); border: 1px solid var(--tile-border);
  padding: 1.25rem 0.625rem; text-decoration: none;
  transition: border-color 0.3s;
}
.tiles a:hover, .tiles a:focus-visible { border-color: var(--red); }
.tile-title {
  display: block; font-family: var(--font-head); font-size: 1.5rem; line-height: 1.3;
  text-transform: uppercase; color: var(--tile-title); margin-bottom: 0.6rem;
}
.tile-text { display: block; color: var(--tile-text); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); border-top: 1px solid var(--tile-border); color: var(--grey-text); font-size: 0.875rem; }
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-top: 1.25rem; padding-bottom: 1.25rem; max-width: calc(80rem + 2 * var(--gutter));
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--red); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: #e0474b; text-decoration: underline; }

/* ---------- 404 ---------- */
.content--404 { text-align: center; padding: 6rem 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 64rem) { /* tablet */
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }
  .content { padding: 3rem 0; }
  .tiles { padding: 3rem 0; }
  .site-logo { flex-basis: 22rem; }
  .site-footer .container { flex-direction: column; text-align: center; gap: 0.25rem; }
}
@media (max-width: 47.9375rem) { /* phone */
  :root { --gutter: 0.875rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .content--article h1 { font-size: 1.6rem; }
  .content { padding: 2.25rem 0; }
  .two-col, .two-col--narrow-aside, .two-col--even, .gallery-cards { grid-template-columns: 1fr; }
  .aside { max-width: 26.75rem; }
  .tiles { padding: 2.25rem 0; }
  .tiles ul { grid-template-columns: 1fr; }
  .site-header .container { padding-top: 0.875rem; padding-bottom: 0.875rem; }
  .site-logo { flex-basis: auto; max-width: 72%; }
  .header-phone { display: none; } /* phone number lives in the flyout menu on small screens */
  .masonry { columns: 2; }
}
@media (max-width: 47.9375rem) and (orientation: landscape), (max-height: 30rem) {
  .hero--home { height: min(62.5vw, 80vh); }
  .hero--page { height: min(41.67vw, 60vh); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
