/* Десятый блок: Telegram как витрина мышления, а не ссылка в футере. */

.telegram {
  --telegram-gutter: clamp(16px, 1.4vw, 24px);
  --telegram-columns: repeat(4, minmax(0, 1fr));
  --telegram-pad: clamp(16px, 2vw, 30px);

  position: relative;
  padding: 0 var(--telegram-gutter);
  overflow: clip;
  background: #fff;
  color: var(--color-bg);
}

.telegram__grid-lines {
  position: absolute;
  inset: 0 var(--telegram-gutter);
  display: grid;
  grid-template-columns: var(--telegram-columns);
  pointer-events: none;
}

.telegram__grid-lines span {
  border-left: 1px solid var(--color-light-grid);
}

.telegram__grid-lines span:first-child {
  border-left: 0;
}

.telegram__inner {
  position: relative;
  z-index: 1;
}

.telegram__head {
  display: grid;
  grid-template-columns: var(--telegram-columns);
  grid-template-rows: auto 1fr auto;
  min-height: clamp(660px, 92svh, 900px);
}

.telegram__label {
  grid-column: 1;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: clamp(24px, 3vw, 42px);
  padding-right: clamp(12px, 1.4vw, 20px);
  font-size: 12px;
  line-height: 1;
}

.telegram__label-num,
.telegram__label-name {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

.telegram__label-num {
  min-width: 46px;
  padding-inline: 12px;
  background: var(--color-red);
  color: #fff;
}

.telegram__label-name {
  padding-inline: 12px;
  border: 1px solid var(--color-bg);
  background: #fff;
}

.telegram__title {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  padding-bottom: clamp(24px, 3vw, 42px);
  font-family: "NAMU Display", Arial, sans-serif;
  font-size: clamp(58px, 8.7vw, 150px);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.telegram__title span {
  display: block;
}

.telegram__title span:nth-child(2) {
  margin-left: 25%;
}

.telegram__title span:last-child {
  margin-left: calc(50% + var(--telegram-pad));
  color: var(--color-red);
  text-align: left;
}

.telegram__intro {
  grid-column: 3 / 5;
  grid-row: 3;
  max-width: 48ch;
  padding: 0 var(--telegram-pad) clamp(44px, 5vw, 72px);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.32;
  letter-spacing: -0.018em;
  color: rgba(2, 10, 10, 0.64);
}

.telegram__posts {
  position: relative;
  margin-inline: calc(-1 * var(--telegram-gutter));
}

.telegram__posts::before,
.telegram-post::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--color-light-grid);
  pointer-events: none;
}

.telegram__posts::before {
  z-index: 2;
  top: 0;
}

.telegram-post {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--telegram-gutter) repeat(4, minmax(0, 1fr)) var(--telegram-gutter);
  min-height: clamp(140px, 12vw, 180px);
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.telegram-post::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: transparent;
  transition: background-color 180ms ease;
}

.telegram-post::after {
  bottom: 0;
}

.telegram-post:hover::before {
  background: #f5f5f5;
}

.telegram-post:focus {
  outline: none;
}

.telegram-post:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: -2px;
}

.telegram-post__tag,
.telegram-post h3,
.telegram-post__action {
  box-sizing: border-box;
  margin: 0;
  padding: var(--telegram-pad);
}

.telegram-post__tag {
  grid-column: 1 / 3;
  align-self: start;
  width: fit-content;
  margin: var(--telegram-pad);
  padding: 8px 12px;
  border: 1px solid rgba(2, 10, 10, 0.28);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.telegram-post h3 {
  grid-column: 3 / 5;
  border-left: 1px solid var(--color-light-grid);
  font-family: "NAMU Display", Arial, sans-serif;
  font-size: clamp(28px, 2.8vw, 44px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.telegram-post:hover h3 {
  color: var(--color-red);
}

.telegram-post__action {
  grid-column: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  border-left: 1px solid var(--color-light-grid);
  font-size: clamp(14px, 1.1vw, 16px);
}

.telegram-post__action span {
  font-family: "NAMU Display", Arial, sans-serif;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1;
  transition: transform 180ms ease;
}

.telegram-post:hover .telegram-post__action span {
  transform: translate(4px, -4px);
}

.telegram__cta {
  display: grid;
  grid-template-columns: var(--telegram-gutter) repeat(4, minmax(0, 1fr)) var(--telegram-gutter);
  min-height: clamp(220px, 20vw, 310px);
  align-items: center;
  margin-inline: calc(-1 * var(--telegram-gutter));
  margin-bottom: clamp(80px, 9vw, 140px);
  background: var(--color-red);
  color: #fff;
  text-decoration: none;
}

.telegram__cta > span:first-child {
  grid-column: 1 / 5;
  padding: var(--telegram-pad);
  font-family: "NAMU Display", Arial, sans-serif;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.telegram__cta-icon {
  grid-column: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  font-family: "NAMU Display", Arial, sans-serif;
  font-size: clamp(58px, 6vw, 92px);
}

.telegram__cta-icon > span {
  display: block;
  transition: transform 180ms ease;
}

.telegram__cta:hover .telegram__cta-icon > span {
  transform: translate(7px, -7px);
}

.telegram__cta:focus {
  outline: none;
}

.telegram__cta:focus-visible {
  outline: 2px solid var(--color-bg);
  outline-offset: -5px;
}

@media (max-width: 900px) {
  .telegram {
    --telegram-columns: repeat(2, minmax(0, 1fr));
  }

  .telegram__grid-lines span:nth-child(n + 3) {
    display: none;
  }

  .telegram__head {
    min-height: clamp(420px, 56svh, 540px);
  }

  .telegram__title {
    font-size: clamp(48px, 9vw, 72px);
    line-height: 0.88;
  }

  .telegram__title span:nth-child(2) {
    margin-left: 10%;
  }

  .telegram__title span:last-child {
    margin-left: 0;
  }

  .telegram__intro {
    grid-column: 1 / -1;
    padding-left: 0;
    padding-bottom: clamp(32px, 5vw, 48px);
  }

  .telegram-post {
    grid-template-columns: var(--telegram-gutter) repeat(2, minmax(0, 1fr)) var(--telegram-gutter);
    grid-template-rows: auto 1fr;
    min-height: 200px;
  }

  .telegram-post__tag {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .telegram-post h3 {
    grid-column: 1 / -1;
    grid-row: 2;
    border-left: 0;
  }

  .telegram-post__action {
    grid-column: 3 / 5;
    grid-row: 1;
    align-self: stretch;
  }

  .telegram__cta {
    grid-template-columns: var(--telegram-gutter) repeat(2, minmax(0, 1fr)) var(--telegram-gutter);
  }

  .telegram__cta > span:first-child {
    grid-column: 1 / 3;
  }

  .telegram__cta-icon {
    grid-column: 3 / 5;
  }
}

@media (max-width: 560px) {
  .telegram__head {
    min-height: 420px;
  }

  .telegram__label {
    grid-column: 1 / -1;
  }

  .telegram__title {
    font-size: clamp(38px, 10vw, 48px);
    line-height: 0.9;
  }

  .telegram__intro {
    padding-right: 32px;
    padding-bottom: 48px;
    font-size: 16px;
  }

  .telegram-post {
    min-height: 220px;
    align-items: start;
  }

  .telegram-post__tag {
    margin: 24px 16px 0;
  }

  .telegram-post h3 {
    padding: 30px 32px 40px 16px;
    font-size: clamp(24px, 6.6vw, 28px);
    line-height: 1.02;
    letter-spacing: -0.025em;
  }

  .telegram-post__action {
    padding: 24px 32px 0 16px;
    font-size: 13px;
  }

  .telegram__cta {
    min-height: 170px;
    margin-top: 32px;
    margin-bottom: 88px;
  }

  .telegram__cta > span:first-child {
    padding: 18px 32px 18px 16px;
    font-size: clamp(29px, 8vw, 38px);
  }

  .telegram__cta-icon {
    font-size: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .telegram-post::before,
  .telegram-post h3,
  .telegram-post__action span,
  .telegram__cta-icon > span {
    transition: none;
  }
}
