﻿/* ==========================
   FONTS
========================== */

@font-face {
  font-family: "PT Root UI";
  src: url("fonts/PTRootUI-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Root UI";
  src: url("fonts/PTRootUI-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Root UI";
  src: url("fonts/PTRootUI-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================
   RESET & VARIABLES
========================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --container: 1664px;
  --content: 1616px;
  --radius: 24px;
  --gap: 80px;
  --section-gap: 200px;
  --transition: 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);

  --bg: #fafafa;
  --text: #1d1d1f;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PT Root UI", sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p + p {
  margin-top: 16px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================
   CONTAINER
========================== */

.container,
.projects,
.concepts {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(16px, 2vw, 24px);
  padding-right: clamp(16px, 2vw, 24px);
}

.project-page {
  max-width: var(--container);
  margin: 0 auto;
}

@media (min-width: 1617px) {
  .container,
  .projects,
  .concepts {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ==========================
   HEADER
========================== */

.header {
  padding: 24px 0;
  background: var(--bg);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--content);
  padding-left: clamp(16px, 2vw, 24px);
  padding-right: clamp(16px, 2vw, 24px);
}

@media (min-width: 1617px) {
  .header .container {
    padding-left: 0;
    padding-right: 0;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
  font-weight: 500;
  transition: opacity var(--transition);
}

.logo:hover {
  color: #2534FA;
}

.logo-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.nav {
  display: flex;
  gap: 40px;
}

.nav a {
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav a:hover {
  color: #2534FA;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
  gap: 6px;
  padding: 0;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

body.nav-open .burger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .burger span:nth-child(2) {
  opacity: 0;
}

body.nav-open .burger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================
   HERO
========================== */

.hero {
  min-height: 100vh;
  padding-top: 260px;
  padding-bottom: var(--section-gap);
}

.hero h1 {
  max-width: 1100px;
  margin: 0 auto;

  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 58px;
  letter-spacing: -0.008em;
  text-align: center;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

/* ==========================
   PROJECTS LIST
========================== */

.projects {
  margin-top: 40px;
}

.project:not(:last-child) {
  margin-bottom: var(--section-gap);
}

/* ==========================
   PROJECT INFO & META
========================== */

.project-info {
  max-width: var(--content);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--gap);
  row-gap: 40px;
}

.project-info h2 {
  grid-column: 1;
  grid-row: 1;

  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.24px;
}

.project-meta {
  grid-column: 1;
  grid-row: 2;
}

.project-meta p {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 24px;
  font-weight: 500;
}

.project-meta p + p {
  margin-top: 12px;
}

.project-meta p.project-desc {
  margin-top: 24px;
}

.meta-label {
  color: rgba(29, 29, 31, 0.6);
}

/* ==========================
   PROJECT COVER
========================== */

.project-image {
  display: block;
  width: 100%;
  height: 800px;
  margin-top: 80px;
  overflow: hidden;
  border-radius: var(--radius);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ==========================
   PROJECT ACTIONS
========================== */

.project-actions {
  grid-column: 1;
  grid-row: 3;

  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-top: 8px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  font-family: "PT Root UI", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-icon {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

.btn-icon svg {
  display: block;
  transition: transform var(--transition);
}

.btn-primary {
  background: #2534FA;
  color: #fff;
  border: none;
}

.hero-actions .btn-primary {
  position: relative;
  padding: 4px 74px 4px 24px;
}

.btn-primary:hover {
  background: #1d2ad8;
}

.btn-primary:hover .btn-icon svg {
  transform: rotate(45deg);
}

.btn-secondary {
  background: #F0F0F0;
  color: #1d1d1f;
  border: none;
}

.btn-secondary:hover {
  background: #e5e5e5;
}

/* ==========================
   PROJECT PAGE (inner)
========================== */

.project-page {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 160px;
}

@media (max-width: 1616px) {
  .project-page {
    padding-left: clamp(16px, 2vw, 24px);
    padding-right: clamp(16px, 2vw, 24px);
  }
}

.project-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  margin-top: 80px;
}

.video-wrapper {
  width: 100%;
  max-width: 1664px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.project-content img {
  width: 100%;
  max-width: 1664px;
  border-radius: var(--radius);
}

.media-pair {
  width: 100%;
  max-width: 1664px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: stretch;
}

.media-left,
.media-right {
  border-radius: var(--radius);
  overflow: hidden;
}

.media-left video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1920 / 1561;
}

.media-left img,
.media-right img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-section {
  max-width: var(--content);
  margin: 80px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 128px;
  row-gap: 40px;
}

.project-info,
.project-section {
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 1617px) {
  .project-info,
  .project-section {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ==========================
   SECTION COLUMN & TYPOGRAPHY
   (Принцип Single-Direction: отступы только сверху)
========================== */

.section-col {
  display: flex;
  flex-direction: column;
}

.section-col h3,
.section-col p,
.section-col ul {
  margin: 0;
  padding: 0;
}

.section-col h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}

.section-col p {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 24px;
  font-weight: 500;
}

/* Отступ под заголовком h3 — ровно 32px */
.section-col h3 + * {
  margin-top: 32px !important;
}

/* Расстояние между абзацами внутри секции — ровно 16px */
.section-col p + p {
  margin-top: 16px;
}

/* Список ul: обнуляем дефолтные браузерные стили */
.section-col ul {
  list-style: none;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 24px;
  font-weight: 500;
}

/* Расстояние от текста до первого пункта списка — ровно 12px */
.section-col p + ul {
  margin-top: 12px;
}

/* Если после списка снова идет абзац текста — ровно 24px */
.section-col ul + p {
  margin-top: 24px;
}

/* Пункты списка: текст отодвинут от маркера на 16px */
.section-col li {
  padding-left: 16px;
  position: relative;
  margin: 0;
  line-height: 24px;
}

/* Маркер-точка: стоит ровно на 0px по левому краю текста */
.section-col li::before {
  content: "\00B7";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  line-height: inherit;
}

/* Шаг между пунктами списка — ровно 8px */
.section-col li + li {
  margin-top: 8px;
}

.project-section p {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 24px;
  font-weight: 500;
}

/* ==========================
   CONCEPTS
========================== */

.concepts {
  max-width: var(--container);
  margin: 0 auto;
  margin-top: var(--section-gap);
}

.concepts .section-title {
  max-width: var(--content);
  margin: 0 auto;

  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.24px;
  margin-bottom: 40px;
}

.concepts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 80px;
}

.concepts-grid img {
  width: 100%;
  border-radius: var(--radius);
}

.concepts-grid .col-1-2  { grid-column: 1 / 3; }
.concepts-grid .col-3    { grid-column: 3 / 4; }
.concepts-grid .full-width { grid-column: 1 / -1; }
.concepts-grid .col-1    { grid-column: 1 / 2; }
.concepts-grid .col-2-3  { grid-column: 2 / 4; }

/* ==========================
   FOOTER
========================== */

.footer {
  max-width: var(--container);
  margin: var(--section-gap) auto 0;
  padding: 0 24px;
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.footer-contacts {
  display: flex;
  gap: 48px;
  font-size: 18px;
  line-height: 24px;
}

.footer-contacts a {
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-contacts a:hover {
  color: #2534FA;
}

.footer-copy {
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 1440px) {
  :root {
    --gap: 48px;
    --section-gap: 160px;
  }

  .hero {
    padding-top: clamp(160px, 20vw, 324px);
  }

  .project-image {
    height: 600px;
  }

  .project-page {
    padding-top: 160px;
  }
}

@media (max-width: 1024px) {
  :root {
    --gap: 40px;
    --section-gap: 120px;
  }

  .hero {
    padding-top: 140px;
  }

  .project-image {
    height: 450px;
    margin-top: 60px;
  }

  .project-page {
    padding-top: 120px;
  }

  .project-content {
    margin-top: 60px;
  }
}

@media (max-width: 768px) {
  :root {
    --gap: 24px;
    --section-gap: 80px;
    --radius: 16px;
  }

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

  .projects,
  .concepts {
    padding-left: 0;
    padding-right: 0;
  }

  .header {
    padding: 16px 0;
  }

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

  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  body.nav-open .nav {
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    font-size: 24px;
  }

  .hero {
    padding-top: 140px;
  }

  .hero h1 {
    text-align: center;
    margin: 0;
    font-size: clamp(22px, 5vw, 28px);
    line-height: 1.35;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-actions .btn,
  .project-actions .btn {
    width: 280px;
    max-width: 100%;
  }

  .btn {
    font-size: 16px;
  }

  .btn-icon {
    height: calc(100% - 8px);
    width: auto;
    aspect-ratio: 1;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
  }

  .hero-actions .btn-primary {
    padding: 16px 52px 16px 24px;
  }

  .project-info {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .project-image {
    height: 360px;
    margin-top: 40px;
  }

  .project-actions {
    flex-direction: column;
    align-items: center;
  }

  .project-page {
    padding-top: 100px;
    padding-left: 0;
    padding-right: 0;
  }

  .project-content {
    margin-top: 40px;
    gap: 16px;
  }

  .project-section {
    grid-template-columns: 1fr;
  }

  .media-pair {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .concepts .section-title {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .concepts-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .concepts-grid img {
    width: 100%;
    grid-column: 1 / -1 !important;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-contacts {
    flex-direction: column;
    gap: 8px;
  }

  .video-wrapper {
    border-radius: calc(var(--radius) - 4px);
  }

  .project-content img {
    border-radius: calc(var(--radius) - 4px);
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 120px;
  }

  .project-image {
    height: 280px;
  }
}

/* ==========================
   BACK BUTTON & BACK TO TOP
========================== */

/* Обертка кнопки назад: повторяет ширину и отступы текстовых блоков */
.back-btn-wrapper {
  max-width: var(--content);
  margin: 0 auto;
  padding: 24px 24px 40px 24px;
}

@media (min-width: 1617px) {
  .back-btn-wrapper {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .back-btn-wrapper {
    padding: 16px 16px 24px 16px;
  }
}

/* Сама кнопка назад */
.back-btn-v2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-family: "PT Root UI", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #1d1d1f;
  transition: color var(--transition);
}

.back-btn-v2 svg {
  flex-shrink: 0;
}

.back-btn-v2:hover {
  color: #2534FA;
}

/* Плавающая кнопка наверх */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #F0F0F0;
  color: #1d1d1f;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #e5e5e5;
}

.back-to-top svg {
  display: block;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 24px;
    right: 16px;
    width: 42px;
    height: 42px;
  }
}

.btn-status {
  cursor: default;
  pointer-events: none;
  color: rgba(29, 29, 31, 0.6);
  background: #f0f0f0;
}