/* Kibi theme overrides on top of the prototype's app.css. */

/* ---------- Brand logo in the header ---------- */

.site-header__brand {
  flex: none;
}

.site-header__logo-img {
  display: block;
  height: 54px;
  width: auto;
}

/* The white logo only reads while the header floats over the hero image. */
.site-header__logo-img--light {
  display: none;
}

.site-header.is-over-hero .site-header__logo-img--light {
  display: block;
}

.site-header.is-over-hero .site-header__logo-img--dark {
  display: none;
}

@media (max-width: 480px) {
  .site-header__logo-img {
    height: 44px;
  }
}

.mobile-sheet__logo {
  display: block;
  height: 48px;
  width: auto;
}

.site-footer__logo {
  display: block;
  height: 62px;
  width: auto;
}

/* The booking summary spells out the arithmetic, so it needs to wrap. */
.booking-summary__formula {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Contact channels come from the admin, so the row has to survive any count. */
.site-footer__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.site-footer__channel {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  line-height: 1;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.site-footer__channel:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Bludit content pages ---------- */

/* Keep the footer at the bottom on pages with little content. */
body:not(.tpl-home) #main-content {
  min-height: calc(100vh - 5rem);
}

.prose :where(a):not(:where([class~="not-prose"] *)) {
  color: var(--color-wood-700);
  text-decoration-color: rgba(140, 106, 69, 0.35);
  text-underline-offset: 3px;
}

.prose :where(h1, h2, h3, h4):not(:where([class~="not-prose"] *)) {
  font-family: 'Fraunces', 'Georgia', serif;
  color: var(--color-text);
}

/* ---------- Blog: archive and post ---------- */

/* The prototype had no blog pages, so everything below extends the .blog-card
   grid from app.css rather than living next to it. */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.breadcrumbs a:hover {
  color: var(--color-wood-700);
}

.breadcrumbs__sep {
  color: var(--color-wood-300);
}

/* A long post title must not push the trail onto a second line. */
.breadcrumbs__current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
}

/* Whole-card click target. The media link is aria-hidden, so the title link is
   the one screen readers and the keyboard reach. */
.blog-card {
  position: relative;
}

.blog-card__title a {
  color: inherit;
  transition: color 0.15s ease;
}

.blog-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.blog-card:hover .blog-card__title a {
  color: var(--color-wood-700);
}

.blog-card__title a:focus-visible {
  outline: 2px solid var(--color-wood-500);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.archive-head {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  text-align: center;
}

.archive-head .section-eyebrow::before {
  display: none;
}

.archive-head__count {
  margin-top: 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-wood-700);
}

.blog-empty {
  max-width: 32rem;
  margin: 3rem auto 0;
  padding: 2.5rem 2rem;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid var(--color-line);
  border-radius: 1.5rem;
}

/* ---------- Paginator ---------- */

.paginator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3rem;
}

.paginator__pages {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.paginator__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid var(--color-line);
  color: var(--color-text);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.paginator__pill:hover {
  border-color: var(--color-wood-500);
  color: var(--color-wood-700);
}

.paginator__pill.is-active {
  background: var(--color-wood-700);
  border-color: var(--color-wood-700);
  color: #FAFAF7;
}

.paginator__gap {
  padding: 0 0.15rem;
  color: var(--color-wood-300);
}

/* ---------- Post ---------- */

.post-head {
  margin-bottom: 2rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.post-meta__dot {
  color: var(--color-wood-300);
}

.post-lead {
  margin-top: 1.25rem;
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.post-cover {
  margin-bottom: 2.5rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 1.5rem;
  background: var(--color-surface-alt);
}

.post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.post-tags .chip {
  background: #FFFFFF;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.post-tags .chip:hover {
  border-color: var(--color-wood-500);
  color: var(--color-wood-700);
}

.post-nav {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-line);
}

@media (min-width: 640px) {
  .post-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .post-nav__item--next {
    text-align: right;
  }
  /* With only a newer neighbour the tile still belongs on the right. */
  .post-nav__item--next:only-child {
    grid-column: 2;
  }
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.25rem;
  background: #FFFFFF;
  border: 1px solid var(--color-wood-300);
  border-radius: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.post-nav__item:hover {
  transform: translateY(-2px);
  border-color: var(--color-wood-500);
  box-shadow: 0 14px 32px -22px rgba(80, 55, 30, 0.35);
}

.post-nav__label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-wood-700);
}

.post-nav__title {
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--color-text);
}
