/* сайт6 — портфолио. Светлая тема: белый + красный. */

:root {
  --red: #E8102E;
  --red-dark: #C40D26;
  --red-wash: #FFF2F3;
  --red-tint: rgba(232, 16, 46, 0.08);
  --ink: #150B0D;
  --muted: #6E6266;
  --line: #F0E2E4;
  --canvas: #FFFFFF;
  --wash: #FAF6F6;

  --font-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-card: 20px;
  --radius-btn: 999px;
  --maxw: 1180px;
  --shadow-card: 0 2px 8px rgba(21, 11, 13, 0.04);
  --shadow-hover: 0 18px 40px rgba(232, 16, 46, 0.12), 0 4px 12px rgba(21, 11, 13, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: #fff; }

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

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

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.accent { color: var(--red); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(232, 16, 46, 0.28);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
}

.btn-sm { padding: 11px 22px; font-size: 14px; }

/* ---------- Навигация ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.logo { display: inline-flex; align-items: center; gap: 12px; }

.logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }

.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- Хиро ---------- */

.hero {
  position: relative;
  padding: 190px 0 90px;
  min-height: 78vh;
  display: flex;
  align-items: center;
}

.hero-inner { position: relative; z-index: 2; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--red-wash);
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 32px;
}

.hero-kicker .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 16, 46, 0.4); }
  55% { box-shadow: 0 0 0 7px rgba(232, 16, 46, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 6.6vw, 82px);
  line-height: 1.06;
  letter-spacing: 0.005em;
  max-width: 1050px;
  margin-bottom: 34px;
}

/* маска для построчного появления */
.hero-title .line-mask { display: block; overflow: hidden; padding: 0.06em 0; }
.hero-title .line { display: block; will-change: transform; }

.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 44px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* фоновое зацикленное видео (Remotion) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* белая вуаль слева и снизу — текст остаётся читаемым */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0) 16%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 34%, rgba(255, 255, 255, 0) 62%);
}

/* ---------- Бегущая строка ---------- */

.ticker {
  background: var(--red);
  transform: rotate(-1.4deg) scale(1.02);
  padding: 15px 0;
  overflow: hidden;
  margin: 10px -10px 0;
}

.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  will-change: transform;
}

.ticker-half { display: flex; }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ticker-item::after { content: '✦'; font-size: 13px; opacity: 0.85; }

/* ---------- Секции ---------- */

.section { padding: 130px 0 0; }

.section-head { margin-bottom: 56px; }

.section-kicker {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.15;
}

/* ---------- Карточки проектов: карусель ---------- */

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.carousel-hint {
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 8px;
}
.carousel-hint::before { content: '← '; color: var(--red); }
.carousel-hint::after { content: ' →'; color: var(--red); }

.projects-carousel {
  overflow: hidden;
  cursor: grab;
  /* растворение карточек у краёв экрана */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  padding: 8px 0 26px;
}
.projects-carousel.is-dragging { cursor: grabbing; }

.projects-track {
  display: flex;
  width: max-content;
  padding-left: max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
}

/* отступ между карточками — внутри ячейки, чтобы луп был бесшовным */
.carousel-cell { flex: 0 0 auto; padding-right: 28px; }

.carousel-cell .project-card {
  width: min(480px, 82vw);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* фолбэк без карусели (мало карточек или включён спокойный режим) */
.projects-carousel.static {
  cursor: default;
  -webkit-mask-image: none;
  mask-image: none;
}
.projects-carousel.static .projects-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  width: auto;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.projects-carousel.static .carousel-cell { padding-right: 0; }
.projects-carousel.static .carousel-cell .project-card { width: auto; }

.project-card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.project-card.is-link { cursor: pointer; }

.project-card.is-link:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(232, 16, 46, 0.35);
}
.project-card:not(.is-link):hover {
  box-shadow: 0 10px 26px rgba(21, 11, 13, 0.07);
}

.card-media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--wash);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  /* масштаб и параллакс картинки — через GSAP (main.js) */
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 15% 10%, rgba(232, 16, 46, 0.16), transparent 55%),
    radial-gradient(120% 120% at 90% 90%, rgba(232, 16, 46, 0.10), transparent 50%),
    var(--red-wash);
}
.card-placeholder span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 84px;
  color: var(--red);
  opacity: 0.85;
}

.card-arrow {
  position: absolute;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(232, 16, 46, 0.35);
  transition: transform 0.3s ease;
}
.project-card.is-link:hover .card-arrow { transform: translate(3px, -3px) scale(1.08); }

.card-body {
  padding: 26px 28px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card-tags { margin-top: auto; }

.card-cat {
  display: inline-block;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--red-wash);
  color: var(--red);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 15px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 18px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags span {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--wash);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}

/* ---------- Услуги: крупные строки ---------- */

.services-list { border-bottom: 1px solid var(--line); }

.service-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 34px 12px;
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease;
}

.service-idx {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.3s ease;
}

.service-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.8vw, 48px);
  line-height: 1.12;
  transition: transform 0.35s ease, color 0.35s ease;
}

.service-note {
  font-size: 15px;
  color: var(--muted);
  text-align: right;
  max-width: 300px;
}

.service-row:hover { background: var(--red-wash); }
.service-row:hover .service-title { transform: translateX(14px); color: var(--red); }
.service-row:hover .service-idx { color: var(--red); }

/* ---------- Процесс: шаги ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.process-step {
  position: relative;
  padding-top: 26px;
}

/* красная линия сверху — отрастает при появлении (GSAP) */
.process-step::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
}
.process-step.is-lined::before { transform: scaleX(1); transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

.process-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1;
  color: var(--red-tint);
  -webkit-text-stroke: 1.5px rgba(232, 16, 46, 0.45);
  display: block;
  margin-bottom: 16px;
}

.process-step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 10px;
}

.process-step p { font-size: 14.5px; color: var(--muted); }

/* ---------- Обо мне ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
}

.about-photo { position: sticky; top: 110px; }

.photo-frame {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(130% 110% at 20% 10%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(150deg, var(--red) 0%, var(--red-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame .monogram {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 130px;
  color: #fff;
}

.about-role {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--red);
}

.about-bio p { font-size: 16.5px; color: var(--muted); margin-bottom: 14px; max-width: 640px; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 44px 0;
}

.stat {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--canvas);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.stat:hover { border-color: rgba(232, 16, 46, 0.35); transform: translateY(-3px); }

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--red);
  line-height: 1.1;
  display: block;
  margin-bottom: 6px;
}

.stat-label { font-size: 13.5px; color: var(--muted); line-height: 1.4; display: block; }

.about-skills { display: flex; flex-wrap: wrap; gap: 10px; }

.skill-chip {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--red-wash);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.skill-chip:hover { border-color: var(--red); color: var(--red); }

/* ---------- Контакты: красная панель ---------- */

.contacts-panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(120% 160% at 85% -20%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(150deg, var(--red) 0%, var(--red-dark) 100%);
  border-radius: 36px;
  padding: clamp(60px, 8vw, 100px) clamp(24px, 5vw, 80px);
  box-shadow: 0 30px 70px rgba(232, 16, 46, 0.22);
}

/* большая полупрозрачная звезда в углу панели */
.contacts-panel::after {
  content: '✳';
  position: absolute;
  top: -50px;
  right: 10px;
  font-size: 210px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

.contacts-panel .section-kicker { color: rgba(255, 255, 255, 0.72); }

.contacts-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4.2vw, 52px);
  line-height: 1.12;
  color: #fff;
  max-width: 820px;
  margin: 0 auto 20px;
}
.contacts-title .accent { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 6px; }

.contacts-text {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin: 0 auto 42px;
}

.contacts-email {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 3vw, 36px);
  color: #fff;
  word-break: break-word;
  border-bottom: 3px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 6px;
  transition: border-color 0.25s ease;
  margin-bottom: 42px;
}
.contacts-email:hover { border-color: #fff; }

.contacts-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; position: relative; z-index: 1; }

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.contact-link:hover {
  background: #fff;
  border-color: #fff;
  color: var(--red);
}
.contact-link::after { content: '↗'; font-size: 14px; }

/* ---------- Футер ---------- */

.footer { border-top: 1px solid var(--line); padding: 26px 0; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-admin { opacity: 0.55; transition: opacity 0.2s ease, color 0.2s ease; }
.footer-admin:hover { opacity: 1; color: var(--red); }

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

/* Планшеты: фото остаётся рядом с текстом, но компактнее */
@media (min-width: 761px) and (max-width: 960px) {
  .about-grid { grid-template-columns: 210px 1fr; gap: 40px; }
  .about-photo { top: 96px; }
  .photo-frame { border-radius: 18px; }
  .photo-frame .monogram { font-size: 92px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .projects-carousel.static .projects-track { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { position: static; max-width: 340px; }
  .about-stats { grid-template-columns: 1fr; gap: 14px; }
  .section { padding-top: 90px; }
  .hero { padding-top: 150px; min-height: 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .contacts-panel { border-radius: 24px; }
  .contacts-panel::after { font-size: 140px; top: -34px; }
  .process-grid { grid-template-columns: 1fr; gap: 22px; }
  .service-row { grid-template-columns: 44px 1fr; padding: 26px 8px; }
  .service-note { grid-column: 2; text-align: left; max-width: none; }
}

/* ---------- Спокойный режим (prefers-reduced-motion) ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-kicker .dot { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
