/*
 * navbar.css
 * Styles for the shared visible navigation rendered by partials/navbar.ejs:
 * topbar, brand/logo, desktop nav, "Send a Free Crush" action, hamburger
 * button, and the mobile menu panel, plus their responsive rules.
 */

.topbar {
        position: absolute;
        z-index: 60;
        top: 0;
        left: 0;
        width: 100%;
        height: var(--menu-h);
        display: grid;
        grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
        align-items: center;
        padding: 0 var(--pad);
        border-bottom: 1px solid var(--line);
        /* The background is already 94% opaque, so the blur behind it was very
         close to invisible — but it still forced a backdrop group that has to
         sample the whole animating hero underneath. That is the most likely
         reason the "Send a Free Crush" pill inside this bar stops painting on
         iOS at the same moment the hero letters do. */
        background: rgba(255, 248, 242, 0.97);
        font-size: var(--menu-font-size);
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.11em;
        text-transform: uppercase;
        will-change: height;
        pointer-events: auto;
      }

.topbar__hamburger {
        display: none;
        width: 34px;
        height: 34px;
        padding: 7px 5px;
        border: 0;
        background: transparent;
        color: var(--ink);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
      }

.topbar__hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition:
          transform 0.25s ease,
          opacity 0.2s ease;
      }

.topbar__hamburger[aria-expanded="true"] span:first-child {
        transform: translateY(3.5px) rotate(45deg);
      }

.topbar__hamburger[aria-expanded="true"] span:last-child {
        transform: translateY(-3.5px) rotate(-45deg);
      }

.topbar__brand {
        justify-self: start;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: var(--brand-gap);
        color: inherit;
        text-decoration: none;
      }

.topbar__logo {
        width: var(--logo-size);
        height: var(--logo-size);
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        transition: filter 0.2s ease;
      }

.topbar__logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: drop-shadow(0 5px 8px rgba(22, 11, 29, 0.15));
      }

.topbar__brand-text {
        display: inline-block;
        max-width: var(--brand-width);
        opacity: var(--brand-opacity);
        overflow: hidden;
        white-space: nowrap;
        transform: translateX(var(--brand-shift));
      }

.topbar__nav {
        justify-self: center;
        display: flex;
        align-items: center;
        gap: clamp(13px, 2vw, 30px);
        white-space: nowrap;
      }

.topbar__nav a {
        position: relative;
        color: inherit;
        text-decoration: none;
      }

.topbar__nav a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -6px;
        height: 1px;
        background: var(--purple);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.25s ease;
      }

.topbar__nav a:hover::after,
      .topbar__nav a:focus-visible::after,
      .topbar__nav a[aria-current="page"]::after {
        transform: scaleX(1);
        transform-origin: left;
      }

.topbar__action {
        position: relative;
        justify-self: end;
        min-height: var(--action-min-height);
        padding: 0 var(--action-padding);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--action-gap);
        overflow: hidden;
        border-radius: 999px;
        background: rgba(242, 221, 33, var(--action-bg-alpha));
        color: var(--ink);
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        pointer-events: auto;
        z-index: 6;
        touch-action: manipulation;
      }

.topbar__action::before {
        content: "";
        width: var(--action-dot-size);
        height: var(--action-dot-size);
        flex: 0 0 auto;
        border-radius: 50%;
        background: var(--pink);
        opacity: var(--action-dot-opacity);
      }

.mobile-menu {
        display: none;
        position: absolute;
        z-index: 58;
        top: var(--menu-h);
        left: 0;
        right: 0;
        padding: 12px 16px 18px;
        background: rgba(255, 248, 242, 0.99);
        border-bottom: 1px solid var(--line);
        opacity: 0;
        transform: translateY(-12px);
        pointer-events: none;
        transition:
          opacity 0.25s ease,
          transform 0.25s ease;
      }

.mobile-menu.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }

.mobile-menu a {
        display: block;
        padding: 13px 4px;
        border-bottom: 1px solid rgba(22, 11, 29, 0.1);
        color: inherit;
        text-decoration: none;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0.1em;
        text-transform: uppercase;
      }

.mobile-menu a:last-child {
        border-bottom: 0;
      }

.topbar > * {
        will-change: transform, opacity, clip-path, filter;
      }

/*
     * Every hint above (and on .hero__letter) exists purely for the one-shot
     * entrance animation. Held past that point they pin a permanent composited
     * layer to each element; on iOS/WebKit some of those layers stop painting on
     * high-resolution devices and the element renders blank while keeping its
     * layout box — the "GOT _ CRUSH?" and missing purple panel symptom.
     * `.intro-done` is added by the intro's completion handler.
     */
.intro-done .topbar > * {
        will-change: auto;
      }

/* Prevent a fully assembled first frame before the entrance timeline starts. */
.intro-pending .topbar > * {
        opacity: 0;
      }

/* ---------- Responsive ---------- */
@media (max-width: 1180px),
        (orientation: portrait) and (max-width: 1366px) {
.topbar__action {
          position: absolute;
          top: 50%;
          right: clamp(12px, 2vw, 22px);
          transform: translateY(-50%);
          justify-self: auto;
        }
}

@media (max-width: 860px) {
.topbar {
          grid-template-columns: minmax(108px, 1fr) auto minmax(108px, 1fr);
          padding-inline: 14px;
          letter-spacing: 0.07em;
        }

.topbar__nav {
          gap: 10px;
          font-size: 8px;
        }

.topbar__action {
          font-size: 8px;
        }
}

@media (max-width: 640px) {
.topbar {
          grid-template-columns: 1fr auto 1fr;
          padding-inline: 12px;
        }

.topbar__hamburger {
          display: flex;
          justify-self: start;
        }

.topbar__brand {
          position: absolute;
          left: 50%;
          justify-self: auto;
          transform: translateX(-50%);
        }

.topbar__brand-text {
          display: none;
        }

.topbar__nav {
          display: none;
        }

.topbar__action {
          top: 50%;
          right: 12px;
          justify-self: auto;
          max-width: 122px;
          font-size: 7.5px;
          letter-spacing: 0.06em;
        }

.mobile-menu {
          display: block;
        }
}

@media (max-width: 390px) {
.topbar__action {
          right: 8px;
          max-width: 102px;
          font-size: 6.8px;
        }
}

/* ==============================================================
       v11 header and footer settings applied to the v61 experience
       ============================================================== */
.topbar {
        pointer-events: auto;
      }

@media (max-width: 1180px) {
.topbar__action {
          position: absolute;
          top: 50%;
          right: clamp(12px, 2vw, 22px);
          transform: translateY(-50%);
          justify-self: auto;
        }
}

@media (max-width: 860px) {
.topbar {
          grid-template-columns: minmax(108px, 1fr) auto minmax(108px, 1fr);
          padding-inline: 14px;
          letter-spacing: 0.07em;
        }

.topbar__nav {
          gap: 10px;
          font-size: 8px;
        }

.topbar__action {
          font-size: 8px;
        }
}

@media (max-width: 640px) {
.topbar {
          grid-template-columns: 1fr auto 1fr;
          padding-inline: 12px;
        }

.topbar__hamburger {
          display: flex;
          justify-self: start;
        }

.topbar__brand {
          position: absolute;
          left: 50%;
          justify-self: auto;
          transform: translateX(-50%);
        }

.topbar__brand-text {
          display: none;
        }

.topbar__nav {
          display: none;
        }

.topbar__action {
          top: 50%;
          right: 12px;
          justify-self: auto;
          max-width: 122px;
          font-size: 7.5px;
          letter-spacing: 0.06em;
        }

.mobile-menu {
          display: block;
        }
}

/* ==============================================================
       Shared mobile navigation — identical across all wadaCrush pages
       ============================================================== */
.mobile-menu {
        color: var(--ink);
        font-family: var(--body);
      }

.mobile-menu a {
        min-height: 46px;
        display: flex;
        align-items: center;
        padding: 0 4px;
        border-bottom: 1px solid rgba(22, 11, 29, 0.1);
        color: inherit;
        background: transparent;
        text-decoration: none;
        font-family: var(--body);
        font-size: 12px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        transition:
          color 0.2s ease,
          background 0.2s ease;
      }

.mobile-menu a:hover,
      .mobile-menu a:focus-visible,
      .mobile-menu a[aria-current="page"] {
        color: var(--purple);
        background: rgba(138, 35, 135, 0.055);
      }

.mobile-menu a:last-child {
        border-bottom: 0;
      }

@media (max-width: 640px) {
.topbar {
          grid-template-columns: 1fr auto 1fr;
          padding-inline: 12px;
        }

.topbar__hamburger {
          position: relative;
          z-index: 4;
          display: flex;
          justify-self: start;
        }

.topbar__brand {
          position: absolute;
          z-index: 3;
          left: 50%;
          justify-self: auto;
          transform: translateX(-50%);
        }

.topbar__brand-text,
        .topbar__nav {
          display: none;
        }

.topbar__action {
          position: absolute;
          z-index: 4;
          top: 50%;
          right: 12px;
          justify-self: auto;
          max-width: 122px;
          transform: translateY(-50%);
          font-size: 7.5px;
          letter-spacing: 0.06em;
        }

.mobile-menu {
          display: block;
          max-height: calc(100svh - var(--menu-h));
          overflow-y: auto;
          overscroll-behavior: contain;
          -webkit-overflow-scrolling: touch;
        }
}

@media (max-width: 360px) {
.topbar__action {
          max-width: 108px;
          padding-inline: 10px;
          font-size: 7px;
        }
}

/* ---------- Compact mobile-header hit target fix ----------
       Keep the hamburger above all sticky-story layers and preserve a full
       tap/click target even when --menu-h animates down to 48px. */
@media (max-width: 640px) {
.topbar__hamburger {
          position: relative;
          z-index: 100;
          flex: 0 0 38px;
          width: 38px;
          height: 38px;
          pointer-events: auto !important;
          touch-action: manipulation;
        }

.topbar {
          pointer-events: auto !important;
        }
}


/*
 * Shared ".site-nav-shell" navigation-shell system.
 * This wraps the topbar/ticker/mobile-menu for use on pages outside the
 * homepage's animated scroll-story (e.g. static content pages). It is kept
 * verbatim from the original header.ejs "wc-global-shell-v3" style block.
 * No page rendered via partials/header.ejs + partials/navbar.ejs currently
 * wraps its topbar in a ".site-nav-shell" element, so these rules are inert
 * today; they are preserved unchanged (not deleted) to avoid altering any
 * future page that already expects them.
 */
.topbar {
        position: absolute;
        z-index: 60;
        top: 0;
        left: 0;
        width: 100%;
        height: var(--menu-h);
        display: grid;
        grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
        align-items: center;
        padding: 0 var(--pad);
        border-bottom: 1px solid var(--line);
        background: rgba(255, 248, 242, 0.97);
        font-size: var(--menu-font-size);
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.11em;
        text-transform: uppercase;
        will-change: height;
        pointer-events: auto;
      }

.topbar__hamburger {
        display: none;
        width: 34px;
        height: 34px;
        padding: 7px 5px;
        border: 0;
        color: var(--ink);
        background: transparent;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
      }

.topbar__hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition:
          transform 0.25s ease,
          opacity 0.2s ease;
      }

.topbar__hamburger[aria-expanded="true"] span:first-child {
        transform: translateY(3.5px) rotate(45deg);
      }

.topbar__hamburger[aria-expanded="true"] span:last-child {
        transform: translateY(-3.5px) rotate(-45deg);
      }

.topbar__brand {
        justify-self: start;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: var(--brand-gap);
        color: inherit;
        text-decoration: none;
      }

.topbar__logo {
        width: var(--logo-size);
        height: var(--logo-size);
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        transition: filter 0.2s ease;
      }

.topbar__logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: drop-shadow(0 5px 8px rgba(22, 11, 29, 0.15));
      }

.topbar__brand-text {
        display: inline-flex;
        align-items: baseline;
        max-width: var(--brand-width);
        opacity: var(--brand-opacity);
        overflow: hidden;
        white-space: nowrap;
        transform: translateX(var(--brand-shift));
        font-family: "Nunito Sans", system-ui, sans-serif;
        font-size: clamp(15px, 1.18vw, 20px);
        line-height: 1;
        letter-spacing: -0.025em;
        text-transform: none !important;
      }

.topbar__brand-wada {
        font-weight: 600;
        color: #20242c;
      }

.topbar__brand-crush {
        font-weight: 900;
        color: #8a2387;
      }

.topbar__nav {
        justify-self: center;
        display: flex;
        align-items: center;
        gap: clamp(13px, 2vw, 30px);
        white-space: nowrap;
      }

.topbar__nav a {
        position: relative;
        color: inherit;
        text-decoration: none;
      }

.topbar__nav a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -6px;
        height: 1px;
        background: var(--purple);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.25s ease;
      }

.topbar__nav a:hover::after,
      .topbar__nav a:focus-visible::after,
      .topbar__nav a[aria-current="page"]::after {
        transform: scaleX(1);
        transform-origin: left;
      }

.topbar__action {
        position: relative;
        z-index: 6;
        justify-self: end;
        min-height: var(--action-min-height);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--action-gap);
        padding: 0 var(--action-padding);
        overflow: hidden;
        border-radius: 999px;
        color: var(--ink);
        background: rgba(242, 221, 33, var(--action-bg-alpha));
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        pointer-events: auto;
        touch-action: manipulation;
      }

.topbar__action::before {
        content: "";
        width: var(--action-dot-size);
        height: var(--action-dot-size);
        flex: 0 0 auto;
        border-radius: 50%;
        background: var(--pink);
        opacity: var(--action-dot-opacity);
      }

.mobile-menu {
        display: none;
        position: absolute;
        z-index: 58;
        top: var(--menu-h);
        left: 0;
        right: 0;
        padding: 12px 16px 18px;
        border-bottom: 1px solid var(--line);
        background: rgba(255, 248, 242, 0.99);
        opacity: 0;
        transform: translateY(-12px);
        pointer-events: none;
        transition:
          opacity 0.25s ease,
          transform 0.25s ease;
        color: var(--ink);
        font-family: var(--body);
      }

.mobile-menu.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }

.mobile-menu a {
        min-height: 46px;
        display: flex;
        align-items: center;
        padding: 0 4px;
        border-bottom: 1px solid rgba(22, 11, 29, 0.1);
        color: inherit;
        background: transparent;
        text-decoration: none;
        font-family: var(--body);
        font-size: 12px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        transition:
          color 0.2s ease,
          background 0.2s ease;
      }

.mobile-menu a:hover,
      .mobile-menu a:focus-visible,
      .mobile-menu a[aria-current="page"] {
        color: var(--purple);
        background: rgba(138, 35, 135, 0.055);
      }

.mobile-menu a:last-child {
        border-bottom: 0;
      }

html.intro-pending .site-nav-shell .topbar > * {
        opacity: 1;
      }

@media (max-width: 1180px) {
.topbar__action {
          position: absolute;
          top: 50%;
          right: clamp(12px, 2vw, 22px);
          transform: translateY(-50%);
          justify-self: auto;
        }
}

@media (max-width: 860px) {
.topbar {
          grid-template-columns: minmax(108px, 1fr) auto minmax(108px, 1fr);
          padding-inline: 14px;
          letter-spacing: 0.07em;
        }

.topbar__nav {
          gap: 10px;
          font-size: 8px;
        }

.topbar__action {
          font-size: 8px;
        }
}

@media (max-width: 640px) {
.topbar {
          grid-template-columns: 1fr auto 1fr;
          padding-inline: 12px;
        }

.topbar__hamburger {
          position: relative;
          z-index: 4;
          display: flex;
          justify-self: start;
        }

.topbar__brand {
          position: absolute;
          z-index: 3;
          left: 50%;
          justify-self: auto;
          transform: translateX(-50%);
        }

.topbar__brand-text {
          display: none;
        }

.topbar__nav {
          display: none;
        }

.topbar__action {
          top: 50%;
          right: 12px;
          justify-self: auto;
          max-width: 122px;
          font-size: 7.5px;
          letter-spacing: 0.06em;
        }

.mobile-menu {
          display: block;
        }
}

/* wadaCrush global navigation + footer consistency layer */
.site-nav-shell {
        position: fixed;
        z-index: 100;
        top: 0;
        left: 0;
        right: 0;
        height: calc(var(--menu-h) + var(--ticker-h));
        pointer-events: none;
      }

.ticker {
        position: absolute;
        z-index: 35;
        top: var(--menu-h);
        left: 0;
        width: 100%;
        height: var(--ticker-h);
        overflow: hidden;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        display: flex;
        align-items: center;
        color: var(--ink);
        background: var(--cream);
        font-family: var(--body);
        font-size: 8px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        white-space: nowrap;
        pointer-events: auto;
      }

.ticker__track {
        display: flex;
        width: max-content;
        min-width: 200%;
        animation: ticker 30s linear infinite;
        will-change: transform;
      }

@keyframes ticker {
        to {
          transform: translateX(-50%);
        }
      }

.ticker__group {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        min-width: max-content;
      }

.ticker span {
        flex: 0 0 auto;
        padding-right: 36px;
      }

.ticker span::before {
        content: "♥";
        padding-right: 12px;
        color: var(--pink);
      }

html.intro-pending .site-nav-shell .ticker {
        opacity: 1;
      }

@media (max-width: 640px) {
.ticker {
          display: none;
        }
}

@media (prefers-reduced-motion: reduce) {
.ticker__track {
          animation: none;
        }
}

/*
 * Locks background scroll while the mobile menu is open (set by navbar.js).
 * This was previously misfiled into home.css even though it's driven by
 * shared navbar behavior and needed on every page with a mobile menu.
 */
@media (max-width: 640px) {
  body.mobile-nav-open {
    overflow: hidden;
  }
}

