/* Hallmark · shape: Open Executive, the mobile menu: links with dashes above a navy contact card. */
/* Mobile header and menu (same breakpoint as style.css: 70rem). Desktop is untouched. */

.nav-extra { display: none; }

@media (max-width: 70rem) {
  /* Compact bar */
  .js .bar { grid-template-columns: minmax(0, 1fr) auto; min-height: 64px; gap: var(--space-md); }
  .js .bar__cta { display: none; }
  .js .brand img { height: 40px; }

  .js .nav-toggle { position: relative; width: 48px; height: 48px; margin-right: calc(-1 * var(--space-xs)); background: transparent; transition: background-color var(--dur-short) var(--ease-out); }
  .js .nav-toggle:hover, .js .nav-toggle[aria-expanded="true"] { background: var(--color-paper-2); }
  .js .nav-toggle path { transition: transform var(--dur-short) var(--ease-out); }

  /* Panel: full height under the bar, a flex column. The links sit on top, the contact card is pushed
     to the bottom; on a short screen the card follows the links and the panel scrolls. */
  html.js .nav {
    display: flex; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    padding: var(--space-xs) var(--gutter) var(--space-lg);
    overflow-y: auto; overscroll-behavior: contain;
    border-top: var(--rule-hair) solid var(--color-rule); box-shadow: none;
    background: var(--color-paper);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 150ms var(--ease-out), visibility 0s linear 150ms;
  }
  html.js .nav.is-open {
    display: flex; opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 200ms var(--ease-out), visibility 0s;
  }
  .js .nav__links { flex: none; margin-bottom: var(--space-lg); }

  /* Links: a dash before each one */
  .js .nav__links a { gap: var(--space-md); min-height: 60px; width: 100%; font-size: var(--text-xl); font-weight: 700; border-bottom: var(--rule-hair) solid var(--color-rule); border-radius: 0; }
  .js .nav__links a::after { display: none; }
  .js .nav__links li:last-child a { border-bottom: 0; }
  .js .nav__links a::before {
    content: ""; flex: none; width: 14px; height: 2px; background: var(--color-accent-text);
    transform-origin: left center; transition: transform var(--dur-short) var(--ease-out);
  }
  .js .nav__label { display: block; transition: transform var(--dur-short) var(--ease-out); }
  .js .nav__links a:hover::before, .js .nav__links a:focus-visible::before, .js .nav__links a[aria-current="true"]::before { transform: scaleX(2); }
  .js .nav__links a:hover .nav__label, .js .nav__links a:focus-visible .nav__label { transform: translateX(4px); }
  .js .nav__links a[aria-current="true"] { color: var(--color-accent-text); }
  .js .nav__links a[aria-current="true"] .nav__label { transform: translateX(16px); }

  /* Contact card */
  .js .nav-extra {
    display: block; flex: none; margin-top: auto; padding: var(--space-lg);
    background: var(--color-ink); color: var(--color-accent-ink); border-radius: var(--radius);
  }
  .nav-extra__name { margin: 0; font-size: var(--text-lg); font-weight: 700; line-height: 1.25; }
  .nav-extra__role { margin: var(--space-2xs) 0 var(--space-md); font-size: var(--text-sm); line-height: 1.4; opacity: 0.75; }
  .nav-extra__contact { margin: 0 0 var(--space-md); padding: 0; list-style: none; border-top: var(--rule-hair) solid var(--color-ink-rule); }
  .nav-extra__contact li + li { border-top: var(--rule-hair) solid var(--color-ink-rule); }
  .nav-extra__contact a { display: flex; align-items: center; gap: var(--space-sm); min-height: 48px; color: var(--color-accent-ink); font-size: var(--text-md); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
  .nav-extra__contact svg { flex: none; fill: none; stroke: var(--color-sun); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  .nav-extra__contact a:hover span { text-decoration: underline; }
  .nav-extra .btn { width: 100%; min-height: 56px; }
  .nav-extra__contact a:active { opacity: 0.75; }
  .nav-extra a:focus-visible { outline: 3px solid var(--color-sun); outline-offset: 2px; }

  /* Opening: panel fades in, links slide in one by one, each dash grows after its link, the card rises last.
     Only opacity and transform. Closing has no animation: the panel just fades out quickly. */
  .js .nav.is-open .nav__links li { animation: nav-in 450ms var(--ease-out) backwards; animation-delay: calc(120ms + var(--i, 0) * 70ms); }
  .js .nav.is-open .nav__links a::before { animation: nav-dash 400ms var(--ease-out) backwards; animation-delay: calc(220ms + var(--i, 0) * 70ms); }
  .js .nav.is-open .nav-extra { animation: nav-rise 500ms var(--ease-out) backwards; animation-delay: 470ms; }
  .js .nav__links li:nth-child(1) { --i: 0; }
  .js .nav__links li:nth-child(2) { --i: 1; }
  .js .nav__links li:nth-child(3) { --i: 2; }
  .js .nav__links li:nth-child(4) { --i: 3; }
  .js .nav__links li:nth-child(5) { --i: 4; }

  @media (max-width: 24rem) {
    .js .nav__links a { font-size: var(--text-lg); }
    .nav-extra__contact a { font-size: var(--text-sm); }
    .js .nav-extra { padding: var(--space-md) var(--space-md) var(--space-lg); }
  }

  html.nav-locked { overflow: clip; }
}

@keyframes nav-in { from { opacity: 0; transform: translateX(-16px); } }
@keyframes nav-dash { from { transform: scaleX(0); } }
@keyframes nav-rise { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: reduce) {
  html.js .nav, html.js .nav.is-open, .js .nav-toggle, .js .nav-toggle path,
  .js .nav__links a::before, .js .nav__label { transition: none; }
  html.js .nav:not(.is-open) { display: none; }
  .js .nav.is-open .nav__links li, .js .nav.is-open .nav__links a::before, .js .nav.is-open .nav-extra { animation: none; }
}
