/* =========================================================
   EDITORIAL HEADER (The Masthead)
   File: /css/components/header.css
   Style: Minimalist, Sharp, High-Contrast
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;

  background: var(--surface-page);
  border-bottom: 1px solid var(--ink-92);
  box-shadow: none;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

/* ---------------------------------------------------------
   INNER LAYOUT — Aligned to Editorial Grid
--------------------------------------------------------- */

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--space-md);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Brand — The Masthead Logo */
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-92);
  text-decoration: none;
  display: flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   NAVIGATION — High-Spaced & Silent
--------------------------------------------------------- */

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-35);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink-92);
}

/* The "Silent" Underline */
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent-gold, #c5a059);

  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------------------------------------------------------
   CART BUTTON (Precision Architectural)
--------------------------------------------------------- */

.header-cart {
  padding: 0.6rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border-soft);

  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-92) !important;

  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.header-cart:hover {
  background: var(--ink-92);
  color: #fff !important;
  border-color: var(--ink-92);
}

/* Hamburger stays hidden on desktop */
.hamburger {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
}

/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 900px) {
  .site-header {
    height: 70px;
    display: flex;
    align-items: center;
  }

  .header-inner {
    width: 100%;
    padding: 0 1.5rem;
    gap: 1rem;
  }

  .site-logo {
    font-size: 1.05rem;
    max-width: calc(100% - 88px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-nav {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
  }

  .hamburger span {
    width: 22px;
    height: 1px;
    background: var(--ink-92);
    transition: transform 0.3s var(--ease);
  }

  body.nav-active {
    overflow: hidden;
  }
}

/* ---------------------------------------------------------
   PAGE CLEARANCE
--------------------------------------------------------- */

.page-home main,
.page-articles main,
.page-article main,
.page-articles-list main,
.page-policies main,
.page-policy main,
.page-product main {
  margin-top: var(--header-h, 70px);
}