/* Нет get_index.js — иначе [data-reveal] из get_index.css оставляет блок с opacity:0 */
.auth-page [data-reveal] {
  opacity: 1;
  transform: none;
}

.auth-page {
  position: relative;
  overflow-x: visible;
  overflow-y: visible;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.25rem) 0;
  isolation: isolate;
}

/* Сетка: компактные колонки; карточки смещены по-разному */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  align-items: center;
  justify-items: center;
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 3vw, 1.5rem);
  position: relative;
  z-index: 1;
  overflow: visible;
}

@media (min-width: 960px) {
  .auth-layout {
    grid-template-columns: minmax(160px, 240px) minmax(300px, 460px) minmax(160px, 240px);
    gap: 1rem 1.25rem;
    align-items: center;
  }

  .auth-diagrams--left {
    grid-column: 1;
    justify-self: stretch;
    padding-top: 0.25rem;
  }

  .auth-section {
    grid-column: 2;
  }

  .auth-diagrams--right {
    grid-column: 3;
    justify-self: stretch;
    padding-bottom: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .auth-layout {
    grid-template-columns: minmax(180px, 270px) minmax(320px, 480px) minmax(180px, 270px);
    gap: 1.15rem 1.5rem;
  }
}

.auth-diagrams {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 260px;
  margin-inline: auto;
  pointer-events: none;
  overflow: visible;
}

@media (max-width: 959px) {
  .auth-layout {
    display: flex;
    flex-direction: column;
  }

  .auth-section {
    order: -10;
    width: 100%;
  }

  .auth-diagrams {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }

  .auth-diagram-card {
    min-width: 0;
  }

  .auth-diagrams .auth-diagram-card:nth-child(odd) {
    transform: translate(-2vw, 0);
  }

  .auth-diagrams .auth-diagram-card:nth-child(even) {
    transform: translate(2vw, 0.35rem);
  }
}

@media (max-width: 520px) {
  .auth-diagrams {
    grid-template-columns: 1fr;
    max-width: 340px;
  }
}

.auth-diagram-card {
  margin: 0;
  padding: 0.65rem 0.7rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    160deg,
    rgba(14, 17, 24, 0.38) 0%,
    rgba(10, 12, 18, 0.28) 100%
  );
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  opacity: 0.82;
}

@media (min-width: 960px) {
  .auth-diagrams--left .auth-diagram-card:nth-child(1) {
    align-self: flex-start;
    max-width: 100%;
    transform: translate(-6%, -4%);
  }

  .auth-diagrams--left .auth-diagram-card:nth-child(2) {
    align-self: flex-end;
    max-width: 96%;
    transform: translate(8%, 0.75rem);
  }

  .auth-diagrams--right .auth-diagram-card:nth-child(1) {
    align-self: flex-end;
    max-width: 98%;
    transform: translate(5%, 0);
  }

  .auth-diagrams--right .auth-diagram-card:nth-child(2) {
    align-self: flex-start;
    max-width: 92%;
    transform: translate(-10%, 1.25rem);
  }
}

.auth-diagrams--left .auth-diagram-card:nth-child(1) {
  border-left: 2px solid rgba(52, 211, 153, 0.32);
}

.auth-diagrams--left .auth-diagram-card:nth-child(2) {
  border-left: 2px solid rgba(129, 140, 248, 0.35);
}

.auth-diagrams--right .auth-diagram-card:nth-child(1) {
  border-left: 2px solid rgba(56, 189, 248, 0.32);
}

.auth-diagrams--right .auth-diagram-card:nth-child(2) {
  border-left: 2px solid rgba(45, 212, 191, 0.32);
}

.auth-diagram-card__cap {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.72;
  text-align: center;
}

.auth-flow-diagram__svg {
  width: 100%;
  max-height: none;
  height: auto;
  display: block;
  opacity: 0.9;
  filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.04));
}

@media (min-width: 960px) {
  .auth-flow-diagram__svg {
    min-height: 0;
    max-height: 11rem;
  }

  .auth-diagrams--right .auth-diagram-card:last-child .auth-flow-diagram__svg {
    max-height: 7.5rem;
  }
}

.auth-flow-diagram__box {
  fill: rgba(12, 16, 22, 0.35);
  stroke: rgba(52, 211, 153, 0.22);
  stroke-width: 1.05;
}

.auth-flow-diagram__box--accent {
  fill: rgba(52, 211, 153, 0.05);
  stroke: rgba(52, 211, 153, 0.32);
  stroke-width: 1.1;
}

.auth-flow-diagram__box--ghost {
  fill: rgba(255, 255, 255, 0.02);
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
  stroke-dasharray: 6 5;
}

.auth-flow-diagram__diamond {
  fill: rgba(56, 189, 248, 0.05);
  stroke: rgba(56, 189, 248, 0.22);
  stroke-width: 1.05;
}

.auth-flow-diagram__edge {
  stroke: rgba(52, 211, 153, 0.24);
  stroke-width: 1.3;
  fill: none;
}

.auth-flow-diagram__edge--curve {
  stroke: rgba(52, 211, 153, 0.2);
}

.auth-flow-diagram__edge--dash {
  stroke: rgba(94, 234, 212, 0.22);
  stroke-dasharray: 7 6;
}

.auth-flow-diagram__edge--vert {
  stroke: rgba(52, 211, 153, 0.2);
}

.auth-flow-diagram__edge--violet {
  stroke: rgba(129, 140, 248, 0.26);
}

.auth-flow-diagram__edge--violet-vert {
  stroke: rgba(129, 140, 248, 0.22);
}

.auth-flow-diagram__edge--sky-vert {
  stroke: rgba(56, 189, 248, 0.24);
}

.auth-flow-diagram__hub {
  fill: rgba(52, 211, 153, 0.32);
  stroke: rgba(15, 20, 28, 0.45);
  stroke-width: 0.85;
}

.auth-flow-diagram__hub--violet {
  fill: rgba(129, 140, 248, 0.36);
  stroke: rgba(15, 20, 28, 0.42);
}

.auth-flow-diagram__box--violet {
  fill: rgba(30, 27, 75, 0.14);
  stroke: rgba(129, 140, 248, 0.22);
}

.auth-flow-diagram__box--sky {
  fill: rgba(12, 40, 54, 0.18);
  stroke: rgba(56, 189, 248, 0.22);
}

.auth-flow-diagram__diamond--sky {
  fill: rgba(56, 189, 248, 0.05);
  stroke: rgba(56, 189, 248, 0.22);
}

.auth-flow-diagram__lbl--spark {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 700;
  font-style: italic;
  fill: rgba(250, 204, 21, 0.48);
  text-anchor: start;
}

.auth-flow-diagram__lbl {
  fill: rgba(226, 232, 240, 0.72);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}

.auth-flow-diagram__lbl--sm {
  font-size: 9px;
}

.auth-flow-diagram__lbl--muted {
  font-size: 8.5px;
  font-weight: 500;
  fill: rgba(148, 163, 184, 0.5);
}

@keyframes auth-flow-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.auth-flow-diagram__g--slow {
  animation: auth-flow-float 14s ease-in-out infinite;
}

.auth-flow-diagram__g--slow2 {
  animation: auth-flow-float 18s ease-in-out infinite 2s;
}

.auth-flow-diagram__g--mid {
  animation: auth-flow-float 16s ease-in-out infinite 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  .auth-flow-diagram__g--slow,
  .auth-flow-diagram__g--slow2,
  .auth-flow-diagram__g--mid {
    animation: none;
  }

  .auth-diagrams--left .auth-diagram-card:nth-child(1),
  .auth-diagrams--left .auth-diagram-card:nth-child(2),
  .auth-diagrams--right .auth-diagram-card:nth-child(1),
  .auth-diagrams--right .auth-diagram-card:nth-child(2),
  .auth-diagrams .auth-diagram-card:nth-child(odd),
  .auth-diagrams .auth-diagram-card:nth-child(even) {
    transform: none;
  }
}

.auth-section {
  position: relative;
  z-index: 1;
  width: 100%;
}

.auth-container {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
}

.auth-card {
  width: min(520px, 100%);
  padding: 2rem 1.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(
    160deg,
    rgba(19, 24, 32, 0.92) 0%,
    rgba(15, 18, 24, 0.85) 100%
  );
  box-shadow: var(--shadow), var(--shadow-glow);
}

.auth-title {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.auth-lead {
  margin: 0 0 1.6rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field__label {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.field__input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 14, 0.5);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field__input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.field__input:focus-visible {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
  background: rgba(8, 10, 14, 0.65);
}

.field__input:invalid[aria-invalid="true"] {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.65rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.check__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check__box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 14, 0.55);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  margin-top: 1px;
  position: relative;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.check__input:focus-visible + .check__box {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.check__input:checked + .check__box {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(52, 211, 153, 0.18);
}

.check__input:checked + .check__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: 2px solid rgba(110, 231, 183, 0.9);
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}

.check__text {
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.check__link {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  filter: saturate(0.9);
  box-shadow: none;
}

.auth-note {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  min-height: 1.25rem;
}

.site-nav--inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 520px) {
  .auth-card {
    padding: 1.6rem 1.2rem;
    border-radius: var(--radius);
  }
}
