/* ==========================================================================
   Ali Mamedov — Portfolio
   Единый файл стилей: база (вместо normalize.css + webflow.css) + компоненты
   ========================================================================== */

/* --------------------------------------------------------------------------
   База
   -------------------------------------------------------------------------- */

@font-face {
  font-family: Cirka;
  src: url('../fonts/Cirka-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

/* Секции с входной анимацией скрыты с первого кадра, чтобы контент не мигал
   до загрузки GSAP. Без JS (нет класса .js) контент виден сразу. */
html.js .header,
html.js .hero__text,
html.js .hero__video-wrapper,
html.js .project {
  opacity: 0;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: #fff;
  color: #000;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  font-size: 14px;
  line-height: 20px;
}

::selection {
  color: #fff;
  background: #262626;
}

h1 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 38px;
  font-weight: 700;
  line-height: 44px;
}

h2 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 36px;
}

p {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 20px;
}

a {
  color: #000;
  text-decoration: none;
}

img {
  max-width: 100%;
  vertical-align: middle;
  display: inline-block;
  border: 0;
}

button {
  font: inherit;
  color: inherit;
  margin: 0;
  cursor: pointer;
}

iframe {
  border: 0;
}

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */

.header {
  z-index: 100;
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  position: fixed;
  inset: 0% 0% auto;
}

.header-wrapper {
  justify-content: space-between;
  width: 1280px;
  max-width: 1280px;
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
}

.header__logo-link {
  grid-column-gap: 12px;
  grid-row-gap: 12px;
  justify-content: flex-start;
  align-items: center;
  max-width: 100%;
  font-size: 14px;
  line-height: 20px;
  transition: all .1s;
  display: flex;
}

.header__logo-link:hover {
  opacity: .5;
}

.header__socials {
  grid-column-gap: 20px;
  grid-row-gap: 20px;
  align-items: center;
  display: flex;
}

.header__social-link {
  max-width: 100%;
  display: inline-block;
  transition: all .1s;
}

.header__social-link:hover {
  opacity: .5;
}

/* Размытие под шапкой */
.blur {
  z-index: 1;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  width: 100%;
  height: 80px;
  transform-style: preserve-3d;
  position: fixed;
  inset: 0% 0% auto;
  transform: rotateX(180deg)rotateY(0)rotateZ(0);
  -webkit-mask: linear-gradient(#0000 0%, #000 95%);
  mask: linear-gradient(#0000 0%, #000 95%);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 0;
  display: flex;
}

.hero__container {
  grid-column-gap: 32px;
  grid-row-gap: 32px;
  flex-flow: column;
  max-width: 1280px;
  display: flex;
}

.hero__content {
  max-width: 418px;
}

.hero__text {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.text-span {
  margin-left: 42px;
}

.hero__video-wrapper {
  border-radius: 24px;
  max-width: 1280px;
  overflow: hidden;
}

.hero__video {
  border: 0 #000;
  width: 100%;
  transform: scale(1.02);
}

.hero__video-mobile {
  width: 100%;
  display: none;
}

/* Мобильный showreel (Vimeo) */
.showreel {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
}

.showreel__cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .6s ease;
  z-index: 2;
}

.showreel__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .6);
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.showreel__play-button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  font-family: Cirka, sans-serif;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  text-transform: none;
  font-weight: bold;
  transition: background-color .3s ease;
}

.showreel__play-icon {
  margin-right: 10px;
}

.showreel__loader {
  display: none;
  position: absolute;
  width: 50px;
  height: 50px;
  border: 5px solid #fff;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.showreel__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.showreel__toggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  z-index: 2;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Проекты
   -------------------------------------------------------------------------- */

.project {
  grid-column-gap: 120px;
  grid-row-gap: 120px;
  flex-flow: column;
  justify-content: center;
  display: flex;
}

.project__container {
  grid-column-gap: 40px;
  grid-row-gap: 40px;
  flex-flow: column;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
}

.project__content {
  grid-column-gap: 32px;
  grid-row-gap: 32px;
  flex-flow: column;
  width: 100%;
  max-width: 1280px;
  padding-top: 80px;
  display: flex;
}

.project__header {
  justify-content: space-between;
  align-items: flex-start;
  display: flex;
}

.project__info {
  grid-column-gap: 16px;
  grid-row-gap: 16px;
  flex-flow: column;
  justify-content: space-between;
  align-items: stretch;
  display: flex;
}

.project__title {
  letter-spacing: -.4px;
  font-family: Cirka, Arial, sans-serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 44px;
}

.project__description {
  max-width: 480px;
}

.project__links {
  grid-column-gap: 12px;
  grid-row-gap: 12px;
  align-items: center;
  display: flex;
}

.project__link {
  grid-column-gap: 2px;
  grid-row-gap: 2px;
  color: #000;
  background-color: #f5f5f5;
  border-radius: 100px;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  max-width: 100%;
  padding: 8px 14px;
  text-decoration: none;
  display: flex;
}

.project__link:hover {
  opacity: .5;
  background-color: #e7e7e7;
}

.paragraph {
  align-items: stretch;
  margin-bottom: 0;
  display: flex;
}

.project__meta {
  grid-column-gap: 32px;
  grid-row-gap: 32px;
  margin-top: 0;
  margin-bottom: 10px;
  padding-left: 0;
  list-style: none;
  display: flex;
}

.project__meta-item {
  grid-column-gap: 2px;
  grid-row-gap: 2px;
  flex-flow: column;
  display: flex;
}

.project__meta-label {
  color: gray;
}

.project__section {
  flex-flow: column;
  display: flex;
}

.project_media-grid-wrapper {
  grid-column-gap: 32px;
  grid-row-gap: 32px;
  flex-flow: column;
  display: flex;
}

.project_media-grid-1item {
  grid-row-gap: 16px;
  grid-column-gap: 16px;
  grid-template-rows: auto;
  grid-template-columns: 1fr;
  grid-auto-columns: 1fr;
  display: grid;
}

.project__media-grid-2items {
  grid-column-gap: 8px;
  grid-row-gap: 8px;
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  display: grid;
}

.project__media-item {
  grid-column-gap: 8px;
  grid-row-gap: 8px;
  flex-flow: column;
  display: flex;
}

.project_section-info {
  grid-column-gap: 8px;
  grid-row-gap: 8px;
  display: flex;
}

.project_section-subtitle {
  color: gray;
}

.project_video-wrapper {
  border-radius: 40px;
  overflow: hidden;
}

.project__video-preview {
  border: 0 #000;
  width: 100%;
  transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   CTA (скрыт) и подвал
   -------------------------------------------------------------------------- */

.cta {
  justify-content: center;
  margin-top: 120px;
  display: none;
}

.cta-container {
  grid-column-gap: 48px;
  grid-row-gap: 48px;
  border-top: 1px solid #0000000d;
  flex-flow: column;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  padding-top: 96px;
  display: flex;
}

.cta-text-block {
  grid-column-gap: 24px;
  grid-row-gap: 24px;
  flex-flow: column;
  max-width: 480px;
  display: flex;
}

.heading-primary {
  color: #000;
  text-align: center;
  letter-spacing: -4px;
  margin-top: 0;
  margin-bottom: 0;
  font-family: Cirka, Arial, sans-serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 64px;
}

.p-primary-2 {
  color: #000;
  letter-spacing: .5px;
  margin-bottom: 0;
  font-size: 18px;
  line-height: 28px;
}

.p-primary-2.align-center {
  text-align: center;
  letter-spacing: 0;
  font-size: 14px;
  line-height: 20px;
}

.cta-video-wrapper {
  justify-content: center;
  display: flex;
}

.avatar-big {
  width: 640px;
  max-width: none;
}

.footer {
  justify-content: center;
  margin-top: 40px;
  padding: 12px 20px;
  display: flex;
}

.footer-wrapper {
  width: 100%;
  max-width: 1280px;
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */

@media screen and (max-width: 767px) {
  .hero__video, .project__video-preview {
    transform: scale(1.04);
  }
}

@media screen and (max-width: 479px) {
  .header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-wrapper {
    grid-column-gap: 8px;
    grid-row-gap: 8px;
    flex-flow: row;
    padding-top: 12px;
  }

  .header__socials {
    grid-column-gap: 16px;
    grid-row-gap: 16px;
  }

  .main-logo-p {
    display: none;
  }

  .hero {
    padding-top: 96px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero__container {
    grid-column-gap: 24px;
    grid-row-gap: 24px;
  }

  .hero__video-wrapper {
    border-radius: 12px;
  }

  .hero__video {
    width: 100%;
    display: none;
    transform: scale(1.04);
  }

  .hero__video-mobile {
    display: block;
  }

  .text-span {
    margin-left: 0;
  }

  .project {
    padding-left: 16px;
    padding-right: 16px;
  }

  .project__content {
    padding-top: 40px;
  }

  .project__title {
    font-size: 32px;
    line-height: 40px;
  }

  .project__meta, .project__links {
    display: none;
  }

  .project__media-grid-2items {
    grid-column-gap: 24px;
    grid-row-gap: 24px;
    flex-flow: column;
    display: flex;
  }

  .project_section-info {
    grid-column-gap: 2px;
    grid-row-gap: 2px;
    flex-flow: column;
  }

  .project__video-preview {
    width: 100%;
    transform: scale(1.04);
  }

  .project_video-wrapper {
    border-radius: 12px;
  }

  .footer {
    justify-content: flex-start;
  }

  .heading-primary {
    letter-spacing: -2px;
    font-size: 40px;
    line-height: 40px;
  }
}
