/* 02-header.css: fixed header, capsule pill, mobile menu. */
/* Fixed Header (Codapress Morphing Capsule Style) */
    .header {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% - 2 * var(--gutter));
      z-index: 100;
      padding-block: 0;
      padding-inline: 0;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 0;
      box-sizing: border-box;
      transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  border-radius 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .header__inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      box-sizing: border-box;
    }

    .logo {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      font-weight: 700;
      font-size: var(--text-md);
      text-transform: lowercase;
      letter-spacing: -0.03em;
      white-space: nowrap;
    }

    .logo__icon {
      width: 26px;
      height: 26px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      transition: color 0.25s;
    }

    .logo__icon svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .header__nav {
      display: flex;
      align-items: center;
      gap: clamp(24px, 2.5vw, 48px);
    }

    .nav-link {
      font-family: var(--font-nav);
      font-size: 13px;
      font-weight: 600;
      color: #ffffff;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      padding: 7px 14px 8px;
      border: 1px solid transparent;
      border-radius: 9999px;
      transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    }

    .nav-link:hover, .nav-link:focus-visible {
      background: rgba(255, 255, 255, 0.14);
      border-color: rgba(255, 255, 255, 0.28);
      outline: none;
    }

    /* Morphing Floating Capsule Pill on Scroll (Matches Image 3) */
    .header.is-capsule {
      top: 14px;
      width: max-content;
      max-width: calc(100vw - 40px);
      border-radius: 9999px;
      background: rgba(255, 255, 255, 0.42);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(255, 255, 255, 0.5);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
      padding-block: 8px;
      padding-inline: 22px;
      color: #111111;
    }

    .header.is-capsule .header__inner {
      gap: 22px;
      justify-content: center;
    }

    .header.is-capsule .logo {
      color: #111111;
    }

    .header.is-capsule .logo__icon {
      color: #111111;
    }

    .header.is-capsule .logo__text {
      display: none;
    }

    .header.is-capsule .header__nav {
      gap: 22px;
    }

    .header.is-capsule .nav-link {
      color: #111111;
      font-size: 12px;
    }

    .header.is-capsule .nav-link:hover,
    .header.is-capsule .nav-link:focus-visible {
      background: rgba(0, 0, 0, 0.08);
      border-color: rgba(0, 0, 0, 0.18);
    }

    .header.is-capsule .header__menu {
      color: #111111;
    }

    .header.is-capsule .header__menu-bar {
      background: #111111;
    }

    /* Mobile Header Menu */
    .header__menu {
      display: none;
      background: none;
      border: none;
      color: var(--color-text);
      cursor: pointer;
      width: 32px;
      height: 32px;
      padding: 0;
      align-items: center;
      justify-content: center;
    }

    .header__menu-icon {
      position: relative;
      display: block;
      width: 22px;
      height: 16px;
    }

    .header__menu-bar {
      position: absolute;
      left: 0;
      top: 50%;
      width: 100%;
      height: 2px;
      margin-top: -1px;
      background: #ffffff;
      transform-origin: center center;
      transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .header__menu-bar:nth-child(1) { transform: translate3d(0, -6px, 0); }
    .header__menu-bar:nth-child(2) { transform: translateZ(0); }
    .header__menu-bar:nth-child(3) { transform: translate3d(0, 6px, 0); }

    .header.is-menu-open .header__menu-bar:nth-child(1) { transform: rotate(45deg); }
    .header.is-menu-open .header__menu-bar:nth-child(2) { opacity: 0; }
    .header.is-menu-open .header__menu-bar:nth-child(3) { transform: rotate(-45deg); }

    .mobile-menu {
      position: fixed;
      inset: 0;
      z-index: 99;
      background: #000000;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease;
    }

    .mobile-menu.is-active {
      opacity: 1;
      pointer-events: auto;
    }

    .mobile-menu__nav {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 28px;
    }

    .mobile-menu__link {
      font-family: var(--font-mono);
      font-size: clamp(22px, 5.5vw, 36px);
      color: #ffffff;
      text-transform: uppercase;
      letter-spacing: -0.02em;
      transition: color 0.2s;
    }

    .mobile-menu__link:hover {
      color: var(--cursor-hover-color);
    }

    @media (max-width: 768px) {
      .header__nav { display: none; }
      .header__menu { display: flex; }
      .logo { font-size: 15px; }
      .home-hero__line--1, .home-hero__line--2, .home-hero__line--3 {
        text-align: left;
        line-height: 0.95;
      }
    }
