/* --- 1. VARIABLES & BASICS --- */
:root {
  --simpsons-yellow: #FFD90F;
  --simpsons-sky: #55ACEE;
  --simpsons-red: #F14E28;
  --simpsons-pink: #F26DA1;
  --simpsons-black: #000000;
  --simpsons-white: #FFFFFF;
}

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

button,
input,
textarea {
  -moz-appearance: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

button:focus {
  box-shadow: none !important;
}

*:focus {
  outline: none;
}

body {
  /* Заменили Montserrat на рукописный шрифт Барта */
  font-family: 'Gloria Hallelujah', cursive; 
  font-weight: 400;
  color: var(--simpsons-black);
  background-color: var(--simpsons-yellow); /* Желтый фон */
}

/* Заголовки делаем шрифтом комиксов */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bangers', cursive;
  letter-spacing: 1px;
}

a {
  display: inline-block;
  font: inherit;
  color: inherit;
  transition: 300ms;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  max-height: 100%;
}

a img {
  border: none;
  outline: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- 2. LAYOUT & CONTAINER (ORIGINAL LOGIC) --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
}

@media screen and (max-width: 1200px) {
  .container {
    width: 970px;
  }
}

@media screen and (max-width: 991px) {
  .container {
    width: 750px;
  }
}

@media screen and (max-width: 767px) {
  .container {
    width: 100%;
    padding: 0 15px;
  }
}

.wrapper {
  background: var(--simpsons-yellow);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

/* --- 3. HEADER --- */
.header {
  position: relative;
  padding: 20px 0;
  background: var(--simpsons-sky); /* Небо Симпсонов */
  border-bottom: 4px solid var(--simpsons-black); /* Жирная обводка */
  box-shadow: 0 4px 0 rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

@media only screen and (max-width: 767px) {
  .header {
    padding: 20px 0 60px 0;
  }
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  position: absolute;
  left: 50%;
  transform: translate(-50%, 0);
  top: 10px;
  z-index: 10;
  /* Тень для лого, чтобы не сливался */
  filter: drop-shadow(3px 3px 0 #000);
}

@media only screen and (max-width: 767px) {
  .header__logo {
    top: 50px;
    width: 50px;
  }
}

.header__social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media only screen and (max-width: 767px) {
  .header__social {
    justify-content: center;
  }
}

.header__social li {
  margin-right: 15px;
}

.header__social li:last-child {
  margin-right: 0;
}

.header__social li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  transition: 0.2s;
}

.header__social li a:hover {
  transform: scale(1.2) rotate(-10deg); /* Веселый эффект при наведении */
}

/* --- 4. SHOWCASE (HERO SECTION) --- */
.showcase {
  padding-bottom: 40px;
}

.showcase__content {
  position: relative;
  margin-bottom: 40px;
}

@media only screen and (max-width: 767px) {
  .showcase__content {
    margin-bottom: 30px;
  }
}

/* Стилизация текста под комикс */
.showcase__info {
  font-size: 18px;
  line-height: 26px;
  max-width: 750px;
  color: var(--simpsons-black);
  background: var(--simpsons-white);
  border: 3px solid var(--simpsons-black);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.8);
}

/* Доп класс для пузырей речи, если понадобится в HTML */
.comic-bubble {
  background: var(--simpsons-white);
  border: 3px solid var(--simpsons-black);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 5px 5px 0px rgba(0,0,0,0.8);
}

@media only screen and (max-width: 991px) {
  .showcase__info {
    font-size: 14px;
    line-height: 22px;
    max-width: 100%;
  }
}

.showcase__image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--simpsons-black);
  border-radius: 12px;
  background: #fff;
}

.showcase__image img {
  -webkit-animation-name: blink2;
  animation-name: blink2;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
  -webkit-animation-duration: 5s;
  animation-duration: 5s;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
}

@-webkit-keyframes blink2 {
  0% { transform: none; }
  50% { transform: scale(1.02); } /* Уменьшил масштаб, чтобы не было мыла */
  100% { transform: none; }
}

@keyframes blink2 {
  0% { transform: none; }
  50% { transform: scale(1.02); }
  100% { transform: none; }
}

.showcase__block {
  position: absolute;
  left: 0;
  bottom: 20px; /* Поднял чуть выше */
  opacity: 1; /* Убрал прозрачность для мультяшности */
  z-index: 5;
  padding: 24px;
  width: 380px;
  background: var(--simpsons-white);
  border: 4px solid var(--simpsons-black);
  box-shadow: 8px 8px 0 var(--simpsons-black);
  transform: rotate(-2deg); /* Легкий наклон */
}

@media only screen and (max-width: 991px) {
  .showcase__block {
    width: 340px;
    padding: 20px;
  }
}

@media only screen and (max-width: 767px) {
  .showcase__block {
    position: static;
    padding: 20px;
    width: 100%;
    transform: none;
    margin-top: -20px;
    margin-bottom: 20px;
  }
}

.showcase__title {
  font-family: 'Bangers', cursive;
  font-size: 32px;
  line-height: 36px;
  margin-bottom: 20px;
  color: var(--simpsons-red);
  text-shadow: 2px 2px 0 var(--simpsons-black);
  text-transform: uppercase;
  font-style: normal; /* Убрал italic, шрифт Bangers и так наклонный */
}

@media only screen and (max-width: 991px) {
  .showcase__title {
    font-size: 26px;
    line-height: 28px;
    margin-bottom: 20px;
  }
}

@media only screen and (max-width: 767px) {
  .showcase__title {
    margin: 0 auto 20px auto;
    text-align: center;
  }
}

.showcase__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 55px;
  background: var(--simpsons-pink); /* Розовый пончик */
  font-size: 24px;
  font-family: 'Bangers', cursive;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  transition: 300ms;
  border-radius: 6px;
  border: 3px solid var(--simpsons-black);
  box-shadow: 4px 4px 0 var(--simpsons-black);
  position: relative;
}

@media only screen and (max-width: 991px) {
  .showcase__btn {
    width: 100%;
  }
}

@media only screen and (max-width: 767px) {
  .showcase__btn {
    margin: 0 auto;
    width: 100%;
    height: 50px;
  }
}

.showcase__btn:hover {
  background: #ff8ebd;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--simpsons-black);
}

/* Убираем старую белую линию под кнопкой */
.showcase__btn::before {
  display: none;
}

.showcase__inner {
  position: relative;
}

.showcase__scroll {
  position: absolute;
  transform: rotate(-90deg);
  top: 75px;
  right: -60px;
  font-family: 'Bangers', cursive;
  font-size: 18px;
  color: var(--simpsons-black);
  -webkit-animation-name: blink;
  animation-name: blink;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
  -webkit-animation-duration: 2s;
  animation-duration: 2s;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
}

@media only screen and (max-width: 767px) {
  .showcase__scroll {
    display: none; /* На мобилках часто мешает */
  }
}

@-webkit-keyframes blink {
  50% { opacity: 0; }
}

@keyframes blink {
  50% { opacity: 0; }
}

.showcase__scroll span {
  margin-right: 6px;
  font-size: 24px;
}

/* --- 5. FOOTER --- */
.footer {
  padding: 40px 80px;
  border-top: 4px solid var(--simpsons-black);
  background: var(--simpsons-sky);
  color: #fff;
}

@media only screen and (max-width: 1300px) {
  .footer {
    padding: 30px 20px;
  }
}

@media only screen and (max-width: 991px) {
  .footer {
    padding: 20px;
  }
}

.footer__items {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

@media only screen and (max-width: 767px) {
  .footer__items {
    grid-template-columns: 1fr;
    row-gap: 15px;
  }
}

.footer__info {
  max-width: 500px;
  font-size: 14px;
  line-height: 22px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000;
}

@media only screen and (max-width: 991px) {
  .footer__info {
    font-size: 12px;
    line-height: 18px;
  }
}

@media only screen and (max-width: 767px) {
  .footer__info {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
  }
}

.footer__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  margin: 0 auto;
  filter: drop-shadow(2px 2px 0 #000);
}

.footer__social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media only screen and (max-width: 767px) {
  .footer__social {
    justify-content: center;
  }
}

.footer__social li {
  margin-right: 15px;
}

.footer__social li:last-child {
  margin-right: 0;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
}

.footer__social a:hover {
  transform: scale(1.2);
}

.footer__contract {
  display: block;
  text-align: center;
  margin-top: 30px;
  font-family: 'Bangers', cursive;
  font-size: 22px;
  color: var(--simpsons-yellow);
  text-shadow: 2px 2px 0 #000;
  text-decoration: none;
}

/* --- 6. SECOND ITEM & WELCOME --- */
#item-second {
  display: none;
}

#item-second .showcase__content {
  margin-bottom: 0;
}

.header-second {
  padding: 20px 0;
  background: var(--simpsons-sky);
  border-bottom: 4px solid #000;
}

@media only screen and (max-width: 639px) {
  .header-second {
    padding: 10px 0;
  }
}

.header-second__items {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-second__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  filter: drop-shadow(2px 2px 0 #000);
}

.welcome {
  margin-bottom: 60px;
}

@media only screen and (max-width: 991px) {
  .welcome {
    margin-bottom: 40px;
  }
}

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

@media only screen and (max-width: 991px) {
  .welcome__items {
    display: block;
  }
}

.welcome__title {
  font-family: 'Bangers', cursive;
  font-size: 42px;
  line-height: 44px;
  color: var(--simpsons-sky);
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 20px;
  font-style: normal;
}

@media only screen and (max-width: 639px) {
  .welcome__title {
    font-size: 32px;
    line-height: 36px;
    margin-bottom: 15px;
  }
}

.welcome__info {
  font-size: 16px;
  line-height: 24px;
  /* Стиль комикс-блока */
  background: #fff;
  border: 3px solid #000;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 5px 5px 0 #000;
}

@media only screen and (max-width: 639px) {
  .welcome__info {
    font-size: 14px;
    line-height: 22px;
  }
}

.welcome__blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 20px;
  min-width: 370px;
  width: 370px;
  margin-left: 80px; /* Чуть уменьшил отступ */
}

@media only screen and (max-width: 991px) {
  .welcome__blocks {
    min-width: auto;
    width: 100%;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin-top: 30px;
    margin-left: 0;
  }
}

@media only screen and (max-width: 639px) {
  .welcome__blocks {
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
    row-gap: 10px;
  }
}

.welcome__block {
  display: flex;
  align-items: center;
  overflow: hidden;
  justify-content: center;
  border-radius: 6px;
  border: 3px solid #000; /* Рамка для картинок */
  background: #fff;
  transition: 300ms;
}

.welcome__block:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 4px 4px 0 #000;
}

.welcome__block img {
  width: 100%;
  height: 100%;
  border-radius: 2px;
}

/* --- 7. ROADMAP --- */
.road {
  margin-bottom: 60px;
}

@media only screen and (max-width: 991px) {
  .road {
    margin-bottom: 40px;
  }
}

.road__banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 40px 30px 60px;
  background: var(--simpsons-red); /* Красный Барта */
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
  border-radius: 10px;
}

@media only screen and (max-width: 991px) {
  .road__banner {
    padding: 20px;
  }
}

@media only screen and (max-width: 767px) {
  .road__banner {
    display: block;
  }
}

.road__banner-title {
  font-family: 'Bangers', cursive;
  font-size: 36px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

@media only screen and (max-width: 767px) {
  .road__banner-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 15px;
  }
}

.road__banner-item {
  display: flex;
  align-items: center;
}

@media only screen and (max-width: 767px) {
  .road__banner-item {
    display: block;
  }
}

.road__banner-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 185px;
  height: 65px;
  border-radius: 6px;
  background: var(--simpsons-sky);
  border: 3px solid #000;
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 22px;
  text-align: center;
  min-width: 185px;
  margin-left: 30px;
  box-shadow: 3px 3px 0 #000;
  text-shadow: 1px 1px 0 #000;
}

@media only screen and (max-width: 767px) {
  .road__banner-btn {
    width: 100%;
    min-width: auto;
    margin: 15px 0 0 0;
  }
}

.road__banner-btn:hover {
  background: #fff;
  color: #000;
  text-shadow: none;
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

.road__banner-info {
  max-width: 400px;
  font-size: 18px;
  line-height: 26px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

@media only screen and (max-width: 991px) {
  .road__banner-info {
    font-size: 14px;
    line-height: 20px;
    max-width: 250px;
  }
}

@media only screen and (max-width: 767px) {
  .road__banner-info {
    text-align: center;
    max-width: 100%;
  }
}

.road__header {
  margin: 60px 0 30px 0;
  font-family: 'Bangers', cursive;
  font-size: 40px;
  color: var(--simpsons-sky);
  text-shadow: 3px 3px 0 #000;
  text-align: center;
}

@media only screen and (max-width: 767px) {
  .road__header {
    font-size: 30px;
    margin-top: 40px;
  }
}

.road__items {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 4px dashed #000; /* Пунктирная линия пути */
}

@media only screen and (max-width: 767px) {
  .road__items {
    padding-top: 15px;
    margin-bottom: 15px;
  }
}

.road__number {
  white-space: nowrap;
  font-family: 'Bangers', cursive;
  font-size: 32px;
  color: var(--simpsons-red);
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: center;
}

.road__number::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: #000;
  display: block;
  margin-right: 10px;
}

.road__item {
  margin-bottom: 20px;
  opacity: 0;
  transform: translateX(-50px);
  transition: 1000ms;
}

.road__item.element-show {
  opacity: 1;
  transform: none;
}

.road__item:nth-child(2n) {
  transform: translateX(50px);
}

.road__item:nth-child(2n).element-show {
  opacity: 1;
  transform: none;
}

.road__item:nth-child(2n) .road__number {
  justify-content: flex-end;
}

.road__item:nth-child(2n) .road__number::before {
  display: none;
}

.road__item:nth-child(2n) .road__number::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: #000;
  display: block;
  margin-left: 10px;
}

.road__item:last-child {
  margin-bottom: 0;
}

.road__text {
  padding: 20px;
  background: #fff; /* Белые карточки */
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 5px 5px 0 #000;
  font-size: 16px;
  line-height: 24px;
  color: #000;
}

@media only screen and (max-width: 767px) {
  .road__text {
    font-size: 16px;
    line-height: 22px;
    padding: 20px 16px;
  }
}

/* --- 8. TEAM --- */
.team {
  margin-bottom: 60px;
}

@media only screen and (max-width: 991px) {
  .team {
    margin-bottom: 40px;
  }
}

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

@media only screen and (max-width: 991px) {
  .team__items {
    display: block;
  }
}

.team__blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 20px;
  min-width: 370px;
  width: 370px;
  margin-left: 120px;
}

@media only screen and (max-width: 1200px) {
  .team__blocks {
    margin-left: 60px;
  }
}

@media only screen and (max-width: 991px) {
  .team__blocks {
    min-width: auto;
    width: 100%;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin-top: 20px;
    margin-left: 0;
  }
}

@media only screen and (max-width: 639px) {
  .team__blocks {
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
    row-gap: 10px;
  }
}

.team__block {
  display: flex;
  align-items: center;
  overflow: hidden;
  justify-content: center;
  border-radius: 6px;
  border: 3px solid #000;
  background: #fff;
}

.team__block:hover img {
  transform: scale(1.1) rotate(-2deg);
}

.team__block img {
  width: 100%;
  height: 100%;
  transition: 300ms;
}

.team__title {
  font-family: 'Bangers', cursive;
  font-size: 40px;
  color: var(--simpsons-sky);
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 20px;
}

@media only screen and (max-width: 767px) {
  .team__title {
    font-size: 30px;
  }
}

.team__info {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 15px;
  /* Стили пузыря */
  background: #fff;
  border: 3px solid #000;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 5px 5px 0 #000;
}

@media only screen and (max-width: 767px) {
  .team__info {
    font-size: 14px;
    line-height: 22px;
  }
}

/* Контейнер для профилей, если нужно обернуть их (как в прошлом ответе) */
.team__profile-list {
  background: #fff;
  border: 3px solid #000;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 5px 5px 0 #000;
  margin-top: 20px;
}

.team__profile {
  margin-top: 15px;
  font-size: 16px;
  border-bottom: 2px dashed #ccc;
  padding-bottom: 10px;
}

.team__profile:last-child {
  border-bottom: none;
}

@media only screen and (max-width: 767px) {
  .team__profile {
    font-size: 14px;
    line-height: 22px;
    margin-top: 15px;
  }
}

.team__profile span {
  color: var(--simpsons-red);
  font-family: 'Bangers', cursive;
  font-size: 20px;
  letter-spacing: 1px;
  display: block;
}