/* V3 rapid round (Nov 8): top bar variant "A · Navy, Nov 8", the new default of group r2cbar.
   Matt picked the navy strip. The nav row (every top-level link) now lives inside it, and Order gets its own zone
   at the right end. It is the default, so it also applies before variants.js sets html[data-v-r2cbar]
   (no flash of the old cream nav). Older variants (a navy strip Nov 1, b cream pills, c photo tiles) are untouched. */

.r2n-order-zone { display: none; }

:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) {
  --r2n-bg: #16203d; --r2n-ink: #fdf8f0; --r2n-gold: #e5be5e; --r2n-line: rgba(255, 255, 255, .1);
}

/* the nav row: navy, in the page flow, sticks to the top, inset like the strip under it */
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav.nav {
  position: sticky !important; top: 0 !important; left: auto; right: auto;
  align-self: stretch; width: 100%; box-sizing: border-box; min-height: 64px;
  padding: 10px clamp(12px, 2.4vw, 32px); gap: 12px;
  background: var(--r2n-bg); color: var(--r2n-ink);
  border-radius: 20px 20px 0 0;
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  transition: border-radius .3s ease, box-shadow .3s ease;
}
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav.nav.scrolled {
  border-radius: 0 0 20px 20px;
  box-shadow: 0 14px 30px -14px rgba(10, 14, 32, .55);
}
/* the strip continues the same navy block, with a hairline between the two rows */
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) .r2c-bar {
  margin-top: -8px; /* body is a flex column with an 8px row gap; the two rows touch */
  border-radius: 0 0 20px 20px;
  box-shadow: inset 0 1px 0 var(--r2n-line);
}

:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav .nav-brand { opacity: 1; pointer-events: auto; width: 42px; height: 42px; flex: 0 0 42px; }
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav .nav-brand-logo { box-shadow: 0 0 0 2px rgba(229, 190, 94, .35), 0 6px 16px rgba(0, 0, 0, .3); }

/* links */
@media (min-width: 901px) {
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks {
    flex: 1; min-width: 0; max-width: none; justify-content: flex-end; gap: clamp(0px, .5vw, 8px);
  }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks .nav-close { display: none; }
}
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta) {
  color: rgba(253, 248, 240, .86); border-radius: 999px; min-height: 40px;
  padding: .4rem clamp(.5rem, .9vw, .8rem); font-size: .84rem; letter-spacing: .03em;
  transition: color .2s ease, background-color .2s ease, scale .12s ease;
}
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta)::after {
  background: var(--r2n-gold); left: 1rem; right: 1rem; bottom: 6px;
}
@media (hover: hover) {
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta):hover { color: #fff; background: rgba(255, 255, 255, .07); }
}
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta):active { scale: .96; background: rgba(255, 255, 255, .12); }
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:focus-visible { outline: 2px solid var(--r2n-gold); outline-offset: 2px; }
/* Order lives in its own zone now, so the old in-list pill steps aside */
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks .nav-cta { display: none; }

/* the Order zone: divider, then the gold pill */
:is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) .r2n-order-zone {
  display: flex; align-items: center; flex: none; position: relative; z-index: 1; /* under the open menu drawer */
  margin-left: 6px; padding-left: clamp(12px, 1.4vw, 20px);
  border-left: 1px solid rgba(229, 190, 94, .3);
}
.r2n-order {
  --r2n-lift: 0px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 20px 0 22px; box-sizing: border-box;
  border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 700 .92rem/1 'DM Sans', system-ui, sans-serif; letter-spacing: .03em; color: #2a0f27;
  background: linear-gradient(160deg, #f3d989 0%, #e5be5e 42%, #c99a35 100%);
  border: 1px solid rgba(255, 230, 160, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(120, 80, 10, .22),
    0 0 0 4px rgba(229, 190, 94, .1), 0 8px 20px -6px rgba(229, 190, 94, .55);
  translate: 0 var(--r2n-lift);
  transition: translate .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease, scale .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.r2n-order::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 66%);
  translate: -120% 0; transition: translate .7s cubic-bezier(.22, 1, .36, 1);
}
.r2n-order svg { width: 16px; height: 16px; flex: none; transition: translate .2s cubic-bezier(.22, 1, .36, 1); }
@media (hover: hover) {
  .r2n-order:hover {
    --r2n-lift: -1px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(120, 80, 10, .22),
      0 0 0 5px rgba(229, 190, 94, .16), 0 12px 26px -6px rgba(229, 190, 94, .7);
  }
  .r2n-order:hover::before { translate: 120% 0; }
  .r2n-order:hover svg { translate: 3px 0; }
}
.r2n-order:focus-visible { outline: 2px solid #fdf8f0; outline-offset: 3px; }
.r2n-order:active {
  --r2n-lift: 0px; scale: .97; transition-duration: .06s;
  background: linear-gradient(160deg, #e9cb73 0%, #d8ad48 45%, #b98a2a 100%);
  box-shadow: inset 0 2px 6px rgba(90, 55, 0, .35), 0 0 0 4px rgba(229, 190, 94, .12), 0 3px 8px -4px rgba(229, 190, 94, .5);
}

/* tighter desktop widths: all eight links still fit on one line */
@media (min-width: 901px) and (max-width: 1180px) {
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta) { font-size: .76rem; letter-spacing: .01em; padding-inline: .42rem; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta)::after { left: .42rem; right: .42rem; }
  .r2n-order { padding: 0 16px 0 18px; font-size: .86rem; }
}

/* phones and tablets: links fold into the menu, Order stays in its own section at the right end */
@media (max-width: 900px) {
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav.nav { min-height: 60px; padding: 8px 10px 8px 12px; gap: 6px; border-radius: 18px 18px 0 0; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav.nav.scrolled { border-radius: 0 0 18px 18px; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) .r2c-bar { border-radius: 0 0 18px 18px; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav .nav-brand { width: 40px; height: 40px; flex-basis: 40px; margin-right: auto; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav .nav-hamburger {
    display: inline-flex; align-items: center; justify-content: center; order: 2;
    width: 44px; height: 44px; padding: 0; border-radius: 999px; transition: background-color .2s ease, scale .1s ease;
  }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav .nav-hamburger svg { stroke: var(--r2n-ink); width: 24px; height: 24px; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav .nav-hamburger:active { scale: .94; background: rgba(255, 255, 255, .1); }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #mainNav .nav-hamburger:focus-visible { outline: 2px solid var(--r2n-gold); outline-offset: 1px; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) .r2n-order-zone { order: 3; margin-left: 4px; padding-left: 10px; }
  .r2n-order { width: 104px; padding: 0 12px; }

  /* the menu drawer matches the bar */
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks {
    background: var(--r2n-bg); box-shadow: -10px 0 40px rgba(6, 10, 26, .45); border-left: 1px solid var(--r2n-line);
  }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta) {
    color: var(--r2n-ink); background: rgba(255, 255, 255, .06); border-radius: 14px; font-size: 1rem; min-height: 48px; padding: .7rem 1rem;
  }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks a:not(.nav-cta)::after { display: none; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #navLinks .nav-close svg { stroke: var(--r2n-ink); }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) .nav-overlay.open { background: rgba(10, 14, 32, .5); }
}
/* Bon Bon's chat bubble lives in the phone header at <=640px (bundle-b); park it left of the menu button, clear of Order.
   right = body gutter + nav padding + Order zone + gap + menu button + gap */
@media (max-width: 640px) {
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #glazeAssistant { top: 10px !important; right: calc(16px + 10px + 119px + 6px + 44px + 8px) !important; }
}
@media (max-width: 359.98px) {
  .r2n-order { width: 84px; }
  .r2n-order svg { display: none; }
  :is(html:not([data-v-r2cbar]), html[data-v-r2cbar="n"]) #glazeAssistant { right: calc(16px + 10px + 99px + 6px + 44px + 8px) !important; }
}

/* Preview-only switcher pill: sit below the navy block, not on top of the tiles */
#r2cBar > .glzv { top: calc(100% + 8px); right: 12px; }
html:has(#r2cBar > .glzv) #r2cBar { margin-bottom: 44px; }

@media (prefers-reduced-motion: reduce) {
  .r2n-order, .r2n-order::before, .r2n-order svg, #mainNav.nav { transition: none !important; }
  .r2n-order::before { display: none; }
}
html.glz-static .r2n-order, html.glz-static .r2n-order::before, html.glz-static .r2n-order svg { transition: none !important; }
html.glz-static .r2n-order::before { display: none; }
