/* Site header — the <style> block of tch-website-181/components/header.hbs,
   lines 434-507, carried over declaration-for-declaration and in its original
   order. The only omission is the file's two external font-loading lines for Bebas
   Neue and Roboto: layouts/base.jinja already links both families, so the
   faces are the same and the request is not made twice.

   This is a singleton component stylesheet. Nothing here is scoped or renamed,
   because in v1 these rules were global: the :root tokens, the .bg-tch-* /
   .text-tch-* / .hover\:* colour utilities and the .nav-link::after underline
   all applied document-wide from the moment the header rendered. */

  :root {
    --tch-primary: #F0BC5E;
    --tch-dark: #D4A142;
    --tch-light: #F5D084;
    --tch-accent: #2DD4BF;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Roboto', sans-serif;
  }
  
  #ai_header {
    font-family: var(--font-body);
  }

  #ai_header .site-logo {
    width: 115px;
    height: 64px;
    object-fit: contain;
  }
  
  /* Navigation links should use Bebas Neue */
  .nav-link,
  .mobile-menu-item a,
  .site-button {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  /* Dropdown menu items should use Roboto */
  .dropdown-menu a,
  .mobile-submenu a {
    font-family: var(--font-body);
    text-transform: none;
    letter-spacing: normal;
  }
  
  /* Define color classes for Tailwind compatibility */
  .bg-tch-primary { background-color: #F0BC5E !important; }
  .bg-tch-dark { background-color: #D4A142 !important; }
  .bg-tch-light { background-color: #F5D084 !important; }
  .bg-accent { background-color: #2DD4BF !important; }
  .text-tch-primary { color: #F0BC5E !important; }
  .text-tch-dark { color: #D4A142 !important; }
  .border-tch-primary { border-color: #F0BC5E !important; }
  .border-tch-dark { border-color: #D4A142 !important; }
  .hover\:bg-tch-primary:hover { background-color: #F0BC5E !important; }
  .hover\:bg-tch-dark:hover { background-color: #D4A142 !important; }
  .hover\:border-tch-dark:hover { border-color: #D4A142 !important; }
  .hover\:text-tch-primary:hover { color: #F0BC5E !important; }
  .hover\:text-white:hover { color: #ffffff !important; }
  .focus\:ring-tch-primary:focus { --tw-ring-color: #F0BC5E; }
  
  .group:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--tch-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
  }
  
  .nav-link:hover::after {
    width: 80%;
  }
  
  @media (max-width: 1023px) {
    .nav-link::after {
      display: none;
    }
  }

/* Runtime-native site search. This ships in the shared, head-loaded header
   layer so the dialog's first visible frame is already fully styled. */
body.search-modal-open {
  overflow: hidden;
}

.site-search-modal[hidden] {
  display: none;
}

.site-search-modal {
  position: fixed;
  inset: 0;
  z-index: 410;
  display: grid;
  place-items: start center;
  padding: clamp(5rem, 12vh, 8rem) 1rem 2rem;
  font-family: var(--font-body);
}

.site-search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(4px);
}

.site-search-modal__dialog {
  position: relative;
  width: min(100%, 640px);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid rgba(240, 188, 94, 0.45);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.28);
}

.site-search-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.site-search-modal__close:hover,
.site-search-modal__close:focus-visible {
  background: var(--tch-primary);
  color: #111827;
}

.site-search-modal__close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.site-search-modal__brand {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.site-search-modal__eyebrow {
  margin: 0 0 0.35rem;
  color: #a97820;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-search-modal__dialog h2 {
  margin: 0;
  color: #111827;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.site-search-modal__intro {
  margin: 0.75rem 0 1.5rem;
  color: #4b5563;
  line-height: 1.6;
}

.site-search-modal__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.site-search-modal__field {
  position: relative;
}

.site-search-modal__field svg {
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: #9ca3af;
  stroke-width: 2;
  stroke-linecap: round;
}

.site-search-modal__field input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #111827;
  font: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.site-search-modal__field input:focus {
  border-color: var(--tch-primary);
  box-shadow: 0 0 0 4px rgba(240, 188, 94, 0.22);
}

.site-search-modal__form > button {
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--tch-primary);
  border-radius: 9px;
  background: var(--tch-primary);
  color: #111827;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.site-search-modal__form > button:hover,
.site-search-modal__form > button:focus-visible {
  border-color: var(--tch-dark);
  background: var(--tch-dark);
}

@media (max-width: 560px) {
  .site-search-modal {
    padding-top: 4.75rem;
  }

  .site-search-modal__form {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   NOT FROM v1. assets/css/theme.css sets `.container { padding-inline: 1rem }`,
   which v1 had no equivalent of. Logical and physical padding longhands cascade
   together, so that declaration lands after Tailwind's `.px-6` and would shrink
   the header gutter from v1's 24px to 16px. This restores the px-6 value the v1
   markup asks for, and stays correct if the theme.css rule ever goes away.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   NOT FROM v1 either, and load-bearing. assets/css/theme.css raises Tailwind's
   `.hidden` to `display: none !important` so its member-state JavaScript can
   toggle it. The v1 header is built on the `hidden lg:flex` pattern — the
   desktop rail and the sign-in / subscribe / account row are both
   `class="hidden lg:flex ..."` — and an !important `.hidden` beats the
   `.lg\:flex` media rule at every width, which would erase the entire desktop
   nav. These two rules put the lg: display variants back for the header only,
   at the same 1024px breakpoint Tailwind uses, so the bar renders as v1 did.
   -------------------------------------------------------------------------- */
