/**
 * 404 and search — Bellco Feeders.
 *
 * The starter kit shipped both templates as light-theme markup with inline
 * styles and a white card shadow that is invisible on #080E18. This file
 * carries the same layout ideas rebuilt on the --bellco-* tokens, and reuses
 * the hero / chip / card / CTA rhythm already established by projects.css so
 * the two utility pages read as part of the same site.
 *
 * Loaded only on is_404() and is_search().
 */

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

.utilhero {
  background: var(--bellco-bg-alt);
  padding: 132px 0 56px;
}

.utilhero-crumbs {
  color: var(--bellco-dim);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.utilhero-crumbs a { color: var(--bellco-dim); text-decoration: none; }
.utilhero-crumbs a:hover,
.utilhero-crumbs a:focus-visible { color: var(--bellco-mint); }
.utilhero-crumbs span { margin: 0 8px; }

/* The query is echoed back verbatim and can be any length someone types. */
.utilhero-crumbs .utilhero-crumb-current {
  display: inline-block;
  margin: 0;
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.utilhero-title {
  color: var(--bellco-text);
  font-size: 56px;
  font-weight: 900;
  line-height: 1.08;
  margin: 0 0 20px;
  max-width: 20ch;
  text-transform: uppercase;
}

.utilhero-title .accent { color: var(--bellco-mint); }

/* The searched-for string is user input, not a design decision — leave it
   cased as typed and let it wrap rather than blowing out the line. */
.utilhero-title .query {
  color: var(--bellco-mint);
  overflow-wrap: anywhere;
  text-transform: none;
}

.utilhero-intro {
  color: var(--bellco-muted);
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
  max-width: 62ch;
}

.utilhero-count {
  color: var(--bellco-dim);
  font-size: 14px;
  letter-spacing: 0.08em;
  margin: 18px 0 0;
  text-transform: uppercase;
}

/* ---- search form --------------------------------------------------------- */

.utilsearch {
  display: flex;
  margin: 32px 0 0;
  max-width: 560px;
}

.utilsearch-field {
  background: var(--bellco-bg-card);
  border: 1px solid var(--bellco-hairline);
  border-radius: 2px 0 0 2px;
  border-right: 0;
  color: var(--bellco-text);
  flex: 1 1 auto;
  font-family: var(--font2);
  font-size: 16px;
  min-width: 0;
  padding: 14px 18px;
}

.utilsearch-field::placeholder { color: var(--bellco-dim); }

.utilsearch-field:focus {
  border-color: var(--bellco-mint);
  outline: 2px solid rgba(139, 217, 186, 0.35);
  outline-offset: -1px;
}

.utilsearch-submit {
  align-items: center;
  background: var(--bellco-mint);
  border: 1px solid var(--bellco-mint);
  border-radius: 0 2px 2px 0;
  color: var(--bellco-on-mint);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--font1);
  font-size: 15px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.12em;
  padding: 14px 24px;
  text-transform: uppercase;
}

.utilsearch-submit:hover { filter: brightness(1.1); }

/* ---- results / links body ------------------------------------------------ */

.utilbody {
  background: var(--bellco-bg);
  padding: 72px 0 104px;
}

.utilgrid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.utilcard {
  background: var(--bellco-bg-card);
  border: 1px solid var(--bellco-hairline);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.utilcard:hover,
.utilcard:focus-within {
  border-color: rgba(139, 217, 186, 0.45);
  transform: translateY(-4px);
}

.utilcard-link {
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.utilcard-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.utilcard-img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  width: 100%;
}

.utilcard:hover .utilcard-img { transform: scale(1.04); }

.utilcard-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 26px 26px 28px;
}

.utilcard-kind {
  color: var(--bellco-mint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.utilcard-title {
  color: var(--bellco-text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
}

.utilcard-excerpt {
  color: var(--bellco-muted);
  flex: 1 1 auto;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 20px;
}

.utilcard-more {
  align-items: center;
  color: var(--bellco-mint);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

/* ---- empty state --------------------------------------------------------- */

.utilempty {
  background: var(--bellco-bg-card);
  border: 1px solid var(--bellco-hairline);
  border-radius: 16px;
  /* The copy inside caps at 62ch; a full-container panel around it is mostly
     empty card. */
  max-width: 820px;
  padding: 44px 40px 48px;
}

.utilempty-title {
  color: var(--bellco-text);
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 14px;
}

.utilempty-body {
  color: var(--bellco-muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 8px;
  max-width: 62ch;
}

.utilempty-body a { color: var(--bellco-mint); }

/* The li is named as well as the ul: a bare `li` rule in style.css matches the
   children directly, and a matched element never inherits from its parent. */
.utilempty-list,
.utilempty-list li {
  color: var(--bellco-muted);
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 4px;
  padding-left: 20px;
}

/* ---- quick links --------------------------------------------------------- */

.utillinks + .utillinks,
.utilgrid + .utillinks,
.utilempty + .utillinks,
.utilpagination + .utillinks { margin-top: 44px; }

.utillinks-label {
  color: var(--bellco-dim);
  font-size: 12px;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.utilchips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.utilchip {
  background: rgba(242, 242, 240, 0.05);
  border: 1px solid var(--bellco-hairline);
  border-radius: 999px;
  color: var(--bellco-text);
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.utilchip:hover,
.utilchip:focus-visible {
  background: rgba(139, 217, 186, 0.14);
  border-color: var(--bellco-mint);
  color: var(--bellco-mint);
}

.utilactions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 36px 0 0;
}

/* ---- pagination ---------------------------------------------------------- */

.utilpagination {
  border-top: 1px solid var(--bellco-hairline);
  margin-top: 56px;
  padding-top: 32px;
}

.utilpagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.utilpagination .page-numbers {
  border: 1px solid var(--bellco-hairline);
  border-radius: 2px;
  color: var(--bellco-text);
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  min-width: 44px;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
}

.utilpagination a.page-numbers:hover,
.utilpagination a.page-numbers:focus-visible {
  border-color: var(--bellco-mint);
  color: var(--bellco-mint);
}

.utilpagination .page-numbers.current {
  background: var(--bellco-mint);
  border-color: var(--bellco-mint);
  color: var(--bellco-on-mint);
}

/* ---- closing CTA --------------------------------------------------------- */

.utilcta {
  background: var(--bellco-bg-card);
  border-top: 1px solid var(--bellco-hairline);
  padding: 80px 0;
  text-align: center;
}

.utilcta-title {
  color: var(--bellco-text);
  font-size: 34px;
  font-weight: 900;
  margin: 0 0 14px;
}

.utilcta-body {
  color: var(--bellco-muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 auto 30px;
  max-width: 56ch;
}

.utilcta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 0;
}

/* ---- breakpoints --------------------------------------------------------- */

@media (max-width: 1199px) {
  .utilhero { padding: 116px 0 44px; }
  .utilhero-title { font-size: 44px; }
  .utilgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 767px) {
  .utilhero { padding: 104px 0 36px; }
  .utilhero-title { font-size: 32px; }
  .utilhero-intro { font-size: 16px; }
  .utilsearch { flex-direction: column; max-width: none; }
  .utilsearch-field { border-radius: 2px; border-right: 1px solid var(--bellco-hairline); }
  .utilsearch-submit { border-radius: 2px; justify-content: center; margin-top: 10px; }
  .utilbody { padding: 48px 0 72px; }
  .utilgrid { grid-template-columns: 1fr; }
  .utilempty { padding: 32px 24px 36px; }
  .utilactions .btn { width: 100%; text-align: center; }
  .utilcta { padding: 56px 0; }
  .utilcta-title { font-size: 26px; }
  .utilcta-actions .btn { width: 100%; }
}


/* ---- long-form prose (privacy, terms, any plain page) -------------------- */

/*
 * A legal notice is the one place on this site with no blocks to give it a
 * container, so `page.php` supplies one. The measure is capped in `ch` rather
 * than px: these pages are a wall of text and a 1650px-wide line is unreadable
 * no matter how big the monitor is.
 */
.bellco-prose {
  color: var(--bellco-muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 78ch;
}

.bellco-prose > *:first-child { margin-top: 0; }
.bellco-prose > *:last-child { margin-bottom: 0; }

.bellco-prose p { margin: 0 0 20px; }

.bellco-prose h2 {
  color: var(--bellco-text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 48px 0 16px;
  text-transform: uppercase;
}

.bellco-prose h3 {
  color: var(--bellco-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin: 32px 0 12px;
}

.bellco-prose h4 {
  color: var(--bellco-text);
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 8px;
}

.bellco-prose strong { color: var(--bellco-text); font-weight: 700; }

.bellco-prose a {
  color: var(--bellco-mint);
  text-decoration: underline;
  text-underline-offset: 2px;
  /* A pasted legal notice is full of bare URLs and long mailto strings. */
  overflow-wrap: anywhere;
}

.bellco-prose a:hover,
.bellco-prose a:focus-visible { text-decoration: none; }

.bellco-prose ul,
.bellco-prose ol { margin: 0 0 20px; padding-left: 22px; }

.bellco-prose li { margin: 0 0 8px; }

.bellco-prose ul li::marker { color: var(--bellco-mint); }

.bellco-prose hr {
  border: 0;
  border-top: 1px solid var(--bellco-hairline);
  margin: 40px 0;
}

.bellco-prose table {
  border-collapse: collapse;
  display: block;
  margin: 0 0 24px;
  /* Never let a wide table push the page sideways -- it scrolls in itself. */
  overflow-x: auto;
  width: 100%;
}

.bellco-prose th,
.bellco-prose td {
  border: 1px solid var(--bellco-hairline);
  padding: 10px 14px;
  text-align: left;
}

.bellco-prose th { color: var(--bellco-text); font-weight: 700; }

.bellco-prose-updated {
  color: var(--bellco-dim);
  font-size: var(--bellco-micro);
  letter-spacing: 0.08em;
  margin: 0 0 40px;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .bellco-prose h2 { font-size: 21px; margin-top: 40px; }
  .bellco-prose h3 { font-size: 17px; }
}
