/* stack3D.sg first-time cover extras (v285), loaded by stack3d.sg.html.
   1. Phone menu: at phone widths (max-width: 30rem, the cover's own
      phone breakpoint) the top nav and the footer links move into one
      menu behind a hamburger, top right. Every rule is gated on
      html.hausMNav, which cover.js sets only once the menu is built, so
      if the script fails the cover keeps its links. Desktop untouched.
   2. Explore now variants (?cta=glass | steps | sun), for Joseph to
      pick. Default: the plain pill. One short pass per hover / press,
      plus one gentle pass after the cover appears; never loops. */

/* ---------- 1. phone menu ---------- */
#hausMenuBtn { display: none; }
@media (max-width: 30rem) {
  html.hausMNav #hausCoverFirst .hausTopLinks,
  html.hausMNav #hausCoverFirst .hausLegal { display: none; }
  html.hausMNav #hausCoverFirst .hausTop { grid-template-columns: 1fr auto; align-items: center; }
  html.hausMNav #hausCoverFirst .hausTop .hausBrand { grid-column: 1; }
  html.hausMNav #hausMenuBtn {
    display: inline-flex; grid-column: 2; grid-row: 1; justify-self: end;
    align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: -10px -10px -10px 0; padding: 0;
    border: 0; background: none; color: #fff; cursor: pointer; border-radius: 999px;
    filter: drop-shadow(0 1px 8px rgba(9, 16, 26, .45));
    transition: transform 100ms var(--ease-out, ease-out), opacity .15s;
  }
  html.hausMNav #hausMenuBtn:active { transform: scale(.92); opacity: .85; }
}
#hausMenuBtn:focus-visible, #hausMenu button:focus-visible { outline: 2px solid #b4562f; outline-offset: 2px; }

#hausMenu { position: fixed; inset: 0; z-index: 221; display: none; }
#hausMenu.on { display: block; }
#hausMenu .hmBack {
  position: absolute; inset: 0; background: rgba(20, 18, 15, .4);
  opacity: 0; transition: opacity .3s var(--ease-out, ease-out); touch-action: none;
}
#hausMenu .hmSheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(21rem, 86vw); box-sizing: border-box;
  display: flex; flex-direction: column;
  padding: max(1.1rem, env(safe-area-inset-top)) max(1.4rem, env(safe-area-inset-right)) max(1.3rem, env(safe-area-inset-bottom)) 1.4rem;
  background: #f3eee4; color: #221f1a;
  box-shadow: -18px 0 50px rgba(20, 18, 15, .22);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translate3d(100%, 0, 0); transition: transform .38s var(--ease-out, cubic-bezier(.25, .8, .35, 1));
}
#hausMenu.open .hmBack { opacity: 1; }
#hausMenu.open .hmSheet { transform: none; }
#hausMenu .hmHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
#hausMenu .hmWord { font-size: 1.45rem; font-weight: 800; letter-spacing: .045em; line-height: 1; }
#hausMenu .hmClose {
  width: 44px; height: 44px; margin-right: -10px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: inherit; cursor: pointer; border-radius: 999px; font-size: 1.15rem;
}
#hausMenu .hmClose:active { background: rgba(34, 31, 26, .08); }
#hausMenu .hmMain button {
  display: block; width: 100%; min-height: 44px; padding: .55rem 0; text-align: left; cursor: pointer;
  border: 0; border-bottom: 1px solid rgba(34, 31, 26, .1); background: none; color: inherit;
  font-family: "Playfair Display", "Iowan Old Style", Georgia, serif; font-weight: 500;
  font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; /* 4 Dec 2026: was 1.55rem, Joseph: "very in the face" */
}
#hausMenu .hmPages { margin-top: 0; } /* 4 Dec 2026, Joseph: unequal spacing; one even list, no gap between the groups */
#hausMenu .hmMain button:first-child { border-top: 1px solid rgba(34, 31, 26, .1); }
/* one line between the groups, not two: this must come after the rule above (same specificity) */
#hausMenu .hmMain.hmPages button:first-child { border-top: 0; }
#hausMenu .hmQuiet { margin-top: auto; padding-top: 1.8rem; display: flex; flex-wrap: wrap; column-gap: 1.3rem; }
#hausMenu .hmQuiet button {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  color: #6b655a; font: inherit; font-size: .9rem; font-weight: 600;
}
#hausMenu .hmMain button, #hausMenu .hmQuiet button { opacity: 0; transform: translate3d(1rem, 0, 0); transition: opacity .35s var(--ease-out, ease-out), transform .35s var(--ease-out, ease-out); }
#hausMenu.open .hmMain button, #hausMenu.open .hmQuiet button { opacity: 1; transform: none; transition-delay: calc(.06s + var(--i, 0) * .035s); }
#hausMenu button:active { opacity: .7; }
html.hausMenuOn, html.hausMenuOn body { overflow: hidden !important; overscroll-behavior: none; }
@media (prefers-reduced-motion: reduce) {
  #hausMenu .hmBack, #hausMenu .hmSheet, #hausMenu .hmMain button, #hausMenu .hmQuiet button { transition: none; }
}

/* ---------- 2. Explore now variants ---------- */
#hausExploreFirst.ctaFx { position: relative; overflow: hidden; }
#hausExploreFirst .ctaLayer { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: -1; }
#hausExploreFirst .ctaLayer.top { z-index: 1; }

/* (a) glass: a small magnifying glass sweeps across the pill */
#hausExploreFirst .ctaGlass {
  position: absolute; top: 50%; left: 0; width: 26px; height: 26px; margin-top: -13px;
  opacity: 0; color: #20261f; transform: translate3d(-30px, 0, 0);
}
#hausExploreFirst .ctaGlass .lens { fill: rgba(255, 255, 255, .55); }
#hausExploreFirst.ctaPlay .ctaGlass { animation: ctaGlass .78s cubic-bezier(.45, .05, .3, 1) both; }
@keyframes ctaGlass {
  0% { opacity: 0; transform: translate3d(-30px, 2px, 0) rotate(-12deg); }
  15% { opacity: 1; }
  55% { transform: translate3d(calc(var(--ctaW, 160px) * .5 - 13px), -2px, 0) rotate(4deg) scale(1.08); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(calc(var(--ctaW, 160px) + 4px), 2px, 0) rotate(10deg); }
}

/* (b) steps: shoe prints walk across the pill toward the arrow, which then nudges */
#hausExploreFirst .ctaStep {
  position: absolute; top: 50%; width: 15px; height: 8px; margin: -4px 0 0 -7.5px; opacity: 0;
  color: #20261f; transform: rotate(-17deg) translate3d(0, -3.5px, 0) rotate(-4deg); /* path angle, then the left foot off the line */
}
#hausExploreFirst .ctaStep.r { transform: rotate(-17deg) translate3d(0, 3.5px, 0) scaleY(-1) rotate(-4deg); }
#hausExploreFirst .ctaStep svg { display: block; fill: currentColor; }
#hausExploreFirst.ctaPlay .ctaStep { animation: ctaStep 1.25s ease-out both; animation-delay: calc(var(--k) * 170ms); }
@keyframes ctaStep { 0% { opacity: 0; } 12% { opacity: .3; } 55% { opacity: .3; } 100% { opacity: 0; } }
#hausExploreFirst.cta-steps.ctaPlay > svg { animation: ctaNudge .36s cubic-bezier(0.22, 1, 0.36, 1) 1.3s both; } /* motion brief: no overshoot */
@keyframes ctaNudge { 0%, 100% { transform: none; } 50% { transform: translate3d(3px, 0, 0); } }

/* (c) sun: a small sun arcs over the pill and leaves a warm sheen, like the
   cover's sun study passing over the maquette */
#hausExploreFirst .ctaSheen {
  position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 214, 150, .55) 50%, transparent 70%);
  background-size: 250% 100%; background-position: 120% 0;
}
#hausExploreFirst .ctaSun {
  position: absolute; left: 0; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: #f6b04a; box-shadow: 0 0 10px 3px rgba(246, 176, 74, .55); opacity: 0;
}
#hausExploreFirst.ctaPlay .ctaSheen { animation: ctaSheen .8s ease-in-out both; }
#hausExploreFirst.ctaPlay .ctaSun { animation: ctaSun .8s cubic-bezier(.4, 0, .3, 1) both; }
@keyframes ctaSheen { 0% { opacity: 0; background-position: 120% 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; background-position: -20% 0; } }
@keyframes ctaSun {
  0% { opacity: 0; transform: translate3d(8px, 10px, 0); }
  15% { opacity: 1; }
  50% { transform: translate3d(calc(var(--ctaW, 160px) * .5), -14px, 0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(calc(var(--ctaW, 160px) - 8px), 10px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #hausExploreFirst .ctaLayer { display: none; }
  #hausExploreFirst.ctaPlay > svg { animation: none !important; }
}
