/* =========================================================
   1. ПАЛИТРА И БАЗОВЫЕ ПЕРЕМЕННЫЕ
========================================================= */
:root {
  --bg: #f3efe8;
  --paper: #fbf8f3;
  --paper-2: #f7f3ed;
  --ink: #1b2735;
  --ink-soft: #415061;
  --muted: #7a8794;
  --line: rgba(27, 39, 53, 0.10);
  --line-strong: rgba(27, 39, 53, 0.18);
  --accent: #6c7f73;
  --accent-soft: #e4e7de;
  --deep: #16212d;
  --deep-soft: #1f2d3b;
  --white: #ffffff;
  --shadow-soft: 0 10px 30px rgba(22, 33, 45, 0.04);
  --shadow-card: 0 18px 50px rgba(22, 33, 45, 0.06);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1240px;
}

/* =========================================================
   2. БАЗОВЫЙ СБРОС
========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #e7dfd2;
  color: var(--ink);
}

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

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

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

/* =========================================================
   3. ШАПКА
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 239, 232, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.site-header__row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
}

.brand__text {
  min-width: 0;
}

.brand__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
}

.brand__subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav a {
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
}

.nav a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.22s ease;
}

.nav a:not(.button):hover::after {
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.button--dark:hover {
  background: #223244;
  border-color: #223244;
}

.button--light:hover {
  background: rgba(27, 39, 53, 0.03);
  border-color: rgba(27, 39, 53, 0.25);
}

/* =========================================================
   4. ПЕРВЫЙ ЭКРАН
========================================================= */
.hero {
  padding: 76px 0 110px;
  border-bottom: 1px solid var(--line);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 72px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--line-strong);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.06em;
  max-width: 10.5ch;
}

.hero__lead {
  margin: 28px 0 0;
  max-width: 760px;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.hero__panel {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.hero__panel-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero__panel-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__panel-item {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero__panel-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.hero__panel-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.hero__panel-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* =========================================================
   5. ОБЩИЕ СЕКЦИИ
========================================================= */
section.section {
  padding: 110px 0;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 40px;
}

.section-head__left {
  max-width: 840px;
}

.section-kicker {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.section-text {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 720px;
}

.section-link {
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
  align-self: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* =========================================================
   6. ПОДХОД
========================================================= */
.expertise {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.expertise-card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.expertise-card:hover {
  transform: translateY(-3px);
  border-color: rgba(27, 39, 53, 0.18);
  background: rgba(255, 255, 255, 0.30);
}

.expertise-card__index {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.expertise-card__index::after {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  background: var(--line-strong);
  margin-top: 12px;
}

.expertise-card h3 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.expertise-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

/* =========================================================
   7. ПРОЕКТЫ
========================================================= */
.projects {
  background: var(--deep);
  color: var(--white);
}

.projects .section-kicker,
.projects .section-text,
.projects .section-link {
  color: rgba(235, 241, 248, 0.68);
}

.projects .section-title {
  color: var(--white);
}

.projects .section-link {
  border-color: rgba(255, 255, 255, 0.18);
}

.projects .section-link:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.project-feature,
.project-stack article {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 26px;
}

.project-feature {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.project-stack {
  display: grid;
  gap: 24px;
}

.project-stack article {
  padding: 26px;
}

.project-media {
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(0deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04)),
    #273444;
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.42);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0px;
  overflow: hidden;
}

.project-meta {
  color: rgba(235, 241, 248, 0.62);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.project-title {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--white);
}

.project-text {
  margin: 0;
  color: rgba(235, 241, 248, 0.76);
  font-size: 16px;
  line-height: 1.72;
  max-width: 62ch;
}

/* =========================================================
   8. НОВОСТИ И СОБЫТИЯ
========================================================= */
.news {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.news-list {
  display: grid;
  gap: 28px;
}

.news--flat {
  border-top: 0;
}

.project-stack .project-title {
  font-size: 24px;
}

.news-card {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.news-card__inner {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
  align-items: stretch;
}

.news-card__media {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08));
}

.news-card__body {
  padding: 30px 30px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-note {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.news-note:first-of-type {
  border-top: 1px solid var(--line);
}

.news-note__year {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  padding-top: 6px;
}

.news-note__content h3 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--ink);
  max-width: 42ch;
}

.news-note__content p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 70ch;
}

.news-date {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.news-content h3 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--ink);
}

.news-content p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.78;
  max-width: 70ch;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 14px;
}

.news-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
  color: var(--ink-soft);
  font-size: 13px;
}

/* =========================================================
   8b. ССЫЛКА «ЧИТАТЬ ДАЛЕЕ»
========================================================== */
.news-read-more {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.news-read-more:hover {
  color: var(--ink);
}

.news-card__cover {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.news-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.news-card__cover:hover img {
  transform: scale(1.03);
}

/* =========================================================
   8c. СТРАНИЦА ОТДЕЛЬНОЙ НОВОСТИ
========================================================== */
.post-nav {
  margin-bottom: 32px;
}

.post-nav__link {
  display: inline-block;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s;
}

.post-nav__link:hover {
  color: var(--ink);
}

.post {
  max-width: 800px;
}

.post__title {
  margin: 0 0 28px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--ink);
}

.post__meta {
  margin-bottom: 24px;
}

.post__gallery {
  margin-bottom: 36px;
}

.post__content {
  margin-top: 8px;
}

.post__content p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.8;
}

/* =========================================================
   9. ГАЛЕРЕЯ
========================================================= */
.gallery {
  position: relative;
}

.gallery__viewport {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #e8e0d4;
  touch-action: pan-y;
}

.gallery__track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}

.gallery__slide {
  min-width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  background: #ddd4c8;
  overflow: hidden;
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 4px 0;
}

.gallery__caption-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.gallery__count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.gallery__dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(27, 39, 53, 0.18);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.gallery__dot:hover {
  transform: scale(1.08);
}

.gallery__dot.is-active {
  background: var(--ink);
  transform: scale(1.2);
}

.gallery__arrows {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gallery__arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.gallery__arrow:hover {
  transform: translateY(-1px);
  background: var(--white);
  border-color: var(--line-strong);
}

.gallery__arrow:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

/* =========================================================
   10. КОМАНДА
========================================================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.person-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.person-card:hover {
  transform: translateY(-4px);
  border-color: rgba(27, 39, 53, 0.18);
  box-shadow: var(--shadow-card);
}

.person-card__photo {
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(0deg, rgba(27, 39, 53, 0.04), rgba(27, 39, 53, 0.04)),
    #e6ddd1;
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.person-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-card__body {
  padding: 20px 20px 22px;
}

.person-card__role {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.person-card__name {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.person-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.person-card__mail {
  display: inline-block;
  margin-top: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  font-size: 14px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.person-card__mail:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* =========================================================
   11. ПОДВАЛ
========================================================= */
.footer {
  background: var(--deep);
  color: rgba(235, 241, 248, 0.82);
  padding: 72px 0 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.footer-brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
}

.footer-brand__title {
  margin: 0;
  font-size: 18px;
  color: var(--white);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.footer-brand__subtitle {
  margin: 2px 0 0;
  color: rgba(235, 241, 248, 0.50);
  font-size: 12px;
}

.footer-text {
  margin: 0;
  max-width: 420px;
  color: rgba(235, 241, 248, 0.62);
  font-size: 15px;
  line-height: 1.75;
}

.footer-block h3 {
  margin: 0 0 18px;
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(235, 241, 248, 0.66);
  font-size: 15px;
  line-height: 1.7;
}

.footer-list a {
  color: rgba(235, 241, 248, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer-list a:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(235, 241, 248, 0.44);
  font-size: 13px;
}

/* =========================================================
   12. АДАПТИВ
========================================================= */
@media (max-width: 1150px) {
  .hero__grid,
  .projects-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-card__inner {
    grid-template-columns: 1fr;
  }

  .news-card__media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .site-header__row {
    min-height: auto;
    padding: 16px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 18px;
  }

  .expertise-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

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

  .news-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .news-note__year {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 32px));
  }

  .hero {
    padding: 54px 0 78px;
  }

  section.section {
    padding: 78px 0;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 64px);
  }

  .hero__lead,
  .section-text,
  .project-text,
  .news-content p,
  .news-note__content p {
    font-size: 16px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .brand__subtitle {
    display: none;
  }

  .project-title,
  .news-content h3,
  .news-note__content h3 {
    font-size: 24px;
  }

  .person-card__name {
    font-size: 22px;
  }

  .news-card__body,
  .news-card__media {
    padding: 22px;
  }

  .gallery__controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery__arrows {
    align-self: flex-end;
  }

  .post__title {
    font-size: 26px;
  }

  .post__content p {
    font-size: 16px;
  }
}
