:root {
  color-scheme: dark;
  background: #050505;
}

[hidden] { display: none !important; }
body { color: #f5f5f5; font: 14px/1.5 'Segoe UI', Arial, sans-serif; }
.depth-1 { --z: -12px; --color: #481205; }
.depth-2 { --z: -10px; --color: #651b07; }
.depth-3 { --z: -8px; --color: #812306; }
.depth-4 { --z: -6px; --color: #9c2d08; }
.depth-5 { --z: -4px; --color: #b6380a; }
.depth-6 { --z: -2px; --color: #d34a0e; }
.site-header { position: absolute; z-index: 10; top: 28px; right: 32px; max-width: calc(100% - 40px); }
.account-area { position: relative; display: flex; justify-content: flex-end; }
.login-button, .profile-button { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; border: 1px solid #343434; border-radius: 12px; background: #111; color: #f5f5f5; padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; }
.login-button:hover, .profile-button:hover { background: #1b1b1b; border-color: #666; }
.login-button span { color: #f77732; font-size: 20px; }
.profile-button { padding: 7px 13px 7px 8px; max-width: 320px; gap: 10px; }
#nickname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: #939393; }
.profile-avatar { position: relative; display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 9px; overflow: hidden; background: #2b1a12; color: #ff9a63; font-size: 11px; }
.profile-avatar img { position: absolute; inset: 0; object-fit: cover; }
.account-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 258px; max-width: calc(100vw - 40px); padding: 10px; background: #141414; border: 1px solid #333; border-radius: 14px; box-shadow: 0 20px 60px #0009; }
.menu-caption { color: #888; font-size: 10px; font-weight: 700; letter-spacing: .12em; margin: 5px 10px 9px; }
.menu-item { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 10px; border: 0; border-radius: 7px; background: transparent; color: #f3f3f3; text-align: left; font: inherit; text-decoration: none; cursor: pointer; }
.menu-item:hover:not(:disabled) { background: #242424; }
.menu-item span { color: #f77732; }
.menu-item:disabled, .menu-item:disabled span { color: #626262; cursor: not-allowed; }
.access-hint { color: #898989; font-size: 11px; margin: -3px 10px 12px; }
.logout { margin-top: 7px; border-top: 1px solid #303030; border-radius: 0 0 7px 7px; color: #b8b8b8; }
.account-status { max-width: 300px; font-size: 12px; color: #e7a981; text-align: right; }
.account-status:empty { display: none; }
:focus-visible { outline: 2px solid #ff833f; outline-offset: 4px; }
.noscript { position: absolute; bottom: 24px; left: 24px; color: #aaa; }
.noscript a { color: #ff833f; }
@media (max-width: 600px) { .site-header { top: 18px; right: 20px; } .login-button { min-height: 44px; padding: 9px 14px; } }

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body { background: #050505; }

main {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 1100px;
}

.logo {
  --rx: 6deg;
  --ry: -10deg;
  display: block;
  position: relative;
  width: min(68vw, 370px, 49svh);
  aspect-ratio: 560 / 625;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transform-style: preserve-3d;
  cursor: pointer;
  animation: arrive 1.2s cubic-bezier(.2, .7, .2, 1) both;
}

.sculpture {
  display: block;
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 650ms cubic-bezier(.18, .7, .2, 1);
}

.logo.is-tracking .sculpture { transition-duration: 110ms; }
.logo:active .sculpture { transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(.96); }

.layer {
  position: absolute;
  /* Frame the supplied transparent PNG without modifying the artwork. */
  width: 182.857143%;
  height: 163.84%;
  left: -41.428571%;
  top: -28.8%;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.depth, .shine, .glow {
  -webkit-mask: url("assets/oskardefenselogo.png") center / contain no-repeat;
  mask: url("assets/oskardefenselogo.png") center / contain no-repeat;
}

.depth {
  background: var(--color);
  transform: translateZ(var(--z));
}

.face {
  object-fit: contain;
  transform: translateZ(0);
  filter: saturate(1.08) contrast(1.03);
}

.glow {
  background: #fa500c;
  opacity: .2;
  transform: translateZ(-22px) scale(1.035);
  filter: blur(24px);
  transition: opacity 700ms;
}

.shine {
  transform: translateZ(1px);
  background: linear-gradient(115deg, transparent 39%, rgb(255 147 58 / .12) 45%, rgb(255 228 169 / .8) 49.5%, rgb(255 255 240 / .95) 50%, rgb(255 183 102 / .38) 52%, transparent 59%);
  background-size: 320% 100%;
  background-position: 100% 0;
  opacity: .7;
  mix-blend-mode: screen;
  animation: sheen 6s ease-in-out 1.1s infinite;
}

.logo:hover .glow, .logo:focus-visible .glow { opacity: .4; }

.logo:focus-visible {
  outline: 2px solid #f56a26;
  outline-offset: 22px;
  border-radius: 14px;
}

.logo:focus-visible .sculpture { transform: rotateX(0deg) rotateY(0deg) scale(1.03); }

@keyframes sheen {
  0%, 14% { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(12px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .logo { animation: none; }
  .sculpture, .logo:focus-visible .sculpture, .logo:active .sculpture {
    transform: none;
    transition: none;
  }
  .shine { animation: none; opacity: 0; }
  .glow { transition: none; }
}
