/* Vinko Visuals ✲ the career pop-up and the peeping smileys (Agency page, Assets/pages/apply.js) */

/* the line: "Show me your portfolio." and its smiley are one button */
.ab-join { all: unset; cursor: pointer; display: inline; color: inherit; border-radius: 6px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: rgba(245,243,238,0); transition: text-decoration-color .4s ease; -webkit-tap-highlight-color: transparent; }
.ab-join:hover, .ab-join:focus-visible { text-decoration-color: rgba(245,243,238,.45); }
.ab-join:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
.ab-join .ab-smile { display: inline-flex; vertical-align: -0.12em; margin-left: 0.2em; }
.ab-join .ab-smile .sym { width: 1.05em; height: 1.05em; transition: transform .7s cubic-bezier(.34,1.56,.64,1); }
.ab-join:hover .ab-smile .sym, .ab-join:focus-visible .ab-smile .sym { transform: rotate(-14deg) scale(1.18); }

/* the veil: the page simply darkens behind the pop-up (a plain colour fading in: no blur, nothing to recompute) */
.ap-veil { position: fixed; inset: 0; z-index: 9000; pointer-events: none; opacity: 0; visibility: hidden; background: rgba(5,5,5,.74);
  transition: opacity .45s cubic-bezier(.33,0,.2,1), visibility 0s .45s; }
.ap-veil.is-on { opacity: 1; visibility: visible; transition: opacity .45s cubic-bezier(.33,0,.2,1); }
html.ap-lock { overflow: hidden; scrollbar-gutter: stable; }

/* the pop-up */
.ap { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; background: transparent; color: var(--white); overflow: auto; overscroll-behavior: contain; }
.ap[open] { display: grid; place-items: center; }
.ap::backdrop { background: transparent; }
.ap-panel { position: relative; width: min(560px, 100%); padding: 44px 40px 36px; border-radius: 28px; background: #101010;
  box-shadow: inset 0 0 0 1px rgba(245,243,238,.12), 0 30px 80px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(10px) scale(.99); transition: opacity .38s cubic-bezier(.33,0,.2,1) .05s, transform .6s cubic-bezier(.16,1,.3,1) .05s; }
.ap.is-in .ap-panel { opacity: 1; transform: none; }
.ap.is-out .ap-panel { opacity: 0; transform: translateY(6px); transition: opacity .22s ease, transform .25s ease; }
.ap-x { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--white); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(245,243,238,.22); transition: box-shadow .3s ease, transform .5s cubic-bezier(.34,1.56,.64,1); }
.ap-x:hover { box-shadow: inset 0 0 0 1px rgba(245,243,238,.7); transform: rotate(90deg); }
.ap-x span::before, .ap-x span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 1px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.ap-x span::after { transform: translate(-50%, -50%) rotate(-45deg); }
.ap-x:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.ap-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.02; letter-spacing: -0.03em; margin: 0 48px 12px 0; }
.ap-sub { font-family: var(--serif); font-size: 18px; line-height: 1.35; color: rgba(245,243,238,.62); margin: 0 0 30px; }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.ap-form > .field + .field, .ap-grid + .field { margin-top: 26px; }
.ap-panel.is-sizing { overflow: hidden; transition: opacity .38s ease, transform .6s cubic-bezier(.16,1,.3,1), height .6s cubic-bezier(.22,1,.36,1); }
.ap-form .field input { font-size: clamp(19px, 1.5vw, 22px); }
.ap-form .field input::placeholder { color: rgba(245,243,238,.24); }
.ap-file { margin-top: 18px; }
.ap-or { margin: 12px 0 0; font-family: var(--sans); font-size: 11px; letter-spacing: .08em; color: rgba(245,243,238,.45); }
.ap-err { margin: 16px 0 0; font-family: var(--sans); font-size: 12px; line-height: 1.5; color: var(--red); }
.ap-err[hidden] { display: none; }
.ap-foot { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 28px; }
.ap-foot .form-privacy { max-width: 250px; margin: 0; }
.ap-foot .vv-pill { flex-shrink: 0; padding: 16px 28px; }
.ap-foot .vv-pill[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* success: the winking face rolls in, lands with a little squash, and winks back */
.ap-ok { text-align: center; padding: 18px 0 6px; }
.ap-ok[hidden] { display: none; }
.ap-face-wrap { position: relative; width: 116px; height: 116px; margin: 0 auto 24px; }
.ap-face { width: 100%; height: 100%; overflow: visible; color: var(--white); }
.ap-face * { transform-box: fill-box; transform-origin: center; }
.ap-spark { position: absolute; width: 26px; height: 26px; top: -8px; right: -14px; opacity: 0; transform: scale(0) rotate(-60deg); }
.ap-ok h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 44px); letter-spacing: -0.03em; margin: 0 0 10px; }
.ap-ok p { font-family: var(--serif); font-size: 18px; line-height: 1.35; color: rgba(245,243,238,.62); margin: 0 auto 28px; max-width: 22em; }
.ap-ok h3, .ap-ok p, .ap-ok .vv-pill { opacity: 0; transform: translateY(10px); }
.ap.is-ok .ap-roll { animation: ap-roll 1.15s cubic-bezier(.2,.9,.25,1) both; }
.ap.is-ok .ap-squash { animation: ap-squash .55s cubic-bezier(.34,1.56,.64,1) .95s both; }
.ap.is-ok .ap-eye-l { animation: ap-wink .42s ease-in-out 1.45s 2; }
.ap.is-ok .ap-spark { animation: ap-spark 1.1s cubic-bezier(.22,1,.36,1) 1.55s both; }
.ap.is-ok .ap-ok h3 { animation: ap-rise .7s cubic-bezier(.22,1,.36,1) .55s both; }
.ap.is-ok .ap-ok p { animation: ap-rise .7s cubic-bezier(.22,1,.36,1) .68s both; }
.ap.is-ok .ap-ok .vv-pill { animation: ap-rise .7s cubic-bezier(.22,1,.36,1) .8s both; }
@keyframes ap-roll { 0% { opacity: 0; transform: translateX(-150px) rotate(-320deg) scale(.6); } 15% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes ap-squash { 0% { transform: none; } 35% { transform: scale(1.12, .88) translateY(4px); } 70% { transform: scale(.96, 1.05); } 100% { transform: none; } }
@keyframes ap-wink { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.1); } }
@keyframes ap-spark { 0% { opacity: 0; transform: scale(0) rotate(-60deg); } 40% { opacity: 1; transform: scale(1) rotate(0deg); } 100% { opacity: 0; transform: scale(.6) rotate(40deg) translate(6px, -6px); } }
@keyframes ap-rise { to { opacity: 1; transform: none; } }

/* the peepers: three bright smileys hiding past the edges of the screen; they lean in as the cursor nears the
   "Show me your portfolio." line, wherever it is on the page (positions and eyes set by apply.js, only transforms change) */
.ap-peeps { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.ap-peep { position: absolute; width: var(--s); height: var(--s); --s: clamp(96px, 8.4vw, 136px); will-change: transform; }
.ap-peep svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ap-peep .pf { fill: var(--c); }
.ap-peep .pe { fill: var(--e); transform-box: fill-box; transform-origin: center; transition: transform .14s ease; }
.ap-peep .pm { fill: none; stroke: var(--e); stroke-width: 5; stroke-linecap: round; }
.ap-peep.is-wink .pe-r { transform: scaleY(.12); }
.ap-peep[data-side="l"] { left: 0; top: 30vh; --c: #f6e12b; --e: #0a0a0a; transform: translate3d(-130%, 0, 0); }
.ap-peep[data-side="r"] { right: 0; top: 56vh; --c: #f6c6cf; --e: #0a0a0a; transform: translate3d(130%, 0, 0); }
.ap-peep[data-side="b"] { bottom: 0; left: 64vw; --c: #3b3fc1; --e: #f5f3ee; transform: translate3d(0, 130%, 0); }

@media (max-width: 640px) {
  .ap { padding: 12px; }
  .ap-panel { padding: 36px 22px 26px; border-radius: 24px; }
  .ap-grid { grid-template-columns: 1fr; }
  .ap-foot { flex-direction: column; align-items: stretch; }
  .ap-foot .form-privacy { max-width: none; }
  .ap-foot .vv-pill { text-align: center; justify-content: center; }
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) { .ap-peeps { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .ap-veil, .ap-panel, .ap.is-out .ap-panel { transition: opacity .2s ease; transform: none !important; }
  .ap.is-ok .ap-roll, .ap.is-ok .ap-squash, .ap.is-ok .ap-eye-l, .ap.is-ok .ap-spark { animation: none; }
  .ap.is-ok .ap-ok h3, .ap.is-ok .ap-ok p, .ap.is-ok .ap-ok .vv-pill { animation: ap-rise .2s ease both; }
}
