:root {
  color-scheme: dark;
  --vh: 1vh;
}

@supports(height:100svh) {
  :root {
    --vh: 1svh;
  }
}

@supports(height:100dvh) {
  :root {
    --vh: 1dvh;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  position: relative;
  isolation: isolate;
  height: calc(var(--vh)*100);
  color: #fafcff;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 15% 20%, #102f6245, transparent 55%), radial-gradient(ellipse at 85% 75%, #00675d26, transparent 50%), linear-gradient(140deg, #07172e, #030b19 65%, #03151e);
}

body::before {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 40%, #1255bf45, transparent 47%), radial-gradient(ellipse at 70% 60%, #00cbb62d, transparent 45%);
  animation: aurora 28s ease-in-out infinite alternate;
}

.vector-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.brand {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: max(min(24px, calc(var(--vh)*3)), env(safe-area-inset-top, 0px)) max(min(24px, 4vw), env(safe-area-inset-right, 0px)) max(min(24px, calc(var(--vh)*3)), env(safe-area-inset-bottom, 0px)) max(min(24px, 4vw), env(safe-area-inset-left, 0px));
}

.brand__symbol {
  display: block;
  flex: none;
  width: min(30vw, calc(var(--vh)*34), 330px);
  height: auto;
  overflow: visible;
}

.brand__type {
  flex: none;
  width: min(86vw, calc(var(--vh)*125), 1160px);
  max-width: calc(100% - 32px);
  margin-top: min(38px, 5vw, calc(var(--vh)*4.5));
}

.wordmark {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 468/43;
  margin-inline: auto;
  user-select: none;
}

.wordmark__layer {
  display: block;
  grid-area: 1/1;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: visible;
}

.wm-hex {
  fill: var(--wm-hex, #fdfdff);
}

.wm-trace {
  fill: var(--wm-trace, url(#text-gradient));
}

.wm-dot {
  fill: var(--wm-dot, #00dcee);
}

.wm-domain {
  fill: var(--wm-domain, #c0d2f0);
}

.wordmark__layer--base {
  z-index: 1;
  animation: paths 5s step-end infinite;
  --wm-hex: url(#glass-letter-white);
  --wm-trace: url(#glass-letter-color);
  --wm-domain: url(#glass-letter-white);
  filter: drop-shadow(0 1px 0 #ccf7ff26) drop-shadow(0 0 9px #00bcff18);
}

.wordmark__layer--pink,
.wordmark__layer--cyan {
  position: relative;
  z-index: 2;
  opacity: 0;
  --wm-hex: currentColor;
  --wm-trace: currentColor;
  --wm-dot: currentColor;
  --wm-domain: currentColor;
  pointer-events: none;
}

.wordmark__layer--pink {
  color: #e0287d;
  animation: paths 5s step-end infinite, opacity 5s step-end infinite, font 8s step-end infinite, movement 10s step-end infinite;
}

.wordmark__layer--cyan {
  color: #1bc7fb;
  animation: paths 5s step-end infinite, opacity 5s step-end infinite, font 7s step-end infinite, movement 8s step-end infinite;
}

.brand__tagline {
  margin: min(23px, 3vw, calc(var(--vh)*2.8)) 0 0;
  color: #a5b9d0;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: min(1.55vw, 19px, calc(var(--vh)*2.5));
  letter-spacing: .46em;
  text-indent: .46em;
  line-height: 1.5;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.light-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.light-ribbon {
  transform-origin: 800px 550px;
  animation: wave-drift 25s ease-in-out infinite alternate;
}

.light-ribbon--second {
  animation-duration: 33s;
  animation-delay: -17s;
  animation-direction: alternate-reverse;
}

.firefly-drift {
  animation: firefly-float var(--float-time, 15s) ease-in-out var(--delay, 0s) infinite alternate;
}

.firefly-light {
  animation: firefly-breathe var(--time, 8s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes aurora {
  from {
    transform: translate(-4%, -3%) rotate(-5deg)
  }

  to {
    transform: translate(4%, 4%) rotate(7deg)
  }
}

@keyframes wave-drift {
  from {
    transform: translate(-30px, 24px) rotate(-3deg) scaleY(.92)
  }

  to {
    transform: translate(30px, -28px) rotate(3deg) scaleY(1.08)
  }
}

@keyframes firefly-breathe {

  0%,
  100% {
    opacity: .06
  }

  25% {
    opacity: .18
  }

  52% {
    opacity: .65
  }

  73% {
    opacity: .24
  }
}

@keyframes firefly-float {
  from {
    transform: translate(-3px, 4px)
  }

  to {
    transform: translate(var(--drift-x, 7px), var(--drift-y, -9px))
  }
}

@media(max-width:600px) and (orientation:portrait) {
  .brand__symbol {
    width: min(48vw, calc(var(--vh)*31), 270px)
  }

  .brand__type {
    width: 88vw
  }

  .brand__tagline {
    font-size: min(2vw, calc(var(--vh)*2));
    letter-spacing: .3em;
    text-indent: .3em
  }

  .light-field {
    opacity: .85
  }
}

@media(max-height:420px) and (orientation:landscape) {
  .brand__symbol {
    width: min(24vw, calc(var(--vh)*30))
  }

  .brand__type {
    margin-top: calc(var(--vh)*3)
  }
}

@media(prefers-reduced-motion:reduce) {

  body::before,
  .light-ribbon,
  .firefly-drift,
  .firefly-light,
  .wordmark__layer {
    animation: none !important
  }

  .wordmark__layer--base {
    clip-path: none !important
  }

  .wordmark__layer--pink,
  .wordmark__layer--cyan {
    opacity: 0 !important
  }

  .firefly-light {
    opacity: .28
  }

  .glass-refractive-art {
    filter: none !important
  }
}

/* Oryginalne klatki glitch — bez zmian. */
@keyframes paths {
  0% {
    clip-path: polygon(0% 43%,
        83% 43%,
        83% 22%,
        23% 22%,
        23% 24%,
        91% 24%,
        91% 26%,
        18% 26%,
        18% 83%,
        29% 83%,
        29% 17%,
        41% 17%,
        41% 39%,
        18% 39%,
        18% 82%,
        54% 82%,
        54% 88%,
        19% 88%,
        19% 4%,
        39% 4%,
        39% 14%,
        76% 14%,
        76% 52%,
        23% 52%,
        23% 35%,
        19% 35%,
        19% 8%,
        36% 8%,
        36% 31%,
        73% 31%,
        73% 16%,
        1% 16%,
        1% 56%,
        50% 56%,
        50% 8%);
  }

  5% {
    clip-path: polygon(0% 29%,
        44% 29%,
        44% 83%,
        94% 83%,
        94% 56%,
        11% 56%,
        11% 64%,
        94% 64%,
        94% 70%,
        88% 70%,
        88% 32%,
        18% 32%,
        18% 96%,
        10% 96%,
        10% 62%,
        9% 62%,
        9% 84%,
        68% 84%,
        68% 50%,
        52% 50%,
        52% 55%,
        35% 55%,
        35% 87%,
        25% 87%,
        25% 39%,
        15% 39%,
        15% 88%,
        52% 88%);
  }

  30% {
    clip-path: polygon(0% 53%,
        93% 53%,
        93% 62%,
        68% 62%,
        68% 37%,
        97% 37%,
        97% 89%,
        13% 89%,
        13% 45%,
        51% 45%,
        51% 88%,
        17% 88%,
        17% 54%,
        81% 54%,
        81% 75%,
        79% 75%,
        79% 76%,
        38% 76%,
        38% 28%,
        61% 28%,
        61% 12%,
        55% 12%,
        55% 62%,
        68% 62%,
        68% 51%,
        0% 51%,
        0% 92%,
        63% 92%,
        63% 4%,
        65% 4%);
  }

  45% {
    clip-path: polygon(0% 33%,
        2% 33%,
        2% 69%,
        58% 69%,
        58% 94%,
        55% 94%,
        55% 25%,
        33% 25%,
        33% 85%,
        16% 85%,
        16% 19%,
        5% 19%,
        5% 20%,
        79% 20%,
        79% 96%,
        93% 96%,
        93% 50%,
        5% 50%,
        5% 74%,
        55% 74%,
        55% 57%,
        96% 57%,
        96% 59%,
        87% 59%,
        87% 65%,
        82% 65%,
        82% 39%,
        63% 39%,
        63% 92%,
        4% 92%,
        4% 36%,
        24% 36%,
        24% 70%,
        1% 70%,
        1% 43%,
        15% 43%,
        15% 28%,
        23% 28%,
        23% 71%,
        90% 71%,
        90% 86%,
        97% 86%,
        97% 1%,
        60% 1%,
        60% 67%,
        71% 67%,
        71% 91%,
        17% 91%,
        17% 14%,
        39% 14%,
        39% 30%,
        58% 30%,
        58% 11%,
        52% 11%,
        52% 83%,
        68% 83%);
  }

  76% {
    clip-path: polygon(0% 26%,
        15% 26%,
        15% 73%,
        72% 73%,
        72% 70%,
        77% 70%,
        77% 75%,
        8% 75%,
        8% 42%,
        4% 42%,
        4% 61%,
        17% 61%,
        17% 12%,
        26% 12%,
        26% 63%,
        73% 63%,
        73% 43%,
        90% 43%,
        90% 67%,
        50% 67%,
        50% 41%,
        42% 41%,
        42% 46%,
        50% 46%,
        50% 84%,
        96% 84%,
        96% 78%,
        49% 78%,
        49% 25%,
        63% 25%,
        63% 14%);
  }

  90% {
    clip-path: polygon(0% 41%,
        13% 41%,
        13% 6%,
        87% 6%,
        87% 93%,
        10% 93%,
        10% 13%,
        89% 13%,
        89% 6%,
        3% 6%,
        3% 8%,
        16% 8%,
        16% 79%,
        0% 79%,
        0% 99%,
        92% 99%,
        92% 90%,
        5% 90%,
        5% 60%,
        0% 60%,
        0% 48%,
        89% 48%,
        89% 13%,
        80% 13%,
        80% 43%,
        95% 43%,
        95% 19%,
        80% 19%,
        80% 85%,
        38% 85%,
        38% 62%);
  }

  1%,
  7%,
  33%,
  47%,
  78%,
  93% {
    clip-path: none;
  }
}

@keyframes movement {
  0% {
    top: 0px;
    left: -20px;
  }

  15% {
    top: 10px;
    left: 10px;
  }

  60% {
    top: 5px;
    left: -10px;
  }

  75% {
    top: -5px;
    left: 20px;
  }

  100% {
    top: 10px;
    left: 5px;
  }
}

@keyframes opacity {
  0% {
    opacity: 0.1;
  }

  5% {
    opacity: 0.7;
  }

  30% {
    opacity: 0.4;
  }

  45% {
    opacity: 0.6;
  }

  76% {
    opacity: 0.4;
  }

  90% {
    opacity: 0.8;
  }

  1%,
  7%,
  33%,
  47%,
  78%,
  93% {
    opacity: 0;
  }
}

@keyframes font {
  0% {
    font-weight: 100;
    color: #e0287d;
    filter: blur(3px);
  }

  20% {
    font-weight: 500;
    color: #fff;
    filter: blur(0);
  }

  50% {
    font-weight: 300;
    color: #1bc7fb;
    filter: blur(2px);
  }

  60% {
    font-weight: 700;
    color: #fff;
    filter: blur(0);
  }

  90% {
    font-weight: 500;
    color: #e0287d;
    filter: blur(6px);
  }
}

.auth-header { position:fixed; top:0; right:0; z-index:100; padding:max(18px,env(safe-area-inset-top)) max(clamp(18px,3vw,40px),env(safe-area-inset-right)); }
.auth-login { display:inline-flex; align-items:center; gap:10px; min-height:44px; padding:11px 17px; color:#dbe8f2; background:rgba(9,23,39,.66); border:1px solid rgba(153,190,214,.23); border-radius:10px; font:500 13px/1.25 Arial,sans-serif; letter-spacing:.035em; text-decoration:none; -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); transition:background-color .18s,border-color .18s; }
.auth-login svg { width:18px; height:18px; color:#84cec9; }
.auth-login:hover { background:rgba(18,39,55,.9); border-color:rgba(112,211,202,.55); }
.auth-login:focus-visible { outline:2px solid #84cec9; outline-offset:4px; }
@media(prefers-reduced-motion:reduce) { .auth-login { transition:none; } }
