/* Site header (partials/site-nav.hbs): About, Learn (two-column menu), Work with me, Subscribe.
   Builds on the old .head rules in styles.css (light band on desktop, fixed bar on phones). */

:root {
  --ws-blue: #356EE9;
  --ws-blue-dk: #2a5bc7;
  --ws-gold: #F4C54A;
  --ws-gold-tint: #fdf0c9;
  --ws-rust: #E07A4F;
  --ws-rust-tint: #fbe1d4;
  --ws-ink: #111;
  --ws-text: #333;
  --ws-muted: #666;
  --ws-rule: #E3E3E3;
  --ws-soft: #F8FAFC;
  --ws-hero: #EDF2FD;
  --ws-shadow: rgba(17, 24, 39, .14);
}

.ws-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ws-ico { width: 36px; height: 36px; flex: none; display: block; overflow: visible; }

.ws-nav { position: relative; display: flex; align-items: center; gap: 0 28px; }
.ws-logo { flex: none; }
.ws-logo a { display: block; }
.ws-menu { margin-left: auto; }
.ws-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 30px; }
.ws-head .ws-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 2px;
  font: 500 13px/1 'Inter', sans-serif; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ws-text); text-decoration: none; border-bottom: 2px solid transparent;
}
.ws-head .ws-link:hover, .ws-learn:hover > .ws-link { color: var(--ws-blue); }
.ws-head .ws-link[aria-current="page"], .ws-learn.is-current > .ws-link { color: var(--ws-blue); border-bottom-color: var(--ws-blue); }
.ws-chev { transition: transform .2s; }

.ws-head .ws-sub {
  flex: none; background: var(--ws-blue); color: #fff; text-decoration: none; border-radius: 999px;
  font: 700 13px/1 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 12px 20px;
}
.ws-head .ws-sub:hover { background: var(--ws-blue-dk); color: #fff; }
.ws-head .ws-sub--account { background: transparent; color: var(--ws-blue); box-shadow: inset 0 0 0 1.5px var(--ws-blue); }
.ws-head .ws-sub--account:hover { background: var(--ws-hero); color: var(--ws-blue); }

.ws-burger { display: none; }

/* The Learn menu */
.ws-drop { display: none; letter-spacing: -0.01em; }
.ws-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ws-col-h {
  font: 700 15px/1.2 'Inter', sans-serif; color: var(--ws-ink); margin: 0 0 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--ws-rule);
}
.ws-col li a {
  display: flex; align-items: center; gap: 14px; padding: 7px 10px; margin: 0 -10px; border-radius: 10px;
  font: 500 16.5px/1.25 'Inter', sans-serif; color: var(--ws-ink); text-decoration: none;
}
.ws-col li a:hover, .ws-col li a:focus-visible { background: var(--ws-soft); color: var(--ws-blue); }
.ws-col li a[aria-current="page"] { color: var(--ws-blue); }
.ws-head .ws-all { display: inline-block; margin-top: 12px; font: 600 14px/1.3 'Inter', sans-serif; color: var(--ws-blue); text-decoration: none; }
.ws-head .ws-all:hover { text-decoration: underline; }

@media (min-width: 891px) {
  .head.ws-head { position: relative; z-index: 50; }
  .ws-drop {
    position: absolute; top: calc(100% - 22px); right: 1rem; width: 620px; max-width: calc(100vw - 2rem);
    background: #fff; border-radius: 16px; padding: 30px 34px 24px; z-index: 60;
    box-shadow: 0 1px 2px var(--ws-shadow), 0 24px 60px var(--ws-shadow);
    grid-template-columns: 1fr 1fr; gap: 36px;
  }
  /* Bridges the gap between "Learn" and the menu, so the menu stays open on the way down */
  .ws-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -26px; height: 26px; }
  .ws-drop::after {
    content: ""; position: absolute; top: -7px; left: var(--ws-caret, 50%); width: 16px; height: 16px; margin-left: -8px;
    background: #fff; transform: rotate(45deg); border-radius: 3px 0 0 0;
  }
  .ws-learn:hover .ws-drop, .ws-learn:focus-within .ws-drop, .ws-learn.is-open .ws-drop { display: grid; }
  .ws-learn.is-closed .ws-drop { display: none; }
  .ws-learn:hover .ws-chev, .ws-learn:focus-within .ws-chev, .ws-learn.is-open .ws-chev { transform: rotate(180deg); }
  .ws-learn.is-closed .ws-chev { transform: none; }
}

@media (max-width: 890px) {
  .head.ws-head { z-index: 50; padding: 0.5rem 1rem; }
  .ws-nav { gap: 0 10px; min-height: 44px; }
  .ws-logo .logo { max-height: 38px; max-width: 140px; }
  .ws-head .ws-sub { margin-left: auto; font-size: 11px; padding: 9px 14px; }
  .ws-burger {
    display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px;
    background: var(--ws-soft); color: var(--ws-ink); cursor: pointer; padding: 0;
  }
  .ws-burger-close { display: none; }
  .ws-head.menu-open .ws-burger-open { display: none; }
  .ws-head.menu-open .ws-burger-close { display: block; }

  .ws-menu {
    display: none; position: fixed; left: 0; right: 0; top: 61px; bottom: 0; margin: 0;
    background: var(--page-bg, #fff); overflow-y: auto; padding: 4px 20px 40px; border-top: 1px solid var(--ws-rule);
  }
  .ws-head.menu-open .ws-menu { display: block; }
  .ws-links { flex-direction: column; align-items: stretch; gap: 0; }
  .ws-links > li { border-bottom: 1px solid var(--ws-rule); }
  .ws-head .ws-link { display: flex; padding: 17px 0; font-size: 15px; font-weight: 600; color: var(--ws-ink); border-bottom: 0; }
  .ws-head .ws-link[aria-current="page"], .ws-learn.is-current > .ws-link { border-bottom: 0; }
  .ws-chev { display: none; }
  .ws-drop { display: grid; gap: 14px; padding: 0 0 16px; }
  .ws-col-h { font: 700 11px/1 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--ws-muted); border: 0; padding: 0; margin: 4px 0 4px; }
  .ws-col li a { font-size: 15.5px; padding: 7px 10px; }
  .ws-col .ws-ico { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) { .ws-chev { transition: none; } }
