/* 🔹 LATIN */
@font-face {
  font-family: 'Inter Variable';
  src: url('../fonts/inter-latin-standard-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter Variable';
  src: url('../fonts/inter-latin-standard-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 🔹 CYRILLIC */
@font-face {
  font-family: 'Inter Variable';
  src: url('../fonts/inter-cyrillic-standard-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+0500-052F, U+2116, U+2DE0-2DFF, U+A640-A69F;
}

@font-face {
  font-family: 'Inter Variable';
  src: url('../fonts/inter-cyrillic-standard-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+0500-052F, U+2116, U+2DE0-2DFF, U+A640-A69F;
}



@layer reset, main, cube, dialog;

@layer reset {
  /* -------------------------------------------------------------------------
  MODERN CSS RESET 2026
  Использует CSS Layers для управления каскадом.
   ------------------------------------------------------------------------- */


  /* 1. Упрощаем расчет размеров (padding не увеличивает ширину) */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  /* 2. Убираем лишние отступы у списков, если они используются для верстки */
  ul,
  ol {
    list-style: none;
  }

  /* 3. Гарантируем, что body занимает всю высоту экрана */
  html,
  body {
    height: 100%;
    /* Плавная прокрутка (за исключением случаев preferences-reduced-motion) */
    scroll-behavior: smooth;
  }

  /* 4. Настраиваем шрифты и сглаживание */
  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  /* 5. Картинки ведут себя предсказуемо */
  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    max-width: 100%;
    height: auto;
  }

  /* 6. Поля ввода наследуют шрифты (по умолчанию они этого не делают) */
  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  /* 7. Убираем подчеркивание ссылок по умолчанию */
  a {
    text-decoration: none;
    color: inherit;
  }

  /* 8. Текст в textarea не "прыгает" */
  textarea {
    resize: vertical;
  }

  /* 9. Отключаем анимации для тех, кто их не любит (производительность + доступность) */
  @media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}


@layer main {

  :root {
    /* Цвета */
    --avatar-bgcolor: radial-gradient(circle at center, #FDBD6B, #ED9C33);
    --text-color: #1f1f1f;
    --bg-color: #fff;
    --btn-color: #1f1f1f;
    --btn-text-color: #fff;
    --header_pseudo_color: #ff0000;
    /* Размеры */
    --avatar-size: clamp(150px, 20vw, 200px);
    --header-size: clamp(2rem, 5vw, 3rem);
    --margin-bottom: clamp(30px, 3vw, 50px);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --avatar-bgcolor: #fff;
      --bg-color: #1f1f1f;
      --text-color: #fff;
      --btn-color: #fff;
      --btn-text-color: #1f1f1f;
      --header_pseudo_color: #ff0000;
    }
  }

  :root[data-theme="dark"] {
    --avatar-bgcolor: #fff;
    --bg-color: #1f1f1f;
    --text-color: #fff;
    --btn-color: #fff;
    --btn-text-color: #1f1f1f;
    --header_pseudo_color: #ff0000;
  }

  :root[data-theme="light"] {
    --avatar-bgcolor: radial-gradient(circle at center, #FDBD6B, #ED9C33);
    --bg-color: #fff;
    --text-color: #1f1f1f;
    --btn-color: #1f1f1f;
    --btn-text-color: #fff;
    --header_pseudo_color: #ff0000;
  }

  .top-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .theme-toggle,
  .lang-toggle {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid var(--btn-color);
    background-color: transparent;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition:
      background-color 0.2s ease,
      color 0.2s ease,
      border-color 0.2s ease,
      transform 0.15s ease;
  }

  .lang-toggle {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .theme-toggle:hover,
  .lang-toggle:hover {
    background-color: var(--btn-color);
    color: var(--btn-text-color);
    transform: translateY(-1px);
  }

  body {
    font-family: 'Inter Variable', system-ui, -apple-system, sans-serif;
    font-optical-sizing: auto;
    /* если в файле осталась ось opsz, браузер подберёт её под размер */
  }

  .layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
  }

  .avatar {
    order: 1;
    width: var(--avatar-size);
    height: var(--avatar-size);
    background: var(--avatar-bgcolor);
    border-radius: 50%;
    margin-bottom: var(--margin-bottom);
  }

  .header {
    order: 2;
    margin-bottom: var(--margin-bottom);
    font-size: var(--header-size);
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
  }

  /* .header::before {
    content: "{";
    color: var(--header_pseudo_color);
    font-size: var(--header-size);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.1em;
  }

  .header::after {
    content: "}";
    color: var(--header_pseudo_color);
    font-size: var(--header-size);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.1em;
  } */

  .subtitle {
    order: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 80%;
    margin-bottom: var(--margin-bottom);
  }


  .vectors-cube {
    order: 4;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    width: 80%;
    max-width: 400px;
    margin-bottom: var(--margin-bottom);
  }

  .vectors {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
  }

  .vector {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  /* .stat-value {
    font-size: 1rem;
    font-weight: bold;
    font-style: italic;
    letter-spacing: 0.08em;
  }

  .stat-label {
    font-size: 0.8rem;
    font-weight: bold;
    font-style: italic;
    letter-spacing: 0.08em;
  } */

  .btn {
    order: 5;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
  }

  .btn-contact {
    border: 1px solid var(--btn-color);
    background: var(--btn-color);
    color: var(--btn-text-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 300;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 150px;
  }

  .btn-contact:hover {
    transform: translateY(-5px);
    font-weight: 500;
  }

  .btn-outline {
    border: 1px solid var(--btn-color);
    color: var(--btn-color);
    background-color: transparent;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 300;
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 150px;
  }

  .btn-outline:hover {
    transform: translateY(-5px);
    font-weight: 500;
  }

}



@layer cube {
  :root {
    --cube-face: #1f1f1f;
    --cube-border: #000000;
    --cube-size: 7rem;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --cube-border: #757575;
    }
  }

  .cube-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .cube-container {
    position: relative;
    perspective: 1000px;
    animation: cube-float 6s ease-in-out infinite;
    opacity: 1;
    cursor: grab;
  }

  .cube-container.cube-dragging {
    cursor: grabbing;
  }

  .cube {
    position: relative;
    width: var(--cube-size);
    height: var(--cube-size);
    transform-style: preserve-3d;
    z-index: 1;
  }

  .cube-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--cube-face);
    border: 1px solid var(--cube-border);
    backdrop-filter: blur(10px);
  }

  .cube-face-inner {
    text-align: center;
  }

  .cube-text-main {
    display: block;
    font-size: calc(var(--cube-size) / 11);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.08em;
    color: #fff;
  }

  .cube-face-front {
    transform: translateZ(calc(var(--cube-size) / 2));
  }

  .cube-face-back {
    transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2));
  }

  .cube-face-right {
    transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2));
  }

  .cube-face-left {
    transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2));
  }

  .cube-face-top {
    transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2));
  }

  .cube-face-bottom {
    transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2));
  }

  @keyframes cube-float {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-20px);
    }
  }

}

@layer dialog {

  /* Сброс и база диалога */
  dialog {
    border: none;
    padding: 0;
    width: 100%;
    max-width: 500px;
    margin: auto;
    background: transparent;
    color: inherit;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) allow-discrete;
  }

  dialog[open] {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  @starting-style {
    dialog[open] {
      opacity: 0;
      transform: scale(0.95) translateY(20px);
    }
  }

  /* Оверлей */
  dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
  }

  /* Контент */
  .dialog-inner {
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    background: var(--bg-color);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
  }

  .dialog-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-right: 2rem;
  }

  .dialog-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-color);
    margin: 0;
  }

  .dialog-header p {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
  }

  .dialog-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(128, 128, 128, 0.1);
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: background 0.2s, transform 0.2s;
  }

  .dialog-close:hover {
    background: rgba(128, 128, 128, 0.2);
    transform: rotate(90deg);
  }

  .dialog-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .contact-info h3,
  .contact-form h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
  }

  address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  address p {
    margin: 0;
  }

  address a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    background: rgba(128, 128, 128, 0.05);
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
  }

  address a:hover {
    background: rgba(128, 128, 128, 0.1);
    transform: translateY(-2px);
  }

  /* Форма */
  form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  input[type="email"] {
    padding: 1rem 1.25rem;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    background: transparent;
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  input[type="email"]:focus {
    outline: none;
    border-color: var(--btn-color);
    box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.1);
  }

  button[type="submit"] {
    padding: 1rem;
    background: var(--btn-color);
    color: var(--btn-text-color);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
  }

  button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  button[type="submit"]:active {
    transform: translateY(0);
  }

  button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}