* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
li {
  margin: 0;
  padding: 0;
}

body {
  background-color: #3d2314;
  color: #682b08;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}

/* Root */

#root {
  display: flex;
  flex-direction: column;
  width: min(100%, 1500px);
  margin: 0 auto;
  min-height: 100vh;
  background-color: #e7c69e;
  overflow: hidden;
}

/* Header */

.header {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  width: 100%;
  height: 300px;

  background-image: url("../assets/слоистые торты.png");
  background-size: cover;
  background-position: 103%;

  z-index: 2;
}

/* Navigation */

.navigation {
  display: flex;
  justify-content: flex-start;
  gap: 200px;

  width: 100%;
  height: 50px;
  padding-top: 8px;
  padding-left: 100px;

  background-color: #e7c69e;
  border-top: 1px solid #682b08;
  border-bottom: 1px solid #682b08;

  font-size: 30px;
}

.navigation a {
  color: #682b08;
  text-decoration: none;
  transition: all 0.3s ease;

  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}

.navigation a:hover {
  display: inline-block;
  transform: scale(1.5);
  text-shadow: 2px 2px 10px white;
}

/* Main */

.main {
  display: block;
  width: 100%;
  border-bottom: 2px solid #682b08;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 24px 20px 0;
}

/* Chef photo */

.chef-photo {
  position: static;
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;

  background-position: center;
  background-size: cover;

  border: 1px solid #682b08;
  box-shadow: 5px 5px 20px 1px #682b08;
}

/* About image */

.about-image {
  position: static;
  left: auto;
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin-top: 0;

  background-color: #e7c69e;
  background-position: center;
  background-size: cover;

  border: 1px solid #682b08;
  box-shadow: 5px 5px 20px 1px #682b08;

  font-size: 30px;
}

/* Cake image */

.cake-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 0;

  border-bottom: 2px solid #682b08;
}

/* Footer */

.footer {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;

  height: 200px;
  padding: 20px;
  padding-top: 50px;

  background-color: #e7c69e;
  border-top: 1px solid #682b08;

  color: #682b08;
  font-size: 25px;

  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}

/* Footer logo */

.footer-logo {
  display: flex;

  width: 200px;
  height: 80px;
  margin: 30px;

  background-image: url("../assets/name-footer.png");
  background-position: center;
  background-size: cover;
}

/* Contact section */

.contact-info {
  margin: 50px;
}

@media (max-width: 768px) {
  #root {
    min-height: 100vh;
    flex-wrap: nowrap;
  }

  .header {
    height: 150px;
    min-height: 150px;

    background-image: url("../assets/name-footer.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e7c69e;
  }

  .navigation {
    height: auto;
    min-height: auto;

    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;

    padding: 12px 16px;

    font-size: 18px;
    text-align: center;
  }

  .navigation a:hover {
    transform: scale(1.05);
  }

  .main {
    display: block;
    flex: none;
    width: 100%;
  }

  .hero {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;

    padding: 24px 12px 0;
  }

  .chef-photo {
    position: static;

    width: 100%;
    max-width: 420px;

    order: 1;
  }

  .about-image {
    position: static;
    left: auto;

    width: 100%;
    max-width: 420px;
    height: auto;

    margin-top: 0;

    order: 2;
  }

  .cake-image {
    width: 100%;
    max-width: 420px;

    order: 3;
  }

  .footer {
    height: auto;
    min-height: auto;

    flex-direction: column;
    align-items: center;
    gap: 16px;

    padding: 24px 16px;

    font-size: 18px;
    text-align: center;
  }

  .footer-logo {
    width: 180px;
    height: 72px;
    margin: 10px auto;
  }

  .contact-info {
    margin: 0;
  }
}

@media (min-width: 1369px) {
  #root {
    position: relative;
  }

  .header {
    margin-bottom: 0;
  }

  .navigation {
    position: relative;
    z-index: 1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: clamp(80px, 12vw, 100px);
    height: 50px;
    margin-top: 0;
    padding-top: 8px;
    padding-left: 150px;
    padding-right: 515px;
  }

  .main {
    overflow-x: hidden;
  }

  .hero {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
  }

  .chef-photo {
    position: absolute;
    top: 330px;
    right: 0px;
    left: auto;
    width: 580px;
    max-width: calc(100% - 40px);
    height: auto;
    z-index: 10;
    box-shadow: 6px 8px 24px 2px rgba(104, 43, 8, 0.45);
  }

  .about-image {
    position: absolute;
    top: 675px;
    left: 20px;
    width: calc(100% - 535px);
    max-width: calc(100% - 535px);
    height: auto;
    margin-top: 0;
    z-index: 2;
    box-shadow: 6px 8px 24px 2px rgba(104, 43, 8, 0.4);
  }

  .cake-image {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-top: calc(300px + (100% - 535px) * 0.625 + 100px);
    z-index: 1;
  }

  .footer {
    position: relative;
    z-index: 2;
    height: auto;
    min-height: auto;
    flex-wrap: wrap;
    padding: 32px 24px;
  }

  .contact-info {
    margin: 24px;
  }
}

@media (min-width: 769px) and (max-width: 1368px) and (min-height: 601px) {
  #root {
    min-height: 100vh;
  }

  .header {
    height: 220px;
    min-height: 220px;
    background-size: cover;
    background-position: center;
  }

  .navigation {
    justify-content: center;
    gap: clamp(32px, 6vw, 120px);
    height: auto;
    min-height: 50px;
    padding: 10px 32px;
    padding-left: 32px;
    font-size: 24px;
  }

  .navigation a:hover {
    transform: scale(1.1);
  }

  .main {
    display: block;
    width: 100%;
    overflow-x: hidden;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    width: 100%;
    padding: 24px 20px 0;
  }

  .chef-photo {
    position: static;
    width: 100%;
    max-width: 640px;
    order: 1;
  }

  .about-image {
    position: static;
    left: auto;
    width: 100%;
    max-width: 760px;
    height: auto;
    margin-top: 0;
    order: 2;
  }

  .cake-image {
    width: 100%;
    max-width: 1000px;
    order: 3;
  }

  .footer {
    height: auto;
    min-height: auto;
    flex-wrap: wrap;
    padding: 32px 24px;
    font-size: 22px;
  }

  .contact-info {
    margin: 24px;
  }
}

@media (max-width: 950px) and (max-height: 500px) {
  #root {
    min-height: 100vh;
    flex-wrap: nowrap;
  }

  .header {
    height: 110px;
    min-height: 110px;

    background-image: url("../assets/name-footer.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e7c69e;
  }

  .navigation {
    height: auto;

    justify-content: center;
    gap: 40px;

    padding: 10px 16px;

    font-size: 20px;
  }

  .main {
    display: block;
    width: 100%;
  }

  .hero {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;

    padding: 24px 16px 0;
  }

  .chef-photo {
    position: static;

    width: 100%;
    max-width: 620px;

    order: 1;
  }

  .about-image {
    position: static;
    left: auto;

    width: 100%;
    max-width: 620px;
    height: auto;

    margin-top: 0;

    order: 2;
  }

  .cake-image {
    width: 100%;
    max-width: 620px;

    order: 3;
  }

  .footer {
    height: auto;

    flex-direction: column;
    align-items: center;
    gap: 12px;

    padding: 20px 16px;

    font-size: 20px;
    text-align: center;
  }

  .footer-logo {
    margin: 10px auto;
  }

  .contact-info {
    margin: 0;
  }
}

