/* サイトヘッダー(日東物流トレース: ロゴ左置き+白角丸バー+アクセントボタン) */
/* 本文へスキップ(キーボード利用時のみ現れる) */
.aplaza-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transform: translateY(-250%);
}
.aplaza-skip:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* ══ [1] ヘッダー(日東物流トレース: ロゴ左置き+白角丸バー+アクセントボタン) ══ */
  .aplaza-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(16px, 2.5vw, 36px);
    pointer-events: none;               /* 隙間は下のコンテンツを触れるように */
  }
  .aplaza-header > * { pointer-events: auto; }

  .aplaza-header__logo {
    opacity: 0;
    animation: drop 1s var(--ease) 0.15s forwards;
  }
  .aplaza-header__logo img { height: clamp(30px, 3.2vw, 42px); width: auto; }

  .aplaza-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: drop 1s var(--ease) 0.3s forwards;
  }
  .aplaza-header__nav {
    display: flex;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    box-shadow: 0 8px 28px -14px rgba(80, 79, 80, 0.35);
  }
  .aplaza-header__nav a {
    font-size: 0.83rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  }
  .aplaza-header__nav a:hover,
  .aplaza-header__nav a:focus-visible {
    background: color-mix(in srgb, var(--accent) 9%, white);
    color: var(--accent-deep);
  }
  .aplaza-header__nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

  .aplaza-header__cta {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 0.5em;
    background: var(--accent);
    color: #fff;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: var(--radius-md);
    padding: 12px 22px;
    box-shadow: 0 10px 28px -12px rgba(230, 48, 81, 0.55);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s var(--ease);
  }
  .aplaza-header__cta::after { content: "↗"; font-size: 0.9em; }
  .aplaza-header__cta:hover, .aplaza-header__cta:focus-visible {
    background: var(--accent-deep);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -12px rgba(230, 48, 81, 0.65);
  }
  .aplaza-header__cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@keyframes appear {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
@keyframes drop {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  /* ハンバーガーボタン(スマホ幅のみ)。2本線が開くと×になる */
  .aplaza-header__menu-button {
    display: none;
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 28px -14px rgba(80, 79, 80, 0.35);
    cursor: pointer;
  }
  .aplaza-header__menu-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .aplaza-header__menu-icon,
  .aplaza-header__menu-icon::before,
  .aplaza-header__menu-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform 0.35s var(--ease);
  }
  .aplaza-header__menu-icon { position: relative; background: transparent; }
  .aplaza-header__menu-icon::before, .aplaza-header__menu-icon::after { content: ""; position: absolute; left: 0; top: 0; }
  .aplaza-header__menu-icon::before { transform: translateY(-4px); }
  .aplaza-header__menu-icon::after { transform: translateY(4px); }
  [aria-expanded="true"] > .aplaza-header__menu-icon::before { transform: rotate(45deg); }
  [aria-expanded="true"] > .aplaza-header__menu-icon::after { transform: rotate(-45deg); }

  @media (max-width: 900px) {
    .aplaza-header__logo { position: relative; z-index: 3; }   /* 開いたパネルの上にロゴを残す */
    /* transform を残す登場アニメーションだと fixed のパネルがこの要素基準になるため、スマホ幅は opacity のみ */
    .aplaza-header__right { position: relative; z-index: 2; animation-name: appear; }
    .aplaza-header__cta { position: relative; z-index: 2; font-size: 0.76rem; padding: 10px 14px; }   /* スマホ幅は一回り小さく */
    .aplaza-header__menu-button { display: inline-flex; }

    /* ナビはスマホ幅では全面パネルになる(マークアップはデスクトップと共通) */
    .aplaza-header__nav {
      position: fixed;
      inset: 0;
      z-index: 1;
      flex-direction: column;
      align-items: stretch;
      justify-content: center;
      gap: 4px;
      padding: 120px clamp(24px, 8vw, 48px) 48px;
      border-radius: 0;
      box-shadow: none;
      background: var(--ground);
      visibility: hidden;
      opacity: 0;
      transform: translateY(-12px);
      transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s;
    }
    .aplaza-header[data-menu="open"] .aplaza-header__nav {
      visibility: visible;
      opacity: 1;
      transform: translateY(0);
      transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0s;
    }
    .aplaza-header__nav a {
      font-family: "Zen Maru Gothic", var(--font-body);
      font-weight: 700;
      font-size: clamp(1.5rem, 6.5vw, 2rem);
      letter-spacing: 0.06em;
      padding: 0.55em 0.4em;
      border-bottom: 1px solid var(--line);
      border-radius: 0;
    }
    .aplaza-header__nav a:last-child { border-bottom: 0; }
    /* パネルが開いている間は背景のスクロールを止める */
    html:has(.aplaza-header[data-menu="open"]) { overflow: hidden; }
  }
