/* "EDD NAISH PORTFOLIO 2026" in the top-left corner: the menu's font and size, the same
   distance from the left as the menu options (64px on a computer, 24px on a phone).
   On computers it's on every page; on phones only the landing page and the menu. On the
   landing page it floats in with the desk intro. */
.brandmark { position: fixed; left: 64px; top: 40px; z-index: 75; margin: 0; pointer-events: none; font-family: var(--pixel); font-weight: 400; font-size: 15px; line-height: 26px; letter-spacing: 0.02em; color: #ffffff; text-shadow: 0 1px 10px rgba(0,0,0,0.55); white-space: nowrap; }
.brandmark span { display: block; }
/* top line a little bigger than the menu text */
.brandmark .bm-title { font-size: 19px; line-height: 28px; }
/* the © is drawn in dots to match the pixel font */
.bm-copy { display: inline-block; width: 0.9em; height: 0.9em; vertical-align: -0.1em; margin: 0 0.12em; }

/* Hover the name: a quick digital glitch. Two copies of the text (blue and red) jump about
   in horizontal slices over the real one for about half a second. */
.brandmark .bm-title { position: relative; width: max-content; pointer-events: auto; cursor: default; }
.brandmark .bm-title::before, .brandmark .bm-title::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; opacity: 0; pointer-events: none; }
.brandmark .bm-title::before { color: #00e5ff; }
.brandmark .bm-title::after { color: #ff2a6d; }
.brandmark .bm-title:hover { animation: bmShake .5s steps(1, end) 1; }
.brandmark .bm-title:hover::before { animation: bmSliceA .5s steps(1, end) 1; }
.brandmark .bm-title:hover::after { animation: bmSliceB .5s steps(1, end) 1; }
@keyframes bmShake {
  0% { transform: translate(0, 0); } 10% { transform: translate(-2px, 1px); } 20% { transform: translate(2px, -1px); }
  30% { transform: translate(-1px, 0); } 45% { transform: translate(3px, 1px) skewX(-6deg); } 55% { transform: translate(-2px, 0); }
  70% { transform: translate(1px, -1px); } 85% { transform: translate(-1px, 0); } 100% { transform: none; }
}
@keyframes bmSliceA {
  0% { opacity: .9; clip-path: inset(10% 0 70% 0); transform: translate(-4px, 0); }
  15% { clip-path: inset(55% 0 20% 0); transform: translate(5px, 0); }
  30% { clip-path: inset(30% 0 45% 0); transform: translate(-6px, 0); }
  45% { clip-path: inset(75% 0 5% 0); transform: translate(3px, 0); }
  60% { clip-path: inset(5% 0 80% 0); transform: translate(-3px, 0); }
  75% { clip-path: inset(40% 0 35% 0); transform: translate(4px, 0); }
  90% { opacity: .9; clip-path: inset(65% 0 15% 0); transform: translate(-2px, 0); }
  100% { opacity: 0; }
}
@keyframes bmSliceB {
  0% { opacity: .9; clip-path: inset(60% 0 15% 0); transform: translate(4px, 0); }
  15% { clip-path: inset(20% 0 60% 0); transform: translate(-5px, 0); }
  30% { clip-path: inset(70% 0 10% 0); transform: translate(6px, 0); }
  45% { clip-path: inset(15% 0 65% 0); transform: translate(-4px, 0); }
  60% { clip-path: inset(45% 0 30% 0); transform: translate(3px, 0); }
  75% { clip-path: inset(0 0 85% 0); transform: translate(-3px, 0); }
  90% { opacity: .9; clip-path: inset(80% 0 0 0); transform: translate(2px, 0); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .brandmark .bm-title:hover, .brandmark .bm-title:hover::before, .brandmark .bm-title:hover::after { animation: none; } }
.brandmark .sub { color: var(--grey); }
@media (max-width: 760px) {
  .brandmark { left: 24px; top: 24px; font-size: 13px; line-height: 20px; }
  .brandmark .bm-title { font-size: 17px; line-height: 24px; }
}

/* Desk intro: hidden until the computer starts coming down, then it drifts down too, sways
   a touch as if floating, and settles in place as the camera arrives. */
html.intro-wait .brandmark { opacity: 0; }
html.intro-run .brandmark { animation: brandFloat 4.6s cubic-bezier(.22,.61,.36,1) both; }
@keyframes brandFloat {
  0%   { opacity: 0; transform: translate3d(-6px, -46px, 0) rotate(-1.6deg); filter: blur(6px); }
  30%  { opacity: 1; filter: blur(0); }
  55%  { transform: translate3d(3px, 7px, 0) rotate(0.6deg); }
  75%  { transform: translate3d(-1px, -3px, 0) rotate(-0.25deg); }
  90%  { transform: translate3d(0, 1px, 0) rotate(0.08deg); }
  100% { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.intro-run .brandmark { animation: brandFade .6s ease both; }
  @keyframes brandFade { from { opacity: 0; } to { opacity: 1; } }
}


/* phones: only on the landing page and the menu */
@media (max-width: 760px) { .brandmark.desk-only { display: none; } }
/* over bright video (randomiser): a dark frosted backing, text kept in exactly the same place */
.brandmark.bm-pill { left: 52px; top: 36px; padding: 4px 12px; border-radius: 12px; background: rgba(18,18,18,0.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-shadow: none; }
.brandmark.bm-pill .sub { color: #b5b5b5; }
