* {
  box-sizing: border-box;
}

:root {
  --bg: #f4efe7;
  --dark: #171512;
  --dark-soft: #25211c;
  --accent: #d79045;
  --accent-hover: #efaa60;
  --text: #28231e;
  --muted: #70675e;
  --white: #ffffff;
  --line: rgba(40, 35, 30, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

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

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.header {
  position: absolute;
  z-index: 10;
  top: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.header__inner,
.footer__inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a,
.header__phone {
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover,
.header__phone:hover {
  color: var(--accent-hover);
}

.menu-button {
  display: none;
  background: none;
  border: 0;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

.hero {
    position: relative;
    min-height: 790px;
    display: grid;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center 42%;

    z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 8, 0.92) 0%, rgba(12, 10, 8, 0.68) 48%, rgba(12, 10, 8, 0.18) 100%),
    linear-gradient(0deg, rgba(12, 10, 8, 0.42), transparent 45%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: 90px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: #a65f24;
}

h1,
h2 {
  font-family: "Playfair Display", serif;
  line-height: 1.02;
  letter-spacing: -1.6px;
}

h1 {
  max-width: 750px;
  margin: 0;
  font-size: clamp(68px, 9vw, 100px);
}

h2 {
  margin: 0 0 30px;
  font-size: clamp(42px, 5vw, 68px);
}

.hero__text {
  max-width: 590px;
  margin: 32px 0 38px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.button {
  min-height: 64px;
  padding: 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.button--primary {
  color: var(--dark);
  background: var(--accent);
}

.button--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.button--ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.advantages {
  color: var(--white);
  background: var(--dark);
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.advantages article {
  min-height: 245px;
  padding: 48px 42px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.advantages article:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.advantages strong {
  color: var(--accent);
  font-size: 13px;
}

.advantages h3 {
  margin: 22px 0 10px;
  font-size: 23px;
}

.advantages p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

.section {
  padding: 120px 0;
}

.teacher__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 90px;
}

.teacher__content p {
  color: var(--muted);
}

.teacher__content .lead {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}

.check-list {
  padding: 0;
  margin: 32px 0;
  list-style: none;
}

.check-list li {
  padding: 11px 0 11px 30px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #a65f24;
}

.text-link {
  font-weight: 800;
  border-bottom: 1px solid currentColor;
}

.teacher__photo-wrap {
  position: relative;
}

.teacher__photo {
  width: 100%;
  height: 650px;
  object-fit: cover;
}

.teacher__badge {
  position: absolute;
  left: -42px;
  bottom: 42px;
  width: 150px;
  height: 150px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--dark);
  background: var(--accent);
}

.teacher__badge strong {
  font-family: "Playfair Display", serif;
  font-size: 60px;
  line-height: 1;
}

.teacher__badge span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery {
  overflow: hidden;
  background: #ece4d8;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: end;
  gap: 80px;
  margin-bottom: 55px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading > p {
  color: var(--muted);
}

.gallery__track {
  width: max-content;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery__track img {
  width: 360px;
  height: 470px;
  flex: 0 0 auto;
  object-fit: cover;
}

.reviews {
  color: var(--white);
  background: var(--dark-soft);
}

.reviews h2 {
  max-width: 750px;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 54px;
}

.review {
  min-height: 360px;
  padding: 38px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.review__stars {
  color: var(--accent);
  letter-spacing: 5px;
}

.review > p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
}

.review__author {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.review__author > span {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--dark);
  background: var(--accent);
  font-weight: 800;
}

.review__author small {
  display: block;
  color: rgba(255, 255, 255, 0.45);
}

.contacts {
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(12, 10, 8, 0.97), rgba(12, 10, 8, 0.82)),
    url("images/7dl58-jzt4b-phb25.png")
    center / cover no-repeat;
}

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 100px;
  align-items: start;
}

.contacts__content > p {
  max-width: 590px;
  color: rgba(255, 255, 255, 0.68);
}

.contacts__links {
  display: grid;
  gap: 10px;
  margin-top: 38px;
  font-size: 18px;
  font-weight: 700;
}

.contacts__links span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  font-weight: 500;
}

.contact-form {
  padding: 42px;
  color: var(--text);
  background: var(--bg);
}

.contact-form label {
  display: block;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 800;
}

.contact-form input,
.contact-form select {
  width: 100%;
  height: 52px;
  margin-top: 7px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.contact-form input:focus,
.contact-form select:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.button--wide {
  width: 100%;
}

.contact-form small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.footer {
  color: var(--white);
  background: #0d0c0a;
}

.footer__inner {
  min-height: 105px;
}

.footer p,
.footer__socials {
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
}

.footer__socials {
  display: flex;
  gap: 20px;
}

@media (max-width: 900px) {
  .nav,
  .header__phone {
    display: none;
  }

  .nav.nav--open {
    position: absolute;
    top: 82px;
    left: 20px;
    right: 20px;
    display: grid;
    gap: 0;
    padding: 14px 20px;
    color: var(--white);
    background: rgba(20, 17, 14, 0.98);
  }

  .nav.nav--open a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 720px;
  }

  .advantages__grid,
  .reviews__grid {
    grid-template-columns: 1fr;
  }

  .advantages article {
    min-height: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .teacher__grid,
  .contacts__grid {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .teacher__photo-wrap {
    order: -1;
  }

  .teacher__photo {
    height: 550px;
  }

  .teacher__badge {
    left: 20px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .header__inner {
    min-height: 70px;
  }

  .hero {
    min-height: 680px;
    background-position: 62% center;
  }

  .hero__content {
    padding-top: 80px;
  }

  h1 {
    font-size: clamp(38px, 11vw, 48px);
    line-height: 1;
    letter-spacing: -0.8px;
  }

  h2 {
    font-size: 42px;
  }

  .hero__text {
    font-size: 16px;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .hero__actions .button {
    width: 100%;
    min-width: 0;
    padding: 0 16px;
    font-size: 14px;
    text-align: center;
  }

  .section {
    padding: 82px 0;
  }

  .advantages article {
    padding: 34px 26px;
  }

  .teacher__photo {
    height: 430px;
  }

  .teacher__badge {
    width: 120px;
    height: 120px;
    bottom: 20px;
  }

  .teacher__badge strong {
    font-size: 39px;
  }

  .gallery__track img {
    width: 285px;
    height: 380px;
  }

  .review,
  .contact-form {
    padding: 28px;
  }

  .footer__inner {
    padding: 30px 0;
    flex-direction: column;
    gap: 12px;
  }
}


.gallery__viewport {
  width: 100%;
  overflow: hidden;
}

.gallery__track {
  width: max-content;
  padding: 0;
  display: flex;
  gap: 0;
  animation: gallery-scroll 34s linear infinite;
  will-change: transform;
}

.gallery__viewport:hover .gallery__track {
  animation-play-state: paused;
}

.gallery__group {
  display: flex;
  gap: 20px;
  padding-right: 20px;
}

.gallery__track img {
  width: 360px;
  height: 470px;
  flex: 0 0 auto;
  object-fit: cover;
}

@keyframes gallery-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.contacts__center {
  max-width: 1050px;
  text-align: center;
}

.contacts__intro {
  max-width: 720px;
  margin: 0 auto 52px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 19px;
}

.contacts__big-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.contact-card {
  min-height: 190px;
  padding: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  transition: 0.22s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: rgba(215, 144, 69, 0.12);
}

.contact-card__label {
  margin-bottom: 13px;
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.contact-card strong {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.1;
}

.contacts__place {
  margin: 36px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}

@media (prefers-reduced-motion: reduce) {
  .gallery__track {
    animation: none;
  }

  .gallery__viewport {
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  .contacts__big-links {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: 145px;
    padding: 28px 18px;
  }

  .gallery__track img {
    width: 285px;
    height: 380px;
  }

  .gallery__track {
    animation-duration: 25s;
  }
}

.gallery__slider {
  position: relative;
}

.gallery__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.gallery__viewport::-webkit-scrollbar {
  display: none;
}

.gallery__track {
  width: max-content;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  gap: 20px;
  animation: none !important;
  transform: none !important;
}

.gallery__track img {
  width: 360px;
  height: 470px;
  flex: 0 0 auto;
  object-fit: cover;
  scroll-snap-align: start;
}

.gallery__arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  font-size: 25px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.gallery__arrow:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.06);
}

.gallery__arrow--prev {
  left: max(12px, calc((100vw - 1260px) / 2));
}

.gallery__arrow--next {
  right: max(12px, calc((100vw - 1260px) / 2));
}

@media (max-width: 700px) {
  .gallery__track img {
    width: 285px;
    height: 380px;
  }

  .gallery__arrow {
    width: 48px;
    height: 48px;
    font-size: 21px;
  }
}


.learning {
  background: #ece4d8;
}

.learning__heading {
  margin-bottom: 55px;
}

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

.learning-card {
  overflow: hidden;
  background: #f8f4ed;
  border: 1px solid rgba(40, 35, 30, 0.09);
  box-shadow: 0 16px 40px rgba(40, 35, 30, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.learning-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(40, 35, 30, 0.12);
}

.learning-card img {
  width: 100%;
  height: 330px;
  object-fit: cover;
}

.learning-card__content {
  padding: 30px 30px 34px;
}

.learning-card__content > span {
  display: block;
  margin-bottom: 15px;
  color: #a65f24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

.learning-card h3 {
  min-height: 76px;
  margin: 0 0 15px;
  font-family: "Playfair Display", serif;
  font-size: 27px;
  line-height: 1.12;
}

.learning-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 900px) {
  .learning__grid {
    grid-template-columns: 1fr;
  }

  .learning-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
  }

  .learning-card img {
    height: 100%;
    min-height: 300px;
  }

  .learning-card h3 {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .learning-card {
    display: block;
  }

  .learning-card img {
    height: 260px;
    min-height: 0;
  }

  .learning-card__content {
    padding: 25px;
  }

  .learning-card h3 {
    font-size: 25px;
  }
}
