/* src/styles/site-header.css */
/*
 * Shared site header: one static, full-width row with the Floxar wordmark on the left
 * (omitted on the home page, whose hero shows it; the row lays out the same without it), four text links
 * and a single call-to-action on the right. Below 768px the links and the CTA
 * collapse behind a menu button into a vertical panel under the header
 * (toggled by /js/site-header.js). Loaded after tokens.css on every content page.
 *
 * Selectors are scoped under .site-header so the element-level rules each page
 * carries (a, a:hover, .container) never restyle the header.
 */

:root {
  --site-header-height: 64px;
  --site-header-logo-height: 22px;
  --site-header-link-size: 14px;
  --site-header-cta-height: 26px;
  --site-header-cta-font-size: 14px;
  --site-header-cta-padding-x: 8px;
  --site-header-toggle-size: 36px;
  --site-header-border-width: 1px;
  --site-header-focus-ring-width: 2px;
  /* Above the page's decorative layers, below the cookie banner. */
  --site-header-z: 100;
}

@media (max-width: 767px) {
  :root {
    --site-header-height: 56px;
    --site-header-logo-height: 20px;
  }
}

.site-header {
  position: relative;
  z-index: var(--site-header-z);
  flex-shrink: 0;
  /* Transparent: the row takes each page's own background instead of a band of its own. */
  background: transparent;
  font-family: var(--font-sans);
  line-height: var(--line-height-normal);
}

.site-header .site-header-inner {
  display: flex;
  align-items: center;
  /* Everything in the row is right-aligned, whether or not a page carries the wordmark or the control. */
  justify-content: flex-end;
  gap: var(--space-6);
  height: var(--site-header-height);
  /* Full-width row on every page, independent of each page's .container width. */
  max-width: none;
  margin: 0;
  padding-left: var(--space-10);
  padding-right: var(--space-10);
}

.site-header .site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-header .site-logo svg {
  display: block;
  height: var(--site-header-logo-height);
  width: auto;
}

/* Wordmark fills live here so the header never depends on the home hero's inline style. */
.site-header .site-logo .wm-text {
  fill: var(--text-primary);
}

.site-header .site-logo .wm-tilde {
  fill: var(--brand-primary);
}

.site-header .site-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-header .site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-header .site-nav a {
  color: var(--text-secondary);
  font-size: var(--site-header-link-size);
  font-weight: var(--font-weight-normal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-header .site-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.site-header .site-actions {
  display: flex;
  align-items: center;
}

.site-header .site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--site-header-cta-height);
  /* A 1px bottom pad nudges the text up: Inter's caps sit low in a centred box of this height. */
  padding: 0 var(--site-header-cta-padding-x) 1px;
  line-height: 1;
  border-radius: var(--radius-sm);
  /* Dark control, not brand blue: the row stays quiet and the tilde is the only colour. */
  background: var(--text-primary);
  color: var(--text-on-brand);
  font-size: var(--site-header-cta-font-size);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast);
}

.site-header .site-cta:hover {
  background: var(--text-secondary);
  color: var(--text-on-brand);
  text-decoration: none;
}

.site-header .site-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--site-header-toggle-size);
  height: var(--site-header-toggle-size);
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.site-header .site-menu-toggle svg {
  width: var(--space-6);
  height: var(--space-6);
}

.site-header a:focus-visible,
.site-header .site-menu-toggle:focus-visible {
  outline: var(--site-header-focus-ring-width) solid var(--brand-primary);
  outline-offset: var(--site-header-focus-ring-width);
  border-radius: var(--radius-sm);
}

/* Small screens: the links and the CTA move into a panel under the header. */
@media (max-width: 767px) {
  .site-header .site-header-inner {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .site-header .site-menu-toggle {
    display: inline-flex;
  }

  .site-header .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    margin: 0;
    padding: var(--space-4);
    background: var(--bg-primary);
    border-bottom: var(--site-header-border-width) solid var(--brand-alpha-10);
    box-shadow: var(--shadow-card);
  }

  .site-header .site-menu.is-open {
    display: flex;
  }

  .site-header .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-header .site-nav a {
    padding: var(--space-3) 0;
  }

  .site-header .site-cta {
    width: 100%;
  }
}
