
/* =========================================
   DIGITAL SPACE — DARK PREMIUM
   Версия 2.0
   ========================================= */

:root {
  color-scheme: dark;

  --bg: #070b16;
  --bg-soft: #0b1223;
  --panel: rgba(16, 27, 49, 0.82);
  --panel-hover: rgba(21, 37, 65, 0.96);
  --text: #edf5ff;
  --muted: #91a3bf;
  --muted-light: #bac8dc;
  --accent: #63dcff;
  --accent-strong: #38bdf8;
  --accent-soft: rgba(99, 220, 255, 0.12);
  --border: rgba(153, 192, 232, 0.14);
  --border-active: rgba(99, 220, 255, 0.48);
  --success: #65e6b1;
  --danger: #ff8799;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(
      ellipse at 50% -15%,
      rgba(37, 109, 184, 0.24),
      transparent 48%
    ),
    radial-gradient(
      ellipse at 100% 42%,
      rgba(25, 103, 159, 0.09),
      transparent 35%
    ),
    var(--bg);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

a {
  color: inherit;
}

::selection {
  color: #06111c;
  background: var(--accent);
}

/* Шапка */

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  min-height: 86px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(157, 190, 228, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.45px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(99, 220, 255, 0.45);
  border-radius: 13px;
  color: #071522;
  background: linear-gradient(135deg, #8be8ff, #42b9fa);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
  font-size: 20px;
  font-weight: 850;
}

.header-note {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.4px;
}

/* Общая структура */

main {
  width: min(1000px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 38px;
  min-height: 450px;
  padding: 64px 0 76px;
}

.hero > .eyebrow,
.hero h1,
.hero .intro {
  grid-column: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.6;
}

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(99, 220, 255, 0.8);
}

.hero h1 {
  margin: 19px 0 16px;
  font-size: clamp(35px, 4.7vw, 53px);
  font-weight: 760;
  line-height: 1.13;
  letter-spacing: -2.3px;
}

.hero h1 span {
  color: var(--accent);
  text-shadow: 0 0 34px rgba(56, 189, 248, 0.16);
}

.intro {
  max-width: 455px;
  margin: 0;
  color: var(--muted-light);
  font-size: 14px;
  line-height: 1.9;
}

/* Декоративная иллюстрация */

.hero-art {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 310px;
  place-items: center;
  isolation: isolate;
}

.art-glow {
  position: absolute;
  z-index: -1;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(27, 150, 226, 0.22);
  filter: blur(65px);
}

.art-card {
  position: absolute;
  width: 225px;
  min-height: 255px;
  border: 1px solid rgba(153, 209, 255, 0.22);
  border-radius: 23px;
  background: linear-gradient(
    145deg,
    rgba(28, 49, 79, 0.96),
    rgba(9, 19, 37, 0.96)
  );
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.34);
}

.card-back {
  transform: translate(18px, -10px) rotate(8deg);
  opacity: 0.65;
}

.card-front {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 25px 23px;
  transform: translate(-8px, 7px) rotate(-3deg);
}

.art-icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  margin-bottom: 25px;
  border: 1px solid rgba(99, 220, 255, 0.25);
  border-radius: 15px;
  color: var(--accent);
  background: rgba(99, 220, 255, 0.1);
  font-size: 26px;
}

.art-title {
  max-width: 170px;
  color: #f0f8ff;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.5;
  letter-spacing: 0.4px;
}

.art-lines {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-top: 17px;
}

.art-lines i,
.mini-line {
  display: block;
  height: 5px;
  border-radius: 10px;
  background: rgba(167, 196, 226, 0.18);
}

.art-lines i:nth-child(1) {
  width: 94%;
}

.art-lines i:nth-child(2) {
  width: 72%;
}

.art-lines i:nth-child(3) {
  width: 84%;
}

.art-pill {
  margin-top: 19px;
  padding: 6px 9px;
  border: 1px solid rgba(99, 220, 255, 0.26);
  border-radius: 7px;
  color: var(--accent);
  background: rgba(99, 220, 255, 0.08);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.card-back .mini-line {
  width: 60%;
  margin: 27px 22px 10px;
}

.card-back .mini-line.short {
  width: 38%;
  margin-top: 0;
}

.mini-chip {
  display: block;
  width: 48px;
  height: 48px;
  margin: 25px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #48c9f4, #3868cb);
  opacity: 0.8;
}

.floating-bubble {
  position: absolute;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(133, 215, 255, 0.28);
  border-radius: 15px;
  color: var(--accent);
  background: rgba(14, 30, 52, 0.92);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.5px;
}

.bubble-one {
  top: 38px;
  right: 4px;
  transform: rotate(9deg);
}

.bubble-two {
  bottom: 35px;
  left: 0;
  transform: rotate(-9deg);
}

/* Раздел материалов */

.materials {
  padding: 28px 0 64px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.section-heading .eyebrow {
  color: #8da7c8;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -1px;
  line-height: 1.3;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--muted-light);
  background: rgba(17, 31, 53, 0.65);
  font-size: 11px;
  white-space: nowrap;
}

.secure-label span {
  color: var(--accent);
  font-size: 17px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.material-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 295px;
  padding: 23px 21px 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(
    155deg,
    rgba(19, 34, 57, 0.92),
    rgba(10, 18, 34, 0.92)
  );
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.material-card::before {
  position: absolute;
  top: 0;
  right: 18%;
  left: 18%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 220, 255, 0.6),
    transparent
  );
  content: "";
  opacity: 0.65;
}

.material-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
  background: linear-gradient(
    155deg,
    rgba(23, 42, 70, 0.98),
    rgba(11, 22, 41, 0.98)
  );
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
}

.file-icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(99, 220, 255, 0.22);
  border-radius: 14px;
  color: var(--accent);
  background: rgba(99, 220, 255, 0.09);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.5px;
}

.file-icon.zip {
  color: #a8b5ff;
  border-color: rgba(168, 181, 255, 0.24);
  background: rgba(124, 139, 255, 0.1);
}

.file-icon.plus {
  color: #75f0c4;
  border-color: rgba(117, 240, 196, 0.24);
  background: rgba(117, 240, 196, 0.09);
  font-size: 22px;
}

.material-number {
  margin-bottom: 7px;
  color: #7f97b6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.material-card h3 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.35px;
  line-height: 1.4;
}

.material-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.open-modal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  padding: 11px 13px;
  border: 1px solid rgba(99, 220, 255, 0.25);
  border-radius: 12px;
  color: #dff8ff;
  background: rgba(49, 155, 208, 0.11);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.open-modal span {
  color: var(--accent);
  font-size: 18px;
  transition: transform 180ms ease;
}

.open-modal:hover {
  border-color: rgba(99, 220, 255, 0.65);
  background: rgba(49, 155, 208, 0.2);
}

.open-modal:hover span {
  transform: translate(2px, -2px);
}

.open-modal:active {
  transform: scale(0.98);
}

.open-modal:disabled,
.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

/* Блок помощи */

.help-strip {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 58px;
  padding: 23px 25px;
  border: 1px solid rgba(116, 160, 205, 0.15);
  border-radius: 18px;
  background: linear-gradient(
    110deg,
    rgba(17, 33, 56, 0.8),
    rgba(12, 22, 39, 0.65)
  );
}

.help-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(99, 220, 255, 0.25);
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 18px;
  font-weight: 700;
}

.help-strip h3 {
  margin: 1px 0 5px;
  font-size: 14px;
  font-weight: 750;
}

.help-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

/* Подвал */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: min(1000px, calc(100% - 48px));
  margin: 0 auto;
  padding: 23px 0 30px;
  border-top: 1px solid rgba(157, 190, 228, 0.1);
  color: #7386a3;
  font-size: 11px;
}

/* Окно ввода пароля */

.password-dialog {
  position: fixed;
  width: min(440px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(135, 196, 237, 0.23);
  border-radius: 24px;
  color: var(--text);
  background: #0c1628;
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.55);
}

.password-dialog[open] {
  animation: dialog-enter 220ms ease both;
}

.password-dialog::backdrop {
  background: rgba(2, 6, 15, 0.76);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.password-dialog form {
  position: relative;
  padding: 35px 30px 27px;
}

.close-dialog {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted-light);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.close-dialog:hover {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.dialog-lock {
  display: grid;
  width: 51px;
  height: 51px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(99, 220, 255, 0.3);
  border-radius: 16px;
  color: var(--accent);
  background: linear-gradient(
    135deg,
    rgba(99, 220, 255, 0.16),
    rgba(56, 125, 248, 0.08)
  );
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.08);
  font-size: 26px;
}

.password-dialog .eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
}

.password-dialog h2 {
  margin: 9px 0 7px;
  font-size: 25px;
  font-weight: 760;
  letter-spacing: -0.8px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dialog-copy {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.password-dialog label {
  display: block;
  margin-bottom: 9px;
  color: #dce8f7;
  font-size: 12px;
  font-weight: 700;
}

.password-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 53px;
  padding: 0 12px 0 15px;
  border: 1px solid rgba(144, 178, 215, 0.22);
  border-radius: 13px;
  background: rgba(3, 10, 22, 0.55);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.password-wrap:focus-within {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.password-wrap input {
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 14px;
}

.password-wrap input::placeholder {
  color: #61738e;
}

.password-wrap input:focus-visible {
  outline: none;
}

.toggle-password {
  flex: 0 0 auto;
  padding: 7px 0 7px 5px;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.form-message {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.6;
}

.form-message:not(:empty) {
  margin-top: 12px;
}

.form-message.success {
  color: var(--success);
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 51px;
  margin-top: 17px;
  padding: 13px 17px;
  border: 1px solid rgba(141, 232, 255, 0.4);
  border-radius: 13px;
  color: #061522;
  background: linear-gradient(110deg, #8beaff, #49c4f7);
  box-shadow: 0 8px 27px rgba(56, 189, 248, 0.17);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}

.submit-button span {
  font-size: 19px;
}

.submit-button:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 34px rgba(56, 189, 248, 0.28);
}

.submit-button:active {
  transform: scale(0.985);
}

.privacy-note {
  margin: 17px 0 0;
  color: #7488a4;
  font-size: 10px;
  line-height: 1.8;
  text-align: center;
}

/* Анимации */

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Планшеты */

@media (max-width: 800px) {
  main {
    width: min(680px, calc(100% - 36px));
  }

  .site-header,
  footer {
    width: calc(100% - 36px);
  }

  .hero {
    grid-template-columns: 1fr 0.85fr;
    gap: 12px;
    min-height: 390px;
    padding: 52px 0 58px;
  }

  .hero h1 {
    font-size: clamp(32px, 5.2vw, 43px);
    letter-spacing: -1.7px;
  }

  .hero-art {
    min-height: 280px;
    transform: scale(0.88);
  }

  .material-grid {
    gap: 12px;
  }

  .material-card {
    padding: 19px 15px 16px;
  }

  .material-card h3 {
    font-size: 16px;
  }

  .open-modal {
    font-size: 11px;
  }
}

/* Телефоны */

@media (max-width: 560px) {
  .site-header {
    min-height: 72px;
  }

  .brand {
    gap: 9px;
    font-size: 15px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }

  .header-note {
    max-width: 120px;
    font-size: 10px;
    text-align: right;
  }

  main {
    width: calc(100% - 36px);
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 48px 0 25px;
  }

  .hero .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .hero h1 {
    margin: 17px 0 13px;
    font-size: clamp(35px, 9vw, 46px);
    letter-spacing: -1.8px;
  }

  .intro {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.85;
  }

  .hero-art {
    align-self: center;
    width: 100%;
    min-height: 280px;
    margin-top: 8px;
    transform: scale(0.9);
  }

  .art-card {
    width: 215px;
    min-height: 245px;
  }

  .materials {
    padding: 25px 0 42px;
  }

  .section-heading {
    align-items: flex-end;
    margin-bottom: 19px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .secure-label {
    gap: 5px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .material-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .material-card {
    display: grid;
    grid-template-columns: 49px 1fr;
    column-gap: 14px;
    min-height: 0;
    padding: 19px;
    border-radius: 19px;
  }

  .file-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 46px;
    height: 46px;
    margin: 0;
  }

  .material-number {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0 0 3px;
  }

  .material-card h3 {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 17px;
  }

  .material-card p {
    grid-column: 1 / -1;
    margin: 16px 0;
    font-size: 12px;
  }

  .open-modal {
    grid-column: 1 / -1;
    min-height: 47px;
    font-size: 12px;
  }

  .help-strip {
    gap: 12px;
    margin-bottom: 35px;
    padding: 18px 16px;
  }

  .help-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .help-strip h3 {
    font-size: 13px;
  }

  .help-strip p {
    font-size: 11px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    width: calc(100% - 36px);
    padding: 20px 0 25px;
    font-size: 10px;
  }

  .password-dialog form {
    padding: 30px 22px 23px;
  }

  .password-dialog h2 {
    padding-right: 12px;
    font-size: 23px;
  }
}

/* Маленькие экраны */

@media (max-width: 360px) {
  .site-header,
  footer,
  main {
    width: calc(100% - 28px);
  }

  .header-note {
    max-width: 105px;
    font-size: 9px;
  }

  .hero h1 {
    font-size: 33px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .hero-art {
    transform: scale(0.82);
    margin-top: -8px;
    margin-bottom: -12px;
  }

  .material-card {
    padding: 16px;
  }
}

/* Учитываем предпочтение пользователя */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
