:root {
  color-scheme: dark;
  --wine-black: #160505;
  --wine-deep: #26090b;
  --burnt-brown: #4b160f;
  --copper-dark: #7a2f18;
  --copper-light: #b87333;
  --old-gold: #c49a5a;
  --antique-white: #f4eadc;
  --muted-beige: #d7b98a;
  --intro-ink: #b45e3f;
  --intro-ink-soft: #d49a70;
  --intro-ink-deep: #7d291d;
  --paper: #f4eadc;
  --ink: #26090b;
  --line: rgba(196, 154, 90, 0.38);
  --focus: rgba(184, 115, 51, 0.22);
  --font-body: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Trajan Pro", "Cinzel", "Cormorant Garamond", "Baskerville", "Libre Baskerville", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  background: var(--wine-black);
  color: var(--antique-white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

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

.login-page {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  color: var(--antique-white);
}

.login-premium-bg {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(176, 78, 26, 0.18) 0%,
      transparent 38%
    ),
    linear-gradient(
      135deg,
      #120404 0%,
      #220607 22%,
      #3a0c0a 58%,
      #160405 100%
    );

  background-image:
    url("/static/img/textures/login-leather-tile.png"),
    radial-gradient(
      circle at 50% 0%,
      rgba(176, 78, 26, 0.18) 0%,
      transparent 38%
    ),
    linear-gradient(
      135deg,
      #120404 0%,
      #220607 22%,
      #3a0c0a 58%,
      #160405 100%
    );

  background-repeat:
    repeat,
    no-repeat,
    no-repeat;

  background-size:
    340px 340px,
    cover,
    cover;

  color: #f4eadc;
}

.login-premium-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;

  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 220, 170, 0.018) 0px,
      rgba(255, 220, 170, 0.018) 1px,
      transparent 1px,
      transparent 5px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.13) 0px,
      rgba(0, 0, 0, 0.13) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 31%,
      rgba(196, 94, 42, 0.08) 31.2%,
      transparent 31.8%,
      transparent 68%,
      rgba(196, 94, 42, 0.045) 68.2%,
      transparent 68.8%
    );

  mix-blend-mode: soft-light;
  opacity: 0.84;
}

.login-premium-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;

  background:
    radial-gradient(circle at center, transparent 0%, transparent 36%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 20%, transparent 66%, rgba(0, 0, 0, 0.46)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.44), transparent 24%, transparent 74%, rgba(0, 0, 0, 0.44));
}

.login-premium-bg > * {
  position: relative;
  z-index: 5;
}

.login-premium-light {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(
      circle at var(--pointer-x, 52%) var(--pointer-y, -4%),
      rgba(224, 112, 70, 0.12) 0%,
      transparent 26%
    ),
    radial-gradient(
      ellipse at 52% -4%,
      rgba(236, 96, 30, 0.34) 0%,
      rgba(143, 39, 15, 0.16) 23%,
      transparent 54%
    );
  mix-blend-mode: screen;
  opacity: 0.68;
  transition: opacity 0.9s cubic-bezier(0.55, 0, 0.2, 1);
}

.login-intro-active .login-premium-light {
  animation: introLightBreath 13.25s cubic-bezier(0.55, 0, 0.2, 1) both;
}

.login-ready .login-premium-light {
  animation: none;
  opacity: 0.38;
}

.background-lines {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.045;
  background:
    linear-gradient(135deg, transparent 0 32%, rgba(184, 115, 51, 0.25) 32.1%, transparent 32.4%),
    linear-gradient(45deg, transparent 0 74%, rgba(184, 115, 51, 0.18) 74.1%, transparent 74.4%);
  transition: opacity 0.9s cubic-bezier(0.55, 0, 0.2, 1);
}

.login-intro-active .background-lines {
  animation: none;
  opacity: 0;
}

.login-ready .background-lines {
  animation: none;
  opacity: 0.045;
}

.brasilia-sketch {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: normal;
  transition:
    opacity 0.52s cubic-bezier(0.55, 0, 0.2, 1),
    visibility 0.52s linear;
}

.brasilia-linework {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: normal;
  filter: none;
  contain: paint;
  will-change: opacity;
  transition:
    opacity 0.52s cubic-bezier(0.55, 0, 0.2, 1),
    visibility 0.52s linear;
}

.brasilia-scene {
  --scene-delay: 0s;
  --scene-duration: 2.7s;
  --scene-start-y: 14px;
  --scene-start-rot: -0.25deg;
  --scene-start-scale: 0.985;
  --scene-end-y: -9px;
  --scene-end-rot: 0.18deg;
  --scene-end-scale: 1.012;
  opacity: 0;
  transform: translateY(var(--scene-start-y)) rotate(var(--scene-start-rot)) scale(var(--scene-start-scale));
  transform-box: fill-box;
  transform-origin: center;
}

.brasilia-scene--congress {
  --scene-delay: 1.45s;
  --scene-start-rot: -0.32deg;
}

.brasilia-scene--cathedral {
  --scene-delay: 4.2s;
  --scene-start-y: 9px;
  --scene-start-rot: 0.16deg;
  --scene-end-rot: -0.12deg;
}

.brasilia-scene--alvorada {
  --scene-delay: 6.95s;
  --scene-start-y: 17px;
  --scene-start-rot: -0.12deg;
  --scene-end-rot: 0.24deg;
}

.sketch-line {
  --line-delay: 0s;
  --line-duration: 0.66s;
  --ink-opacity: 0.72;
  fill: none;
  stroke: url("#brasiliaInk");
  stroke-width: 1.34;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.sketch-primary {
  --ink-opacity: 0.94;
  stroke-width: 1.92;
}

.sketch-echo {
  --ink-opacity: 0.48;
  stroke-width: 0.92;
}

.sketch-hatch {
  --ink-opacity: 0.42;
  stroke-width: 0.78;
}

.line-01 { --line-delay: 0s; --line-duration: 1.22s; }
.line-02 { --line-delay: 0.18s; --line-duration: 1.14s; }
.line-03 { --line-delay: 0.36s; --line-duration: 1.06s; }
.line-04 { --line-delay: 0.54s; --line-duration: 0.98s; }
.line-05 { --line-delay: 0.72s; --line-duration: 0.90s; }
.line-06 { --line-delay: 0.90s; --line-duration: 0.82s; }
.line-07 { --line-delay: 1.08s; --line-duration: 0.74s; }

.login-intro-active .brasilia-scene {
  animation: brasiliaSketchScene var(--scene-duration) cubic-bezier(0.45, 0, 0.2, 1) var(--scene-delay) forwards;
}

.login-intro-active .brasilia-scene .sketch-line {
  animation: brasiliaSketchDraw var(--line-duration) cubic-bezier(0.6, 0, 0.22, 1) calc(var(--scene-delay) + var(--line-delay)) forwards;
}

.intro-architectural-trace {
  opacity: 0;
}

.intro-bloom {
  --bloom-delay: 0s;
  opacity: 1;
}

.intro-bloom--congress {
  --bloom-delay: 1.45s;
}

.intro-bloom--cathedral {
  --bloom-delay: 4.2s;
}

.intro-bloom--alvorada {
  --bloom-delay: 6.95s;
}

.intro-bloom-line {
  --filament-delay: 0s;
  fill: none;
  stroke: rgba(212, 154, 112, 0.72);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.intro-bloom-line:nth-of-type(2) { --filament-delay: 0.04s; }
.intro-bloom-line:nth-of-type(3) { --filament-delay: 0.08s; }
.intro-bloom-line:nth-of-type(4) { --filament-delay: 0.12s; }
.intro-bloom-line:nth-of-type(5) { --filament-delay: 0.16s; }
.intro-bloom-line:nth-of-type(6) { --filament-delay: 0.2s; }
.intro-bloom-line:nth-of-type(7) { --filament-delay: 0.24s; }
.intro-bloom-line:nth-of-type(8) { --filament-delay: 0.28s; }
.intro-bloom-line:nth-of-type(9) { --filament-delay: 0.32s; }
.intro-bloom-line:nth-of-type(10) { --filament-delay: 0.36s; }
.intro-bloom-line:nth-of-type(11) { --filament-delay: 0.4s; }
.intro-bloom-line:nth-of-type(12) { --filament-delay: 0.44s; }
.intro-bloom-line:nth-of-type(13) { --filament-delay: 0.48s; }
.intro-bloom-line:nth-of-type(14) { --filament-delay: 0.52s; }

.intro-bloom-line:nth-of-type(3n) {
  stroke: rgba(244, 234, 220, 0.78);
  stroke-width: 0.92;
}

.intro-bloom-line:nth-of-type(4n) {
  stroke: rgba(180, 94, 63, 0.74);
  stroke-width: 0.58;
}

.intro-bloom-core {
  fill: rgba(244, 234, 220, 0.74);
  stroke: rgba(180, 94, 63, 0.78);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.login-intro-active .intro-bloom-line {
  animation: introBloomDraw 2.7s cubic-bezier(0.45, 0, 0.2, 1) calc(var(--bloom-delay) + var(--filament-delay)) forwards;
}

.login-intro-active .intro-bloom-core {
  animation: introBloomCore 2.7s cubic-bezier(0.45, 0, 0.2, 1) var(--bloom-delay) forwards;
}

.login-branding-active .intro-bloom {
  opacity: 0;
  transition: opacity 0.48s cubic-bezier(0.55, 0, 0.2, 1);
}

.intro-continuous-line {
  stroke: var(--intro-ink-soft);
  stroke-width: 1.08;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0.74;
}

.intro-continuous-line--echo {
  stroke: var(--intro-ink);
  stroke-width: 0.62;
  opacity: 0.36;
}

.intro-continuous-line--whisper {
  stroke: rgba(244, 234, 220, 0.42);
  stroke-width: 0.48;
  opacity: 0.24;
}

.login-intro-active .intro-architectural-trace {
  opacity: 1;
}

.login-intro-active .intro-continuous-line {
  animation: introContinuousTrace 10.2s linear 0.16s forwards;
}

.login-intro-active .intro-continuous-line--echo {
  animation-delay: 0.24s;
}

.login-intro-active .intro-continuous-line--whisper {
  animation-delay: 0.32s;
}

.login-branding-active .intro-architectural-trace {
  opacity: 0.22;
  transition: opacity 0.72s cubic-bezier(0.55, 0, 0.2, 1);
}

.login-intro-out .intro-architectural-trace,
.login-intro-out .intro-bloom,
.login-ready .intro-architectural-trace {
  opacity: 0;
}

.login-ready .intro-bloom {
  opacity: 0;
}

.login-intro-out .brasilia-sketch,
.login-intro-out .brasilia-linework {
  opacity: 0;
}

.login-ready .brasilia-sketch,
.login-ready .brasilia-linework {
  animation: none;
  opacity: 0;
  visibility: hidden;
}

.login-has-errors .brasilia-sketch,
.login-has-errors .brasilia-linework {
  display: none;
}

.brasilia-sketch {
  overflow: hidden;
}

.brasilia-croquis {
  --scene-delay: 0s;
  --scene-duration: 2.7s;
  --croquis-start-y: -46%;
  --croquis-start-rot: -0.45deg;
  --croquis-start-scale: 0.96;
  --croquis-end-y: -50%;
  --croquis-end-rot: 0.18deg;
  --croquis-end-scale: 1.006;
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: min(500px, 46vw);
  aspect-ratio: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  clip-path: polygon(50% 100%, 50% 100%, 50% 100%, 50% 100%);
  -webkit-clip-path: polygon(50% 100%, 50% 100%, 50% 100%, 50% 100%);
  transform: translate(-50%, -48%) rotate(-0.2deg) scale(0.98);
  transform-origin: center;
  filter: none;
  mix-blend-mode: normal;
  contain: paint;
  will-change: transform, opacity, clip-path;
}

.brasilia-croquis img {
  position: absolute;
  top: 0;
  height: 100%;
  width: auto;
  max-width: none;
  user-select: none;
}

.brasilia-croquis--congress {
  --scene-delay: 1.45s;
  --croquis-start-rot: -0.62deg;
}

.brasilia-croquis--cathedral {
  --scene-delay: 4.2s;
  --croquis-start-y: -46%;
  --croquis-start-rot: 0.28deg;
  --croquis-end-rot: -0.12deg;
}

.brasilia-croquis--alvorada {
  --scene-delay: 6.95s;
  --croquis-start-y: -46%;
  --croquis-start-rot: -0.2deg;
  --croquis-end-rot: 0.24deg;
}

.brasilia-croquis--congress img {
  left: 0;
}

.brasilia-croquis--cathedral img {
  left: -100%;
}

.brasilia-croquis--alvorada img {
  left: -200%;
}

.login-intro-active .brasilia-croquis {
  animation: brasiliaCroquisScene var(--scene-duration) cubic-bezier(0.45, 0, 0.2, 1) var(--scene-delay) forwards;
}

.intro-ink-trail,
.intro-ink-cursor {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.intro-ink-trail {
  z-index: 5;
  width: 58px;
  height: 1px;
  transform-origin: right center;
  background: linear-gradient(90deg, transparent, rgba(180, 94, 63, 0.06) 28%, rgba(212, 154, 112, 0.5) 100%);
}

.intro-ink-cursor {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(244, 234, 220, 0.72);
  border-radius: 50%;
  background: rgba(244, 234, 220, 0.92);
  box-shadow:
    0 0 0 3px rgba(184, 115, 51, 0.07),
    0 0 14px rgba(196, 154, 90, 0.42);
  transform: translate(-50%, -50%) scale(0.62);
}

.intro-ink-cursor::before,
.intro-ink-cursor::after {
  content: none;
}

.login-intro-active .intro-ink-cursor {
  animation: introInkCursor 10.2s linear 0.16s both;
}

.login-intro-active .intro-ink-trail {
  animation: introInkCursor 10.2s linear 0.16s both;
}

.login-intro-out .intro-ink-cursor,
.login-ready .intro-ink-cursor,
.login-intro-out .intro-ink-trail,
.login-ready .intro-ink-trail {
  opacity: 0;
  visibility: hidden;
}

.intro-drawing-caption {
  position: absolute;
  z-index: 6;
  left: 50%;
  right: auto;
  bottom: clamp(36px, 7vh, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: min(620px, calc(100vw - 44px));
  pointer-events: none;
  color: rgba(212, 154, 112, 0.72);
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 7px);
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-drawing-caption.is-visible {
  opacity: 0.78;
  transform: translate(-50%, 0);
}

.intro-drawing-caption__index {
  color: rgba(244, 234, 220, 0.86);
  font-variant-numeric: tabular-nums;
}

.intro-drawing-caption__rule {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, rgba(180, 94, 63, 0.12), rgba(212, 154, 112, 0.72));
}

.intro-drawing-caption__text {
  max-width: min(90vw, 1200px);
  white-space: normal;
  overflow-wrap: anywhere;
}

.intro-copper-wipe {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  background:
    linear-gradient(90deg, transparent 0%, rgba(180, 94, 63, 0.18) 22%, rgba(244, 234, 220, 0.72) 50%, rgba(180, 94, 63, 0.18) 78%, transparent 100%);
  box-shadow: 0 0 18px rgba(180, 94, 63, 0.22);
}

.intro-copper-wipe::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -52px;
  height: 104px;
  background:
    radial-gradient(ellipse at center, rgba(180, 94, 63, 0.16), rgba(122, 47, 24, 0.06) 36%, transparent 68%);
  opacity: 0;
}

.login-intro-out .intro-copper-wipe {
  animation: introCopperWipe 0.92s cubic-bezier(0.55, 0, 0.2, 1) forwards;
}

.login-intro-out .intro-copper-wipe::before {
  animation: introWipeGlow 0.92s cubic-bezier(0.55, 0, 0.2, 1) forwards;
}

.login-brand {
  position: absolute;
  inset: 0;
  z-index: 5;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
  padding: 0;
  text-align: center;
  pointer-events: none;
  transition:
    opacity 0.72s cubic-bezier(0.55, 0, 0.2, 1),
    visibility 0.72s cubic-bezier(0.55, 0, 0.2, 1),
    transform 0.72s cubic-bezier(0.55, 0, 0.2, 1);
}

.login-brand::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 43%;
  width: min(900px, 82vw);
  height: 250px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(196, 154, 90, 0.1) 0%, rgba(122, 47, 24, 0.08) 34%, transparent 68%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  animation: brandHaloIn 1.35s cubic-bezier(0.22, 1, 0.36, 1) 10.45s forwards;
  transition:
    opacity 0.75s cubic-bezier(0.55, 0, 0.2, 1),
    transform 0.75s cubic-bezier(0.55, 0, 0.2, 1);
}

.login-brand::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: min(980px, 86vw);
  height: min(430px, 58vh);
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(196, 154, 90, 0.42), transparent) left top / 138px 1px no-repeat,
    linear-gradient(270deg, rgba(196, 154, 90, 0.42), transparent) right top / 138px 1px no-repeat,
    linear-gradient(90deg, rgba(196, 154, 90, 0.28), transparent) left bottom / 110px 1px no-repeat,
    linear-gradient(270deg, rgba(196, 154, 90, 0.28), transparent) right bottom / 110px 1px no-repeat,
    linear-gradient(180deg, rgba(196, 154, 90, 0.34), transparent) left top / 1px 84px no-repeat,
    linear-gradient(180deg, rgba(196, 154, 90, 0.34), transparent) right top / 1px 84px no-repeat,
    linear-gradient(0deg, rgba(196, 154, 90, 0.22), transparent) left bottom / 1px 72px no-repeat,
    linear-gradient(0deg, rgba(196, 154, 90, 0.22), transparent) right bottom / 1px 72px no-repeat;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.985);
  animation: none;
  transition:
    opacity 0.62s cubic-bezier(0.55, 0, 0.2, 1),
    transform 0.62s cubic-bezier(0.55, 0, 0.2, 1);
}

.login-brand h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
  color: #f4eadc;
  text-shadow:
    0 2px 2px rgba(0,0,0,0.75),
    0 0 18px rgba(180, 94, 63, 0.12);
  opacity: 0;
  transform: translateY(16px);
  animation: brandTitleIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 10.4s forwards;
  white-space: nowrap;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.login-brand h1::after {
  content: "";
  position: absolute;
  inset: -14px -54px;
  pointer-events: none;
  background:
    linear-gradient(100deg, transparent 0%, transparent 43%, rgba(244, 234, 220, 0.2) 48%, rgba(196, 154, 90, 0.14) 51%, transparent 57%, transparent 100%);
  opacity: 0;
  transform: translateX(-120%);
}

.login-brand h1.is-lettered::after {
  animation: none;
}

.login-brand h1.is-lettered {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

.brand-word {
  display: inline-block;
  white-space: nowrap;
}

.brand-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.brand-letter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.brand-letter.is-exiting {
  opacity: 0;
  transform: translateY(-10px);
}

.brand-divider {
  position: relative;
  width: min(620px, 72vw);
  height: 26px;
  margin: 34px auto 20px;
}

.brand-divider::before,
.brand-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 18px);
  height: 1px;
  opacity: 0;
  transform: scaleX(0);
  animation: dividerIn 0.72s cubic-bezier(0.22, 1, 0.36, 1) 11.56s forwards;
  transition:
    opacity 0.52s cubic-bezier(0.55, 0, 0.2, 1),
    transform 0.62s cubic-bezier(0.55, 0, 0.2, 1);
}

.brand-divider::before {
  right: calc(50% + 18px);
  transform-origin: right center;
  background: linear-gradient(90deg, transparent, rgba(180, 94, 63, 0.82));
}

.brand-divider::after {
  left: calc(50% + 18px);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(180, 94, 63, 0.82), transparent);
}

.brand-divider span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.65);
  background: linear-gradient(135deg, #d49a70, #7d291d);
  box-shadow: 0 0 18px rgba(180, 94, 63, 0.24);
  opacity: 0;
  animation: diamondIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) 11.71s forwards;
  transition:
    opacity 0.42s cubic-bezier(0.55, 0, 0.2, 1),
    transform 0.52s cubic-bezier(0.55, 0, 0.2, 1);
}

.brand-subtitle {
  margin: 0;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 500;
  letter-spacing: 0.46em;
  color: rgba(212, 154, 112, 0.94);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) 11.78s forwards;
  transition:
    opacity 0.52s cubic-bezier(0.55, 0, 0.2, 1),
    transform 0.52s cubic-bezier(0.55, 0, 0.2, 1);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.brand-phrase {
  position: relative;
  display: inline-block;
  min-height: 18px;
  margin: clamp(42px, 6vh, 66px) 0 0;
  padding: 0 34px;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  letter-spacing: 0.34em;
  color: rgba(212, 154, 112, 0.84);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.64);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.54s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.54s cubic-bezier(0.22, 1, 0.36, 1);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.brand-phrase::before,
.brand-phrase::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 1px;
  background: rgba(180, 94, 63, 0.52);
  opacity: 0;
  transform: scaleX(0);
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-phrase::before {
  left: 0;
  transform-origin: right center;
}

.brand-phrase::after {
  right: 0;
  transform-origin: left center;
}

.brand-phrase.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.brand-phrase.is-visible::before,
.brand-phrase.is-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.intro-loading {
  display: none;
}

.intro-loading span {
  display: block;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(244, 234, 220, 0.78), transparent);
  transform: translateX(-110%);
  animation: introLoader 1.55s cubic-bezier(0.55, 0, 0.2, 1) 6.15s 1 both;
}

.login-intro-out .login-brand::before,
.login-intro-out .login-brand::after,
.login-intro-out .login-brand h1::after {
  animation: none;
  opacity: 0;
}

.login-intro-out .login-brand::before {
  transform: translate(-50%, -50%) scale(1.04);
}

.login-intro-out .login-brand::after {
  transform: translate(-50%, -50%) scale(1.015);
}

.login-intro-out .login-brand {
  transform: translateY(-8px);
}

.login-intro-out .brand-divider::before,
.login-intro-out .brand-divider::after {
  animation: none;
  opacity: 0;
  transform: scaleX(0);
}

.login-intro-out .brand-divider span {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.72);
}

.login-intro-out .brand-subtitle,
.login-intro-out .brand-phrase {
  animation: none;
  opacity: 0;
  transform: translateY(-8px);
}

.login-intro-out .intro-loading {
  animation: none;
  opacity: 0;
}

.login-box {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 26px 28px 24px;
  border: 1px solid rgba(180, 94, 63, 0.32);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(37, 12, 10, 0.72), rgba(16, 5, 5, 0.68)),
    linear-gradient(135deg, rgba(244, 234, 220, 0.1), rgba(180, 94, 63, 0.05) 44%, transparent);
  box-shadow:
    0 26px 76px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--antique-white);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 20px));
  pointer-events: none;
}

.login-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(180, 94, 63, 0.82), transparent);
  transform: scaleX(0);
  transform-origin: center;
}

.login-box::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(180, 94, 63, 0.62);
  transform: translateX(-50%) rotate(45deg);
  background: rgba(180, 94, 63, 0.1);
  opacity: 0.72;
}

.login-box form {
  margin: 0;
}

.login-box .field,
.login-box .submit,
.login-box .certificate-login,
.login-box .security-note {
  opacity: 0;
  transform: translateY(8px);
}

.login-has-errors .login-brand,
.login-has-errors .dt-monogram,
.login-has-errors .login-brand h1,
.login-has-errors .brand-divider::before,
.login-has-errors .brand-divider::after,
.login-has-errors .brand-divider span,
.login-has-errors .brand-subtitle,
.login-has-errors .brand-phrase,
.login-has-errors .login-box {
  animation-duration: 0.01ms;
  animation-delay: 0s;
}

.login-has-errors .login-brand {
  display: none;
}

.login-has-errors .login-box {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.login-has-errors .login-box .field,
.login-has-errors .login-box .submit,
.login-has-errors .login-box .certificate-login,
.login-has-errors .login-box .security-note {
  opacity: 1;
  transform: none;
}

.login-has-errors .brand-phrase {
  opacity: 1;
  transform: translateY(0);
}

.login-has-errors .intro-loading {
  display: none;
}

.login-ready .login-box {
  animation: loginBoxIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: auto;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.login-has-errors .login-box {
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.login-ready .login-box::before {
  animation: loginBoxTrace 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards;
}

.login-has-errors .login-box::before {
  transform: scaleX(1);
}

.login-ready .login-box .field,
.login-ready .login-box .submit,
.login-ready .login-box .certificate-login,
.login-ready .login-box .security-note {
  animation: formItemIn 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.login-ready .login-box .field:nth-of-type(1) {
  animation-delay: 0.12s;
}

.login-ready .login-box .field:nth-of-type(2) {
  animation-delay: 0.22s;
}

.login-ready .login-box .submit {
  animation-delay: 0.32s;
}

.login-ready .login-box .security-note {
  animation-delay: 0.42s;
}

.login-ready .login-box .certificate-login {
  animation-delay: 0.52s;
}

.login-ready .login-brand {
  opacity: 0;
  visibility: hidden;
}

.login-ready .brand-phrase {
  animation: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.login-ready .intro-loading {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(244, 234, 220, 0.14);
}

.login-eyebrow {
  margin: 0;
  color: #d7b98a;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-title {
  margin: 12px 0 0;
  color: #f4eadc;
  font-family: var(--font-body);
  font-size: 25px;
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: 0;
}

.login-subtitle {
  margin: 8px 0 0;
  color: rgba(244, 234, 220, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.feedback {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 0 11px 13px;
  border-left: 3px solid rgba(196, 154, 90, 0.74);
  background: linear-gradient(90deg, rgba(196, 74, 52, 0.16), transparent);
  color: #f0c6b6;
  font-size: 13px;
  line-height: 1.42;
}

.feedback svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin: 0 0 8px;
  color: rgba(215, 185, 138, 0.78);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.input-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 154, 90, 0.8), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.input-wrap:focus-within::after {
  transform: scaleX(1);
}

.field input {
  width: 100%;
  height: 40px;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(244, 234, 220, 0.2);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--antique-white);
  font-size: 15px;
  line-height: 1.2;
}

.field input.with-toggle {
  padding-right: 42px;
}

.field input::placeholder {
  color: rgba(244, 234, 220, 0.44);
}

.field input[aria-invalid="true"] {
  border-bottom-color: #9e2e24;
}

.field-error {
  margin: 8px 0 0;
  color: #f0c6b6;
  font-size: 12px;
  line-height: 1.35;
}

.password-toggle {
  position: absolute;
  top: 4px;
  right: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(244, 234, 220, 0.68);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(244, 234, 220, 0.08);
  color: var(--antique-white);
  outline: none;
}

.password-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.submit {
  position: relative;
  width: 100%;
  height: 43px;
  margin-top: 0;
  border: 1px solid rgba(196, 154, 90, 0.48);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(142, 49, 31, 0.94), rgba(97, 23, 23, 0.94));
  color: #fff9f1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-120%);
  transition: transform 0.56s cubic-bezier(0.22, 1, 0.36, 1);
}

.submit:hover {
  filter: brightness(1.06);
}

.submit:hover::before {
  transform: translateX(120%);
}

.submit:active {
  transform: translateY(1px);
}

.submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

.submit:disabled {
  cursor: wait;
  opacity: 0.9;
}

.submit-text {
  position: relative;
  z-index: 1;
}

.submit-spinner {
  position: absolute;
  z-index: 1;
  width: 72px;
  height: 2px;
  display: none;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
}

.submit-spinner::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  background: #ffffff;
  transform: translateX(-120%);
  animation: buttonLoader 0.82s cubic-bezier(0.55, 0, 0.2, 1) infinite;
}

.submit.is-loading .submit-text {
  opacity: 0;
}

.submit.is-loading .submit-spinner {
  display: block;
}

.security-note {
  margin: 14px 0 0;
  color: rgba(244, 234, 220, 0.62);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.certificate-login {
  margin-top: 16px;
}

.certificate-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: rgba(215, 185, 138, 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.certificate-divider::before,
.certificate-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(244, 234, 220, 0.16);
}

.certificate-submit {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(196, 154, 90, 0.4);
  border-radius: 0;
  background: rgba(244, 234, 220, 0.05);
  color: #f4eadc;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.certificate-submit:hover,
.certificate-submit:focus-visible {
  background: rgba(196, 154, 90, 0.14);
  outline: none;
}

.certificate-submit:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.certificate-note {
  margin: 9px 0 0;
  color: rgba(244, 234, 220, 0.56);
  font-size: 11px;
  line-height: 1.38;
  text-align: center;
}

@keyframes brasiliaSketchScene {
  0% {
    opacity: 0;
    transform: translateY(var(--scene-start-y)) rotate(var(--scene-start-rot)) scale(var(--scene-start-scale));
  }
  8% {
    opacity: 0.86;
  }
  72% {
    opacity: 1;
    transform: translateY(0) rotate(var(--scene-end-rot)) scale(1);
  }
  88% {
    opacity: 0.84;
  }
  100% {
    opacity: 0;
    transform: translateY(var(--scene-end-y)) rotate(var(--scene-end-rot)) scale(var(--scene-end-scale));
  }
}

@keyframes brasiliaSketchDraw {
  0% {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  18% {
    opacity: 0.5;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: var(--ink-opacity);
  }
}

@keyframes introContinuousTrace {
  0% {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  4% {
    opacity: 0.58;
  }
  16% {
    stroke-dashoffset: 0.5;
    opacity: 0.78;
  }
  82% {
    stroke-dashoffset: 0.5;
    opacity: 0.66;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.74;
  }
}

@keyframes introBloomDraw {
  0% {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  10% {
    opacity: 0.18;
  }
  48% {
    stroke-dashoffset: 0;
    opacity: 0.76;
  }
  70% {
    stroke-dashoffset: 0;
    opacity: 0.36;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes introBloomCore {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  14% {
    opacity: 0.86;
    transform: scale(1);
  }
  34% {
    opacity: 0.52;
    transform: scale(2.8);
  }
  100% {
    opacity: 0;
    transform: scale(4.2);
  }
}

@keyframes brasiliaCroquisScene {
  0%,
  30% {
    opacity: 0;
    clip-path: polygon(50% 100%, 50% 100%, 50% 100%, 50% 100%);
    -webkit-clip-path: polygon(50% 100%, 50% 100%, 50% 100%, 50% 100%);
    transform: translate(-50%, var(--croquis-start-y)) rotate(var(--croquis-start-rot)) scale(var(--croquis-start-scale));
  }
  52% {
    opacity: 0.78;
    clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);
    -webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);
    transform: translate(-50%, -48%) rotate(var(--croquis-end-rot)) scale(1);
  }
  76% {
    opacity: 0.84;
    clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);
    -webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);
  }
  100% {
    opacity: 0;
    clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);
    -webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);
    transform: translate(-50%, var(--croquis-end-y)) rotate(var(--croquis-end-rot)) scale(var(--croquis-end-scale));
  }
}

@keyframes introInkCursor {
  0% {
    opacity: 0;
    transform: translate3d(-3vw, 76.7vh, 0) translate(-50%, -50%) scale(0.5);
  }
  4% {
    opacity: 0.92;
    transform: translate3d(7vw, 76.3vh, 0) translate(-50%, -50%) scale(1);
  }
  16% {
    opacity: 0.9;
    transform: translate3d(50vw, 78.2vh, 0) translate(-50%, -50%) scale(1);
  }
  25% {
    opacity: 0.72;
    transform: translate3d(49.65vw, 77.6vh, 0) translate(-50%, -50%) scale(0.78);
  }
  34% {
    opacity: 0.94;
    transform: translate3d(50.3vw, 78.35vh, 0) translate(-50%, -50%) scale(1.18);
  }
  43% {
    opacity: 0.7;
    transform: translate3d(49.8vw, 77.85vh, 0) translate(-50%, -50%) scale(0.76);
  }
  52% {
    opacity: 0.94;
    transform: translate3d(50.25vw, 78.3vh, 0) translate(-50%, -50%) scale(1.16);
  }
  61% {
    opacity: 0.68;
    transform: translate3d(49.7vw, 77.7vh, 0) translate(-50%, -50%) scale(0.8);
  }
  70% {
    opacity: 0.94;
    transform: translate3d(50.2vw, 78.25vh, 0) translate(-50%, -50%) scale(1.14);
  }
  82% {
    opacity: 0.84;
    transform: translate3d(50vw, 78.2vh, 0) translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(103vw, 76.7vh, 0) translate(-50%, -50%) scale(0.52);
  }
}

@keyframes monogramIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes brandTitleIn {
  from {
    opacity: 0;
    transform: translateY(16px);
    letter-spacing: 0.08em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.035em;
  }
}

@keyframes brandHaloIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  36% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0.52;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes titleSheen {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  18% {
    opacity: 0.52;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes introLightBreath {
  0% {
    opacity: 0.42;
    transform: translateY(-10px) scale(0.985);
  }
  40% {
    opacity: 0.74;
    transform: translateY(0) scale(1);
  }
  76% {
    opacity: 0.62;
    transform: translateY(4px) scale(1.018);
  }
  100% {
    opacity: 0.44;
    transform: translateY(8px) scale(1.03);
  }
}

@keyframes introLinesDrift {
  0% {
    opacity: 0.03;
    transform: translate3d(0, 0, 0) scale(1);
  }
  32% {
    opacity: 0.1;
  }
  100% {
    opacity: 0.055;
    transform: translate3d(-10px, 8px, 0) scale(1.015);
  }
}

@keyframes introCopperWipe {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }
  36% {
    opacity: 0.88;
    transform: scaleX(1);
  }
  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

@keyframes introWipeGlow {
  0% {
    opacity: 0;
    transform: scaleY(0.72);
  }
  34% {
    opacity: 0.86;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(1.08);
  }
}

@keyframes introFrameIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.975);
  }
  to {
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes dividerIn {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes diamondIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(45deg) scale(0.65);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginBoxIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 18px)) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes loginBoxTrace {
  from {
    opacity: 0.28;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes formItemIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introLoader {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(295%);
  }
}

@keyframes loginBoxInMobile {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonLoader {
  to {
    transform: translateX(260%);
  }
}

@media (max-width: 900px) {
  .login-brand {
    width: min(94vw, 760px);
  }

  .brand-phrase {
    margin-top: 58px;
  }
}

@media (max-width: 640px) {
  .background-lines {
    opacity: 0.08;
  }

  .brasilia-sketch {
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .brasilia-linework {
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .brasilia-croquis {
    width: min(78vw, 360px);
    transform: translate(-50%, -48%) rotate(-0.2deg) scale(0.98);
  }

  .intro-drawing-caption {
    bottom: 24vh;
    width: calc(100% - 32px);
  }

  .login-brand {
    width: calc(100% - 28px);
  }

  .login-brand::after {
    width: calc(100vw - 34px);
    height: min(460px, 62vh);
    background:
      linear-gradient(90deg, rgba(196, 154, 90, 0.32), transparent) left top / 76px 1px no-repeat,
      linear-gradient(270deg, rgba(196, 154, 90, 0.32), transparent) right top / 76px 1px no-repeat,
      linear-gradient(90deg, rgba(196, 154, 90, 0.2), transparent) left bottom / 58px 1px no-repeat,
      linear-gradient(270deg, rgba(196, 154, 90, 0.2), transparent) right bottom / 58px 1px no-repeat,
      linear-gradient(180deg, rgba(196, 154, 90, 0.26), transparent) left top / 1px 54px no-repeat,
      linear-gradient(180deg, rgba(196, 154, 90, 0.26), transparent) right top / 1px 54px no-repeat,
      linear-gradient(0deg, rgba(196, 154, 90, 0.18), transparent) left bottom / 1px 46px no-repeat,
      linear-gradient(0deg, rgba(196, 154, 90, 0.18), transparent) right bottom / 1px 46px no-repeat;
  }

  .login-brand h1 {
    font-size: clamp(28px, 10vw, 44px);
    letter-spacing: 0.025em;
    line-height: 1.08;
    white-space: normal;
  }

  .brand-divider {
    width: min(320px, 78vw);
    margin: 26px auto 18px;
  }

  .brand-subtitle {
    font-size: 11px;
    letter-spacing: 0.32em;
  }

  .brand-phrase {
    margin-top: 52px;
    max-width: 300px;
    padding: 0 22px;
    font-size: 10px;
    line-height: 1.8;
    letter-spacing: 0.24em;
  }

  .brand-phrase::before,
  .brand-phrase::after {
    width: 14px;
  }

  .intro-drawing-caption {
    right: 22px;
    bottom: 30px;
    gap: 8px;
    max-width: calc(100vw - 44px);
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  .intro-drawing-caption__rule {
    width: 24px;
  }

  .intro-drawing-caption__text {
    white-space: normal;
  }

  .intro-ink-cursor {
    width: 5px;
    height: 5px;
  }

  .intro-ink-trail {
    width: 48px;
  }

  .login-box {
    width: calc(100vw - 32px);
    padding: 22px;
    transform: translate(-50%, calc(-50% + 16px));
  }

  .login-has-errors .login-box {
    transform: translate(-50%, -50%);
  }

  .login-title {
    font-size: 23px;
  }
}

@media (max-width: 420px) {
  .brand-subtitle {
    letter-spacing: 0.24em;
  }

  .brand-phrase {
    letter-spacing: 0.2em;
  }
}

@media (max-height: 720px) and (max-width: 640px) {
  .brand-phrase {
    display: none;
  }

  .login-brand h1 {
    font-size: clamp(26px, 9vw, 38px);
  }

  .login-box {
    padding: 18px;
  }

  .login-head {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .field {
    margin-bottom: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .brasilia-sketch,
  .brasilia-linework,
  .intro-bloom {
    display: none;
  }

  .login-brand h1,
  .brand-divider::before,
  .brand-divider::after,
  .brand-divider span,
  .brand-subtitle,
  .brand-phrase,
  .login-box,
  .login-box .field,
  .login-box .submit,
  .login-box .certificate-login,
  .login-box .security-note {
    opacity: 1;
  }

  .intro-ink-cursor,
  .intro-ink-trail,
  .intro-drawing-caption {
    display: none;
  }

  .brand-divider::before,
  .brand-divider::after {
    transform: scaleX(1);
  }

  .brand-divider span {
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }

  .login-box {
    transform: translate(-50%, -50%);
    pointer-events: auto;
  }

  .login-box::before {
    transform: scaleX(1);
  }

  .login-box .field,
  .login-box .submit,
  .login-box .security-note {
    transform: none;
  }

  .login-brand {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 640px) {
  .login-box {
    transform: translate(-50%, -50%);
  }
}

html.js-enabled body:not(.login-ready):not(.login-has-errors) .login-box {
  animation: loginBoxIn 0.78s cubic-bezier(0.22, 1, 0.36, 1) 13.9s forwards;
  pointer-events: auto;
}

html.js-enabled body:not(.login-ready):not(.login-has-errors) .login-box .field,
html.js-enabled body:not(.login-ready):not(.login-has-errors) .login-box .submit,
html.js-enabled body:not(.login-ready):not(.login-has-errors) .login-box .certificate-login,
html.js-enabled body:not(.login-ready):not(.login-has-errors) .login-box .security-note {
  animation: formItemIn 0.58s cubic-bezier(0.22, 1, 0.36, 1) 14.06s forwards;
}

html.js-enabled body:not(.login-ready):not(.login-has-errors) .login-brand {
  animation: fallbackHideBrand 0.48s cubic-bezier(0.55, 0, 0.2, 1) 12.4s forwards;
}

html:not(.js-enabled) .login-brand {
  display: none;
}

html:not(.js-enabled) .login-box {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

html:not(.js-enabled) .login-box::before {
  transform: scaleX(1);
}

html:not(.js-enabled) .login-box .field,
html:not(.js-enabled) .login-box .submit,
html:not(.js-enabled) .login-box .certificate-login,
html:not(.js-enabled) .login-box .security-note {
  opacity: 1;
  transform: none;
}

@keyframes fallbackHideBrand {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
